[unit]
	id=Merman Javelineer
	name= _ "Merman Javelineer"
	race=merman
	image="units/merfolk/javelineer.png"
	profile=portraits/Alex_Jarocha-Ernst/merman-hunter.png
	hitpoints=55
	movement_type=swimmer
	movement=6
	experience=100
	level=3
	alignment=lawful
	advanceto=null
	{AMLA_TOUGH 3}
	undead_variation=swimmer
	cost=48
	usage=mixed fighter
	unit_description= _ "Those mermen who master the art of javelinry can become nearly as effective as an archer - though the heft of their weapons impedes their range, the impact of one is considerably greater. In the water, the mobility of the mermen more than makes up for this when facing foes who cannot swim."
	die_sound=mermen-die.ogg
	{DEFENSE_ANIM "units/merfolk/javelineer-defend.png" "units/merfolk/javelineer.png" mermen-hit.wav }
	[attack]
		name=spear
		type=pierce
		range=melee
		damage=8
		number=2
		[animation]
			direction=se,sw
			[frame]
				begin=-200
				end=-100
				image="units/merfolk/javelineer.png"
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=100
					image="units/merfolk/javelineer-attack-se.png"
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=100
					image="units/merfolk/javelineer-attack-se.png"
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=100
				end=150
				image="units/merfolk/javelineer.png"
			[/frame]
		[/animation]
		[animation]
			direction=ne,nw
			[frame]
				begin=-200
				end=-100
				image="units/merfolk/javelineer-attack-ne.png"
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=100
					image="units/merfolk/javelineer-attack-ne.png"
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=100
					image="units/merfolk/javelineer-attack-ne.png"
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=100
				end=150
				image="units/merfolk/javelineer.png"
			[/frame]
		[/animation]
		[animation]
			direction=n
			[frame]
				begin=-200
				end=-100
				image="units/merfolk/javelineer-attack-n.png"
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=100
					image="units/merfolk/javelineer-attack-n.png"
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=100
					image="units/merfolk/javelineer-attack-n.png"
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=100
				end=150
				image="units/merfolk/javelineer-attack-n.png"
			[/frame]
		[/animation]
		[animation]
			direction=s
			[frame]
				begin=-200
				end=-100
				image="units/merfolk/javelineer-attack-s.png"
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=100
					image="units/merfolk/javelineer-attack-s.png"
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=100
					image="units/merfolk/javelineer-attack-s.png"
					sound=spear-miss.ogg
				[/frame]
			[/else]
			[frame]
				begin=100
				end=150
				image="units/merfolk/javelineer-attack-s.png"
			[/frame]
		[/animation]
	[/attack]
	[attack]
		name=spear
		type=pierce
		range=ranged
		damage=10
		number=4
		[animation]
			[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/merfolk/javelineer-attack-ranged.png"
				sound={SOUND_LIST:THROW}
			[/frame]
			[if]
				hits=yes
				[frame]
					begin=-100
					end=50
					image="units/merfolk/javelineer-attack-ranged.png"
					sound=spear.ogg
				[/frame]
			[/if]
			[else]
				hits=no
				[frame]
					begin=-100
					end=50
					image="units/merfolk/javelineer-attack-ranged.png"
				[/frame]
			[/else]
		[/animation]
	[/attack]
[/unit]
