[unit]
	id=Goblin Spearman
	name= _ "Goblin Spearman"
	race=goblin
	image="units/goblins/spearman.png"
	ellipse="misc/ellipse-nozoc"
	{MAGENTA_IS_THE_TEAM_COLOR}
	hitpoints=18
	movement_type=orcishfoot
	movement=4
	experience=18
	level=0
	alignment=chaotic
	advanceto=Goblin Impaler,Goblin Rouser
	cost=8
	usage=fighter
	unit_description= _ "In any litter of orcs, several are born much smaller and weaker than the rest. These runts are called 'Goblins' and are looked down on by the rest of their kin. In battle, these are given the most meager of equipment, and are used as a soak-off force to give the Warlords time to prepare the real assault.

Some speculate that the existence of these creatures is the beginning of a failure of the orcish bloodline, though no one knows enough of their history to state anything conclusive."
	die_sound={SOUND_LIST:GOBLIN_DIE}
	{DEFENSE_ANIM "units/goblins/spearman-defend.png" "units/goblins/spearman.png" {SOUND_LIST:GOBLIN_HIT} }
	[attack]
		name=spear
		type=pierce
		range=melee
		damage=4
		number=3
		icon=attacks/spear-orcish.png
		[animation]
			direction=n
			[frame]
				begin=-200
				end=-100
				image=units/goblins/spearman-attack-n1.png
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=100
					image=units/goblins/spearman-attack-n2.png
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=100
					image=units/goblins/spearman-attack-n2.png
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=100
				end=200
				image=units/goblins/spearman-attack-n1.png
			[/frame]
		[/animation]
		[animation]
			direction=s
			[frame]
				begin=-200
				end=-100
				image=units/goblins/spearman-attack-s1.png
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=100
					image=units/goblins/spearman-attack-s2.png
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=100
					image=units/goblins/spearman-attack-s2.png
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=100
				end=200
				image=units/goblins/spearman-attack-s1.png
			[/frame]
		[/animation]

		[animation]
			direction=ne,nw
			[frame]
				begin=-200
				end=-100
				image=units/goblins/spearman-attack-ne1.png
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=100
					image=units/goblins/spearman-attack-ne2.png
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=100
					image=units/goblins/spearman-attack-ne2.png
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=100
				end=200
				image=units/goblins/spearman-attack-ne1.png
			[/frame]
		[/animation]
		[animation]
			direction=se,sw
			[frame]
				begin=-200
				end=-100
				image=units/goblins/spearman-attack-se1.png
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=100
					image=units/goblins/spearman-attack-se2.png
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=100
					image=units/goblins/spearman-attack-se2.png
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=100
				end=200
				image=units/goblins/spearman-attack-se1.png
			[/frame]
		[/animation]
	[/attack]



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

		[animation]
			direction=ne,nw
			[missile_frame]
				begin=-150
				end=0
				image="projectiles/spear-n.png"
				image_diagonal="projectiles/spear-ne.png"
			[/missile_frame]
			[frame]
				begin=-200
				end=-100
				image="units/goblins/spearman.png"
				sound={SOUND_LIST:THROW}
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=50
					image="units/goblins/spearman-attack-ne1.png"
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=50
					image="units/goblins/spearman-attack-ne1.png"
				[/frame]
			[/else]
		[/animation]

		[animation]
			direction=s
			[missile_frame]
				begin=-150
				end=0
				image="projectiles/spear-n.png"
				image_diagonal="projectiles/spear-ne.png"
			[/missile_frame]
			[frame]
				begin=-200
				end=-100
				image="units/goblins/spearman.png"
				sound={SOUND_LIST:THROW}
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=50
					image="units/goblins/spearman-attack-s1.png"
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=50
					image="units/goblins/spearman-attack-s1.png"
				[/frame]
			[/else]
		[/animation]

		[animation]
			direction=se,sw
			[missile_frame]
				begin=-150
				end=0
				image="projectiles/spear-n.png"
				image_diagonal="projectiles/spear-ne.png"
			[/missile_frame]
			[frame]
				begin=-200
				end=-100
				image="units/goblins/spearman.png"
				sound={SOUND_LIST:THROW}
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=50
					image="units/goblins/spearman-attack-se1.png"
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=50
					image="units/goblins/spearman-attack-se1.png"
				[/frame]
			[/else]
		[/animation]

	[/attack]
	[idle_anim]
		{STANDARD_IDLE_FILTER}
		start_time=0
		[frame]
			duration=150
			image="units/goblins/spearman-idle-1.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-2.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-3.png"
		[/frame]
		[frame]
			duration=300
			image="units/goblins/spearman-idle-4.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-5.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-6.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-7.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-8.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-9.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-10.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-11.png"
		[/frame]
		[frame]
			duration=150
			image="units/goblins/spearman-idle-12.png"
		[/frame]
	[/idle_anim]
[/unit]
