#textdomain wesnoth-trow

#I'm putting TROW's common Macros in here.
#This should make my WML a little more sane
#So Far:
#LOOT
#GUARD_UNIT
#HERO
#UNDEAD_INTEL
#RISE_UP_RISE_UP

#define LOOT AMOUNT SIDE
	[sound]
		name=gold.ogg
	[/sound]

	[message]
		speaker=narrator
		message= _ "You retrieve {AMOUNT} pieces of gold."
	[/message]

	[gold]
		side={SIDE}
		amount={AMOUNT}
	[/gold]
#enddef

#define HERO TYPE DESC UDESC SIDE X Y PROFILE
		[unit]
			type={TYPE}
			description={DESC}
			user_description={UDESC}
			profile={PROFILE}
			side={SIDE}
			x={X}
			y={Y}
			{IS_HERO}
			unrenamable=yes

			[modifications]
				{TRAIT_LOYAL}
			[/modifications]
		[/unit]
#enddef

#define GUARD_UNIT TYPE DESC UDESC SIDE X Y
		[unit]
			type={TYPE}
			description={DESC}
			user_description={UDESC}
			side={SIDE}
			x={X}
			y={Y}

			ai_special=guardian

			[modifications]
				{TRAIT_LOYAL}
			[/modifications]
		[/unit]
#enddef

#define UNDEAD_INTEL TYPE DESCRIPTION UDESCRIPTION PROFILE SIDE X Y
	[unit]
		type={TYPE}
		description={DESCRIPTION}
		user_description={UDESCRIPTION}
		profile={PROFILE}
		side={SIDE}
		x={X}
		y={Y}
		[modifications]
			{TRAIT_UNDEAD}
			{TRAIT_LOYAL}
		[/modifications]
	[/unit]
#enddef

#define RISE_UP_RISE_UP X Y
		[filter]
			side=1
		[/filter]
		[filter_second]
			[not]
				#Basically not any type that has plague
				type=Walking Corpse,Soulless
			[/not]
		[/filter_second]

		[store_unit]
		variable=dead_store
		kill=yes
		[filter]
			x={X}
			y={Y}
		[/filter]
		[/store_unit]

#ifdef EASY
		[unit]
			description=A Former Friend
			user_description= _ "A Former Friend"
			type=Walking Corpse
			side=2
			x={X}
			y={Y}
			moves=0
			[modifications]
				{TRAIT_UNDEAD}
				{TRAIT_LOYAL}
			[/modifications]
		[/unit]
#endif
#ifdef NORMAL
		[unit]
			description=A Former Friend
			user_description= _ "A Former Friend"
			type=Soulless
			side=2
			x={X}
			y={Y}
			moves=0
			[modifications]
				{TRAIT_UNDEAD}
				{TRAIT_LOYAL}
			[/modifications]
		[/unit]
#endif
#ifdef HARD
		[unit]
			description=A Former Friend
			user_description= _ "A Former Friend"
			type=Ghoul
			side=2
			x={X}
			y={Y}
			moves=0
			[modifications]
				{TRAIT_UNDEAD}
				{TRAIT_LOYAL}
			[/modifications]
		[/unit]

		{CLEAR_VARIABLE dead_store}
#endif
#enddef
