*comment Copyright 2015 by Mike Walter.
*comment The Lost Heir 2: Forging a Kingdom
*comment choicescript_stats.txt
*if (stage=0)
	Welcome to the Lost Heir 2:  Forging a Kingdom
	*finish
*temp maxstat 100
*temp display_army_food army_food
*temp display_army_morale army_morale
*temp display_army_power army_power
*temp display_army_size army_size
*temp display_friend1_relationship 0
*temp display_friend2_relationship 0
*temp display_friend3_relationship 0
*temp display_friend4_relationship 0
*temp display_prisoner1_relationship 0
*if (display_army_food<0)
	*set display_army_food 0
*if (display_army_morale<0)
	*set display_army_morale 0
*if (display_army_power<0)
	*set display_army_power 0
*if (display_army_size<0)
	*set display_army_size 0	
*if (display_army_food>100)
	*set display_army_food 100
*if (display_army_morale>100)
	*set display_army_morale 100
*if (display_army_power>100)
	*set display_army_power 100
*if (display_army_size>100)
	*set display_army_size 100
*if (friend1_name=theothea_name)
	*set display_friend1_relationship theothea_relationship
*if (friend1_name=jacejess_name)
	*set display_friend1_relationship jacejess_relationship
*if (friend1_name=karlkarla_name)
	*set display_friend1_relationship karlkarla_relationship
*if (friend1_name=gillgale_name)
	*set display_friend1_relationship gillgale_relationship
*if (friend1_name=peterpetra_name)
	*set display_friend1_relationship peterpetra_relationship
*if (friend1_name=branbrinn_name)
	*set display_friend1_relationship branbrinn_relationship
*if (friend2_name=theothea_name)
	*set display_friend2_relationship theothea_relationship
*if (friend2_name=jacejess_name)
	*set display_friend2_relationship jacejess_relationship
*if (friend2_name=karlkarla_name)
	*set display_friend2_relationship karlkarla_relationship
*if (friend2_name=gillgale_name)
	*set display_friend2_relationship gillgale_relationship
*if (friend2_name=peterpetra_name)
	*set display_friend2_relationship peterpetra_relationship
*if (friend2_name=branbrinn_name)
	*set display_friend2_relationship branbrinn_relationship
*if (friend3_name=theothea_name)
	*set display_friend3_relationship theothea_relationship
*if (friend3_name=jacejess_name)
	*set display_friend3_relationship jacejess_relationship
*if (friend3_name=karlkarla_name)
	*set display_friend3_relationship karlkarla_relationship
*if (friend3_name=gillgale_name)
	*set display_friend3_relationship gillgale_relationship
*if (friend3_name=peterpetra_name)
	*set display_friend3_relationship peterpetra_relationship
*if (friend3_name=branbrinn_name)
	*set display_friend3_relationship branbrinn_relationship
*if (friend4_name=theothea_name)
	*set display_friend4_relationship theothea_relationship
*if (friend4_name=jacejess_name)
	*set display_friend4_relationship jacejess_relationship
*if (friend4_name=karlkarla_name)
	*set display_friend4_relationship karlkarla_relationship
*if (friend4_name=gillgale_name)
	*set display_friend4_relationship gillgale_relationship
*if (friend4_name=peterpetra_name)
	*set display_friend4_relationship peterpetra_relationship
*if (friend4_name=branbrinn_name)
	*set display_friend4_relationship branbrinn_relationship
*set display_prisoner1_relationship prisoner1_relationship
*if (display_friend1_relationship<0)
	*set display_friend1_relationship 0
*if (display_friend2_relationship<0)
	*set display_friend2_relationship 0
*if (display_friend3_relationship<0)
	*set display_friend3_relationship 0
*if (display_friend4_relationship<0)
	*set display_friend4_relationship 0	
*if (display_prisoner1_relationship<0)
	*set display_prisoner1_relationship 0
