#textdomain wesnoth-utbs
[unit_type]
    id=Desert Avenger
    name= _ "Desert Avenger"
    race=elf
    image=units/elves-desert/avenger.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=55
    movement_type=desert_elf
    # Avengers move faster in mountains and shallow water
    [movement_costs]
        shallow_water=2
        mountains=2
    [/movement_costs]
    # Avengers defend better in shallow water and swamp
    [defense]
        shallow_water=70
        swamp_water=60
    [/defense]
    movement=6
    experience=150
    level=3
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    cost=80
    usage=mixed fighter
    description= _ "Desert Avengers are extremely skillful and extremely quick, powerful in all forms of combat. Like their kin, they prefer the sword to the bow and are adept at sneaking around and backstabbing their enemies."+{SPECIAL_NOTES}+{SPECIAL_NOTES_BACKSTAB}
    die_sound={SOUND_LIST:ELF_HIT}
    # originally 8-4 melee (changed to 9-3 because I added backstab)
    # then increase to 10-3 because all desert elves are strong
    # ranged attack is decreased by 1 (10-4 to 9-4)
    [attack]
        name=sword
        description= _"sword"
        type=blade
        range=melee
        damage=10
        number=3
        [specials]
            {WEAPON_SPECIAL_BACKSTAB}
        [/specials]
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        type=pierce
        range=ranged
        damage=9
        number=4
        icon=attacks/bow-elven.png
    [/attack]
    {DEFENSE_ANIM_RANGE "units/elves-desert/avenger-sword-defend.png" "units/elves-desert/avenger-sword.png" {SOUND_LIST:ELF_HIT} melee}
    {DEFENSE_ANIM_RANGE "units/elves-desert/avenger-bow-defend.png" "units/elves-desert/avenger-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/avenger-bow.png:65"
        [/frame]
        {SOUND:HIT_AND_MISS bow.ogg bow-miss.ogg -380}
        [frame]
            image="units/elves-desert/avenger-bow-attack[1~4].png:[75*2,100,130]"
        [/frame]
        [frame]
            image="units/elves-desert/avenger-bow.png:65"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        start_time=-200
        [frame]
            image="units/elves-desert/avenger-sword.png:25"
        [/frame]
        [frame]
            image="units/elves-desert/avenger-sword-[1~3].png:[100,150,100]"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -75}
        [frame]
            image="units/elves-desert/avenger-sword.png:25"
        [/frame]
    [/attack_anim]

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