All pastes #335761 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-02-01 15:55 UTC
rendered paste body

#######SHOPS#######
###############################HERO############################
#define HERO_OPTIONS SIDE
[command]

{VARIABLE in_hero_shop yes}
	[while] 
		[variable] 
		name=in_hero_shop
		equals=yes 
		[/variable] 
	[do] 
		[store_gold] 
		side=$side_number 
		variable=gold 
		[/store_gold]

	[message]
	speaker=narrator
	caption=Shopkeeper
	message= _ "Hey there, young warrior. You have $gold gold to spend. What would you like to buy?"

	[option]
		message="Strength Training 100 gold: +1 melee damage"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=100
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-100
			[/gold]
			[object]
			silent=yes
				[effect]
				apply_to=attack
				range=melee
				increase_damage=1
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Ranged Training 100 gold: +1 ranged damage"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=100
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-100
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=attack
					range=ranged
					increase_damage=1
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Melee Agility Training 355 gold: +1 melee strike"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=355
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-355
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=attack
					range=melee
					increase_attacks=1
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Ranged Dexterity Training 350 gold: +1 ranged strike"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=350
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-350
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=attack
					range=ranged
					increase_attacks=1
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Speed Training 333 gold: +1 movement point"
		[command]
		[if]
			[variable]
				name=gold
				greater_than_equal_to=333
			[/variable]
		[then]
			[gold]
				side=$side_number
				amount=-333
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=movement
					increase=1
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Endurance Training 150 gold: +10% max HP +5 max HP 10 HP"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=150
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-150
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase_total=10%
				[/effect]
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase_total=5
				[/effect]
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase=10
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Endurance Training 275 gold: +20% max HP +10 max HP 20 HP"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=275
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-275
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase_total=20%
				[/effect]
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase_total=10
				[/effect]
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase=20
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]	


	[option]
		message="Endurance Training 1000 gold: +100% max HP +50 max HP 100 HP"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=1000
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-1000
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase_total=100%
				[/effect]
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase_total=50
				[/effect]
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase=100
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Leave."
			[command]
			{VARIABLE in_hero_shop no}
			[/command]
	[/option]
	[/message]

	[/do]
	[/while]

[/command]
#enddef

