[unit]
	id=Goblin Impaler
	name= _ "Goblin Impaler"
	race=goblin
	image="units/goblins/impaler.png"
	ellipse="misc/ellipse"
	{MAGENTA_IS_THE_TEAM_COLOR}
	hitpoints=26
	movement_type=orcishfoot
	movement=4
	experience=100
	level=1
	alignment=chaotic
	advanceto=null
	{AMLA_TOUGH 3}
	cost=13
	usage=fighter
	unit_description= _ "Goblins are used by the orcs as skirmishers to disrupt the enemy's battle line. Those who manage to survive their first few battles equip themselves with a long spear to compensate for their short reach, and better armor to guard their diminuitive frames.

Special Notes:"+{SPECIAL_NOTES_FIRSTSTRIKE}
	die_sound={SOUND_LIST:GOBLIN_DIE}
	{DEFENSE_ANIM "units/goblins/impaler-defend.png" "units/goblins/impaler.png" {SOUND_LIST:GOBLIN_HIT} }
	[attack]
		name=spear
		type=pierce
		range=melee
		damage=7
		number=3
		icon=attacks/spear-orcish.png
		[specials]
			{WEAPON_SPECIAL_FIRSTSTRIKE}
		[/specials]

		[animation]
			direction=se,sw
			[frame]
				begin=-200
				end=-125
				image=units/goblins/impaler.png
			[/frame]
			[frame]
				begin=-125
				end=-75
				image=units/goblins/impaler-attack-se-1.png
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-75
					end=75
					image=units/goblins/impaler-attack-se-2.png
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-75
					end=75
					image=units/goblins/impaler-attack-se-2.png
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=75
				end=125
				image=units/goblins/impaler-attack-se-1.png
			[/frame]
			[frame]
				begin=125
				end=200
				image=units/goblins/impaler.png
			[/frame]
		[/animation]


		[animation]
			direction=s
			[frame]
				begin=-200
				end=-125
				image=units/goblins/impaler.png
			[/frame]
			[frame]
				begin=-125
				end=-75
				image=units/goblins/impaler-attack-se-1.png
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-75
					end=75
					image=units/goblins/impaler-attack-s.png
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-75
					end=75
					image=units/goblins/impaler-attack-s.png
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=75
				end=125
				image=units/goblins/impaler-attack-se-1.png
			[/frame]
			[frame]
				begin=125
				end=200
				image=units/goblins/impaler.png
			[/frame]
		[/animation]

		[animation]
			direction=n
			[frame]
				begin=-200
				end=-125
				image=units/goblins/impaler.png
			[/frame]
			[frame]
				begin=-125
				end=-75
				image=units/goblins/impaler-attack-n.png
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-75
					end=75
					image=units/goblins/impaler-attack-n.png
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-75
					end=75
					image=units/goblins/impaler-attack-n.png
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=75
				end=125
				image=units/goblins/impaler-attack-n.png
			[/frame]
			[frame]
				begin=125
				end=200
				image=units/goblins/impaler.png
			[/frame]
		[/animation]

		[animation]
			direction=ne,nw
			[frame]
				begin=-200
				end=-125
				image=units/goblins/impaler.png
			[/frame]
			[frame]
				begin=-125
				end=-75
				image=units/goblins/impaler-attack-ne.png
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-75
					end=75
					image=units/goblins/impaler-attack-ne.png
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-75
					end=75
					image=units/goblins/impaler-attack-ne.png
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=75
				end=125
				image=units/goblins/impaler-attack-ne.png
			[/frame]
			[frame]
				begin=125
				end=200
				image=units/goblins/impaler.png
			[/frame]
		[/animation]


	[/attack]
	[attack]
		name=spear
		type=pierce
		range=ranged
		damage=5
		number=1
		icon=attacks/javelin-orcish.png
		[animation]
			[missile_frame]
				begin=-150
				end=0
				image="projectiles/spear-n.png"
				image_diagonal="projectiles/spear-ne.png"
			[/missile_frame]
			[frame]
				begin=-250
				end=-150
				image="units/goblins/impaler-attack-se-1.png"
				sound={SOUND_LIST:THROW}
			[/frame]
			[frame]
				begin=-150
				end=-100
				image="units/goblins/impaler-attack-ranged-s.png"
			[/frame]
			[if]
				hits=yes
				[frame]
					sound=spear.ogg
					begin=-100
					end=-50
					image="units/goblins/impaler-attack-ranged-s.png"
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=-50
					image="units/goblins/impaler-attack-ranged-s.png"
				[/frame]
			[/else]
			[frame]
				begin=-50
				end=0
				image="units/goblins/impaler-death-1.png"
			[/frame]
		[/animation]
	[/attack]


	[death]
		[frame]
			begin=0
			end=80
			image="units/goblins/impaler-death-1.png"
		[/frame]
		[frame]
			begin=80
			end=155
			image="units/goblins/impaler-death-2.png"
		[/frame]
		[frame]
			begin=155
			end=225
			image="units/goblins/impaler-death-3.png"
		[/frame]
		[frame]
			begin=225
			end=290
			image="units/goblins/impaler-death-4.png"
		[/frame]
		[frame]
			begin=290
			end=350
			image="units/goblins/impaler-death-5.png"
		[/frame]
		[frame]
			begin=350
			end=405
			image="units/goblins/impaler-death-6.png"
		[/frame]
		[frame]
			begin=405
			end=455
			image="units/goblins/impaler-death-7.png"
		[/frame]
		[frame]
			begin=455
			end=500
			image="units/goblins/impaler-death-8.png"
		[/frame]
		[frame]
			begin=500
			end=650
			image="units/goblins/impaler-death-9.png"
		[/frame]
	[/death]
[/unit]
