#define DESERT_ARCHER NUM COST
[unit]
#textdomain wesnoth-utbs
	id=Desert Archer{NUM}
	name= _ "Desert Archer"
	race=elf
	gender=male
	image=newelves/desert-elvish-archer.png
	image_long=newelves/desert-elvish-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_FILTERED "newelves/desert-elvish-archer-defend.png" newelves/desert-elvish-archer.png {SOUND_LIST:ELF_HIT} range=melee}
	{DEFENSE_ANIM_FILTERED "newelves/desert-elvish-archer-bow-defend.png" newelves/desert-elvish-archer.png {SOUND_LIST:ELF_HIT} range=ranged}
	[death]
		[frame]
			begin=0
			end=100
			image="newelves/desert-elvish-archer-die1.png"
		[/frame]
		[frame]
			begin=100
			end=200
			image="newelves/desert-elvish-archer-die2.png"
		[/frame]
		[frame]
			begin=200
			end=300
			image="newelves/desert-elvish-archer-die3.png"
		[/frame]
		[frame]
			begin=300
			end=400
			image="newelves/desert-elvish-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]
		hits=no
			[frame]
				begin=-101
				end=100
				image=newelves/desert-elvish-archer-attack.png
				sound={SOUND_LIST:MISS}
			[/frame]
		[/animation]
		[animation]
		hits=yes
			[frame]
				begin=-101
				end=100
				image=newelves/desert-elvish-archer-attack.png
				sound={SOUND_LIST:SWORD_SWISH}
			[/frame]
		[/animation]
	[/attack]
	[attack]
		name=bow
		description= _"bow"
		type=pierce
		range=ranged
		damage=4
		number=4
		icon=attacks/bow-elven.png
		[animation]
			hits=no
			[missile_frame]
				begin=-100
				end=0
				image=projectiles/missile-n.png
				image_diagonal=projectiles/missile-ne.png
			[/missile_frame]
			[frame]
				begin=-400
				end=-250
				image=newelves/desert-elvish-archer-attack1.png
				sound=bow-miss.ogg
			[/frame]
			[frame]
				begin=-250
				end=-150
				image=newelves/desert-elvish-archer-attack2.png
			[/frame]
			[frame]
				begin=-150
				end=-100
				image=newelves/desert-elvish-archer-attack3.png
			[/frame]
			[frame]
				begin=-100
				end=0
				image=newelves/desert-elvish-archer-attack3.png
			[/frame]
		[/animation]
		[animation]
			hits=yes
			[missile_frame]
				begin=-100
				end=0
				image=projectiles/missile-n.png
				image_diagonal=projectiles/missile-ne.png
			[/missile_frame]
			[frame]
				begin=-400
				end=-250
				image=newelves/desert-elvish-archer-attack1.png
				sound=bow.ogg
			[/frame]
			[frame]
				begin=-250
				end=-150
				image=newelves/desert-elvish-archer-attack2.png
			[/frame]
			[frame]
				begin=-150
				end=-100
				image=newelves/desert-elvish-archer-attack3.png
			[/frame]
			[frame]
				begin=-100
				end=0
				image=newelves/desert-elvish-archer-attack3.png
			[/frame]
		[/animation]
	[/attack]
	[female]
		id="Desert Archer"
		name= _ "female^Desert Archer"
		race=elf
		gender=female
		image="newelves/desert-elvish-archer+female.png"
		image_long="newelves/desert-elvish-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_FILTERED "newelves/desert-elvish-archer+female-defend.png" "newelves/desert-elvish-archer+female.png" {SOUND_LIST:ELF_FEMALE_HIT} range=melee}
		{DEFENSE_ANIM_FILTERED "newelves/desert-elvish-archer+female-bow-defend.png" "newelves/desert-elvish-archer+female.png" {SOUND_LIST:ELF_FEMALE_HIT} range=ranged}
		[death]
			[frame]
				begin=0
				end=100
				image="newelves/desert-elvish-archer-female-die1.png"
			[/frame]
			[frame]
				begin=100
				end=200
				image="newelves/desert-elvish-archer-female-die2.png"
			[/frame]
			[frame]
				begin=200
				end=300
				image="newelves/desert-elvish-archer-female-die3.png"
			[/frame]
			[frame]
				begin=300
				end=400
				image="newelves/desert-elvish-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]
			hits=no
				[frame]
					begin=-101
					end=100
					image="newelves/desert-elvish-archer+female-attack.png"
					sound={SOUND_LIST:MISS}
				[/frame]
			[/animation]
			[animation]
			hits=yes
				[frame]
					begin=-101
					end=100
					image="newelves/desert-elvish-archer+female-attack.png"
					sound={SOUND_LIST:SWORD_SWISH}
				[/frame]
			[/animation]
		[/attack]
		[attack]
			name=bow
			description= _"bow"
			type=pierce
			range=ranged
			damage=4
			number=4
			icon=attacks/bow-elven.png
			[animation]
				hits=no
				[missile_frame]
					begin=-100
					end=0
					image=projectiles/missile-n.png
					image_diagonal=projectiles/missile-ne.png
				[/missile_frame]
				[frame]
					begin=-400
					end=-250
					image="newelves/desert-elvish-archer+female-attack1.png"
					sound=bow-miss.ogg
				[/frame]
				[frame]
					begin=-250
					end=-150
					image="newelves/desert-elvish-archer+female-attack2.png"
				[/frame]
				[frame]
					begin=-150
					end=-100
					image="newelves/desert-elvish-archer+female-attack3.png"
				[/frame]
				[frame]
					begin=-100
					end=0
					image="newelves/desert-elvish-archer+female-attack3.png"
				[/frame]
			[/animation]
			[animation]
				hits=yes
				[missile_frame]
					begin=-100
					end=0
					image=projectiles/missile-n.png
					image_diagonal=projectiles/missile-ne.png
				[/missile_frame]
				[frame]
					begin=-400
					end=-250
					image="newelves/desert-elvish-archer+female-attack1.png"
					sound=bow.ogg
				[/frame]
				[frame]
					begin=-250
					end=-150
					image="newelves/desert-elvish-archer+female-attack2.png"
				[/frame]
				[frame]
					begin=-150
					end=-100
					image="newelves/desert-elvish-archer+female-attack3.png"
				[/frame]
				[frame]
					begin=-100
					end=0
					image="newelves/desert-elvish-archer+female-attack3.png"
				[/frame]
			[/animation]
		[/attack]
	[/female]
[/unit]
#enddef

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