######################################BUY WEAPONS#########################
#define ARMORY_OPTIONS SIDE
[command]
{VARIABLE in_weapon_shop yes}
	[while] 
		[variable] 
		name=in_weapon_shop
		equals=yes 
		[/variable] 
	[do] 
		[store_gold] 
		side=$side_number 
		variable=gold 
		[/store_gold]

	[message]
	speaker=narrator
	caption=Weaponsmith
	message= _ "Hey there and welcome to me humble armory. You have $gold gold to spend. What can I do for ya?"

	[option]
		message="Buy a sword 210 gold: 7-3 melee blade attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=210
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-210
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=sword 
					type=blade 
					range=melee 
					damage=7
					number=3	
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy a mace 225 gold: 10-2 melee impact attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=225
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-225
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=mace 
					type=impact 
					range=melee 
					damage=10
					number=2	
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy a torch 265 gold: 6-3 melee fire attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=265
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-265
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=torch 
					type=fire 
					range=melee 
					damage=5
					number=3	
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy a Blessed Staff 190 gold: 11-1 melee holy attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=190
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-190
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=blessed staff 
					type=holy 
					range=melee 
					damage=11
					number=1	
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy a Spear 200 gold: 13-1 melee pierce firststrike attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=200
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-200
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=spear
					type=pierce 
					range=melee 
					damage=13
					number=1	
					[specials]
					{WEAPON_SPECIAL_FIRSTSTRIKE}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy a Baneblade 340 gold: 5-3 melee blade drain attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=340
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-340
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=baneblade
					type=blade
					range=melee 
					damage=5
					number=3
					[specials]
					{WEAPON_SPECIAL_DRAIN}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Buy an ancient staff 1450 gold: 13-5 melee holy attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=1450
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-1450
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=blessed staff 
					type=holy
					icon=attacks/staff-magic.png 
					range=melee 
					damage=13
					number=5	
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]


	[option]
		message="Buy a short bow 250 gold: 6-3 ranged pierce attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=250
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-250
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=short bow
					type=pierce 
					range=ranged 
					damage=6
					number=3	
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy a Power Bow 280 gold: 7-2 ranged pierce marksman attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=280
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-280
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=power bow 
					type=pierce 
					range=ranged
					damage=7
					number=2	
					[specials]
						{WEAPON_SPECIAL_MARKSMAN}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy a Fire Scepter 325 gold: 16-1 ranged fire magical attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=325
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-325
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=fire scepter 
					type=fire
					range=ranged 
					damage=16
					number=1
					[specials]
						{WEAPON_SPECIAL_MAGICAL}
					[/specials]	
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy an Ice Wand 300 gold: 15-1 ranged cold magical attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=300
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-300
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=ice wand 
					type=cold 
					range=ranged 
					damage=15
					number=1 
					[specials]
						{WEAPON_SPECIAL_MAGICAL}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy a Curse Scepter 350 gold: 12-1 ranged cold drain attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=350
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-350
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=Curse scepter
					type=cold 
					range=ranged 
					damage=12
					number=1 
					[specials]
						{WEAPON_SPECIAL_DRAIN}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy Poison Darts 380 gold: 3-3 ranged pierce poison attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=380
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-380
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=poison darts
					type=pierce
					range=ranged 
					damage=3
					number=3 
					[specials]
						{WEAPON_SPECIAL_POISON}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy a Net 550 gold: 4-2 ranged impact slow attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=550
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-550
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=net
					type=impact
					range=ranged 
					damage=4
					number=2 
					[specials]
						{WEAPON_SPECIAL_SLOW}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Buy a Scepter  of the Dragon 1650 gold: 13-5 ranged cold drain attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=1650
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-1650
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=Curse scepter
					type=cold
					icon=attacks/staff-necromantic.png 
					range=ranged 
					damage=13
					number=5 
					[specials]
						{WEAPON_SPECIAL_DRAIN}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Buy an Axe of Rage 644 gold: 6-4 melee blade rage attack (3-round berserk)"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=644
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-644
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=Axe of Rage 
					type=blade 
					range=melee 
					damage=6
					number=4 
					[specials]
						{WEAPON_SPECIAL_RAGE_3}	
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy Pickpocket Gloves 430 gold: 3-3 melee impact pickpocket attack (gives 10 gold on each succesful hit)"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=430
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-430
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=pickpocket gloves
					type=impact
					range=melee 
					damage=3
					number=3 
					[specials]
						{WEAPON_SPECIAL_PICKPOCKET}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy Platemail armor 1025 gold, strong but heavy: +10% to all physical resistances, -1 movement point"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=525
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-525
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=resistance
					replace=false
					[resistance]
					blade=-10
					pierce=-10
					impact=-10
					[/resistance]
				[/effect]
				[effect]
					apply_to=movement
					increase=-1
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Leave."
			[command]
			{VARIABLE in_weapon_shop no}
			[/command]
	[/option]
	[/message]

	[/do]
	[/while]

[/command]
#enddef

