*comment Copyright 2015 by Mike Walter.
*comment The Lost Heir 2: Forging a Kingdom
*comment Store
*allow_reuse
*temp basics true
*temp thiefstuff true
*temp stablestuff true
*temp templeopen true
*temp buy_horse_only false
*if (store_scene="exile_knightstore")
	*set basics true
	*set thiefstuff false
	*set stablestuff true
	*set templeopen false
	*goto Shopping_loop
*if (store_scene="exile_dobbton")
	*set basics true
	*set thiefstuff true
	*set stablestuff true
	*set templeopen true
	*goto Shopping_loop
*if (store_scene="brightwater_to_politics")
	*set basics true
	*set thiefstuff true
	*set stablestuff true
	*set templeopen true
	*goto Shopping_loop
*if (store_scene="begin_luddmarch")
	*set basics true
	*set thiefstuff true
	*set stablestuff true
	*set templeopen true
	*goto Shopping_loop
*if (store_scene="luddmarch_buyhorse")
	*set buy_horse_only true
	*goto Stable_loop
ERROR, PLEASE TELL DEVELOPER THAT THIS HAPPENED:  I forgot to limit what the store has in it!  This is done at the beginning of "store" for store_scene="${store_scene}"
*label Shopping_loop

*label Shopping_loop_ns
You have: ${gold} Gold
*choice
	*if ((basics) and (((sword=false) or (dagger=false)) or (bow=false))) #Buy weapons.
		*label Shopping_Weapons_loop
		*if (((sword) and (dagger)) and (bow))
			*goto Shopping_loop_ns
		You have: ${gold} Gold
		*choice
			*if (sword=false)
				*selectable_if (gold>=30) #Buy a sword. (Needs 30 Gold)
					You purchase a blade.  It comes with a sheath which fits onto your belt.
					*if (showstats)
						*line_break
						(Gold -30 and Gained Sword)
					*set gold -30
					*set sword true
					
					*goto Shopping_Weapons_loop
			*if (dagger=false)
				*selectable_if (gold>=15) #Buy a dagger. (Needs 15 Gold)
					You purchase a small dagger.  It comes with a sheath which fits onto your belt.
					*if (showstats)
						*line_break
						(Gold -15 and Gained Dagger)
					*set gold -15
					*set dagger true
					
					*goto Shopping_Weapons_loop
			*if (bow=false)
				*selectable_if (gold>=40) #Buy a bow. (Needs 40 Gold)
					You purchase a bow.  It's well-made and comes with several strings as well as a 
					quiver full of arrows.
					*if (showstats)
						*line_break
						(Gold -40 and Gained Bow)
					*set gold -40
					*set bow true
					
					*goto Shopping_Weapons_loop
			*allow_reuse #Go back.
				*goto Shopping_loop_ns	
	*if ((basics) and ((((lute=false) or (rope=false)) or ((lantern=false) or (hammerspikes=false))) or (sleepingroll=false))) #Buy equipment.
		*label Shopping_Equipment_loop
		*if ((((lute) and (rope)) and ((lantern) and (hammerspikes))) and (sleepingroll))
			*goto Shopping_loop_ns
		You have: ${gold} Gold
		*choice
			*if (lute=false)
				*selectable_if (gold>=50) #Buy a lute. (Needs 50 Gold)
					The wooden instrument is well made with authentic catgut strings.  It comes with a sturdy travel case that fits nicely over your back.
					*if (showstats)
						*line_break
						(Gold -50 and Gained Lute)
					*set gold -50
					*set lute true
					
					*goto Shopping_Equipment_loop
			*if (rope=false)
				*selectable_if (gold>=15) #Buy a coil of rope. (Needs 15 Gold)
					Every story tells of the need for a good length of rope.
					*if (showstats)
						*line_break
						(Gold -15 and Gained Rope)
					*set gold -15
					*set rope true
					
					*goto Shopping_Equipment_loop
			*if (lantern=false)
				*selectable_if (gold>=15) #Buy a lantern. (Needs 15 Gold)
					A sturdy lantern with several canisters of oil will come in handy in a dark place.
					*if (showstats)
						*line_break
						(Gold -15 and Gained Lantern)
					*set gold -15
					*set lantern true
					
					*goto Shopping_Equipment_loop
			*if (hammerspikes=false)
				*selectable_if (gold>=20) #Buy a hammer and spikes.  (Needs 20 Gold)
					A hammer and a few iron spikes will no doubt benefit you on your adventures.
					*if (showstats)
						*line_break
						(Gold -20 and Gained Hammer and Spikes)
					*set gold -20
					*set hammerspikes true
					
					*goto Shopping_Equipment_loop
			*if (sleepingroll=false)
				*selectable_if (gold>=5) #Buy a bed roll. (Needs 5 Gold)
					The warm blanket will protect you from rocks and cold while sleeping outside.  It also rolls up tightly to make it easier to carry.
					*if (showstats)
						*line_break
						(Gold -5 and Gained Sleeping Roll)
					*set gold -5
					*set sleepingroll true
					
					*goto Shopping_Equipment_loop
			*allow_reuse #Go back.
				*goto Shopping_loop_ns
	*if ((basics) and (((thiefharness=false) or (spellbook=false)) or (lockpickset=false))) #Buy from the Thieves Guild.
		*label Shopping_ThiefStuff_loop
		*if (((thiefharness) and (spellbook)) and (lockpickset))
			*goto Shopping_loop_ns
		You have: ${gold} Gold
		*choice
			*if ((thiefharness=false) and (thiefstuff))
				*selectable_if (gold>=80) #Buy a thief harness for climbing. (Needs 80 Gold)
					The thief harness includes a series of ropes, straps and hooks to allow a person to climb up vertical walls while keeping their hands free.
					*if (showstats)
						*line_break
						(Gold -80 and Gained Thief Harness)
					*set gold -80
					*set thiefharness true
					
					*goto Shopping_ThiefStuff_loop
			*if (spellbook=false)
				*selectable_if (gold>=55) #Buy a spellbook. (Needs 55 Gold)
					The old tome has a few basic spells in it as well as lots of room for new incantations.  The Academy doesn't like spellbooks being sold to untrained wizards, but that doesn't stop the sales from occurring.
					*if (showstats)
						*line_break
						(Gold -55 and Gained Spellbook)
					*set gold -55
					*set spellbook true
					
					*goto Shopping_ThiefStuff_loop
			*if (lockpickset=false)
				*selectable_if (gold>=60) #Buy a lockpick set. (Needs 60 Gold)
					The set of lockpicks includes nearly everything needed to disarm most traps and unlock most doors.
					*if (showstats)
						*line_break
						(Gold -60 and Gained Lockpick Set)
					*set gold -60
					*set lockpickset true
					
					*goto Shopping_ThiefStuff_loop
			*allow_reuse #Go back.
				*goto Shopping_loop_ns				
	*if (stablestuff) #Visit the stables.
		*label Stable_loop
		*if (mount_name!="None")
			You are currently riding ${mount_name}, ${mount_desc} ${mount_type}.
			*if (mount_type="dragon")
				You realize that your connection to ${mount_name} goes beyond mere ownership.  If you were to release ${mount_name} into the wild, you might never be the same again.
			*if (mount_type="hellbeast")
				You would need to release ${mount_name}, the hellbeast, from your service if you were to get a horse instead.
			*if ((mount_type="forest worm") or (mount_type="crocodile"))
				You know that you'd need to release the ${companion_type} into the wild, if you bought a horse.
			*if (mount_type="Dreadhorse")
				The horse trader won't give you a penny for what he thinks is a diseased horse.
			*if (mount_type="holy warhorse")
				The horse trader says that he doesn't have enough money to buy such a beautiful animal.
			*if (((mount_type="horse") or (mount_type="warhorse")) or (mount_type="mule"))
				The horse trader is prepared to give you ${mount_value} gold for the animal.
		You look over the horses in the corral which are available for purchase.
		*label Mount_Buying_loop
		*choice
			*selectable_if (gold>=50) #Purchase an old sway-backed horse.  (Needs 50 Gold)
				*if (mount_name!="None")
					You already have a mount that you will need to deal with first.
					*goto Mount_Buying_loop
				*gosub Mount_Gender
				*gosub PickBadName
				The poor animal looks like ${mount_heshe} can barely walk.  Besides having fleas and a bad-temper, ${mount_heshe} looks so old that you wonder how ${mount_heshe} can even stand.
				*if (showstats)
					*line_break
					(Gold -50)
				*set gold -50
				*set mount_level 1
				*set mount_value 25
				*set mount_type "horse"
				*set mount_desc "an old sway-backed"
				*goto ChooseName
			*selectable_if (gold>=75) #Purchase a farmer's old field horse.  (Needs 75 Gold)
				*if (mount_name!="None")
					You already have a mount that you will need to deal with first.
					*goto Mount_Buying_loop
				*gosub Mount_Gender
				*gosub PickBadName
				The animal is old and has been worked very hard.  $!{mount_heshe} was likely strong once, but now the poor animal breathes heavily just being led out of the stable.
				*if (showstats)
					*line_break
					(Gold -75)
				*set gold -75
				*set mount_level 2
				*set mount_value 30
				*set mount_type "horse"
				*set mount_desc "a farmer's old field"
				*goto ChooseName
			*selectable_if (gold>=150) #Purchase a young timid riding horse.  (Needs 150 Gold)
				*if (mount_name!="None")
					You already have a mount that you will need to deal with first.
					*goto Mount_Buying_loop
				*gosub Mount_Gender
				*gosub PickOkName
				The animal looks healthy and clean, but ${mount_heshe} isn't very experienced or well-trained.  $!{mount_heshe} looks timid and startles
				easily at loud noises.
				*if (showstats)
					*line_break
					(Gold -150)
				*set gold -150
				*set mount_level 3
				*set mount_value 75
				*set mount_type "horse"
				*set mount_desc "a young timid riding"
				*goto ChooseName
			*selectable_if (gold>=300) #Purchase a healthy riding horse.  (Needs 300 Gold)
				*if (mount_name!="None")
					You already have a mount that you will need to deal with first.
					*goto Mount_Buying_loop
				*gosub Mount_Gender
				*gosub PickOkName
				The horse looks healthy and of a good age, but not war trained.  $!{mount_heshe} is likely to be a dependable mount.
				*if (showstats)
					*line_break
					(Gold -300)
				*set gold -300
				*set mount_value 150
				*set mount_level 4
				*set mount_type "horse"
				*set mount_desc "a healthy riding"
				*goto ChooseName
			*selectable_if (gold>=500) #Purchase a fully trained warhorse.  (Needs 500 Gold)
				*if (mount_name!="None")
					You already have a mount that you will need to deal with first.
					*goto Mount_Buying_loop
				*gosub Mount_Gender
				*gosub PickGoodName
				The horse is young and in excellent shape.  $!{mount_heshe} has been trained by a talented stablemaster and will never shy away from loud noises or combat.
				*if (showstats)
					*line_break
					(Gold -500)
				*set gold -500
				*set mount_value 125
				*set mount_level 5
				*set mount_type "warhorse"
				*set mount_desc "a fully trained"
				*goto ChooseName
			*if ((mount_name!="None") and (mount_type="Dreadhorse")) #Release ${mount_name} from ${mount_hisher} undeath.
				Your Dreadhorse falls over and stops moving.  It looks like ${mount_heshe} has been lying there for a month, slowly decomposing and rotting.  It's hard to believe that ${mount_heshe} was standing upright only a moment before.
				*goto Remove_Mount
			*if ((mount_name!="None") and ((mount_type="forest worm") or (mount_type="crocodile"))) #Release ${mount_name}, the ${mount_type}, into the wild.
				You watch as ${mount_name} leaves.
				*label Remove_Mount
				*set mount_name "None"
				*set mount_heshe "None"
				*set mount_hisher "None"
				*set mount_himher "None"
				*set mount_desc "None"
				*set mount_type "None"
				*set mount_value 0
				*goto Mount_Buying_loop
			*if ((mount_name!="None") and (mount_type="hellbeast")) #Release ${mount_name} from your service.
				The profane animal bursts into flames and burns to ash before your eyes as ${mount_heshe} returns to the hells from which ${mount_heshe} came.  You suspect that ${mount_heshe} will continue to serve the evil Gods and Goddesses for the remainder of ${mount_hisher} natural life and beyond.
				*goto Remove_Mount
			*if ((mount_name!="None") and (mount_type="holy warhorse")) #Release ${mount_name} from your service.
				The divine animal leaves at your request, never to be seen again.  You suspect that ${mount_heshe} will continue to serve the good Gods and Goddesses for the remainder of ${mount_hisher} natural life and beyond.
				*goto Remove_Mount
			*if ((mount_name!="None") and (mount_type="dragon")) #Break your bond and release ${mount_name}, the ${mount_type}, into the wild.
				It is merely a matter of will.  Once the bond is broken, ${mount_name} looks upon you in disgust before flying off into the sky.  You never see ${mount_himher} again.  You feel extremely weak and exhausted without the bond.
				*if (showstats)
					*line_break
					(Lost All Levels in Dragonrider, Strength -15, Agility -15 and Endurance -15)
				*set strength -15
				*set agility -15
				*set endurance -15
				*set class_dragonrider 0
				*goto Remove_Mount
			*if ((mount_name!="None") and (mount_level!=6))
				*allow_reuse #Consider selling ${mount_name}, ${mount_desc} ${mount_type}.
					The horse trader offers you ${mount_value} gold for ${mount_name}.
					*choice
						#Accept the deal and sell your ${mount_type}.
							You watch as ${mount_name} is led away.
							*if (showstats)
								*line_break
								(Gold +${mount_value})
							*set gold +(mount_value)
							*set mount_name "None"
							*set mount_desc "None"
							*set mount_type "None"
							*set mount_value 0
							
							*goto Stable_loop
						#Refuse the deal.
							*goto Stable_loop
			*if (buy_horse_only=false)
				*allow_reuse #Go back.
					*goto Shopping_loop_ns
			*if (buy_horse_only) #Stop looking for a new horse.
				*goto Done_Shopping
		
		*label PickBadName
		*temp randommountname
		*rand randommountname 1 15
		*if (randommountname=1)
			*set mount_name "Boo"
		*if (randommountname=2)
			*set mount_name "Bruno"
			*set mount_hisher "his"
			*set mount_heshe "he"
			*set mount_himher "him"
		*if (randommountname=3)
			*set mount_name "Buttons"
		*if (randommountname=4)
			*set mount_name "Buttermilk"
		*if (randommountname=5)
			*set mount_name "Biscuit"
		*if (randommountname=6)
			*set mount_name "Daisy"
			*set mount_hisher "her"
			*set mount_heshe "she"
			*set mount_himher "her"
		*if (randommountname=7)
			*set mount_name "Dinky"
			*set mount_hisher "his"
			*set mount_heshe "he"
			*set mount_himher "him"
		*if (randommountname=8)
			*set mount_name "Dopey"
		*if (randommountname=9)
			*set mount_name "Flopsy"
		*if (randommountname=10)
			*set mount_name "Nugget"
		*if (randommountname=11)
			*set mount_name "Netty"
			*set mount_hisher "her"
			*set mount_heshe "she"
			*set mount_himher "her"
		*if (randommountname=12)
			*set mount_name "Pokey"
		*if (randommountname=13)
			*set mount_name "Pumpkin"
		*if (randommountname=14)
			*set mount_name "Carrots"
		*if (randommountname=15)
			*set mount_name "Bella"
			*set mount_hisher "her"
			*set mount_heshe "she"
			*set mount_himher "her"
		*return
			
		*label PickOkName
		*temp randommountname
		*rand randommountname 1 28
		*if (randommountname=1)
			*set mount_name "Angel"
		*if (randommountname=2)
			*set mount_name "Apple Jack"
		*if (randommountname=3)
			*set mount_name "Angel Eyes"
		*if (randommountname=4)
			*set mount_name "Autumn"
		*if (randommountname=5)
			*set mount_name "Babe"
		*if (randommountname=6)
			*set mount_name "Basil"
			*set mount_hisher "his"
			*set mount_heshe "he"
			*set mount_himher "him"
		*if (randommountname=7)
			*set mount_name "Blackie"
		*if (randommountname=8)
			*set mount_name "Boots"
		*if (randommountname=9)
			*set mount_name "Blossom"
		*if (randommountname=10)
			*set mount_name "Breeze"
		*if (randommountname=11)
			*set mount_name "Cactus"
		*if (randommountname=12)
			*set mount_name "Checkers"
		*if (randommountname=13)
			*set mount_name "Cinnamon"
		*if (randommountname=14)
			*set mount_name "Firecracker"
		*if (randommountname=15)
			*set mount_name "Felicity"
			*set mount_hisher "her"
			*set mount_heshe "she"
			*set mount_himher "her"
		*if (randommountname=16)
			*set mount_name "Ginger"
			*set mount_hisher "her"
			*set mount_heshe "she"
			*set mount_himher "her"
		*if (randommountname=17)
			*set mount_name "Hazel"
			*set mount_hisher "her"
			*set mount_heshe "she"
			*set mount_himher "her"
		*if (randommountname=18)
			*set mount_name "Indigo"
		*if (randommountname=19)
			*set mount_name "Jasper"
		*if (randommountname=20)
			*set mount_name "Jewel"
		*if (randommountname=21)
			*set mount_name "Lady"
			*set mount_hisher "her"
			*set mount_heshe "she"
			*set mount_himher "her"
		*if (randommountname=22)
			*set mount_name "Lucky"
		*if (randommountname=23)
			*set mount_name "Nutmeg"
		*if (randommountname=24)
			*set mount_name "Patches"
		*if (randommountname=25)
			*set mount_name "Pebbles"
		*if (randommountname=26)
			*set mount_name "Rusty"
		*if (randommountname=27)
			*set mount_name "Saffron"
		*if (randommountname=28)
			*set mount_name "Tango"
		*return
				
		*label PickGoodName
		*temp randommountname
		*rand randommountname 1 50
		*if (randommountname=1)
			*set mount_name "Aurora"
			*set mount_hisher "her"
			*set mount_heshe "she"
			*set mount_himher "her"
		*if (randommountname=2)
			*set mount_name "Ash"
		*if (randommountname=3)
			*set mount_name "Bandit"
		*if (randommountname=4)
			*set mount_name "Blue Moon"			
		*if (randommountname=5)
			*set mount_name "Braveheart"
		*if (randommountname=6)
			*set mount_name "Black Bart"
			*set mount_hisher "his"
			*set mount_heshe "he"
			*set mount_himher "him"
		*if (randommountname=7)
			*set mount_name "Cloud Dancer"
		*if (randommountname=8)
			*set mount_name "Dawn Sprinter"
		*if (randommountname=9)
			*set mount_name "Daredevil"
		*if (randommountname=10)
			*set mount_name "Darkness"
		*if (randommountname=11)
			*set mount_name "Diamond Flame"
		*if (randommountname=12)
			*set mount_name "Eagle Spirit"
		*if (randommountname=13)
			*set mount_name "Evening Star"
		*if (randommountname=14)
			*set mount_name "Falcon"
		*if (randommountname=15)
			*set mount_name "Fury"
		*if (randommountname=16)
			*set mount_name "Firebolt"
		*if (randommountname=17)
			*set mount_name "Goldmoon"
		*if (randommountname=18)
			*set mount_name "Gypsy"
		*if (randommountname=19)
			*set mount_name "Hunter"
		*if (randommountname=20)
			*set mount_name "Kashmir"
		*if (randommountname=21)
			*set mount_name "Knife's Edge"
		*if (randommountname=22)
			*set mount_name "Legacy"
		*if (randommountname=23)
			*set mount_name "Midnight"
		*if (randommountname=24)
			*set mount_name "Mercury"
		*if (randommountname=25)
			*set mount_name "Mystery"
		*if (randommountname=26)
			*set mount_name "Moonlight"
		*if (randommountname=27)
			*set mount_name "Nimbus"
		*if (randommountname=28)
			*set mount_name "Oblivion"
		*if (randommountname=29)
			*set mount_name "Odyssey"
		*if (randommountname=30)
			*set mount_name "Phantom"
		*if (randommountname=31)
			*set mount_name "Phoenix"
		*if (randommountname=32)
			*set mount_name "Quasar"
		*if (randommountname=33)
			*set mount_name "Red Devil"
		*if (randommountname=34)
			*set mount_name "Rage"
		*if (randommountname=35)
			*set mount_name "Shadow"
		*if (randommountname=36)
			*set mount_name "Star"
		*if (randommountname=37)
			*set mount_name "Silver"
		*if (randommountname=38)
			*set mount_name "Sky Song"
		*if (randommountname=39)
			*set mount_name "Solar"
		*if (randommountname=40)
			*set mount_name "Starlight"
		*if (randommountname=41)
			*set mount_name "Storm"
		*if (randommountname=42)
			*set mount_name "Eclipse"
		*if (randommountname=43)
			*set mount_name "Thunder"
		*if (randommountname=44)
			*set mount_name "Tornado"
		*if (randommountname=45)
			*set mount_name "Utopia"
		*if (randommountname=46)
			*set mount_name "White Lightning"
		*if (randommountname=47)
			*set mount_name "Wind Breaker"
		*if (randommountname=48)
			*set mount_name "Wild Rose"
		*if (randommountname=49)
			*set mount_name "Zephyr"
		*if (randommountname=50)
			*set mount_name "Zanzibar"
			*set mount_hisher "his"
			*set mount_heshe "he"
			*set mount_himher "him"
		*return
			
		*label ChooseName
		
		The horse trader says that ${mount_hisher} name is ${mount_name}.
		*choice
			#Continue calling the ${mount_type} ${mount_name}.
				*if (buy_horse_only)
					*goto Done_Shopping
				*goto Shopping_loop_ns
			#Give the ${mount_type} a new name.
				*label NameTheMount
				*input_text mount_name
				*if (mount_name="None")
					That's not fair to the poor animal. Go ahead, give ${mount_himher} a real name.
					*goto NameTheMount
				*if (buy_horse_only)
					*goto Done_Shopping
				*goto Shopping_loop_ns
	*if (templeopen) #Visit the temple.
		*label Temple_loop
		You have: ${gold} Gold
		*choice
			*if (holywater=false)
				*selectable_if (gold>=40) #Buy a flask of holy water. (Needs 40 Gold)
					The small flask of liquid looks like regular water, but the priests of the temple assure you that it has been blessed in the name of their Gods.
					*if (showstats)
						*line_break
						(Gold -40 and Gained Holy Water)
					*set gold -40
					*set holywater true
					
					*goto Temple_loop
			*if (holysymbol=false)
				*selectable_if (gold>=25) #Buy a holy symbol. (Needs 25 Gold)
					The holy symbol is mounted on a fine-linked silver chain.
					*if (showstats)
						*line_break
						(Gold -25 and Gained Holy Symbol)
					*set gold -25
					*set holysymbol true					
					*choice
						*selectable_if (good>=50) #You follow a good deity.  (Needs 50 or more Good)
							The embodiment of all that is good in the world.  Light, compassion, healing, justice, truth, kindness…the list could go on for hours.  In addition to these things, your deity encourages truth, honour and charity to the less fortunate.
							*set god_good true
							*choice
								#You follow Lucien, a good and kind God.
									*set god_name "Lucien"
									*set god_goddess "God"	
									*set god_goddess "God"
									*set god_hisher "His"
									*set god_himher "Him"
									*set god_heshe "He"
									*goto BuyingASymbol
								#You follow Auriel, a good and kind Goddess.
									*set god_name "Auriel"
									*set god_goddess "Goddess"
									*set god_hisher "Her"
									*set god_himher "Her"
									*set god_heshe "She"
									*goto BuyingASymbol
								#You follow a different God.
									*set god_goddess "God"	
									*set god_hisher "His"
									*set god_himher "Him"
									*set god_heshe "He"
									*goto NameTheGod
								#You follow a different Goddess.	
									*set god_goddess "Goddess"
									*set god_hisher "Her"
									*set god_himher "Her"
									*set god_heshe "She"
									*goto NameTheGod
							*label NameTheGod
							*input_text god_name
							*if (((god_name="None") or (god_name="Unknown")) or (god_name="the Unknown"))
								Every known deity has a name, or it wouldn't be known.  What is the name of your ${god_goddess}?
								*goto NameTheGod
							*goto BuyingASymbol
						*selectable_if (good<=50) #You follow an evil deity. (Needs 50 or more Evil)
							The embodiment of all that is evil in the world.  Darkness, shadows, disease, corruption, deceit…the list could go on for hours.  In addition to these things, your deity encourages wealth, power and domination over other creatures: living and dead.
							*set god_good false
							*choice
								#You follow Noct, an evil and cruel God.
									*set god_name "Noct"
									*set god_goddess "God"
									*set god_hisher "His"
									*set god_himher "Him"
									*set god_heshe "He"
									*goto BuyingASymbol
								#You follow Shadi, an evil and cruel Goddess.
									*set god_name "Shadi"
									*set god_goddess "Goddess"
									*set god_hisher "Her"
									*set god_himher "Her"
									*set god_heshe "She"
									*goto BuyingASymbol
								#You follow a different God.
									*set god_goddess "God"	
									*set god_hisher "His"
									*set god_himher "Him"
									*set god_heshe "He"
									*goto NameTheGod
								#You follow a different Goddess.	
									*set god_goddess "Goddess"
									*set god_hisher "Her"
									*set god_himher "Her"
									*set god_heshe "She"
									*goto NameTheGod
						#Change your mind.
							You return the holy symbol and get your money back.
							*if (showstats)
								*line_break
								(Gold +25 and Lost Holy Symbol)
							*set gold +25
							*set holysymbol false
							*goto Temple_loop
					*label BuyingASymbol
					The holy symbol dedicated to ${god_name} represents ${god_hisher} divine will.
					*if (god_good=false)
						Of course, you can't openly show that you worship an evil ${god_goddess}, so the symbol looks similar to that of a good deity that is commonly worshipped.  Only a trained eye looking at the symbol very closely would see how it has been corrupted to serve ${god_name}.
					You hang the holy symbol around your neck, allowing it to fall down
					*if (gender="male")
						your tunic and lay against your chest.
					*if (gender="female")
						the front of your dress and lay against your chest.
					*goto Temple_loop
			*if (((no_thief_vow=false) and (no_thief_vow_showit)) and (class_thief=0)) #Take a "no thieving" vow.
				You make a holy vow to the Gods and Goddesses that you will not steal.  The good deities of the world take note of your words.
				*if (showstats)
					*line_break
					(Good +10)
				*set good +10
				*set no_thief_vow true
				*goto Temple_loop
			*if (((no_thief_vow=false) and (no_thief_vow_showit)) and (class_thief=0)) #Do not take a "no thieving" vow.
				You decide to not make such a promise to the Gods.
				*set no_thief_vow_showit false
				*goto Temple_loop
			*allow_reuse #Donate gold to the needy.
				You have: ${gold} Gold.  How much do you wish to donate?
				*temp goldtogive 0
				*temp goodtogive 0
				*input_number goldtogive 0 gold
				*if (goldtogive=0)
					You changed your mind.
					
					*goto Temple_loop
				*set gold -goldtogive
				*set charity +goldtogive
				You donate some gold to the needy.
				*if (goldtogive<10)
					*if (showstats)
						*line_break
						(Gold -${goldtogive})
					
					*goto Temple_loop
				*if ((goldtogive>=10) and (goldtogive<25))
					*set goodtogive 1
				*if ((goldtogive>=25) and (goldtogive<50))
					*set goodtogive 3
				*if ((goldtogive>=50) and (goldtogive<100))
					*set goodtogive 5
				*if ((goldtogive>=100) and (goldtogive<200))
					*set goodtogive 10
				*if ((goldtogive>=200) and (goldtogive<350))
					*set goodtogive 15
				*if ((goldtogive>=350) and (goldtogive<500))
					*set goodtogive 20
				*if (goldtogive>=500)
					*set goodtogive 30
				*if (goodtogive=0)
					
					ERROR:  There is a bug here.  If you've reached this point, please report the bug: "Goodtogive
					was 0, but shouldn't be."
				*if (charity_bonusgiven>=charity_maxbonus)
					*if (showstats)
						*line_break
						(Gold -${goldtogive})
					
					*goto Temple_loop
				*if (charity_bonusgiven+goodtogive)>=charity_maxbonus
					*set goodtogive (charity_maxbonus-charity_bonusgiven)
					*if (showstats)
						*line_break
						(Gold -${goldtogive} and Good +${goodtogive})
					*set good +(goodtogive)
					*set charity_bonusgiven charity_maxbonus
					
					*goto Temple_loop
				*if (showstats)
						*line_break
						(Gold -${goldtogive} and Good +${goodtogive})
				*set good +goodtogive
				
				*goto Temple_loop
			*hide_reuse *if (god_name!="None") #Say a brief prayer to ${god_name}.
				You close your eyes and say some words to ${god_name}.
				*if (god_good)
					You feel more at peace after you are finished.
					*if (showstats)
						*line_break
						(Good +1 and Religion +1)
					*set good +1
					*set religion +1
					*goto Temple_loop
				*else
					Your vile prayer makes you feel more prepared to bend the world to your will.
					*if (showstats)
						*line_break
						(Evil +1 and Religion +1)
					*set good -1
					*set religion +1
					*goto Temple_loop
			*allow_reuse #Go back.
				*goto Shopping_loop_ns
	#Done shopping.
		*label Done_Shopping
		*if ((store_scene="exile_knightstore") or (store_scene="exile_dobbton"))
			*goto_scene exile
		*if (store_scene="brightwater_to_politics")
			*goto_scene politics
		*if ((store_scene="begin_luddmarch") or (store_scene="luddmarch_buyhorse"))
			*goto_scene luddmarch
		*page_break Error!
		ERROR:  Sorry, you've found a Choicescript error.  Please contact the developer and tell them "the store didn't find the store_scene: ${store_scene}."
		*line_break
		Sorry for the inconvenience.
		*finish

*label Mount_Gender
*rand coinflip 1 2
*if (coinflip=1)
	*set mount_hisher "his"
	*set mount_heshe "he"
	*set mount_himher "him"
	*return
*else
*set mount_hisher "her"
*set mount_heshe "she"
*set mount_himher "her"
*return
