#textdomain wesnoth-units
[unit_type]
    name= _ "Elvish Ranger"
    id=Elvish Ranger
    race=elf
    gender=male,female
    image="units/elves-wood/ranger.png"
    profile="portraits/elves/ranger.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=42
    movement_type=woodland
    movement=6
    experience=90
    level=2
    alignment=neutral
    advances_to=Elvish Avenger
    undead_variation=archer
    cost=41
    usage=mixed fighter
    description= _ "Though a man might spend years in the forest, he will never shake the feeling that he is a guest in a place he is not truly a part of. With elves, this is quite reversed. Any elf that studies the lore of the woods becomes a fitting master of them. This, combined with a considerable skill at archery and swordsmanship, is very useful in warfare."+{SPECIAL_NOTES}+{SPECIAL_NOTES_AMBUSH}
    die_sound={SOUND_LIST:ELF_HIT}
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/elves/transparent/ranger.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/elves/transparent/ranger.png"
    [/portrait]
    [movement_costs]
        shallow_water=2
        mountains=2
    [/movement_costs]
    [defense]
        shallow_water=70
        swamp_water=60
        sand=60
    [/defense]
    [abilities]
        {ABILITY_AMBUSH}
    [/abilities]
#ifdef __UNUSED__
    # FIXME: Commented out because these images are in 1.2 size and style
    [death]
        [frame]
            begin=0
            end=100
            image="units/elves-wood/ranger-die1.png"
        [/frame]
        [frame]
            begin=100
            end=200
            image="units/elves-wood/ranger-die2.png"
        [/frame]
        [frame]
            begin=200
            end=300
            image="units/elves-wood/ranger-die3.png"
        [/frame]
        [frame]
            begin=300
            end=400
            image="units/elves-wood/ranger-die4.png"
        [/frame]
    [/death]
#endif
    [attack]
        name=sword
        description=_"sword"
        icon=attacks/sword-elven.png
        type=blade
        range=melee
        damage=7
        number=3
    [/attack]
    [attack]
        name=bow
        description=_"bow"
        icon=attacks/bow-elven.png
        type=pierce
        range=ranged
        damage=7
        number=4
    [/attack]
    {DEFENSE_ANIM_RANGE "units/elves-wood/ranger-sword-defend.png" "units/elves-wood/ranger-sword.png" {SOUND_LIST:ELF_HIT} melee }
    {DEFENSE_ANIM_RANGE "units/elves-wood/ranger-bow-defend.png" "units/elves-wood/ranger-bow.png" {SOUND_LIST:ELF_HIT} ranged }
    [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-wood/ranger-bow.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-380
                end=-305
                image="units/elves-wood/ranger-bow-attack1.png"
                sound=bow.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-380
                end=-305
                image="units/elves-wood/ranger-bow-attack1.png"
                sound=bow-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=-305
            end=-230
            image="units/elves-wood/ranger-bow-attack2.png"
        [/frame]
        [frame]
            begin=-230
            end=-130
            image="units/elves-wood/ranger-bow-attack3.png"
        [/frame]
        [frame]
            begin=-130
            end=0
            image="units/elves-wood/ranger-bow-attack4.png"
        [/frame]
        [frame]
            begin=0
            end=65
            image="units/elves-wood/ranger-bow.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-200
            end=-175
            image="units/elves-wood/ranger-sword.png"
        [/frame]
        [frame]
            begin=-175
            end=-75
            image="units/elves-wood/ranger-sword-1.png"
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-75
                end=75
                image="units/elves-wood/ranger-sword-2.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-75
                end=75
                image="units/elves-wood/ranger-sword-2.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/else]
        [frame]
            begin=75
            end=175
            image="units/elves-wood/ranger-sword-3.png"
        [/frame]
        [frame]
            begin=175
            end=200
            image="units/elves-wood/ranger-sword.png"
        [/frame]
    [/attack_anim]
    [female]
        name= _ "female^Elvish Ranger"
        gender=female
        image="units/elves-wood/ranger+female.png"
        profile="portraits/elves/ranger+female.png"
        die_sound={SOUND_LIST:ELF_FEMALE_HIT}
        {DEFENSE_ANIM_RANGE "units/elves-wood/ranger-sword-defend.png" "units/elves-wood/ranger+female-sword.png" {SOUND_LIST:ELF_FEMALE_HIT} melee}
        {DEFENSE_ANIM_RANGE "units/elves-wood/ranger+female-bow-defend.png" "units/elves-wood/ranger+female-bow.png" {SOUND_LIST:ELF_FEMALE_HIT} ranged}
        [portrait]
            size=400
            side="left"
            mirror="false"
            image="portraits/elves/transparent/ranger+female.png"
        [/portrait]
        [portrait]
            size=400
            side="right"
            mirror="true"
            image="portraits/elves/transparent/ranger+female.png"
        [/portrait]
        # FIXME: Commented out because these images are in 1.2 size and style
#ifdef __UNUSED__
        [death]
            [frame]
                image="units/elves-wood/ranger-die1.png"
            [/frame]
            [frame]
                image="units/elves-wood/ranger-die2.png"
            [/frame]
            [frame]
                image="units/elves-wood/ranger-die3.png"
            [/frame]
            [frame]
                image="units/elves-wood/ranger-die4.png"
            [/frame]
        [/death]
#endif
        [attack_anim]
            [filter_attack]
                name=bow
            [/filter_attack]
            [frame]
                image="units/elves-wood/ranger+female-bow.png"
            [/frame]
            [if]
                [frame]
                    image="units/elves-wood/ranger+female-bow-attack1.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/elves-wood/ranger+female-bow-attack1.png"
                [/frame]
            [/else]
            [frame]
                image="units/elves-wood/ranger+female-bow-attack2.png"
            [/frame]
            [frame]
                image="units/elves-wood/ranger+female-bow-attack3.png"
            [/frame]
            [frame]
                image="units/elves-wood/ranger+female-bow-attack4.png"
            [/frame]
            [frame]
                image="units/elves-wood/ranger+female-bow.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=sword
            [/filter_attack]
            [frame]
                image="units/elves-wood/ranger+female-sword.png"
            [/frame]
            [frame]
                image="units/elves-wood/ranger+female-sword-1.png"
            [/frame]
            [if]
                [frame]
                    image="units/elves-wood/ranger+female-sword-2.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/elves-wood/ranger+female-sword-2.png"
                [/frame]
            [/else]
            [frame]
                image="units/elves-wood/ranger+female-sword-3.png"
            [/frame]
            [frame]
                image="units/elves-wood/ranger+female-sword.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]
