[unit]
#textdomain wesnoth-utbs
	id=Desert Avenger
	name= _ "Desert Avenger"
	race=elf
	image=newelves/desert-elvish-avenger.png
	image_long=newelves/desert-elvish-avenger-bow.png
	hitpoints=55
	movement_type=woodland
# Desert elves move fast across the sands, but are not used to forests
# They are also a bit faster in caves
# Avengers move faster in mountains and shallow water
	[movement_costs]
		sand=1
		forest=2
		cave=2
		tundra=3
		shallow_water=2
		mountains=2
	[/movement_costs]
# Avengers defend better in shallow water and swamp
	[defense]
		sand=40
		forest=50
		shallow_water=70
		swamp_water=60
	[/defense]
	movement=6
	experience=100
	level=3
	alignment=lawful
	advanceto=null
	{AMLA_TOUGH 3}
	cost=80
	usage=mixed fighter
	unit_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: While a unit with the same allegiance as the Desert Avenger distracts an enemy, the Avenger may backstab, inflicting double damage, by creeping around behind that enemy."
	die_sound={SOUND_LIST:ELF_HIT}
	{DEFENSE_ANIM_FILTERED "newelves/desert-elvish-avenger-defend.png" newelves/desert-elvish-avenger.png {SOUND_LIST:ELF_HIT} range=melee}
	{DEFENSE_ANIM_FILTERED "newelves/desert-elvish-avenger-bow-defend.png" newelves/desert-elvish-avenger.png {SOUND_LIST:ELF_HIT} range=ranged}
	[death]
		[frame]
			begin=0
			end=100
			image="newelves/desert-elvish-avenger-die1.png"
		[/frame]
		[frame]
			begin=100
			end=200
			image="newelves/desert-elvish-avenger-die2.png"
		[/frame]
		[frame]
			begin=200
			end=300
			image="newelves/desert-elvish-avenger-die3.png"
		[/frame]
		[frame]
			begin=300
			end=400
			image="newelves/desert-elvish-avenger-die4.png"
		[/frame]
	[/death]
# 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
		[animation]
		hits=no
			[frame]
				begin=-101
				end=100
				image="newelves/desert-elvish-avenger-attack.png"
				sound={SOUND_LIST:MISS}
			[/frame]
		[/animation]
		[animation]
		hits=yes
			[frame]
				begin=-101
				end=100
				image="newelves/desert-elvish-avenger-attack.png"
				sound={SOUND_LIST:SWORD_SWISH}
			[/frame]
		[/animation]
	[/attack]
	[attack]
		name=bow
		description= _"bow"
		type=pierce
		range=ranged
		damage=9
		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=-525
				end=-450
				image=newelves/desert-elvish-avenger-bow.png
			[/frame]
			[frame]
				begin=-450
				end=-300
				image=newelves/desert-elvish-avenger-attack1.png
				sound=bow-miss.ogg
			[/frame]
			[frame]
				begin=-300
				end=-150
				image=newelves/desert-elvish-avenger-attack2.png
			[/frame]
			[frame]
				begin=-150
				end=-100
				image=newelves/desert-elvish-avenger-attack3.png
			[/frame]
			[frame]
				begin=-100
				end=0
				image=newelves/desert-elvish-avenger-attack3.png
			[/frame]
			[frame]
				begin=0
				end=100
				image=newelves/desert-elvish-avenger-bow.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=-525
				end=-450
				image=newelves/desert-elvish-avenger-bow.png
			[/frame]
			[frame]
				begin=-450
				end=-300
				image=newelves/desert-elvish-avenger-attack1.png
				sound=bow.ogg
			[/frame]
			[frame]
				begin=-300
				end=-150
				image=newelves/desert-elvish-avenger-attack2.png
			[/frame]
			[frame]
				begin=-150
				end=-100
				image=newelves/desert-elvish-avenger-attack3.png
			[/frame]
			[frame]
				begin=-100
				end=0
				image=newelves/desert-elvish-avenger-attack3.png
			[/frame]
			[frame]
				begin=0
				end=100
				image=newelves/desert-elvish-avenger-bow.png
			[/frame]
		[/animation]
	[/attack]
	[female]
		id=Desert Avenger
		name= _ "female^Desert Avenger"
		race=elf
		gender=female
		image="newelves/desert-elvish-avenger+female.png"
		image_long="newelves/desert-elvish-avenger+female-bow.png"
		hitpoints=60
		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=100
		level=3
		alignment=lawful
		advanceto=null
		{AMLA_TOUGH 3}
		cost=80