############################WIZARD###################
#define WIZARD_OPTIONS SIDE
[command]
{VARIABLE in_wizard_shop yes}
	[while] 
		[variable] 
		name=in_wizard_shop
		equals=yes 
		[/variable] 
	[do] 
		[store_gold] 
		side=$side_number 
		variable=gold 
		[/store_gold]

	[message]
	speaker=narrator
	caption=Great Wizard
	message= _ "Welcome to my tower of magic. You have $gold gold to spend. What may I do for you, young one?"

	[option]
		message="Tiny Healing 7 gold: +15 HP"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=5
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-7
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase=15
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Minor Healing 13 gold: +30 HP"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=13
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-13
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase=30
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Medium Healing 20 gold: +50 HP"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=20
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-20
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase=50
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Major Healing 35 gold: +100 HP"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=35
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-35
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase=100
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Supreme Healing 80 gold: +250 HP"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=80
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-80
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=hitpoints
					heal_full=no
					increase=250
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Ultimate Healing 400 gold: Full life"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=400
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-400
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=hitpoints
					heal_full=yes
					increase=2000
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Magical Remedy 70 gold: Removes poison and slow"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=70
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-70
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=status
					remove=poisoned
				[/effect]
				[effect]
					apply_to=status
					remove=slowed
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Elemental Protection Spell 750 gold: +10% fire and cold resistance"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=550
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-550
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=resistance
					replace=false
					[resistance]
					fire=-10
					cold=-10
					[/resistance]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Shelter from the Light's Wrath Spell 700 gold: +10% holy resistance"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=500
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-500
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=resistance
					replace=false
					[resistance]
					holy=-10
					[/resistance]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]

	[option]
		message="Leave."
			[command]
			{VARIABLE in_wizard_shop no}
			[/command]
	[/option]
	[/message]

	[/do]
	[/while]

[/command]
#enddef

#define KING_OPTIONS SIDE
[command]
{VARIABLE shopping yes}
	[while] 
		[variable] 
		name=shopping
		equals=yes 
		[/variable] 
	[do] 
		[store_gold] 
		side=$side_number 
		variable=gold 
		[/store_gold]

	[message]
	speaker=narrator
	caption=Shopkeeper
	message= _ "You have $gold gold today. What can I do for you and His Majesty?"

	[option]
		message="Heal your king: 65 gold +30 HP"
		[command]
			[if]
			[variable]
			name=gold
			greater_than_equal_to=65
			[/variable]
				[then]
				[gold]
				side=$side_number
				amount=-65
				[/gold]
				[object]
				silent=yes
					[filter]
					side=8
					canrecruit=1
					[/filter]
					[effect]
					apply_to=hitpoints
					heal_full=no
					increase=30
					[/effect]
				[/object]
				[/then]
			[/if]		
		[/command]
	[/option]

	[option]
		message="Increase your king's max HP 300 gold: +25 max HP +25 HP"
		[command]	
			[if]
			[variable]
			name=gold
			greater_than_equal_to=300
			[/variable]
				[then]
				[gold]
				side=$side_number
				amount=-300
				[/gold]
				[object]
				silent=yes
					[filter]
					side=8
					canrecruit=1
					[/filter]
					[effect]
					apply_to=hitpoints
					heal_full=no
					increase_total=25
					[/effect]
					[effect]
					apply_to=hitpoints
					heal_full=no
					increase=25
					[/effect]
				[/object]
				[/then]
			[/if]		
		[/command]
	[/option]
	[option]
		message="Increase your king's strength 150 gold: +1 melee damage for the King"
		[command]	
			[if]
			[variable]
			name=gold
			greater_than_equal_to=150
			[/variable]
				[then]
				[gold]
				side=$side_number
				amount=-150
				[/gold]
				[object]
				silent=yes
					[filter]
					side=8
					canrecruit=1
					[/filter]
					[effect]
					apply_to=attack
					range=melee
					increase_damage=1
					[/effect]
				[/object]
				[/then]
			[/if]		
		[/command]
	[/option]
	[option]
		message="Boost your king's ranged 150 gold: +1 ranged damage for the King"
		[command]	
			[if]
			[variable]
			name=gold
			greater_than_equal_to=150
			[/variable]
				[then]
				[gold]
				side=$side_number
				amount=-150
				[/gold]
				[object]
				silent=yes
					[filter]
					side=8
					canrecruit=1
					[/filter]
					[effect]
					apply_to=attack
					range=ranged
					increase_damage=1
					[/effect]
				[/object]
				[/then]
			[/if]		
		[/command]
	[/option]
	[option]
		message="Boost your king's agility 720 gold: +1 melee and ranged strikes for the King"
		[command]	
			[if]
			[variable]
			name=gold
			greater_than_equal_to=720
			[/variable]
				[then]
				[gold]
				side=$side_number
				amount=-720
				[/gold]
				[object]
				silent=yes
					[filter]
					side=8
					canrecruit=1
					[/filter]
					[effect]
					apply_to=attack
					range=melee
					increase_attacks=1
					[/effect]
					[effect]
					apply_to=attack
					range=ranged
					increase_attacks=1
					[/effect]
				[/object]
				[/then]
			[/if]		
		[/command]
	[/option]
	[option]
		message="Buy your king a baneblade 400 gold: 7-2 melee blade drain attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=400
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-400
			[/gold]
			[object]
			silent=yes
			[filter]
			side=8
			canrecruit=1
			[/filter]
				[effect]
					apply_to=new_attack 
					name=baneblade
					type=blade
					range=melee 
					damage=7
					number=2
					[specials]
					{WEAPON_SPECIAL_DRAIN}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Buy your king a net 400 gold: 7-1 ranged impact slow attack"
		[command]
		[if]
			[variable]
			name=gold
			greater_than_equal_to=400
			[/variable]
		[then]
			[gold]
			side=$side_number
			amount=-400
			[/gold]
			[object]
			silent=yes
				[effect]
					apply_to=new_attack 
					name=net
					type=impact
					range=ranged 
					damage=7
					number=1
					[specials]
					{WEAPON_SPECIAL_SLOW}
					[/specials]
				[/effect]
			[/object]
		[/then]
		[/if]
		[/command]
	[/option]
	[option]
		message="Cure your king of poison and slowing: 50 gold"
		[command]	
			[if]
			[variable]
			name=gold
			greater_than_equal_to=10
			[/variable]
				[then]
				[gold]
				side=$side_number
				amount=-10
				[/gold]
				[object]
				silent=yes
					[filter]
					side=8
					canrecruit=1
					[/filter]
					[effect]
					apply_to=status
					remove=poisoned
					[/effect]
					[effect]
					apply_to=status
					remove=slowed
					[/effect]
				[/object]
				[/then]
			[/if]		
		[/command]
	[/option]

	[option]
		message="Leave."
		[command]
		{VARIABLE shopping no}
		[/command]
	[/option]

	[/message]

	[/do]
	[/while]

