[unit]
	#textdomain wesnoth-did
	id=Ghast
	name= _ "Ghast"
	race=undead
	image="units/ghast.png"
	[advancefrom]
		unit=Necrophage
		experience=60
	[/advancefrom]
	hitpoints=65
	movement_type=undeadfoot
	movement=5
	level=3
	alignment=chaotic
	advanceto=null
	{AMLA_NECROHEAL}
	experience=50
	cost=41
	usage=fighter
	unit_description= _ "The ghast is a creature taken from humankind's most primal nightmares.  Unlike their lesser cousins, ghouls and necrophages, ghasts are not patient enough to wait for their victim to die from poison before consuming the body.  They attack directly with their enormous mouths, trying to rip the flesh straight from their foes.  Once their enemy is defeated, they eat the rest of the body, gaining strength in the process.

Special Notes: This unit gains has 1 hitpoint added to its maximum whenever it kills a living unit.
"+{SPECIAL_NOTES_POISON}
	# Growth ability
	[abilities]
		[regenerate]
			name=growth
			description=_ "Growth"
		[/regenerate]
	[/abilities]
	[event]
		name=die
		first_time_only=no
		[filter]
			[not]
				race=undead
			[/not]
		[/filter]
		[filter_second]
			ability=growth
		[/filter_second]
		[effect]
			unit_type=Ghast
			apply_to=hitpoints
			increase_total=1
		[/effect]
		# Store and unstore to show the hitpoint bonus text
		[store_unit]
			[filter]
				x,y=$x2,$y2
			[/filter]
			kill=yes
			variable=ghastTemp
		[/store_unit]
		[unstore_unit]
			variable=ghastTemp
			red,green,blue=0,0,255
			text="+1"
		[/unstore_unit]
		[clear_variable]
			name=ghastTemp
		[/clear_variable]
	[/event]

	die_sound=ghoul-hit.wav
	{DEFENSE_ANIM "units/ghast-defend.png" "units/ghast.png" ghoul-hit.wav }
	[movement_costs]
		deep_water=100
		shallow_water=3
	[/movement_costs]
	[resistance]
		impact=100
		fire=90
		cold=60
	[/resistance]
	[attack]
		name=bite
		description=_ "bite"
		icon=attacks/fangs.png
		type=blade
		range=melee
		damage=10
		number=3
		[specials]
			{WEAPON_SPECIAL_POISON}
		[/specials]
		[animation]
			hits=no
			[frame]
				begin=-250
				end=-200
				image="units/ghast.png"
			[/frame]
			[frame]
				begin=-200
				end=-100
				image="units/ghast-attack1.png"
			[/frame]
			[frame]
				begin=-100
				end=100
				image="units/ghast-attack2.png"
				sound={SOUND_LIST:MISS}
			[/frame]
			[frame]
				begin=100
				end=150
				image="units/ghast-attack1.png"
			[/frame]
			[frame]
				begin=150
				end=200
				image="units/ghast.png"
			[/frame]
		[/animation]
		[animation]
			hits=yes
			[frame]
				begin=-250
				end=-200
				image="units/ghast.png"
			[/frame]
			[frame]
				begin=-200
				end=-100
				image="units/ghast-attack1.png"
			[/frame]
			[frame]
				begin=-100
				end=100
				image="units/ghast-attack2.png"
				sound=bite.ogg
			[/frame]
			[frame]
				begin=100
				end=150
				image="units/ghast-attack1.png"
			[/frame]
			[frame]
				begin=150
				end=200
				image="units/ghast.png"
			[/frame]
		[/animation]
	[/attack]
[/unit]
