#textdomain wesnoth-utbs
[unit_type]
    id=Desert Ranger
    name= _ "Desert Ranger"
    race=elf
    image=units/elves-desert/ranger.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=42
    movement_type=desert_elf
    # Rangers move faster in mountains and shallow water
    [movement_costs]
        shallow_water=2
        mountains=2
    [/movement_costs]
    # Rangers defend better in shallow water and swamp
    [defense]
        shallow_water=70
        swamp_water=60
    [/defense]
    movement=6
    experience=80
    level=2
    alignment=lawful
    advances_to=Desert Avenger
    cost=40
    #instead of ambush desert rangers have backstab
    usage=mixed fighter
    description= _ "Desert Rangers are quick and powerful. Skilled in both short and long-range combat, Rangers are truly all-round fighters. 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}
    # melee attack stayed the same from 7-3 to 7-3
    # ranged attack decreased from 7-4 to 6-4
    # I decided not to increase melee damage I didn't want the
    # backstab attack ability to be too powerful
    # For comparison the level 2 Rogue unit has a 6,3 backstab attack
    [attack]
        name=sword
        description= _"sword"
        type=blade
        range=melee
        damage=7
        number=3
        [specials]
            {WEAPON_SPECIAL_BACKSTAB}
        [/specials]
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        type=pierce
        range=ranged
        damage=6
        number=4
        icon=attacks/bow-elven.png
    [/attack]
    {DEFENSE_ANIM_RANGE "units/elves-desert/ranger-sword-defend.png" "units/elves-desert/ranger-sword.png" {SOUND_LIST:ELF_HIT} melee }
    {DEFENSE_ANIM_RANGE "units/elves-desert/ranger-bow-defend.png" "units/elves-desert/ranger-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/ranger-bow.png:65"
        [/frame]
        [frame]
            image="units/elves-desert/ranger-bow-attack[1~4].png:[75*2,100,130]"
        [/frame]
        [frame]
            image="units/elves-desert/ranger-bow.png:65"
        [/frame]
        {SOUND:HIT_AND_MISS bow.ogg bow-miss.ogg -380}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        start_time=-200
        [frame]
            image="units/elves-desert/ranger-sword.png:25"
        [/frame]
        [frame]
            image="units/elves-desert/ranger-sword-[1~3].png:[100,150,100]"
        [/frame]
        [frame]
            image="units/elves-desert/ranger-sword.png:25"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -75}
    [/attack_anim]
    [female]
        name= _ "female^Desert Ranger"
        gender=female
        image="units/elves-desert/ranger+female.png"
        die_sound={SOUND_LIST:ELF_FEMALE_HIT}
        {DEFENSE_ANIM_RANGE "units/elves-desert/ranger-sword-defend.png" "units/elves-desert/ranger+female-sword.png" {SOUND_LIST:ELF_FEMALE_HIT} melee}
        {DEFENSE_ANIM_RANGE "units/elves-desert/ranger+female-bow-defend.png" "units/elves-desert/ranger+female-bow.png" {SOUND_LIST:ELF_FEMALE_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/ranger+female-bow.png:65"
            [/frame]
            [frame]
                image="units/elves-desert/ranger+female-bow-attack[1~4].png:[75*2,100,130]"
            [/frame]
            [frame]
                image="units/elves-desert/ranger+female-bow.png:65"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=sword
            [/filter_attack]
            start_time=-200
            [frame]
                image="units/elves-desert/ranger+female-sword.png:25"
            [/frame]
            [frame]
                image="units/elves-desert/ranger+female-sword-[1~3].png:[100,150,100]"
            [/frame]
            [frame]
                image="units/elves-desert/ranger+female-sword.png:25"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]