*if (display_friend1_relationship>100)
	*set display_friend1_relationship 100
*if (display_friend2_relationship>100)
	*set display_friend2_relationship 100
*if (display_friend3_relationship>100)
	*set display_friend3_relationship 100
*if (display_friend4_relationship>100)
	*set display_friend4_relationship 100
*if (display_prisoner1_relationship>100)
	*set display_prisoner1_relationship 100
*temp display_health health
*temp display_gold gold
*temp display_good good
*temp display_archery archery
*temp display_devices devices
*temp display_magic magic
*temp display_blades blades
*temp display_stealth stealth
*temp display_unarmed unarmed
*temp display_agility agility
*temp display_charm charm
*temp display_endurance endurance
*temp display_perception perception
*temp display_strength strength
*temp display_willpower willpower
*temp display_arcana arcana
*temp display_geography geography
*temp display_history history
*temp display_nature nature
*temp display_religion religion
*if (display_good<0)
	*set display_good 0
*if (display_good>100)
	*set display_good 100
*if (display_gold<0)
	*set display_gold 0
*if (display_health<0)
	*set display_health 0
*if (display_health>100)
	*set display_health 100
*if (display_archery<0)
	*set display_archery 0
*if (display_devices<0)
	*set display_devices 0
*if (display_magic<0)
	*set display_magic 0
*if (display_blades<0)
	*set display_blades 0
*if (display_stealth<0)
	*set display_stealth 0
*if (display_unarmed<0)
	*set display_unarmed 0
*if (display_agility<0)
	*set display_agility 0
*if (display_charm<0)
	*set display_charm 0
*if (display_endurance<0)
	*set display_endurance 0
*if (display_perception<0)
	*set display_perception 0
*if (display_strength<0)
	*set display_strength 0
*if (display_willpower<0)
	*set display_willpower 0
*if (display_arcana<0)
	*set display_arcana 0
*if (display_geography<0)
	*set display_geography 0
*if (display_history<0)
	*set display_history 0
*if (display_nature<0)
	*set display_nature 0
*if (display_religion<0)
	*set display_religion 0
*if (display_archery>maxstat)
	*set display_archery maxstat
*if (display_devices>maxstat)
	*set display_devices maxstat
*if (display_magic>maxstat)
	*set display_magic maxstat
*if (display_blades>maxstat)
	*set display_blades maxstat
*if (display_stealth>maxstat)
	*set display_stealth maxstat
*if (display_unarmed>maxstat)
	*set display_unarmed maxstat
*if (display_agility>maxstat)
	*set display_agility maxstat
*if (display_charm>maxstat)
	*set display_charm maxstat
*if (display_endurance>maxstat)
	*set display_endurance maxstat
*if (display_perception>maxstat)
	*set display_perception maxstat
*if (display_strength>maxstat)
	*set display_strength maxstat
*if (display_willpower>maxstat)
	*set display_willpower maxstat
*if (display_arcana>maxstat)
	*set display_arcana maxstat
*if (display_geography>maxstat)
	*set display_geography maxstat
*if (display_history>maxstat)
	*set display_history maxstat
*if (display_nature>maxstat)
	*set display_nature maxstat
*if (display_religion>maxstat)
	*set display_religion maxstat
*temp display_cumari_relationship cumari_relationship
*temp display_vale_relationship vale_relationship
*temp display_tovor_relationship tovor_relationship
*temp display_citizen_reputation citizen_reputation
*temp display_citizen_fear citizen_fear
*temp display_prisonchild_relationship prisonchild_relationship
*set display_cumari_relationship cumari_relationship
*set display_vale_relationship vale_relationship
*set display_tovor_relationship tovor_relationship
*set display_citizen_reputation citizen_reputation
*set display_citizen_fear citizen_fear
*set display_prisonchild_relationship prisonchild_relationship
*if (display_cumari_relationship<0)
	*set display_cumari_relationship 0
