#textdomain wesnoth-httt

################################
#
# HTTT MACROS FOLLOW
#
################################

#
# HTTT-specific artifacts
#

#define OBJ_SWORD_FIRE X Y ID
	{PLACE_IMAGE items/flame-sword.png ({X}) ({Y})}
	{VARIABLE sword_taken 0}
	[event]
	name=moveto
	first_time_only=no
		[filter]
		side=1
		x={X}
		y={Y}
		[/filter]
		[if]
		[variable]
		name=sword_taken
		numerical_equals=0
		[/variable]
		[then]
			[message]
			speaker=narrator
			image="wesnoth-icon.png"
				message= _ "Do you want this unit to pick up the sword?"
				[option]
				message= _ "Yes"
					[command]
						[object]
						id={ID}
						name= _ "Flaming Sword"
						image=attacks/sword-flaming.png
						duration=forever
						description= _ "This massive blade was created centuries ago by long-forgotten elvish forgemasters, who imbued the bluish steel with an inner magical fire. Tongues of flame dance on the surface, giving the metal a flawless mirrored finish."
						cannot_use_message= _ "Only the leader of an army can wield this sword!"
							[filter]
							type=Fighter,Commander,Lord,Princess,Battle Princess,Elvish Captain,Elvish Hero,Elvish Marshal,Elvish Champion,Paladin
							x,y={X},{Y}
							[/filter]
							[then]
								[removeitem]
								x,y={X},{Y}
								[/removeitem]
								[message]
								speaker=narrator
								image="wesnoth-icon.png"
								message= _ "As you place your hand around the glittering leather hilt, the sword roars to life! Strangely, you feel no heat once you pick it up, yet the grass at your feet bursts into flame as you test the heft of this mighty weapon."
								[/message]
								{VARIABLE sword_taken 1}
							[/then]
							[effect]
							apply_to=new_attack
							name= _ "flaming sword"
							icon=attacks/sword-flaming.png
							type=fire
							range=melee
							special=magical
							damage=15
							number=4
								[sound]
								time=-200
								sound=fire.wav
								[/sound]
							[/effect]
						[/object]
					[/command]
				[/option]
				[option]
				message= _ "No"
				[/option]
			[/message]
		[/then]
		[/if]
	[/event]
#enddef

