#define DESERT_ARCHER NUM COST HIDEORNOT
[unit]
#textdomain wesnoth-utbs
	id=Desert Archer{NUM}
	hide_help={HIDEORNOT}
	name= _ "Desert Archer"
	race=elf
	gender=male
	image=units/elves-desert/archer.png
	image_long=units/elves-desert/archer-bow.png
	hitpoints=29
	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
		tundra=3
	[/movement_costs]
	[defense]
		sand=40
		forest=50
	[/defense]
	movement=6
	experience=44
	level=1
	alignment=lawful
	advanceto=Desert Ranger,Desert Marksman
	cost={COST}
	usage=archer
	unit_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}
	{DEFENSE_ANIM_RANGE "units/elves-desert/archer-defend.png" units/elves-desert/archer.png {SOUND_LIST:ELF_HIT} melee}
	{DEFENSE_ANIM_RANGE "units/elves-desert/archer-bow-defend.png" units/elves-desert/archer.png {SOUND_LIST:ELF_HIT} ranged}
	[death]
		[frame]
			begin=0
			end=100
			image="units/elves-desert/archer-die1.png"
		[/frame]
		[frame]
			begin=100
			end=200
			image="units/elves-desert/archer-die2.png"
		[/frame]
		[frame]
			begin=200
			end=300
			image="units/elves-desert/archer-die3.png"
		[/frame]
		[frame]
			begin=300
			end=400
			image="units/elves-desert/archer-die4.png"
		[/frame]
	[/death]
# 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
		[animation]
		[if]
			hits=yes
				[frame]
					begin=-101
					end=100
					image=units/elves-desert/archer-attack.png
					sound={SOUND_LIST:SWORD_SWISH}
				[/frame]
		[/if]
		[else]
			hits=no
				[frame]
					begin=-101
					end=100
					image=units/elves-desert/archer-attack.png
					sound={SOUND_LIST:MISS}
				[/frame]
		[/else]
		[/animation]
	[/attack]
	[attack]
		name=bow
		description= _"bow"
		type=pierce
		range=ranged
		damage=4
		number=4
		icon=attacks/bow-elven.png
		[animation]
			[missile_frame]
				begin=-100
				end=0
				image=projectiles/missile-n.png
				image_diagonal=projectiles/missile-ne.png
			[/missile_frame]
			[if]
				hits=yes
				[frame]
					begin=-400
					end=-250
					image=units/elves-desert/archer-attack1.png
					sound=bow.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-400
					end=-250
					image=units/elves-desert/archer-attack1.png
					sound=bow-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=-250
				end=-150
				image=units/elves-desert/archer-attack2.png
			[/frame]
			[frame]
				begin=-150
				end=-100
				image=units/elves-desert/archer-attack3.png
			[/frame]
			[frame]
				begin=-100
				end=0
				image=units/elves-desert/archer-attack3.png
			[/frame]
		[/animation]
	[/attack]
	[female]
		id="Desert Archer"
		name= _ "female^Desert Archer"
		race=elf
		gender=female
		image="units/elves-desert/archer+female.png"
		image_long="units/elves-desert/archer+female-bow.png"
		hitpoints=29
		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
			tundra=3
		[/movement_costs]
		[defense]
			sand=40
			forest=50
		[/defense]
		movement=6
		experience=44
		level=1
		alignment=lawful
		advanceto=Desert Ranger,Desert Marksman
		cost=17
		usage=archer
		unit_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_FEMALE_HIT}
		{DEFENSE_ANIM_RANGE "units/elves-desert/archer+female-defend.png" "units/elves-desert/archer+female.png" {SOUND_LIST:ELF_FEMALE_HIT} melee}
		{DEFENSE_ANIM_RANGE "units/elves-desert/archer+female-bow-defend.png" "units/elves-desert/archer+female.png" {SOUND_LIST:ELF_FEMALE_HIT} ranged}
		[death]
			[frame]
				begin=0
				end=100
				image="units/elves-desert/archer-female-die1.png"
			[/frame]
			[frame]
				begin=100
				end=200
				image="units/elves-desert/archer-female-die2.png"
			[/frame]
			[frame]
				begin=200
				end=300
				image="units/elves-desert/archer-female-die3.png"
			[/frame]
			[frame]
				begin=300
				end=400
				image="units/elves-desert/archer-female-die4.png"
			[/frame]
		[/death]
		[attack]
			name=sword
			description= _"sword"
			type=blade
			range=melee
			damage=6
			number=2
			icon=attacks/sword-elven.png
			[animation]
			[if]
				hits=yes
					[frame]
						begin=-101
						end=100
						image="units/elves-desert/archer+female-attack.png"
						sound={SOUND_LIST:SWORD_SWISH}
					[/frame]
			[/if]
			[else]
				hits=no
					[frame]
						begin=-101
						end=100
						image="units/elves-desert/archer+female-attack.png"
						sound={SOUND_LIST:MISS}
					[/frame]
			[/else]
			[/animation]
		[/attack]
		[attack]
			name=bow
			description= _"bow"
			type=pierce
			range=ranged
			damage=4
			number=4
			icon=attacks/bow-elven.png
			[animation]
				[missile_frame]
					begin=-100
					end=0
					image=projectiles/missile-n.png
					image_diagonal=projectiles/missile-ne.png
				[/missile_frame]
				[if]
					hits=yes
					[frame]
						begin=-400
						end=-250
						image="units/elves-desert/archer+female-attack1.png"
						sound=bow.ogg
					[/frame]
				[/if]
				[else]
					hits=no
					[frame]
						begin=-400
						end=-250
						image="units/elves-desert/archer+female-attack1.png"
						sound=bow-miss.ogg
					[/frame]
				[/else]
				[frame]
					begin=-250
					end=-150
					image="units/elves-desert/archer+female-attack2.png"
				[/frame]
				[frame]
					begin=-150
					end=-100
					image="units/elves-desert/archer+female-attack3.png"
				[/frame]
				[frame]
					begin=-100
					end=0
					image="units/elves-desert/archer+female-attack3.png"
				[/frame]
			[/animation]
		[/attack]
	[/female]
[/unit]
#enddef

{DESERT_ARCHER "" 17 false}
{DESERT_ARCHER 2 18 true}
{DESERT_ARCHER 3 19 true}
{DESERT_ARCHER 4 20 true}
{DESERT_ARCHER 5 21 true}
{DESERT_ARCHER 6 22 true}
{DESERT_ARCHER 7 23 true}
{DESERT_ARCHER 8 24 true}
{DESERT_ARCHER 9 25 true}
{DESERT_ARCHER 10 26 true}
{DESERT_ARCHER 11 27 true}
