#textdomain wesnoth-utbs
[unit]
    id=Desert Marshal
    name= _ "Desert Marshal"
    race=elf
    image=units/elves-desert/marshal.png
    [attack_anim]
        apply_to=attack
        start_time=-150
        [frame]
            duration=300
            image=units/elves-desert/marshal-bow.png
        [/frame]
        [attack_filter]
            range=ranged
        [/attack_filter]
    [/attack_anim]
    image_leading=units/elves-desert/marshal-leading.png
    hitpoints=62
    [abilities]
        {ABILITY_LEADERSHIP_LEVEL_3}
    [/abilities]
    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
        tundra=3
    [/movement_costs]
    [defense]
        sand=40
        forest=50
    [/defense]
    movement=5
    experience=150
    level=3
    alignment=lawful
    advanceto=null
    {AMLA_DEFAULT}
    cost=80
    usage=fighter
    unit_description= _ "Desert Marshals are master commanders, able to inspire confidence in any level 1 or 2 unit in adjacent hexes, causing them to fight with increased skill. Desert Marshals prefer engaging the enemy in melee combat, but are trained in archery as well."+{SPECIAL_NOTES}+{SPECIAL_NOTES_LEADERSHIP}
    die_sound={SOUND_LIST:ELF_HIT}
    {DEFENSE_ANIM_RANGE "units/elves-desert/marshal-defend.png" units/elves-desert/marshal.png {SOUND_LIST:ELF_HIT} melee}
    {DEFENSE_ANIM_RANGE "units/elves-desert/marshal-bow-defend.png" units/elves-desert/marshal-attack1.png {SOUND_LIST:ELF_HIT} ranged}
    # melee attack increased from 10-4 to 11-4
    # ranged attack decreased from 8-3 to 7-3
    [attack]
        name=sword
        description= _"sword"
        type=blade
        range=melee
        damage=11
        number=4
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        type=pierce
        range=ranged
        damage=7
        number=3
        icon=attacks/bow-elven.png
    [/attack]
    [attack_anim]
        [attack_filter]
            name=bow
        [/attack_filter]
        [missile_frame]
            begin=-100
            end=0
            image=projectiles/missile-n.png
            image_diagonal=projectiles/missile-ne.png
        [/missile_frame]
        [frame]
            begin=-600
            end=-450
            image=units/elves-desert/marshal-bow.png
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-450
                end=-300
                image=units/elves-desert/marshal-attack1.png
                sound=bow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-450
                end=-300
                image=units/elves-desert/marshal-attack1.png
                sound=bow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-300
            end=-200
            image=units/elves-desert/marshal-attack2.png
        [/frame]
        [frame]
            begin=-200
            end=-100
            image=units/elves-desert/marshal-attack3.png
        [/frame]
        [frame]
            begin=-100
            end=0
            image=units/elves-desert/marshal-attack3.png
        [/frame]
        [frame]
            begin=0
            end=100
            image=units/elves-desert/marshal-bow.png
        [/frame]
    [/attack_anim]
    [attack_anim]
        [attack_filter]
            name=sword
        [/attack_filter]
        [if]
            hits=yes
            [frame]
                begin=-101
                end=100
                image=units/elves-desert/marshal-attack.png
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-101
                end=100
                image=units/elves-desert/marshal-attack.png
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
    [/attack_anim]
[/unit]