#define OBJ_VOID_ARMOR X Y ID
	{PLACE_IMAGE items/armor.png ({X}) ({Y})}
	{VARIABLE armor_taken 0}
	[event]
	name=moveto
	first_time_only=no
		[filter]
		side=1
		x,y={X},{Y}
		[/filter]

		[if]
		[variable]
		name=armor_taken
		numerical_equals=0
		[/variable]
		[then]
			[message]
			speaker=narrator
			image="wesnoth-icon.png"
				message= _ "Do you want this unit to pick up the armor?"
				[option]
				message= _ "Yes"
					[command]
						[object]
						id={ID}
						name= _ "Void Armor"
						image="icon_armor.png"
						description= _ "A beautiful chest plate crafted from shimmering black steel, the Void Armor is virtually impenetrable to physical weapons!"
						cannot_use_message= _ "Only a powerful warrior may don this armor!"
						duration=forever
							[filter]
							side=1
							x,y={X},{Y}
							type=Fighter,Commander,Lord,Princess,Battle Princess,Elvish Lord,Elvish High Lord,Elvish Fighter,Elvish Captain,Elvish Hero,Elvish Marshal,Elvish Champion,Elvish Ranger,Elvish Avenger,Horseman,Knight,Lancer,Paladin,Grand Knight,Dwarvish Fighter,Dwarvish Steelclad,Dwarvish Lord,Dwarvish Guardsman,Dwarvish Stalwart,Dwarvish Sentinel
							[/filter]
							[then]
								[removeitem]
								x,y={X},{Y}
								[/removeitem]
								[message]
								speaker=narrator
								image="wesnoth-icon.png"
								message= _ "You struggle to lift and don the heavy plate. Once worn, however, it is amazingly comfortable. You have increased resistance to all physical damage!"
								[/message]
								{VARIABLE armor_taken 1}
								[store_unit]
									[filter]
										x,y={X},{Y}
									[/filter]

									kill=yes
									variable=void_armor_taker
								[/store_unit]

								{VARIABLE void_armor_taker_heals $void_armor_taker.abilities.heals.length}

								{VARIABLE_OP void_armor_heals_temp format "void_armor_taker.abilities.heals[$void_armor_taker_heals].id"}
								{VARIABLE $void_armor_heals_temp "void_armor"}

								{VARIABLE_OP void_armor_heals_temp format "void_armor_taker.abilities.heals[$void_armor_taker_heals].name"}
								{VARIABLE_OP $void_armor_heals_temp format ( _ "void armor")}
								{VARIABLE_OP void_armor_heals_temp format "void_armor_taker.abilities.heals[$void_armor_taker_heals].name_inactive"}
								{VARIABLE_OP $void_armor_heals_temp format ( _ "void armor")}

								{VARIABLE_OP void_armor_heals_temp format "void_armor_taker.abilities.heals[$void_armor_taker_heals].description"}
								{VARIABLE_OP $void_armor_heals_temp format ( _ "The Void Armor grants the following resistances:
blade:  50%
pierce: 50%
impact: 60%
fire:  +10%")}
								{VARIABLE_OP void_armor_heals_temp format "void_armor_taker.abilities.heals[$void_armor_taker_heals].description_inactive"}
								{VARIABLE_OP $void_armor_heals_temp format ( _ "The Void Armor grants the following resistances:
blade:  50%
pierce: 50%
impact: 60%
fire:  +10%")}


								{CLEAR_VARIABLE $void_armor_temp}
								{CLEAR_VARIABLE void_armor_temp}

								[unstore_unit]
									variable=void_armor_taker
								[/unstore_unit]

								{CLEAR_VARIABLE void_armor_taker}
								{CLEAR_VARIABLE void_armor_heals_temp}
							[/then]
							#
							# Set physical resistance to 50/40/40
							#
							[effect]
							apply_to=resistance
								replace=true
								[resistance]
								blade=50
								pierce=60
								impact=60
								[/resistance]
							[/effect]
							#
							# Increase fire resistance by 10%
							#
							[effect]
							apply_to=resistance
								[resistance]
								fire=-10
								[/resistance]
							[/effect]
						[/object]
					[/command]
				[/option]
				[option]
				message= _ "No"
				[/option]
			[/message]
		[/then]
		[/if]
	[/event]
#enddef

#
# This macro isn't actually used in the scenario "The Scepter of Fire"
# because of the random location issue.  We're keeping it here for
# posterity for the time being.
#

#define OBJ_SCEPTER_FIRE X Y ID
	{PLACE_IMAGE items/sceptre-of-fire.png ({X}) ({Y})}
	[event]
	name=moveto
	first_time_only=no
		[filter]
		side=1
		x={X}
		y={Y}
		[/filter]
		[object]
		id={ID}
		name= _ "Scepter of Fire"
		image=items/sceptre-of-fire.png
		duration=forever
		description= _ "This ancient Scepter was forged by the Dwarves. A symbol of the kingship of Wesnoth, the Scepter has the power to shoot fireballs at enemies of the bearer!"
		cannot_use_message= _ "This is the Scepter of Fire. Only a true successor to the throne can possibly dare to take this!"
			[filter]
			type=Princess,Battle Princess,Commander,Lord
			x,y={X},{Y}
			[/filter]
			[then]
				[removeitem]
				x,y={X},{Y}
				[/removeitem]
			[/then]
			[effect]
			apply_to=variation
			name=scepter
			[/effect]
		[/object]
	[/event]
#enddef

################################
#
# SCEPTER OF FIRE MACROS FOLLOW
#
################################


#define SOF_TERRAIN_MASK

[terrain_mask]
	x,y=1,1
	mask="
_f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    Re,    Re,    _f,    Uh,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    Uh,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f
    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Uh,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f
    _f,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    Re,    _f,    _f,    Re,    Re,    Re,    Re,    Uh,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    Uh,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    Re
    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Uh,    _f,    _f,    _f,    Uh,    _f,    _f,    Uh
    _f,    _f,    Re,    _f,    Re,    Re,    Re,    _f,    Re,    Re,    Re,    Re,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Uh,    _f,    _f,    _f
    Re,    Re,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re
    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    Uh,    Re,    Re,    Re,    Re,    Re,    Re,    Uh,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f
    Uh,    Re,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Uh,    _f,    Re,    _f,    _f,    Re,    Uh,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f
    Re,    Re,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    Uh,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    Re,    _f,    Re,    Re,    _f,    Re,    Uh,    _f,    _f,    _f,    Uh,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    _f,    _f
    Re,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Uh,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    Uh,    _f,    Re,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Uh
    Re,    _f,    Uh,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Uh,    Re,    _f,    _f,    _f,    Re,    Re
    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Uh,    _f,    _f,    _f,    _f,    _f,    Uh,    _f,    Re,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f
    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    Uh,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f
    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re
    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    Uh,    _f,    _f,    _f,    Uh,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    Re,    _f,    Re
    _f,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    Re
    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    Uh,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f
    Re,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Uh,    _f,    Re,    _f,    _f,    Re,    Re,    Re
    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Uh,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    Re,    _f
    _f,    Re,    _f,    Re,    Uh,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Uh,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Uh,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f
    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f
    _f,    Re,    Re,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Uh,    Re,    Re,    Uh,    Re,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f
    Re,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    Re,    Re,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f
    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    Re,    _f
    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Uh,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Uh,    Re,    _f,    Re,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Uh,    _f,    _f,    _f
    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Uh,    _f,    Uh,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re
    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Uh,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f
    _f,    _f,    _f,    Uh,    _f,    Re,    Uh,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    Uh,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    Uh,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re
    Re,    Uh,    Re,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Uh,    _f,    Re,    Re,    Uh,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re
    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Uh,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f
    _f,    Re,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    Re,    Re
    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    Re,    Re,    Re,    Re,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    Re,    _f
    Re,    _f,    _f,    _f,    Uh,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f
    Uh,    _f,    Uh,    _f,    _f,    _f,    _f,    _f,    Re,    Uh,    Re,    _f,    _f,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Uh,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re
    _f,    _f,    _f,    Re,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    Re,    Re,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    Uh,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    Re
    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Uh,    _f,    Re,    Re,    Uh,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    Uh,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    Uh,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    _f
    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Uh,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f
    _f,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f
    Re,    _f,    _f,    Re,    Re,    Re,    Re,    Re,    _f,    Uh,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    Uh,    _f,    Uh,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    Re
    Re,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f
    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Uh,    _f,    _f,    _f,    Re
    _f,    Re,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    Re,    Re,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Uh,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Uh,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    Re,    Re,    _f,    Re,    Re,    _f,    _f
    Re,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f
    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    Uh,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    Uh,    Re,    _f,    Re,    Re
    Re,    Re,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    Re,    _f,    Re,    _f,    Re,    Re,    Re,    _f,    _f,    Uh,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f
    Re,    _f,    Re,    Uh,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    Re,    Uh,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    Re,    _f
    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    Uh,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Uh,    _f,    _f,    Re,    Re,    _f,    Re,    Re,    Re,    Re,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re
    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Uh,    _f,    _f,    _f,    _f,    _f,    _f
    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    Re
    _f,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Uh,    _f,    _f,    _f
    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    Re,    _f,    Re,    _f,    Re,    Uh,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    Re
    _f,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    Re,    Uh,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    Re,    Re,    _f,    Re,    _f,    _f,    Re,    Re,    _f
    _f,    Re,    Re,    Re,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re
    Re,    _f,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Uh,    Re,    _f,    _f,    _f,    _f,    Uh,    Re,    Re,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Re,    Uh,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Uh,    _f,    Re,    _f,    Re,    Re,    _f,    _f
    _f,    _f,    _f,    _f,    Re,    Uh,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    Re,    Re,    Uh,    _f,    Re,    Re,    _f,    Re,    Uu^Uf,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Uu^Uf,    Re,    _f,    Re
    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,   Uu^Vud,    _f,    Re,    Re,    Re,    Re,    Re,    _f,    _f,    Re,    _f,    Uu^Uf,    Re,    _f,    _f,    Re,    _f,    Re,   Uu^Vud,    _f,    _f,    Uu^Uf,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Re,   Uu^Vud,    _f
    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Uu^Uf,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,   Uu^Vud,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,   Uu^Vud,    _f,    _f,    _f,    _f
    _f,    _f,    Re,    _f,   Uu^Vud,    _f,    _f,    _f,    _f,    _f,    _f,   Uu^Vud,    Re,    Re,    Re,    _f,    _f,    _f,    Re,    Re,    Re,    Uu^Uf,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Uu^Uf,    _f,    _f,    _f,    Re,    _f,    _f,    Uu^Uf,    _f,    Re,   Uu^Vud,    _f,    Re,    _f,    Re,    _f,    Re
    _f,    _f,    _f,   Uu^Vud,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    Uu^Uf,    Re,    Re,   Uu^Vud,    Re,   Uu^Vud,    _f,    _f,    _f,    _f,   Uu^Vud,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,   Uu^Vud,    _f,    _f,    _f,    _f,    Re,    Re,    _f,    Uu^Uf,    _f,    _f,    _f,    Uu^Uf,    _f,    _f,    Uu^Uf
    _f,    _f,    Re,    _f,   Uu^Vud,    Re,    Re,    _f,    Re,    Re,    _f,    Re,    _f,    _f,    Re,   Uu^Vud,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Re,   Uu^Vud,    _f,    _f,    _f,    _f,    _f,    _f,    Uu^Uf,   Uu^Vud,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    Uu^Uf,    _f,    _f,    _f
    Re,    Re,   Uu^Vud,    Re,    _f,    Re,    _f,    _f,    Re,    Re,    Re,    _f,    Re,    Re,   Uu^Vud,    Re,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,   Uu^Vud,    _f,    Re,    _f,    _f,   Uu^Vud,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    Uu^Uf,    Re
    _f,    Re,    Re,    _f,    _f,    _f,   Uu^Vud,    Re,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    Uu^Uf,    _f,    Re,    Re,    Re,   Uu^Vud,    Re,    Uu^Uf,    Re,    _f,    Re,    Re,    Re,    _f,    _f,    _f,   Uu^Vud,    _f,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,   Uu^Vud,    _f,    _f,    _f,    Re,    _f
    Uu^Uf,    Re,   Uu^Vud,    Re,    Re,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    Uu^Uf,    _f,    _f,    _f,    _f,    Re,    Uu^Uf,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,   Uu^Vud,    Re,    _f,    _f,    Re,    _f
    Re,    Re,    Re,    Re,    Re,    Re,    _f,    Re,    _f,    Uu^Uf,    _f,    _f,    _f,    _f,    _f,    Re,   Uu^Vud,    _f,    _f,   Uu^Vud,    Re,    Re,    Re,    Re,    _f,    Re,    Uu^Uf,    _f,    _f,    _f,    Uu^Uf,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,   Uu^Vud,   Uu^Vud,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f
    _f,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Uu^Uf,    _f,    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    Uu^Uf,    _f,    Re,    Re,    Re,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    Uu^Uf
    Re,    _f,    Uu^Uf,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,   Uu^Vud,   Uu^Vud,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Uu^Uf,    Re,    _f,    _f,    _f,    Re,    Re
    Re,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,   Uu^Vud,    Uu^Uf,    _f,    _f,    _f,    _f,    _f,    Uu^Uf,    _f,   Uu^Vud,    Re,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,   Uu^Vud,    Re,    _f,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f
    Re,    _f,    _f,   Uu^Vud,    _f,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,   Uu^Vud,    _f,   Uu^Vud,    _f,    _f,    Re,    Re,    Re,    _f,   Uu^Vud,    _f,    Uu^Uf,   Uu^Vud,    _f,    Re,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Uu^Uf,    _f,    _f,    _f,    _f,    _f
    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    Re,    Re,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    _f,    _f,    _f,    Re,    _f,    _f,    Re
    _f,    Re,    _f,    _f,    Re,    _f,    _f,    _f,    Re,    Re,    _f,    _f,    Re,    _f,   Uu^Vud,    _f,    Re,    Re,    _f,    _f,    _f,    Re,    _f,    Re,    _f,    _f,    _f,   Uu^Vud,    Re,    Uu^Uf,    _f,    _f,    _f,    Uu^Uf,    Re,    _f,    _f,    Re,    _f,    Re,    _f,   Uu^Vud,    Re,    _f,    Re,    Re,    Re,    Re,    _f,    Uu^Uf
"
	[rule]		# Make sure your castle is not converted
	old=Cud
	new=Re, Uu^Vud, Uh, Uu^Uf
	terrain=Cud
	[/rule]
	[rule]		# Make sure cave walls are not converted
	old=Xu
	new=Re, Uu^Vud, Uh, Uu^Uf
	terrain=Xu
	[/rule]
	[rule]		# Make sure the keep is not converted
	old=Kud
	new=Re, Uu^Vud, Uh, Uu^Uf
	terrain=Kud
	[/rule]
	[rule]		# Convert cave villages to stone villages
	old=Vu
	new=_f, Re, Uu^Vud, Uh, Uu^Uf
	terrain=Uu^Vud
	[/rule]
	[rule]		# Add stone villages
	old=Uu
	new=Uu^Vud
	terrain=Uu^Vud
	[/rule]
	[rule]		# Add roads
	old=Uu
	new=Re
	terrain=Re
	[/rule]
	[rule]		# Add hilly caves
	old=Uu
	new=Uh
	terrain=Uh
	[/rule]
	[rule]		# Add a mushroom forest
	old=Uu
	new=Uu^Uf
	terrain=Uu^Uf
	[/rule]
[/terrain_mask]

#enddef

#define PLACE_SCEPTER
			[item]
			image=items/sceptre-of-fire.png
			[/item]

			[event]
			same_location_as_previous=yes
			name=moveto
			first_time_only=no
				[filter]
				side=1
				x=22
				y=32
				[/filter]
				[object]
				id=object_scepter
				name= _ "Scepter of Fire"
				image=items/sceptre-of-fire.png
				duration=forever
				description= _ "This ancient Scepter was forged by the great Dwarves of the Deep Mountains. A symbol of the kingship of Wesnoth, the Scepter has the power to shoot fireballs at enemies of the bearer!"
				cannot_use_message= _ "This is the Scepter of Fire. Only a true successor to the throne can possibly dare to take this!"
					[filter]
					type=Princess,Battle Princess,Fighter,Commander,Lord
					[/filter]
					[effect]
					apply_to=variation
					name=scepter
					[/effect]
				[/object]
			[/event]
#enddef

#define KONRAD_GETS_SCEPTER
			[event]
			same_location_as_previous=yes
			name=moveto
				[filter]
				description=Konrad
				[/filter]
				[set_variable]
				name=scepter
				value="Konrad"
				[/set_variable]
				[message]
				description=Konrad
				message= _ "Here it is at last, I have the Scepter!"
				[/message]
				[message]
				description=Kalenz
				message= _ "So it is in our hands! Now let us leave this stinking pit."
				[/message]
				[message]
				description=Li'sar
				message= _ "I think that if we travel just a little north, we might be able to get out."
				[/message]
				[endlevel]
				result=victory
				[/endlevel]
			[/event]
#enddef

#define LISAR_GETS_SCEPTER
			[event]
			same_location_as_previous=yes
			name=moveto
				[filter]
				description=Li'sar
				[/filter]
				[set_variable]
				name=scepter
				value="Li'sar"
				[/set_variable]
				[message]
				description=Li'sar
				message= _ "At last! I have the Scepter!"
				[/message]
				[message]
				description=Konrad
				message= _ "Indeed. You managed to reach it, Li'sar. I hope you shall use it wisely."
				[/message]
				[message]
				description=Li'sar
				message= _ "My first use for it is going to be to help us get out of this hole! I hope you consider that wise."
				[/message]
				[message]
				description=Delfador
				message= _ "The Scepter makes its wielder powerful, but hardly immortal, child. Use it prudently. Now come, I believe there is an exit to the north!"
				[/message]
				[message]
				description=Li'sar
				message= _ "I think I know what I'm doing. Come, let us go!"
				[/message]

				[endlevel]
				result=victory
				[/endlevel]
			[/event]
#enddef

#define PASSAGE_NORMAL DESTINATION WIDTH WINDINESS JAGGED
[passage]
destination={DESTINATION}
width={WIDTH}
windiness={WINDINESS}
jagged={JAGGED}
[/passage]
#enddef

#define PASSAGE_CHANCE CHANCE DESTINATION WIDTH WINDINESS JAGGED
[passage]
chance={CHANCE}
destination={DESTINATION}
width={WIDTH}
windiness={WINDINESS}
jagged={JAGGED}
[/passage]
#enddef

#define ERASE_CASTLE SIDE LETTER
[store_unit]
variable=side_store
	[filter]
	side={SIDE}
	canrecruit=1
	[/filter]
[/store_unit]
{VARIABLE min_x $side_store.x}
{VARIABLE_OP min_x add -1}
{VARIABLE min_y $side_store.y}
{VARIABLE_OP min_y add -1}
{VARIABLE max_x $side_store.x}
{VARIABLE_OP max_x add 1}
{VARIABLE max_y $side_store.y}
{VARIABLE_OP max_y add 1}
{VARIABLE_OP x_range format ("$min_x|-|$max_x")}
{VARIABLE_OP y_range format ("$min_y|-|$max_y")}
[terrain]
x=$x_range
y=$y_range
letter={LETTER}
[/terrain]
#enddef

#textdomain wesnoth
#define UNDERGROUND_VOLCANO R G B
#
# -30, -40, -40 are the default good values for an underground
# reddish hue
#
		[time]
		id=underground
		name= _ "Underground"
		image=misc/schedule-underground.png
		lawful_bonus=-25
		red={R}
		green={G}
		blue={B}
		[/time]
#enddef
