#textdomain wesnoth-units
[unit_type]
    id=Death Knight
    name= _ "Death Knight"
    race=undead
    image="units/undead-skeletal/deathknight.png"
    profile=portraits/undead/death-knight.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    {LEADING_ANIM "units/undead-skeletal/deathknight-lead-2.png" "units/undead-skeletal/deathknight-lead-1.png"}
    hitpoints=66
    movement_type=undeadfoot
    movement=5
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
#ifdef ENABLE_DEATH_KNIGHT
    [advancefrom]
        unit=Revenant
        experience=85
    [/advancefrom]
#endif
    {AMLA_DEFAULT}
    cost=45
    usage=fighter
    description= _ "Tales are told of the mightiest warriors and generals, who, cursed with hate and stung by betrayal, have come back to this world as Death Knights. Wielding the same weapons as in life, they command the Undead in their quest for revenge."+{SPECIAL_NOTES}+{SPECIAL_NOTES_LEADERSHIP}
    die_sound=lich-die.ogg
    [abilities]
        {ABILITY_LEADERSHIP_LEVEL_3}
    [/abilities]
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/undead/transparent/death-knight.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/undead/transparent/death-knight.png"
    [/portrait]
    [attack]
        name=battle axe
        description=_"battle axe"
        icon=attacks/battleaxe-undead.png
        type=blade
        range=melee
        damage=11
        number=4
    [/attack]
    [attack]
        name=crossbow
        description=_"crossbow"
        icon=attacks/crossbow-undead.png
        type=pierce
        range=ranged
        damage=6
        number=2
    [/attack]
    {DEFENSE_ANIM_RANGE "units/undead-skeletal/deathknight-defend-2.png" "units/undead-skeletal/deathknight-defend-1.png" {SOUND_LIST:SKELETON_BIG_HIT} melee}
    {DEFENSE_ANIM_RANGE "units/undead-skeletal/deathknight-crossbow-defend.png" "units/undead-skeletal/deathknight-crossbow.png" {SOUND_LIST:SKELETON_BIG_HIT} ranged}
    [attack_anim]
        [filter_attack]
            name=crossbow
        [/filter_attack]
        start_time=-400
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
        [frame]
            duration=100
            image="units/undead-skeletal/deathknight-crossbow.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=150
                image="units/undead-skeletal/deathknight-crossbow-attack1.png"
                sound=crossbow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=150
                image="units/undead-skeletal/deathknight-crossbow-attack1.png"
                sound=crossbow-miss.ogg
            [/frame]
        [/else]
        [frame]
            duration=150
            image="units/undead-skeletal/deathknight-crossbow-attack2.png"
        [/frame]
    [/attack_anim]

    [attack_anim]
        [filter_attack]
            name=battle axe
        [/filter_attack]
        [frame]
            begin=-300
            end=-250
            image="units/undead-skeletal/deathknight.png"
            offset=0.0~0.1
        [/frame]
        [frame]
            begin=-250
            end=-200
            image="units/undead-skeletal/deathknight-melee-attack-1.png"
            offset=0.1~0.15
        [/frame]
        [frame]
            begin=-200
            end=-100
            image="units/undead-skeletal/deathknight-melee-attack-2.png"
            offset=0.15~0.35
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=-25
                image="units/undead-skeletal/deathknight-melee-attack-3.png"
                sound=axe.ogg
                offset=0.35~0.45
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=-25
                image="units/undead-skeletal/deathknight-melee-attack-3.png"
                sound={SOUND_LIST:MISS}
                offset=0.35~0.45
            [/frame]
        [/else]
        [frame]
            begin=-25
            end=75
            image="units/undead-skeletal/deathknight-melee-attack-4.png"
            offset=0.45~0.5
        [/frame]
        [frame]
            begin=75
            end=95
            image="units/undead-skeletal/deathknight-melee-attack-5.png"
            offset=0.5
        [/frame]
        [frame]
            begin=95
            end=125
            image="units/undead-skeletal/deathknight-melee-attack-5.png"
            offset=0.5~0.4
        [/frame]
        [frame]
            begin=125
            end=200
            image="units/undead-skeletal/deathknight-melee-attack-6.png"
            offset=0.4~0.2
        [/frame]
        [frame]
            begin=150
            end=225
            image="units/undead-skeletal/deathknight.png"
            offset=0.2~0.0
        [/frame]
    [/attack_anim]
[/unit_type]