*if (display_vale_relationship<0)
	*set display_vale_relationship 0
*if (display_tovor_relationship<0)
	*set display_tovor_relationship 0
*if (display_citizen_reputation<0)
	*set display_citizen_reputation 0
*if (display_citizen_fear<0)
	*set display_citizen_fear 0
*if (display_prisonchild_relationship<0)
	*set display_prisonchild_relationship 0
*if (display_cumari_relationship>100)
	*set display_cumari_relationship 100
*if (display_vale_relationship>100)
	*set display_vale_relationship 100
*if (display_tovor_relationship>100)
	*set display_tovor_relationship 100
*if (display_citizen_reputation>100)
	*set display_citizen_reputation 100
*if (display_citizen_fear>100)
	*set display_citizen_fear 100
*if (display_prisonchild_relationship>100)
	*set display_prisonchild_relationship 100
*comment -------------------------------------- CharacterSheet
[b]${Name}, the ${title}.
*stat_chart
	percent display_health Health
[b]Specialized Training[/b]:
*temp nospecial true
*if (class_squire>0)
	*set nospecial false
	*line_break
	Squire Levels: ${class_squire}
*if (class_bard>0)
	*set nospecial false
	*line_break
	Bard Levels: ${class_bard}
*if (class_monk>0)
	*set nospecial false
	*line_break
	Monk Levels: ${class_monk}
*if (class_assassin>0)
	*set nospecial false
	*line_break
	Assassin Levels: ${class_assassin}
*if (class_priest>0)
	*set nospecial false
	*line_break
	$!{priestpriestess} Levels: ${class_priest}
*if (class_cleric>0)
	*set nospecial false
	*line_break
	Cleric Levels: ${class_cleric}
*if (class_thief>0)
	*set nospecial false
	*line_break
	Thief Levels: ${class_thief}
*if (class_thug>0)
	*set nospecial false
	*line_break
	Thug Levels: ${class_thug}
*if (class_guard>0)
	*set nospecial false
	*line_break
	Guard Levels: ${class_guard}
*if (class_wizard>0)
	*set nospecial false
	*line_break
	Wizard Levels: ${class_wizard}
*if (class_druid>0)
	*set nospecial false
	*line_break
	Druid Levels: ${class_druid}
*if (class_ranger>0)
	*set nospecial false
	*line_break
	Ranger Levels: ${class_ranger}
*if (class_sage>0)
	*set nospecial false
	*line_break
	Sage Levels: ${class_sage}
*if (class_knight>0)
	*set nospecial false
	*line_break
	Knight Levels: ${class_knight}
*if (class_tattooist>0)
	*set nospecial false
	*line_break
	Prestige Class: Arcane Tattooist
*if (class_dragonrider>0)
	*set nospecial false
	*line_break
	Prestige Class: Dragonrider
*if (class_warmaster>0)
	*set nospecial false
	*line_break
	Prestige Class: War Master
*if (class_darkknight>0)
	*set nospecial false
	*line_break
	Prestige Class: Dark Knight
*if (class_paladin>0)
	*set nospecial false
	*line_break
	Prestige Class: Paladin
*if (class_elementalarcher>0)
	*set nospecial false
	*line_break
	Prestige Class: Elemental Archer
*if (class_blademaster>0)
	*set nospecial false
	*line_break
	Prestige Class: Blademaster
*if (class_alchemist>0)
	*set nospecial false
	*line_break
	Prestige Class: Alchemist
*if (class_necromancer>0)
	*set nospecial false
	*line_break
	Prestige Class: Necromancer
*if (class_seer>0)
	*set nospecial false
	*line_break
	Prestige Class: Seer
*if (nospecial)
	*line_break
	None

[b]MORALITY:
*stat_chart
	opposed_pair display_good
		Good
		Evil
[b]ABILITIES:
*stat_chart
	percent display_agility Agility
	percent display_charm Charm
	percent display_endurance Endurance
	percent display_perception Perception
	percent display_strength Strength
	percent display_willpower Willpower