#instead of ambush, desert avengers have backstab
		usage=mixed fighter
		unit_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: While a unit with the same allegiance as the desert avenger distracts an enemy, the desert avenger may backstab, inflicting double damage, by creeping around behind that enemy."
		die_sound={SOUND_LIST:ELF_FEMALE_HIT}
		{DEFENSE_ANIM_FILTERED "newelves/desert-elvish-avenger+female-defend.png" "newelves/desert-elvish-avenger+female.png" {SOUND_LIST:ELF_FEMALE_HIT} range=melee}
		{DEFENSE_ANIM_FILTERED "newelves/desert-elvish-avenger+female-bow-defend.png" "newelves/desert-elvish-avenger+female.png" {SOUND_LIST:ELF_FEMALE_HIT} range=ranged}
		[death]
			[frame]
				begin=0
				end=100
				image="newelves/desert-elvish-avenger-die1.png"
			[/frame]
			[frame]
				begin=100
				end=200
				image="newelves/desert-elvish-avenger-die2.png"
			[/frame]
			[frame]
				begin=200
				end=300
				image="newelves/desert-elvish-avenger-die3.png"
			[/frame]
			[frame]
				begin=300
				end=400
				image="newelves/desert-elvish-avenger-die4.png"
			[/frame]
		[/death]
# originally 8 damage, 4 attacks changed to 8,3 because
# added backstab then increased to 9 damage while ranged
# damage is decreased by 1
		[attack]
			name=sword
			description= _"sword"
			type=blade
			range=melee
			damage=9
			number=3
			[specials]
				{WEAPON_SPECIAL_BACKSTAB}
			[/specials]
			icon=attacks/sword-elven.png
			[animation]
			hits=no
				[frame]
					begin=-101
					end=100
					image="newelves/desert-elvish-avenger+female-attack.png"
					sound={SOUND_LIST:MISS}
				[/frame]
			[/animation]
			[animation]
			hits=yes
				[frame]
					begin=-101
					end=100
					image="newelves/desert-elvish-avenger+female-attack.png"
					sound={SOUND_LIST:SWORD_SWISH}
				[/frame]
			[/animation]
		[/attack]
		[attack]
			name=bow
			description= _"bow"
			type=pierce
			range=ranged
			damage=10
			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=-525
					end=-450
					image="newelves/desert-elvish-avenger+female-bow.png"
				[/frame]
				[frame]
					begin=-450
					end=-300
					image="newelves/desert-elvish-avenger+female-attack1.png"
					sound=bow-miss.ogg
				[/frame]
				[frame]
					begin=-300
					end=-150
					image="newelves/desert-elvish-avenger+female-attack2.png"
				[/frame]
				[frame]
					begin=-150
					end=-100
					image="newelves/desert-elvish-avenger+female-attack3.png"
				[/frame]
				[frame]
					begin=-100
					end=0
					image="newelves/desert-elvish-avenger+female-attack3.png"
				[/frame]
				[frame]
					begin=0
					end=100
					image="newelves/desert-elvish-avenger+female-bow.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=-525
					end=-450
					image="newelves/desert-elvish-avenger+female-bow.png"
				[/frame]
				[frame]
					begin=-450
					end=-300
					image="newelves/desert-elvish-avenger+female-attack1.png"
					sound=bow.ogg
				[/frame]
				[frame]
					begin=-300
					end=-150
					image="newelves/desert-elvish-avenger+female-attack2.png"
				[/frame]
				[frame]
					begin=-150
					end=-100
					image="newelves/desert-elvish-avenger+female-attack3.png"
				[/frame]
				[frame]
					begin=-100
					end=0
					image="newelves/desert-elvish-avenger+female-attack3.png"
				[/frame]
				[frame]
					begin=0
					end=100
					image="newelves/desert-elvish-avenger+female-bow.png"
				[/frame]
			[/animation]
		[/attack]
	[/female]
[/unit]