[/command]
#enddef

#define SHOP X Y SIDE
[event]
name=moveto
first_time_only=no
	[filter]
	x,y={X},{Y}
	canrecruit=1
	[/filter]

	{VARIABLE in_all_shops yes} 
	[while] 
		[variable] 
		name=in_all_shops
		equals=yes 
		[/variable] 
	[do] 
		[store_gold] 
		side=$side_number 
		variable=gold 
		[/store_gold] 
		
		[message]
		speaker=narrator
		message="Welcome to your castle. You have $gold gold to spend. Where would you like to go?"
			[option]
			message="Training Grounds"
				{HERO_OPTIONS {SIDE} }
			[/option]
			[option]
			message="Wizard's Tower"
				{WIZARD_OPTIONS {SIDE} }
			[/option]
			[option]
			message="The Armory"
				{ARMORY_OPTIONS {SIDE} }
			[/option]
			[option]
			message="King's Attendants"
				{KING_OPTIONS {SIDE} }
			[/option]
			[option]
			message="Leave."
				[command]
				{VARIABLE in_all_shops no}
				[/command]
			[/option]
		[/message]		
	[/do]
	[/while]
[/event]
#enddef

{SHOP 14 15 1}
{SHOP 17 14 2}
{SHOP 20 15 3}
{SHOP 20 18 4}
{SHOP 17 20 5}
{SHOP 14 18 6}