#textdomain wesnoth-units
[unit]
    id=Death Knight
    name= _ "Death Knight"
    race=undead
    image="units/undead-skeletal/deathknight.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    [leading_anim]
        start_time=-150
        [frame]
            duration=100
            image="units/undead-skeletal/deathknight-defend-1.png"
        [/frame]
        [frame]
            duration=100
            image="units/undead-skeletal/deathknight-defend-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/undead-skeletal/deathknight-defend-1.png"
        [/frame]
    [/leading_anim]
    hitpoints=66
    movement_type=undeadfoot
    movement=5
    experience=150
    level=3
    alignment=chaotic
    advanceto=null
#ifdef ENABLE_DEATH_KNIGHT
    [advancefrom]
        unit=Revenant
        experience=85
    [/advancefrom]
#endif
    {AMLA_DEFAULT}
    cost=45
    usage=fighter
    unit_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]
    [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]
        [attack_filter]
            name=crossbow
        [/attack_filter]
        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]
        [attack_filter]
            name=battle axe
        [/attack_filter]
        [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]
