#textdomain wesnoth-utbs
[unit_type]
    id=Desert Hero
    name= _ "Desert Hero"
    race=elf
    image=units/elves-desert/hero.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=48
    movement_type=woodland
    #desert elves move fast across the sands, but are not used to forests
    #they are also a bit faster in caves
    [movement_costs]
        sand=1
        forest=2
        cave=2
        frozen=3
    [/movement_costs]
    [defense]
        sand=40
        forest=50
    [/defense]
    movement=5
    experience=80
    level=2
    alignment=lawful
    advances_to=Desert Champion
    cost=40
    usage=fighter
    description= _ "Desert Heroes focus on individual performance on the battlefield, having tweaked their combat skills to the very maximum. Desert Heroes prefer fighting at close range with the sword, but also have some skill with the bow."
    die_sound={SOUND_LIST:ELF_HIT}
    # melee attack increased from 8-4 to 9-4
    # ranged attack decreased from 6-3 to 5-3
    [attack]
        name=sword
        description= _"sword"
        type=blade
        range=melee
        damage=9
        number=4
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        type=pierce
        range=ranged
        damage=5
        number=3
        icon=attacks/bow-elven.png
    [/attack]
    {DEFENSE_ANIM_RANGE "units/elves-desert/hero-defend.png" "units/elves-desert/hero.png" {SOUND_LIST:ELF_HIT} melee }
    {DEFENSE_ANIM_RANGE "units/elves-desert/hero-bow-defend.png" "units/elves-desert/hero-bow.png" {SOUND_LIST:ELF_HIT} ranged }
    [attack_anim]
        [filter_attack]
            name=bow
        [/filter_attack]
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
        [frame]
            begin=-445
            end=-380
            image="units/elves-desert/hero-bow.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-380
                end=-305
                image="units/elves-desert/hero-bow-attack1.png"
                sound=bow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-380
                end=-305
                image="units/elves-desert/hero-bow-attack1.png"
                sound=bow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-305
            end=-230
            image="units/elves-desert/hero-bow-attack2.png"
        [/frame]
        [frame]
            begin=-230
            end=-130
            image="units/elves-desert/hero-bow-attack3.png"
        [/frame]
        [frame]
            begin=-130
            end=0
            image="units/elves-desert/hero-bow-attack4.png"
        [/frame]
        [frame]
            begin=0
            end=65
            image="units/elves-desert/hero-bow.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-200
            end=-175
            image="units/elves-desert/hero.png"
        [/frame]
        [frame]
            begin=-175
            end=-110
            image="units/elves-desert/hero-melee-1.png"
        [/frame]
        [frame]
            begin=-110
            end=-75
            image="units/elves-desert/hero-melee-2.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-75
                end=75
                image="units/elves-desert/hero-melee-3.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-75
                end=75
                image="units/elves-desert/hero-melee-3.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=75
            end=120
            image="units/elves-desert/hero-melee-4.png"
        [/frame]
        [frame]
            begin=120
            end=180
            image="units/elves-desert/hero-defend.png"
        [/frame]
        [frame]
            begin=180
            end=200
            image="units/elves-desert/hero.png"
        [/frame]
    [/attack_anim]
[/unit_type]