[b]SKILLS:
*stat_chart
	percent display_archery Archery
	percent display_devices Devices
	percent display_magic Magic
	percent display_blades Blades
	percent display_stealth Stealth
	percent display_unarmed Unarmed
[b]KNOWLEDGE:
*stat_chart
	percent display_arcana Arcana
	percent display_geography Geography
	percent display_history History
	percent display_nature Nature
	percent display_religion Religion
[b]RELATIONSHIPS:
*comment Stage 1:  Friend1 is exile friend, Friend2 may not exist, Friend3 and Friend4 are prisoners
*comment Stage 2:  Friend3 is surviving prisoner, Friend4 is "dead" prisoner
*comment Stage 3:  Friend4 is now BrinBrann
*comment Stage 4:  Campaigning for votes
*comment Stage 5:  Gain War Stats
*comment Stage 6:  Red Revealed, still has all else
*comment Stage 7:  Only Red, no one else (Lost, ending)
*if ((stage>=1) and (stage<=6))
	*stat_chart
		percent display_friend1_relationship ${friend1_name}
	*if (friend2_name!="None")
		*stat_chart
			percent display_friend2_relationship ${friend2_name}
	*stat_chart
		percent display_friend3_relationship ${friend3_name}
		percent display_friend4_relationship ${friend4_name}
*if ((stage=6) and (stage=7))
	*stat_chart
		percent display_prisoner1_relationship ${prisoner1_name}
*if ((stage>=4) and (stage<=6))
	*stat_chart
		percent display_vale_relationship Lord Vale
		percent display_tovor_relationship Lord Tovor
		percent display_cumari_relationship Archmage Cumari
*if ((prisonchild_name!="None") and (stage!=7))
	*stat_chart
		percent display_prisonchild_relationship ${prisonchild_name}
*if (mount_name!="None")
	Your mount: ${mount_desc} ${mount_type} named ${mount_name}.
*if (companion_name!="None")
	*if (mount_name!="None")
		*line_break
	${companion_name}, your ${companion_type}
	*if (companion_familiar)
		familiar.
	*if (companion_familiar=false)
		companion.
*if (stage>=5)
	
	[b]KINGDOM[/b]
*if ((stage=5) or (stage=6))
	*stat_chart
		percent display_army_size Army Surplus Size
		percent display_army_power Army Power
		percent display_army_morale Army Morale
		percent display_army_food Army Food
*if (stage>=5)
	*stat_chart
		percent display_citizen_reputation Citizen Reputation
		percent display_citizen_fear Citizen Fear
*if ((stage=5) or (stage=6))
	*if (army_delays>0)
		Army Delays: ${army_delays}
*if (tattoo_gotsome)
	
	[b]TATTOOS[/b]
	*if (tattoo_circle)
		*line_break
		- a white circle on your shoulder-blade
	*if (tattoo_star)
		*line_break
		- a blue star on the side of your neck
	*if (tattoo_circles)
		*line_break
		- a set of concentric circles on your shoulder-blade
	*if (tattoo_stars)
		*line_break
		- a series of blue stars up your neck
	*if (tattoo_face)
		*line_break
		- a full-face tattoo of black swirls and runes
	*if (tattoo_sword)
		*line_break
		- a sword dripping blood on your bicep
	*if (tattoo_rings)
		*line_break
		- a series of rings across your fingers and toes
	*if (tattoo_spiral)
		*line_break
		- a spiralling vortex extending from your heart outwards
	*if (tattoo_flames)
		*line_break
		- a bunch of flames along the base of your neck
	*if (tattoo_leaves)
		*line_break
		- leaves and vines around your wrists
	*if (tattoo_blacksnakes)
		*line_break
		- a pair of black snakes climbing each leg
	*if (tattoo_coins)
		*line_break
		- a pile of golden coins in each palm

