#textdomain wesnoth-utbs

[unit_type]
    id=Desert Archer
    name= _ "Desert Archer"
    race=elf
    gender=male,female
    image=units/elves-desert/archer.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=29
    movement_type=desert_elf
    movement=6
    experience=44
    level=1
    alignment=lawful
    advances_to=Desert Ranger,Desert Marksman
    cost=17
    usage=archer
    description= _ "Desert Archers are trained from youth in archery, and so skilled in long-range combat. Though their bows are cruder and their arrows less plentiful than their elvish ancestors, they fight with ferocity that does credit to their race."
    die_sound={SOUND_LIST:ELF_HIT}

    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
        [frame]
            image="units/elves-desert/archer-idle-1.png:100"
        [/frame]
        [frame]
            image="units/elves-desert/archer-idle-[2~6,3~6,3~6,2].png:100"
        [/frame]
        [frame]
            image="units/elves-desert/archer-idle-1.png:100"
        [/frame]
    [/idle_anim]

    # melee attack increased from 5-2 to 6-2
    # ranged attack decreased from 5-4 to 4-4
    [attack]
        name=sword
        description= _"sword"
        type=blade
        range=melee
        damage=6
        number=2
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        type=pierce
        range=ranged
        damage=4
        number=4
        icon=attacks/bow-elven.png
    [/attack]
    {DEFENSE_ANIM_RANGE "units/elves-desert/archer-sword-defend.png" "units/elves-desert/archer-sword.png" {SOUND_LIST:ELF_HIT} melee }
    {DEFENSE_ANIM_RANGE "units/elves-desert/archer-bow-defend.png" "units/elves-desert/archer-bow.png" {SOUND_LIST:ELF_HIT} ranged }
    [attack_anim]
        [filter_attack]
            name=bow
        [/filter_attack]
        missile_start_time=-150
        [missile_frame]
            duration=150
            image="projectiles/missile-n.png"
            image_diagonal="projectiles/missile-ne.png"
        [/missile_frame]
        start_time=-445
        [frame]
            image="units/elves-desert/archer-bow.png:65"
        [/frame]
        {SOUND:HIT_AND_MISS bow.ogg bow-miss.ogg -380}
        [frame]
            image="units/elves-desert/archer-bow-attack[1~4].png:[75*2,100,130]"
        [/frame]
        [frame]
            image="units/elves-desert/archer-bow.png:65"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        start_time=-200
        [frame]
            image="units/elves-desert/archer-sword.png:25"
        [/frame]
        [frame]
            image="units/elves-desert/archer-sword-[1~4].png:[100,150,50*2]"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -75}
        [frame]
            image="units/elves-desert/archer-sword.png:25"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Desert Archer"
        gender=female
        image="units/elves-desert/archer+female.png"
        die_sound={SOUND_LIST:ELF_FEMALE_HIT}
        {DEFENSE_ANIM_RANGE "units/elves-desert/archer+female-sword-defend.png" "units/elves-desert/archer+female-sword.png" {SOUND_LIST:ELF_FEMALE_HIT} melee }
        {DEFENSE_ANIM_RANGE "units/elves-desert/archer+female-bow-defend.png" "units/elves-desert/archer+female-bow.png" {SOUND_LIST:ELF_FEMALE_HIT} ranged}
        [attack_anim]
            [filter_attack]
                name=bow
            [/filter_attack]
            [frame]
                image="units/elves-desert/archer+female-bow.png:65"
            [/frame]
            [frame]
                image="units/elves-desert/archer+female-bow-attack[1~4].png:[75*2,100,130]"
            [/frame]
            [frame]
                image="units/elves-desert/archer+female-bow.png:65"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=sword
            [/filter_attack]
            [frame]
                image="units/elves-desert/archer+female-sword.png:25"
            [/frame]
            [frame]
                image="units/elves-desert/archer+female-sword-[1~4].png:[100,150,50*2]"
            [/frame]
            [frame]
                image="units/elves-desert/archer+female-sword.png:25"
            [/frame]
        [/attack_anim]
        [idle_anim]
            [frame]
                image="units/elves-desert/archer+female-bow.png:50"
            [/frame]
            [frame]
                image="units/elves-desert/archer-idle-[2~6,3~6,3~6,2].png:100"
            [/frame]
            [frame]
                image="units/elves-desert/archer+female-bow.png:50"
            [/frame]
        [/idle_anim]
    [/female]
[/unit_type]

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

{DESERT_ARCHER_VARIANT  1 18}
{DESERT_ARCHER_VARIANT  2 19}
{DESERT_ARCHER_VARIANT  3 20}
{DESERT_ARCHER_VARIANT  4 21}
{DESERT_ARCHER_VARIANT  5 22}
{DESERT_ARCHER_VARIANT  6 23}
{DESERT_ARCHER_VARIANT  7 24}
{DESERT_ARCHER_VARIANT  8 25}
{DESERT_ARCHER_VARIANT  9 26}
{DESERT_ARCHER_VARIANT 10 27}

#undef DESERT_ARCHER_VARIANT
