#textdomain wesnoth-utbs

[unit_type]
    id=Desert Fighter
    name= _ "Desert Fighter"
    race=elf
    image=units/elves-desert/fighter.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=34
    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=40
    level=1
    alignment=lawful
    advances_to=Desert Captain,Desert Hero
    cost=15
    usage=fighter
    description= _ "Desert Fighters make up the bulk of the Quenoth warriors. They are trained in both sword and bow, though like most of their kin, they prefer swordplay to archery. These Elves are deft of foot, and fight best in the open sands."
    die_sound={SOUND_LIST:ELF_HIT}
    [attack]
        name=sword
        description= _"sword"
        type=blade
        range=melee
        damage=6
        number=4
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        type=pierce
        range=ranged
        damage=2
        number=3
        icon=attacks/bow-elven.png
    [/attack]
    {DEFENSE_ANIM_RANGE "units/elves-desert/fighter-defend.png" "units/elves-desert/fighter.png" {SOUND_LIST:ELF_HIT} melee }
    {DEFENSE_ANIM_RANGE "units/elves-desert/fighter-bow-defend.png" "units/elves-desert/fighter-bow.png" {SOUND_LIST:ELF_HIT} ranged }
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
        [frame]
            duration=100
            image="units/elves-desert/fighter-idle-1.png"
        [/frame]
        [frame]
            duration=100
            image="units/elves-desert/fighter-idle-2.png"
        [/frame]
        [frame]
            duration=125
            image="units/elves-desert/fighter-idle-3.png"
        [/frame]
        [frame]
            duration=150
            image="units/elves-desert/fighter-idle-4.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/fighter-idle-5.png"
        [/frame]
        [frame]
            duration=200
            image="units/elves-desert/fighter-idle-6.png"
        [/frame]
        [frame]
            duration=200
            image="units/elves-desert/fighter-idle-5.png"
        [/frame]
        [frame]
            duration=400
            image="units/elves-desert/fighter-idle-6.png"
        [/frame]
        [frame]
            duration=175
            image="units/elves-desert/fighter-idle-7.png"
        [/frame]
        [frame]
            duration=200
            image="units/elves-desert/fighter-idle-8.png"
        [/frame]
        [frame]
            duration=250
            image="units/elves-desert/fighter-idle-9.png"
        [/frame]
        [frame]
            duration=400
            image="units/elves-desert/fighter-idle-10.png"
        [/frame]
        [frame]
            duration=150
            image="units/elves-desert/fighter-idle-9.png"
        [/frame]
        [frame]
            duration=150
            image="units/elves-desert/fighter-idle-11.png"
        [/frame]
        [frame]
            duration=150
            image="units/elves-desert/fighter-idle-12.png"
        [/frame]
    [/idle_anim]
    [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/fighter-bow.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-380
                end=-305
                image="units/elves-desert/fighter-bow-attack1.png"
                sound=bow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-380
                end=-305
                image="units/elves-desert/fighter-bow-attack1.png"
                sound=bow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-305
            end=-230
            image="units/elves-desert/fighter-bow-attack2.png"
        [/frame]
        [frame]
            begin=-230
            end=-130
            image="units/elves-desert/fighter-bow-attack3.png"
        [/frame]
        [frame]
            begin=-130
            end=0
            image="units/elves-desert/fighter-bow-attack4.png"
        [/frame]
        [frame]
            begin=0
            end=65
            image="units/elves-desert/fighter-bow.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-175
            end=-100
            image="units/elves-desert/fighter.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/elves-desert/fighter-melee-1.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/elves-desert/fighter-melee-1.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=150
            image="units/elves-desert/fighter-melee-2.png"
        [/frame]
        [frame]
            begin=150
            end=175
            image="units/elves-desert/fighter.png"
        [/frame]
    [/attack_anim]
[/unit_type]

#define DESERT_FIGHTER_VARIANT SUFFIX_NUMBER COST
    [unit_type]
        id=Desert Fighter{SUFFIX_NUMBER}
        [base_unit]
            id=Desert Fighter
        [/base_unit]
        hide_help=true
        do_not_list=true
        cost={COST}
    [/unit_type]
#enddef

{DESERT_FIGHTER_VARIANT  2 16}
{DESERT_FIGHTER_VARIANT  3 17}
{DESERT_FIGHTER_VARIANT  4 18}
{DESERT_FIGHTER_VARIANT  5 19}
{DESERT_FIGHTER_VARIANT  6 20}
{DESERT_FIGHTER_VARIANT  7 21}
{DESERT_FIGHTER_VARIANT  8 22}
{DESERT_FIGHTER_VARIANT  9 23}
{DESERT_FIGHTER_VARIANT 10 24}
{DESERT_FIGHTER_VARIANT 11 25}

#undef DESERT_FIGHTER_VARIANT