[b]INVENTORY[/b]
*line_break
*if (display_gold!=0)
	- a pouch on your belt containing ${gold} gold
*if (display_gold=0)
	- a pouch on your belt containing no gold
*if (spellbook)
	*line_break
	- a spellbook
*if (sword)
	*line_break
	- a sword on your belt
*if (holysymbol)
	*line_break
	- a holy symbol
	*if (god_good=false)
		secretly
	dedicated to the ${god_goddess} ${god_name} hangs around your neck
*if (dagger)
	*line_break
	- a dagger on your belt
*if (class_elementalarcher>0)
	*line_break
	- an Astral Bow of the Elements that can be created with a single thought
*if ((bow) and (class_elementalarcher=0))
	*line_break
	- a bow strung over your back
*if (lute)
	*line_break
	- a lute strung over your back
*if (bandoleer)
	*line_break
	- a bandoleer filled with various potions across your body
*if (teardrop)
	*line_break
	*if (teardrop_known=false)
		- a silver necklace with a blue gem in the shape of a teardrop
	*if (teardrop_known)
		- Auriel's Grief: a silver necklace with a blue gem in the shape of a teardrop
	*if (teardrop_holding=false)
		sitting in a chest in Brightwater
	*if (teardrop_holding)
		sitting in your pocket
*if ((demonsummoner=false) and (runebag))
	*line_break
	*temp numberofstones 1
	*if (demonstone_xiatta)
		*set numberofstones +1
	*if (demonstone_zonch)
		*set numberofstones +1
	*if (demonstone_brahl)
		*set numberofstones +1
	*if (demonstone_daanda)
		*set numberofstones +1
	*if (demonstone_tyborr)
		*set numberofstones +1
	*if (numberofstones=1)
		- a black runebag with 1 Demonstone in it
	*if (numberofstones>1)
		- a black runebag with ${numberofstones} Demonstones in it
*if (demonsummoner)
	
	*if (runebag)
		A black runebag containing:
	*if (runebag=false)
		The torn remains of a runebag which used to contain:
	*if (demonstone_kgirr)
		*line_break
		*if (demonstone_kgirr_known=false)
			- an unknown unglowing Demonstone			
		*if (demonstone_kgirr_known)
			- a Demonstone with a faint glow inscribed with the name "K'Girr"
	*if (demonstone_xiatta)
		*line_break
		*if (demonstone_xiatta_known)
			- a Demonstone glowing a soft blue inscribed with the name "Xi'atta"
		*if (demonstone_xiatta_known=false)
			- an unknown Demonstone glowing a soft blue
	*if (demonstone_zonch)
		*line_break
		*if (demonstone_zonch_known)
			- a Demonstone glowing a greyish brown inscribed with the name "Zon'ch"
		*if (demonstone_zonch_known=false)
			- an unknown Demonstone glowing a greyish brown
	*if (demonstone_brahl)
		*line_break
		*if (demonstone_brahl_known)
			- a Demonstone glowing a dull green inscribed with the name "Brahl"
		*if (demonstone_brahl_known=false)
			- an unknown Demonstone glowing a dull green
	*if (demonstone_tyborr)
		*line_break
		- a Demonstone glowing many colours inscribed with the name "Tyborr"
	*if (demonstone_daanda)
		*line_break
		*if (demonstone_daanda_known)
			- a Demonstone glowing a dim grey inscribed with the name "Daan'da"
		*if (demonstone_daanda_known=false)
			- an unknown Demonstone glowing a dim grey
	*if (demonstone_gaabon)
		*line_break
		- a Demonstone glowing a shimmering silver inscribed with the name "Gaa'bon"

A backpack containing:
*if ((black_shackles) and (stage=7))
	*line_break
	- a pair of black shackles with glowing white runes
*if (lockpickset)
	*line_break
	- a lockpick set
*if (rope)
	*line_break
	- a rope
*if (unfinished_magicdagger)
	*line_break
	- an unusable dull magic dagger covered in jewels
*if (lantern)
	*line_break
	- a lantern
*if (waterskin)
	*line_break
	- a water skin
*if (flintandsteel)
	*line_break
	- flint and steel
*if (hammerspikes)
	*line_break
	- a hammer and a few iron spikes
*if (holywater)
	*line_break
	- a flask of holy water
*if (sleepingroll)
	*line_break
	- a sleeping roll
*if (strangeamulet)
	*line_break
	- a strange amulet to an unknown God
*if (small_package)
	*line_break
	- an unknown package
*if (poison_package)
	*line_break
	- a package of poison
*if (thiefharness)
	*line_break
	- a thief harness for hands-free climbing
*if (book_of_wizardry)
	*line_break
	- a textbook from the Academy of Wizards
*if (book_of_the_dead)
	*line_break
	- the Book of the Dead bound in human skin
*if (amos_spider_statue)
	*line_break
	- a statue of a spider stolen from the wizard Luimar by Amos, your foster father
*if (grady_letter)
	*line_break
	- a letter from Sir Grady, your foster father
*if (emaline_letter)
	*line_break
	- a letter from Lady Emaline, your foster mother
*if (geri_ring)
	*line_break
	- a golden ring from Sister Geri, your foster mother

You are wearing:
*line_break
- your clothing
*if (legacy_amulet)
	*line_break
	- the silver amulet belonging to the time-traveling Wizard of Elmvale
*if ((black_shackles) and (stage!=7))
	*line_break
	- a pair of black shackles with glowing white runes
*if (class_knight>=2)
	*line_break
	- shiny silver plate mail armour
*if (class_darkknight>=1)
	*line_break
	- dark black plate mail armour
*if (circlet)
	*line_break
	- the Circlet of Daria, resting on your head
*if (academy_robes)
	*line_break
	-  the blue robes with yellow moons and stars of an Academy Wizard
*if (cape_of_shadows)
	*line_break
	- the Cape of Shadows over your back
	*if (showstats)
		(+${cape_of_shadows_bonus} Bonus to Stealth)
*if (gloves_archery)
	*line_break
	- the Gloves of Archery on your hands
	*if (showstats)
		(+${gloves_archery_bonus} Bonus to Archery)
*if (necklace_nature)
	*line_break
	- the bone Necklace of Nature around your neck 
	*if (showstats)
		(+${necklace_nature_bonus} Bonus to Nature)
*if (gem_seeing)
	*line_break
	- the Gem of Seeing in your pocket
	*if (showstats)
		(+${gem_seeing_bonus} Bonus to Perception)
*if (magic_shield)
	*line_break
	- the Magic Shield on your back
*if (feather_of_glibness)
	*line_break
	- the Feather of Glibness in your hat
	*if (showstats)
		(+${feather_of_glibness_bonus} Bonus to Charm)
*if (cloak_of_spiders)
	*line_break
	- the Cloak of Spiders over your shoulders and down your back
*if (belt_of_speed)
	*line_break
	- Thuja's Belt of Speed around your waist
*if (familyring)
	*line_break
	- your family signet ring
	*if (showstats)
		(+${familyring_bonus} to All)
*if (thief_token)
	*line_break
	- the Thief Token, an amulet the shape of a dagger, on a chain around your neck
	*if (showstats)
		(+${thief_token_bonus} bonus to Stealth, Devices and Agility)
*if (staff_archmagi)
	*line_break
	- the Staff of the Archmagi in your hand
	*if (showstats)
		(+${staff_archmagi_bonus} Bonus to Magic)
*if (legacy_map)
	*line_break
	- Map of Daria by Roxas the Cartographer
	*choice
		#Don't look at your map.
			You leave your map in your pocket.
			*finish
		#Look at your map.
			You unfold your map and look at it.
			*image map.png
			*finish
*finish