Combat<<nobr>>
<!-- sync maiden story variable with maiden manager story variable -->
<<run $MaidenManager.maidens[$currentMaidenIndex] = $currentMaiden;>>
@@<<print $sentMsg ?? `Interact with $currentMaiden.name`>>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Back" "Maidens">><<unset $currentMaiden, $currentMaidenIndex>><<audio "select2" play>><</button>>
<<button "Talk" "Talk">><<audio "select" play>><</button>>
<<button "Gift" "Gift">><<audio "select" play>><</button>>
<<button "Flirt" "Flirt">><<audio "select" play>><</button>>
<<button "Ask" "Ask">><<audio "select" play>><</button>>
<<button "Stats" "Stats">><<audio "select" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawConvoMain($currentMaiden)>>
<</done>>@@No more time tonight.@@
<<button "Go to sleep" "Bedchamber">><<audio "select" play>><</button>><<nobr>>
<<if $DayManager.noTimeLeft()>>
<<unset $currentMaiden, $currentMaidenIndex, $sentMsg>>
<<goto "NightOver">>
<<else>>
@@Talk with $currentMaiden.name@@
<</if>>
<</nobr>>
<<button "Weather" "Interact">>
<<if !$currentMaiden.askedWeather>>
<<set _interactMsg to "You talk with her about the weather.\n\n">>
<<set _reactionValue to $currentMaiden.getTalkWeatherReaction()>>;
<<run $currentMaiden.askedWeather = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already talked about this.">>
<</if>>
<</button>>
<<button "Your castle" "Interact">>
<<if !$currentMaiden.askedCastle>>
<<set _interactMsg to "You talk with her about your castle.\n\n">>
<<set _reactionValue to $currentMaiden.getTalkCastleReaction()>>;
<<run $currentMaiden.askedCastle = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already talked about this.">>
<</if>>
<</button>>
<<button "Shopping" "Interact">>
<<if !$currentMaiden.askedShopping>>
<<set _interactMsg to "You talk with her about shopping.\n\n">>
<<set _reactionValue to $currentMaiden.getTalkShoppingReaction()>>;
<<run $currentMaiden.askedShopping = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already talked about this.">>
<</if>>
<</button>>
<<button "Nature" "Interact">>
<<if !$currentMaiden.askedNature>>
<<set _interactMsg to "You talk with her about nature.\n\n">>
<<set _reactionValue to $currentMaiden.getTalkNatureReaction()>>;
<<run $currentMaiden.askedNature = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already talked about this.">>
<</if>>
<</button>>
<<button "Back" "Interact">><<unset $sentMsg>><<audio "select2" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawConvoTalk($currentMaiden)>>
<</done>><<nobr>>
<<if $DayManager.noTimeLeft()>>
<<unset $currentMaiden, $currentMaidenIndex, $sentMsg>>
<<goto "NightOver">>
<<else>>
@@Give gift to $currentMaiden.name@@
<</if>>
<</nobr>>
<<button "Jewelry" "Interact">>
<<if !$currentMaiden.askedJewelry>>
<<set _interactMsg to "You give her new piece of jewelry.\n\n">>
<<set _reactionValue to $currentMaiden.getGiftJewelryReaction()>>;
<<run $currentMaiden.askedJewelry = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already given her this.">>
<</if>>
<</button>>
<<button "Food" "Interact">>
<<if !$currentMaiden.askedFood>>
<<set _interactMsg to "You give her food.\n\n">>
<<set _reactionValue to $currentMaiden.getGiftFoodReaction()>>;
<<run $currentMaiden.askedFood = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already given her this.">>
<</if>>
<</button>>
<<button "Book" "Interact">>
<<if !$currentMaiden.askedBook>>
<<set _interactMsg to "You give her a new book.\n\n">>
<<set _reactionValue to $currentMaiden.getGiftBookReaction()>>;
<<run $currentMaiden.askedBook = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already given her this.">>
<</if>>
<</button>>
<<button "Painting" "Interact">>
<<if !$currentMaiden.askedPainting>>
<<set _interactMsg to "You give her a new painting.\n\n">>
<<set _reactionValue to $currentMaiden.getGiftPaintingReaction()>>;
<<run $currentMaiden.askedPainting = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already given her this.">>
<</if>>
<</button>>
<<button "Back" "Interact">><<unset $sentMsg>><<audio "select2" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawConvoGift($currentMaiden)>>
<</done>><<nobr>>
<<if $DayManager.noTimeLeft()>>
<<unset $currentMaiden, $currentMaidenIndex, $sentMsg>>
<<goto "NightOver">>
<<else>>
@@Flirt with $currentMaiden.name@@
<</if>>
<</nobr>>
<<button "Tease" "Interact">>
<<if !$currentMaiden.askedTease>>
<<set _interactMsg to "You playfully tease her.\n\n">>
<<set _reactionValue to $currentMaiden.getFlirtTeaseReaction()>>;
<<run $currentMaiden.askedTease = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already done this.">>
<</if>>
<</button>>
<<button "Compliment" "Interact">>
<<if !$currentMaiden.askedCompliment>>
<<set _interactMsg to "You give her a nice compliment.\n\n">>
<<set _reactionValue to $currentMaiden.getFlirtComplimentReaction()>>;
<<run $currentMaiden.askedCompliment = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already done this.">>
<</if>>
<</button>>
<<button "Light Touch" "Interact">>
<<if !$currentMaiden.askedLightTouch>>
<<set _interactMsg to "You give her a light touch.\n\n">>
<<set _reactionValue to $currentMaiden.getFlirtLightTouchReaction()>>;
<<run $currentMaiden.askedLightTouch = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already done this.">>
<</if>>
<</button>>
<<button "Smile" "Interact">>
<<if !$currentMaiden.askedSmile>>
<<set _interactMsg to "You give her a warm smile.\n\n">>
<<set _reactionValue to $currentMaiden.getFlirtSmileReaction()>>;
<<run $currentMaiden.askedSmile = true>>
<<run $currentMaiden.stats.connection.value += _reactionValue + 1>>>>
<<set $sentMsg to _interactMsg + $currentMaiden.getTextReaction(_reactionValue)>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<<else>>
<<set $sentMsg to "You've already done this.">>
<</if>>
<</button>>
<<button "Back" "Interact">><<unset $sentMsg>><<audio "select2" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawConvoFlirt($currentMaiden)>>
<</done>><<nobr>>
<<if $DayManager.noTimeLeft()>>
<<unset $currentMaiden, $currentMaidenIndex, $sentMsg>>
<<goto "NightOver">>
<<else>>
@@Ask $currentMaiden.name@@
<</if>>
<</nobr>>
@@#soulBtn;<<button "Ask about your soul maiden [Unavailable]">><</button>>@@
@@#inviteBtn;<<button "Invite to bedchamber" "Interact">>
<<run $currentMaiden.invitedToBed = $currentMaiden.getBedInvitationReaction()>>
<<set _interactMsg to "You invite " + $currentMaiden.name + " to your bedchamber.\n\n">>
<<set $sentMsg to _interactMsg + ($currentMaiden.invitedToBed ? "She agrees." : "She declines")>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<</button>>@@
<<button "Back" "Interact">><<unset $sentMsg>><<audio "select2" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawConvoAsk($currentMaiden)>>
<<run $("#soulBtn button").prop("disabled", true)>>x
<<run $("#inviteBtn button").prop("disabled", $currentMaiden.invitedToBed)>>
<</done>>Stats for $currentMaiden.name
<<button "Back" "Interact">><<unset $sentMsg>><<audio "select2" play>><</button>><table class="stats-table">
<pre><blockquote><table>
<tr>
<th>Stat</th>
<th>Value</th>
</tr>
<tr>
<td>Level</td>
<td>$currentMaiden.level</td>
</tr>
<tr>
<td>Dragon Type</td>
<td>$currentMaiden.type</td>
</tr>
<tr>
<td>Rarity</td>
<td>$currentMaiden.rarity</td>
</tr>
<tr>
<td>$currentMaiden.stats.primaryAttack.name</td>
<td>$currentMaiden.stats.primaryAttack.value</td>
</tr>
<tr>
<td>$currentMaiden.stats.secondaryAttack.name</td>
<td>$currentMaiden.stats.secondaryAttack.value</td>
</tr>
<tr>
<td>$currentMaiden.stats.screech.name</td>
<td>$currentMaiden.stats.screech.value</td>
</tr>
<tr>
<td>$currentMaiden.stats.plating.name</td>
<td>$currentMaiden.stats.plating.value</td>
</tr>
<tr>
<td>$currentMaiden.stats.stamina.name</td>
<td><<print $currentMaiden.getCurrentStamina()>></td>
</tr>
<tr>
<td>Max $currentMaiden.stats.stamina.name</td>
<td>$currentMaiden.stats.stamina.value</td>
</tr>
<tr>
<td>$currentMaiden.stats.connection.name</td>
<td>$currentMaiden.stats.connection.value</td>
</tr>
<tr>
<td>Primary Attack Type</td>
<td>$currentMaiden.stats.primaryAttackType</td>
</tr>
<tr>
<td>Secondary Attack Type</td>
<td>$currentMaiden.stats.secondaryAttackType</td>
</tr>
<tr>
<td>Screech Type</td>
<td>$currentMaiden.stats.screechType</td>
</tr>
<tr>
<td>Plating Type</td>
<td>$currentMaiden.stats.platingType</td>
</tr>
<tr>
<td>Breast Size</td>
<td>$currentMaiden.stats.breastSize</td>
</tr>
<tr>
<td>Hip Size</td>
<td>$currentMaiden.stats.hipSize</td>
</tr>
<tr>
<td>Ass Size</td>
<td>$currentMaiden.stats.assSize</td>
</tr>
<tr>
<td>Lip Size</td>
<td>$currentMaiden.stats.lipSize</td>
</tr>
<tr>
<td>Hair Color</td>
<td>$currentMaiden.stats.hairColor</td>
</tr>
<tr>
<td>Eye Color</td>
<td>$currentMaiden.stats.eyeColor</td>
</tr>
</table></blockquote></pre>@@Welcome to your home castle!@@
<<run setup.AudioEngine.enterHomeCastle($DayManager.isNight())>>
<<button "Maidens" "Maidens">><<audio "select" play>><</button>>
<<button "Hatchery" "Hatchery">><<audio "hatch" play>><</button>>
<<button "Workbench" "Workbench">><<audio "bench" play>><</button>>
<<button "Bedchamber" "Bedchamber">>
<<audio "door" play>>
<<run setup.AudioEngine.exitHomeCastle($DayManager.isNight())>>
<</button>>
<<button "Leave Castle" "Menu">>
<<audio "doorClose" play>>
<<run setup.AudioEngine.exitHomeCastle($DayManager.isNight())>>
<</button>>
@@#textBkgd;<<print $DayManager.getTimeString()>>@@
<!----------------------------------------------------------------->
<!--------MAIN CASTLE MENU ---------------------------------------->
<!----------------------------------------------------------------->@@Maidens@@
<<button "Back" "HomeCastle">><<audio "select2" play>><</button>>
<<for _i, _maiden range $MaidenManager.maidens>>
<<nobr>>
<<capture _i, _maiden>>
<<set _maidenName to _maiden.name + (_maiden.unavailable ? " (unavailable)" : "")>>
<<set _maidenDetails to [_maidenName, _maiden.type, "Lvl " + _maiden.level, "♥ " + _maiden.stats.connection.value].join(" | ")>>
<<button _maidenDetails>>
<<if !_maiden.unavailable>>
<<audio "select" play>>
<<set $currentMaidenIndex to _i>>
<<set $currentMaiden to _maiden>>
<<goto "Interact">>
<</if>>
<</button>>
<</capture>>
<</nobr>>
<</for>>@@Hatchery@@
<<button "Back" "HomeCastle">><<audio "select2" play>><</button>>
<<for _i, _egg range $EggManager.developingEggs>>
<<nobr>>
<<capture _i, _egg>>
<<set _eggDetails to [_egg.rarity, _egg.type, "Egg"].join(" ")>>
<<button _eggDetails "EggItem">>
<<audio "select" play>>
<<set $eggIndex to _i>>
<<set $egg to _egg>>
<</button>>
<</capture>>
<</nobr>>
<</for>>@@Workbench@@
<<button "Back" "HomeCastle">><<audio "select2" play>><</button>>
<<button "Recipes" "Recipes">><<audio "openBook" play>><</button>>
<<button "Craft" "Craft">><<audio "craft" play>><</button>>
<<button "Inventory" "Inventory">><<audio "heavyMenu" play>><</button>>@@Bedchamber@@
<<nobr>><<run setup.AudioEngine.enterBedchamber();>><</nobr>>
<<button "Back" "HomeCastle">>
<<audio "select2" play>>
<<run setup.AudioEngine.exitBedchamber()>>
<</button>>
<<button "Sleep" "Sleep">><<audio "select" play>><</button>>
<<set _bedMaidens to $MaidenManager.maidens.filter((m)=>m.invitedToBed && !m.unavailable)>>
<<for _maiden range _bedMaidens>>
<<nobr>>
<<capture _maiden>>
<<set _maidenDetails to [_maiden.name, _maiden.type, "Lvl " + _maiden.level, "♥ " + _maiden.stats.connection.value].join(" | ")>>
@@#maidenBtns;<<button _maidenDetails "SexItem">>
<<audio "select" play>>
<<set $currentMaidenIndex to $MaidenManager.maidens.indexOf(_maiden)>>
<<set $currentMaiden to _maiden>>
<</button>>@@
<</capture>>
<</nobr>>
<</for>>
<<if _bedMaidens.length > 0>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawRandomBedMaiden(_bedMaidens)>>
<</done>>
<</if>>
<<done>>
<<run $("#maidenBtns button").prop("disabled", $DayManager.isMorning() || $DayManager.noTimeLeft())>>
<</done>>
<!----------------------------------------------------------------->
<!----------------------------------------------------------------->
<!----------------------------------------------------------------->@@Recipes@@
<<button "Back" "Workbench">><<audio "select2" play>><</button>>
<pre>
<<for _recipe range setup.ItemList.getItemsFormattedForRecipes($Player.highestRegion)>>
<blockquote>''<<print _recipe.name>>'' - <i>increases _recipe.effect</i>
<<print _recipe.materials>>
</blockquote>
<</for>>
</pre>@@Craft@@
<<nobr>>
<<if $DayManager.noTimeLeft()>>
<<unset $egg, $eggIndex>>
<<goto "NightOver">>
<<else>>
@@<<print $craftMsg ?? "">>@@
<<unset $craftMsg>>
<</if>>
<</nobr>>
<<button "Back" "Workbench">><<audio "select2" play>><</button>>
<<for _item range $Inventory.getCraftableItems(setup.ItemList.items, $Player.highestRegion)>>
<<nobr>>
<<capture _item>>
<<set _btnTitle to "Craft " + _item.name + " [owned: " + $Inventory.getItems(_item.id).length +"]">>
<<button _btnTitle "Craft">>
<<audio "craft" play>>
<<audio "achieve" play>>
<<set _craftableMaterials to $Inventory.getCraftableMaterials(_item)>>
<<set _craftedItem to setup.ItemList.craftItem(_item, _craftableMaterials)>>
<<run $Inventory.addItem(_craftedItem)>>
<<run $Inventory.useMaterials(_craftableMaterials)>>
<<set $craftMsg to "You crafted a " + _craftedItem.fullName + "!">>
<<run $DayManager.tick()>>
<</button>>
<</capture>>
<</nobr>>
<</for>>@@Inventory@@
<<button "Back" "Workbench">><<audio "select2" play>><</button>>
<<button "Items" "Items">><<audio "select" play>><</button>>
<<button "Materials" "Materials">><<audio "select" play>><</button>>@@Items@@
<<button "Back" "Inventory">><<audio "select2" play>><</button>>
<<for _item range Array.from($Inventory.items.values())>>
<<nobr>>
<<capture _item>>
<<button _item[0].name "ItemView">>
<<audio "select" play>>
<<set $selectedItemId to _item[0].id>>
<</button>>
<</capture>>
<</nobr>>
<</for>>@@<<print $Inventory.getItems($selectedItemId)[0].name>>@@
<!-- Displays list of items based on selected item ID -->
<<button "Back" "Items">><<audio "select2" play>><<unset $selectedItemId>><</button>>
<ul><<for _item range $Inventory.getItems($selectedItemId)>>
<li>''<<print _item.fullName>>''</li>
<</for>></ul>@@Materials@@
<<button "Back" "Inventory">><<audio "select2" play>><</button>>
<<for _mat range Array.from($Inventory.materials.values())>>
<<nobr>>
<<capture _mat>>
<<button _mat[0].name "MaterialView">>
<<audio "select" play>>
<<set $selectedMaterialId to _mat[0].id>>
<</button>>
<</capture>>
<</nobr>>
<</for>>@@<<print $Inventory.getMaterials($selectedMaterialId)[0].name>>@@
<!-- Displays list of materials based on selected material ID -->
<<button "Back" "Materials">><<audio "select2" play>><<unset $selectedMaterialId>><</button>>
<ul>
<<for _mat range $Inventory.getMaterials($selectedMaterialId)>>
<li>''<<print _mat.fullName>>''</li>
<</for>>
</ul>@@You go to sleep.@@
<<button "Next Morning" "NextMorning">><<audio "select" play>><</button>>@@You wake up from sleep.@@
<<nobr>>
<<run $DayManager.reset()>>
<<run $EggManager.tick()>>
<<run $MaidenManager.tick()>>
<<run $Inventory.tick()>>
<<run $KingdomManager.clearTicks()>>
<<set _readyEggs to $EggManager.hatchEggs()>>
<<if _readyEggs.length > 0>>
<blockquote>@@#wake;@@</blockquote>
<</if>>
<<run setup.AudioEngine.enterHomeCastle($DayManager.isNight())>>
<</nobr>>
<<button "Castle" "HomeCastle">><<audio "select" play>><</button>>
<<done>>
<<for _egg range _readyEggs>>
<<set _msg to $MaidenManager.createMaiden(_egg)>>
<<append #wake>>_msg<br><</append>>
<</for>>
<</done>>@@Give item to egg@@
<<button "Back" "HomeCastle">>
<<audio "select2" play>>
<<unset $egg, $eggIndex>>
<</button>>
<<button "Continue without item" "Egg">><<audio "select" play>><</button>>
<<for _i, _eggItem range $Inventory.getEggItems()>>
<<nobr>>
<<capture _i, _eggItem>>
<<button _eggItem.fullName "Egg">>
<<audio "select" play>>
<<run $Inventory.equippedItem = _eggItem>>
<<set $equippedItemIndex to _i>>
<</button>>
<</capture>>
<</nobr>>
<</for>><<nobr>>
<!-- sync equipped item story variable with inventory story variable -->
<<if $Inventory.equippedItem>>
<<run $Inventory.sync($Inventory.equippedItem, $equippedItemIndex)>>
<</if>>
<<if $DayManager.noTimeLeft()>>
<<run $Inventory.equippedItem = null>>
<<unset $egg, $eggIndex, $equippedItemIndex>>
<<goto "NightOver">>
<<else>>
@@#eggmsg;A $egg.rarity dragon egg@@
<</if>>
<</nobr>>
<<button "Back" "EggItem">>
<<audio "select2" play>>
<!-- sync egg story variable with egg manager story variable -->
<<run $EggManager.developingEggs[$eggIndex] = $egg;>>
<<run $Inventory.equippedItem = null>>
<<unset $equippedItemIndex>>
<</button>>
<<button "Hug egg">>
<<set _action to new window.HugEggAction({egg: $egg})>>
<<set _message to $DayManager.performAction(_action, $Inventory.equippedItem)>>
<<set $egg to _action.egg>>
<<if _action.executed>><<run setup.AudioEngine.interactEgg()>><</if>>
<<run $Inventory.tick()>>
<<replace #eggmsg>>_message<</replace>>
<</button>>
<<button "Talk to egg">>
<<set _action to new window.TalkEggAction({egg: $egg})>>
<<set _message to $DayManager.performAction(_action, $Inventory.equippedItem)>>
<<set $egg to _action.egg>>
<<if _action.executed>><<run setup.AudioEngine.interactEgg()>><</if>>
<<run $Inventory.tick()>>
<<replace #eggmsg>>_message<</replace>>
<</button>>
<<button "Whiper to egg">>
<<set _action to new window.WhisperEggAction({egg: $egg})>>
<<set _message to $DayManager.performAction(_action, $Inventory.equippedItem)>>
<<set $egg to _action.egg>>
<<if _action.executed>><<run setup.AudioEngine.interactEgg()>><</if>>
<<run $Inventory.tick()>>
<<replace #eggmsg>>_message<</replace>>
<</button>>
<<button "Sing to egg">>
<<set _action to new window.SingEggAction({egg: $egg})>>
<<set _message to $DayManager.performAction(_action, $Inventory.equippedItem)>>
<<set $egg to _action.egg>>
<<if _action.executed>><<run setup.AudioEngine.interactEgg()>><</if>>
<<run $Inventory.tick()>>
<<replace #eggmsg>>_message<</replace>>
<</button>>
<<button "Rock egg">>
<<set _action to new window.RockEggAction({egg: $egg})>>
<<set _message to $DayManager.performAction(_action, $Inventory.equippedItem)>>
<<set $egg to _action.egg>>
<<if _action.executed>><<run setup.AudioEngine.interactEgg()>><</if>>
<<run $Inventory.tick()>>
<<replace #eggmsg>>_message<</replace>>
<</button>>
<<button "Rub egg">>
<<set _action to new window.RubEggAction({egg: $egg})>>
<<set _message to $DayManager.performAction(_action, $Inventory.equippedItem)>>
<<set $egg to _action.egg>>
<<if _action.executed>><<run setup.AudioEngine.interactEgg()>><</if>>
<<run $Inventory.tick()>>
<<replace #eggmsg>>_message<</replace>>
<</button>><<nobr>>
<<set _kingdom to $KingdomManager.getCurrentKingdom()>>
<<run _kingdom.setBackgroundImage(_kingdom.getKingdomImage())>>
@@<<print `Kingdom of _kingdom.name`>>@@
<</nobr>>
<blockquote>You are now playing as $currentMaiden.name.
Kingdoms can be dangerous areas for someone like you. If town suspicion is high, you
could be captured and even killed. You can change the town's attributes by taking
different actions in the towns. Some towns have hidden items you can uncover. Take
control of the castle to obtain new maidens.
</blockquote>
<<button "Leave" "Region">><<audio "select2" play>><</button>>
<<button "Continue" "Kingdom">><<audio "select" play>><</button>><<nobr>>
<<set _kingdom to $KingdomManager.getCurrentKingdom()>>
<<set _castle to _kingdom.castle>>
<<run $KingdomManager.tickDay()>>
<<run _kingdom.setBackgroundImage(_kingdom.getKingdomImage())>>
@@<<print `Kingdom of _kingdom.name`>>@@
<</nobr>>
<<button "Leave" "Region">><<audio "select2" play>><</button>>
<<button "Castle" "Castle">>
<<run _castle.setCurrentMaiden($MaidenManager.maidens[$currentMaidenIndex])>>
<<audio "select" play>>
<</button>>
<<for _i, _town range _kingdom.getTowns()>>
<<nobr>>
<<capture _i, _town>>
<<button _town.name "Town">>
<<audio "select" play>>
<<run $KingdomManager.setCurrentTown(_i)>>
<<run _town.setCurrentMaiden($MaidenManager.maidens[$currentMaidenIndex])>>
<!--<<print `maidens: _town.maidens.size`>>-->
<</button>>
<</capture>>
<</nobr>>
<</for>>
<<for _land range _kingdom.getLand()>>
<<button Land "Land">><<audio "select" play>><</button>>
<</for>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.setCurrentMaiden(null)>>
<<run _town.clearBackgroundImage()>>
<</nobr>>
<<goto "DayOver">>@@The guards have been ordered to seize you. You have been captured!@@
<<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<print `Suspicion was at ${_town.entity.suspicion}.`>>
<<run $MaidenManager.maidens[$currentMaidenIndex] = _town.currentMaiden.maiden>>
<<run _town.setCurrentMaiden(null)>>
<<run _town.clearBackgroundImage()>>
<<unset $currentMaiden, $currentMaidenIndex, $cachedMaidenIndex>>
<<run setup.AudioEngine.exitWorldMap()>>
<</nobr>>
<<button "Continue" "HomeCastle">><</button>><<set _town to $KingdomManager.getCurrentTown()>>\
<pre><blockquote>\
<<for _msg range _town.getReversedLog()>>
<<print _msg>>
<</for>>
</blockquote></pre><pre><blockquote>\
Core attributes (0 - 100):
Suspicion - Increases chances that maidens will be captured and spies will be discovered
Fear - How easily townspeople are controlled by stronger entities
Aggression - How likely townspeople are to kill or flee
Bonds - Ability of townspeople to join clans or troops
Influence - Ability of townspeople to convert others to faiths or spies
Faiths: King's Faith, Occult, Dragon Soul
Clans: Lion, Skull, Dragon
Loyalties: King, Town Leader, Maiden
Win Conditions:
80% spies working against the king -- top clan required
1500 troops per region level
80% blasphemous faith against king -- top clan required
90% clan of the king -- top loyalty required
70% faith of the maiden -- top loyalty required
Tips:
Collect more resources when maidens are at higher levels
Lion clan kills Occult followers, and Skull clan kills King's Faith followers
Grow population by planting gardens and building monuments
</blockquote></pre><<nobr>>
<<if $DayManager.isNight()>>
<<goto "KingdomDayOver">>
<</if>>
<</nobr>>
<<button "Leave" "Kingdom">><<audio "select2" play>><</button>>
<<button "Forage" "ForageLand">><<audio "select" play>><</button>><<nobr>>
<<set _kingdom to $KingdomManager.getCurrentKingdom()>>
<<if $DayManager.isNight()>><<run _kingdom.castle.setCurrentMaiden(null)>><<unset $throneMsg>><<goto "KingdomDayOver">><</if>>
<<run _kingdom.castle.setBackgroundImage(_kingdom.castle.getCastleImage())>>
<</nobr>>
@@<<print "Castle">>@@
<blockquote><<print $throneMsg ?? `_kingdom.castle.leader.name is the King.`>></blockquote>
<<button "Leave" "Kingdom">>
<<audio "select2" play>>
<<run _kingdom.castle.setCurrentMaiden(null)>>
<<unset $throneMsg>>
<</button>>
<<if _kingdom.isATownLeader($MaidenManager.maidens[$currentMaidenIndex]) || _kingdom.castleKey>>
<<button "Enter Throne Room" "ThroneRoom">><<audio "select" play>><</button>>
<<else>>
<<button "Enter Throne Room (Town Leaders only)">><</button>>
<</if>><<nobr>>
<<set _kingdom to $KingdomManager.getCurrentKingdom()>>
<<set _town to _kingdom.castle>> <!-- warning: property changes won't persist with _town. must use _kingdom.castle -->
<<if $DayManager.isNight()>><<unset $throneMsg, $throneState>><<goto "KingdomDayOver">><</if>>
<<run _town.setBackgroundImage(_town.getThroneImage())>>
<</nobr>>
@@<<print "Throne Room">>@@
<<nobr>>
<<if !_kingdom.defeated>>
@@<<print $throneMsg ?? _kingdom.castle.leader.name + " says, \"You've come for my throne. How do you intend to get it?\"">>@@
<<else>>
@@<<print $throneMsg ?? `_kingdom.castle.leader.name is the King.`>>@@
<</if>>
<</nobr>>
<<button "Leave" "Castle">><<audio "select2" play>><<unset $throneMsg, $throneState>><</button>>
<<if !$throneState && !_kingdom.defeated>>
<<button "My spies have infiltrated your kingdom. You've already lost.">>
<<audio "select" play>>
<<if _kingdom.isSpyWin()>>
<<set $throneState to "maiden">>
<<set $victoryType to "Spy">>
<<set $throneMsg to _kingdom.castle.leader.name + " says, \"I have to say you did well to make it this far. I have no choice but to comply.\"">>
<<goto "ThroneRoom">>
<<else>>
<<run $DayManager.tick()>>
<<set $throneMsg to _kingdom.castle.leader.name + " orders her guards to remove you from the castle.">>
<<goto "Castle">>
<</if>>
<</button>>
<<button "My huge army is waiting outside to crush you and everyone in this castle. Cede control of your kingdom to me.">>
<<audio "select" play>>
<<if _kingdom.isCombatWin()>>
<<set $throneState to "maiden">>
<<set $victoryType to "Large Army">>
<<set $throneMsg to _kingdom.castle.leader.name + " says, \"I have to say you did well to make it this far. I have no choice but to comply.\"">>
<<goto "ThroneRoom">>
<<else>>
<<run $DayManager.tick()>>
<<set $throneMsg to _kingdom.castle.leader.name + " orders her guards to remove you from the castle.">>
<<goto "Castle">>
<</if>>
<</button>>
<<button "Give up your kingdom and join the Occult faith or my followers and I will ritual sacrifice you to the devil.">>
<<audio "select" play>>
<<if _kingdom.isOccultWin()>>
<<set $throneState to "maiden">>
<<set $victoryType to "Occult">>
<<set $throneMsg to _kingdom.castle.leader.name + " says, \"I have to say you did well to make it this far. I have no choice but to comply.\"">>
<<goto "ThroneRoom">>
<<else>>
<<run $DayManager.tick()>>
<<set $throneMsg to _kingdom.castle.leader.name + " orders her guards to remove you from the castle.">>
<<goto "Castle">>
<</if>>
<</button>>
<<button "I have sworn loyalty to the Lion clan and your troops have rallied around me. Don't embarrass yourself, step down now or let the lion's justice devour you.">>
<<audio "select" play>>
<<if _kingdom.isLionClanWin()>>
<<set $throneState to "maiden">>
<<set $victoryType to "Lion Clan">>
<<set $throneMsg to _kingdom.castle.leader.name + " says, \"I have to say you did well to make it this far. I have no choice but to comply.\"">>
<<goto "ThroneRoom">>
<<else>>
<<run $DayManager.tick()>>
<<set $throneMsg to _kingdom.castle.leader.name + " orders her guards to remove you from the castle.">>
<<goto "Castle">>
<</if>>
<</button>>
<<button "You've spent too many years consumed with managerial drudgery in this castle. Step away from it all and I'll offer you all the sexual pleasures life has to offer.">>
<<audio "select" play>>
<<if _kingdom.isDragonSoulWin()>>
<<set $throneState to "maiden">>
<<set $victoryType to "Dragon Soul">>
<<set $throneMsg to _kingdom.castle.leader.name + " says, \"You're right. I've grown tired of the tedium of running a kingdom. Sign me up for your sex cult. The castle is yours.\"">>
<<goto "ThroneRoom">>
<<else>>
<<run $DayManager.tick()>>
<<set $throneMsg to _kingdom.castle.leader.name + " orders her guards to remove you from the castle.">>
<<goto "Castle">>
<</if>>
<</button>>
<<button "I'm a dragon maiden and I will destroy this castle if you don't give up control." "ThroneRoom">>
<<audio "select" play>>
<<run $DayManager.tick()>>
<<set $throneMsg to _kingdom.castle.leader.name + " says, \"I expected better from a fellow dragon maiden. Can't you tell that you are no match for me? If you have a death wish, I can help you with that.\"">>
<</button>>
<<elseif $throneState == "maiden">> <!-- what will you do with this dragon maiden? -->
<<button "Kill her" "Castle">>
<<audio "select" play>>
<<unset $throneState>>
<<set $throneMsg to "You kill the dragon maiden and take the throne for yourself.\n\n-- KINGDOM VICTORY -- \nStrategy: " + $victoryType + "\nDays: " + _kingdom.days>>
<<run _kingdom.castle.leader=_kingdom.castle.currentMaiden>>
<<run _kingdom.defeated = true>>
<</button>>
<<button "Take her" "Castle">>
<<audio "select" play>>
<<unset $throneState>>
<<set _msg to "You take the dragon maiden with you. " + _kingdom.castle.leader.name + " joins the other maidens at your castle.\n\n-- KINGDOM VICTORY -- \nStrategy: " + $victoryType + "\nDays: " + _kingdom.days>>
<<set $throneMsg to _msg>>
<<run $MaidenManager.maidens.push(_kingdom.castle.leader.maiden)>>
<<run _kingdom.castle.leader=_kingdom.castle.currentMaiden>>
<<run _kingdom.defeated = true>>
<</button>>
<</if>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawConvoMain(_kingdom.castle.leader.maiden)>>
<</done>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run $KingdomManager.transferResources(_town)>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<goto "KingdomDayOver">><</if>>
<<run _town.setBackgroundImage(_town.getTownImage())>>
<</nobr>>
<<button "Leave" "Kingdom">>
<<audio "select2" play>>
<<run _town.setCurrentMaiden(null)>>
<</button>>
<<for _building range _town.buildings>>
<<set _passage to _building.name.replace(/ /g,'')>>
<<button _building.name _passage>><<audio "select" play>><</button>>
<</for>>
<<if _town.buildings.length < _town.possibleBuildings.length>>
<<button "Build" "Plot">><<audio "select" play>><</button>>
<</if>>@@Build a new structure:@@
<<button "Leave" "Town">><<audio "select2" play>><<run $KingdomManager.tick()>><<run $DayManager.quarterTick()>><</button>>\
<<set _town to $KingdomManager.getCurrentTown()>>\
<<for _buildingName range _town.possibleBuildings>>
<<nobr>>
<<if !_town.buildings.find((b) => b.name == _buildingName)>>
<<set _passage to _buildingName.replace(/ /g,'')>>
<<set _cost to _town.getBuildingCost(_passage)>>
<<set _buildingTitle to `_buildingName (_cost resources)`>>
<<capture _passage, _cost>>
<<button _buildingTitle>>
<<if _town.resources >= _cost>>
<<run _town.resources -= _cost>>
<<set _building to _town.createBuilding(_passage)>>
<<run _building.startBuilding()>>
<<run $DayManager.quarterTick()>>
<<audio "select" play>>
<<goto _passage>>
<</if>>
<</button>>
<</capture>>
<</if>>
<</nobr>>
<</for>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<unset $townHallMsg>><<unset $townHallState>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<unset $townHallMsg>><<unset $townHallState>><<goto "KingdomDayOver">><</if>>
<<set _building to _town.getBuilding("TownHall")>>
<<if !$townHallState>><<set $townHallState to "">><</if>>
<</nobr>>
@@Town Hall@@
<blockquote><<print $townHallMsg ?? `Town Hall leader is ${_town.leader?.name ?? "no one"}`>></blockquote>
<<button "Leave" "Town">>
<<audio "select2" play>>
<<unset $townHallState, $townHallMsg, $threat>>
<<run _town.resetDeal()>>
<<run $KingdomManager.tick()>>
<<run $DayManager.quarterTick()>>
<</button>>
<<if _building.isDestroyed>>\
<<run _building.setBackgroundImage(_building.getDestroyedImage())>>
<<elseif _building.isUnderAttack>>\
<<run _building.setBackgroundImage(_building.getAttackingImage())>>
<<button "Continue attacking" "TownHall">>
<<set $townHallMsg to "You continue destroying the building.">>
<<run _building.advanceTimedEffects(_town)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<</button>>
<<else>>\
<<run _building.setBackgroundImage(_building.getBuildingImage())>>\
<<switch $townHallState>>
<<case "">>
<<if !(_town.leader instanceof window.MaidenEntity) && _town.leader>>
<<button "Interact with leader" "TownHall">>
<<set $townHallState to "talk">>
<<set $townHallMsg to `What do you want to talk to _town.leader.name about?`>>
<<audio "select" play>>
<</button>>
<</if>>
<<button "Attack building" "TownHall">>
<<run _town.startDestroying(_building)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<</button>>
<<case "talk">>
<<button "Exchange pleasantries">>
<<if _town.talkToLeader()>>
<<run $DayManager.tick()>>
<<set $townHallMsg to "You have a pleasant conversation with the town leader.">>
<<goto "TownHall">>
<<else>>
<<goto "CaptureMaiden">>
<</if>>
<<audio "select" play>>
<</button>>
<<button "Negotiate" "TownHall">>
<<set $townHallState to "negotiate">>
<<set $townHallMsg to "What do you want to negotiate about?">>
<<audio "select" play>>
<</button>>
<<case "negotiate">>
<<button "Troops" "TownHall">>
<<run _town.setPlayerDesire("troops")>>
<<set $townHallState to "offer">>
<<set $townHallMsg to "You want troops. What are you willing to offer?">>
<<audio "select" play>>
<</button>>
<<button "Leader Position" "TownHall">>
<<run _town.setPlayerDesire("leaderPosition")>>
<<set $townHallState to "offer">>
<<set $townHallMsg to "You want the leader's position. What are you willing to offer?">>
<<audio "select" play>>
<</button>>
<<button "Cease Fire" "TownHall">>
<<run _town.setPlayerDesire("ceaseFire")>>
<<set $townHallState to "offer">>
<<set $townHallMsg to "You want a cease fire. What are you willing to offer?">>
<<audio "select" play>>
<</button>>
<<button "Release Maidens" "TownHall">>
<<run _town.setPlayerDesire("releaseMaidens")>>
<<set $townHallState to "offer">>
<<set $townHallMsg to "You want to release maidens. What are you willing to offer?">>
<<audio "select" play>>
<</button>>
<<button "Alliance" "TownHall">>
<<run _town.setPlayerDesire("alliance")>>
<<set $townHallState to "offer">>
<<set $townHallMsg to "You want an alliance. What are you willing to offer?">>
<<audio "select" play>>
<</button>>
<<button "Resources" "TownHall">>
<<run _town.setPlayerDesire("resources")>>
<<set $townHallState to "offer">>
<<set $townHallMsg to "You want resources. What are you willing to offer?">>
<<audio "select" play>>
<</button>>
<<button "Hidden Item" "TownHall">>
<<run _town.setPlayerDesire("treasure")>>
<<set $townHallState to "offer">>
<<set $townHallMsg to "You want a hidden item. What are you willing to offer?">>
<<audio "select" play>>
<</button>>
<<case "offer">>
<<set $threat to false>>
<<button "Troops" "TownHall">>
<<run _town.setPlayerOffer("troops")>>
<<set $townHallState to "consider">>
<<set $townHallMsg to `You'll give _town.playerOffer for _town.playerDesire. Ask the town leader to consider the deal?`>>
<<audio "select" play>>
<</button>>
<<button "Ritual Orgy" "TownHall">>
<<run _town.setPlayerOffer("sex")>>
<<set $townHallState to "consider">>
<<set $townHallMsg to `You'll give _town.playerOffer for _town.playerDesire. Ask the town leader to consider the deal?`>>
<<audio "select" play>>
<</button>>
<<button "Cease Fire" "TownHall">>
<<run _town.setPlayerOffer("ceaseFire")>>
<<set $townHallState to "consider">>
<<set $townHallMsg to `You'll give _town.playerOffer for _town.playerDesire. Ask the town leader to consider the deal?`>>
<<audio "select" play>>
<</button>>
<<button "Resources" "TownHall">>
<<run _town.setPlayerOffer("resources")>>
<<set $townHallState to "consider">>
<<set $townHallMsg to `You'll give _town.playerOffer for _town.playerDesire. Ask the town leader to consider the deal?`>>
<<audio "select" play>>
<</button>>
<<case "consider">>
<<button "Consider" "TownHall">>
<<if _town.calculateDeal($threat)>>
<<set $townHallState to "deal">>
<<set $townHallMsg to "The town leader has agreed to your deal!">>
<<unset $threat>>
<<else>>
<<set $townHallState to "nodeal">>
<<set $townHallMsg to "The town leader declines your deal.">>
<</if>>
<<audio "select" play>>
<<run $DayManager.quarterTick()>>
<</button>>
<<case "deal">>
<<run $DayManager.quarterTick()>>
<<button "Confirm deal" "TownHall">>
<<run _town.executeDeal()>>
<<set $townHallState to "">>
<<set $townHallMsg to "Deal was confirmed.">>
<<audio "select" play>>
<</button>>
<<case "nodeal">>
<<run $DayManager.quarterTick()>>
<<button "End negotiations" "TownHall">>
<<set $townHallState to "">>
<<set $townHallMsg to "You end negotiations.">>
<<unset $threat>>
<<audio "select" play>>
<</button>>
<<button "Threaten" "TownHall">>
<<set $threat to true>>
<<set $townHallState to "threaten">>
<<set $townHallMsg to "How do you want to threaten the town leader?">>
<<audio "select" play>>
<</button>>
<<if $threat>>
<<button "Execute Threat" "TownHall">>
<<run _town.executeThreat($threat)>>
<<unset $threat, $townHallState, $townHallMsg>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<</button>>
<</if>>
<<case "threaten">>
<<button "Start War" "TownHall">>
<<set $threat to "startWar">>
<<set $townHallState to "consider">>
<<set $townHallMsg to "You threaten to start a war.">>
<<audio "select" play>>
<</button>>
<<button "Destroy Town Hall" "TownHall">>
<<set $threat to "destroyTownHall">>
<<set $townHallState to "consider">>
<<set $townHallMsg to "You threaten to destroy the town hall.">>
<<audio "select" play>>
<</button>>
<<if _town.playerTroops >= 10>>\
<<button "Order troops to kill her" "TownHall">>
<<set $threat to "playerTroopsKillLeader">>
<<set $townHallState to "consider">>
<<set $townHallMsg to "You threaten to order your troops to kill her.">>
<<audio "select" play>>
<</button>>
<</if>>\
<<if _town.getSpyLevel() >= 10>>\
<<button "Have her killed by her own men" "TownHall">>
<<set $threat to "spyKillLeader">>
<<set $townHallState to "consider">>
<<set $townHallMsg to "You threaten to have her killed by her own men.">>
<<audio "select" play>>
<</button>>
<</if>>\
<<if _town.entity.fear >= 50 && _town.entity.getTopFaith() == "Occult">>\
<<button "Have her ritual sacrificed" "TownHall">>
<<set $threat to "occultKillLeader">>
<<set $townHallState to "consider">>
<<set $townHallMsg to "You threaten to have her ritually sacrificed.">>
<<audio "select" play>>
<</button>>
<</if>>\
<</switch>>
<</if>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<unset $libraryMsg>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<unset $libraryMsg>><<goto "KingdomDayOver">><</if>>
<<set _building to _town.getBuilding("Library")>>
@@<<print $libraryMsg ?? "Welcome to the Library">>@@
<</nobr>>
<<button "Leave" "Town">><<audio "select2" play>><<unset $libraryMsg>><<run $KingdomManager.tick()>><<run $DayManager.quarterTick()>><</button>>
<<if _building.isDestroyed>>
<<run _building.setBackgroundImage(_building.getDestroyedImage())>>
<<elseif _building.isUnderAttack>>\
<<run _building.setBackgroundImage(_building.getAttackingImage())>>
<<button "Continue attacking" "Library">>
<<set $libraryMsg to "You continue destroying the building.">>
<<set _building to _town.getBuilding("Library")>>
<<run _building.advanceTimedEffects(_town)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<</button>>
<<else>>
<<run _building.setBackgroundImage(_building.getBuildingImage())>>
<<button "Read about town leader" "Library">>
<<if _building.readTownLeader(_town)>>
<<run $DayManager.tick()>>
<<set $libraryMsg to "You've learned about the town leader, and they'll feel a little more comfortable around you.">>
<<run _town.logMessage($libraryMsg)>>
<<else>>
<<set $libraryMsg to "You've learned all that you can about the town leader.">>
<</if>>
<<audio "select" play>>
<</button>>
<<button "Read about a hidden item" "Library">>
<<if _building.readTreasure()>>
<<run $DayManager.tick()>>
<<set $libraryMsg to "You've learned some info about a possible hidden item. Your chances of finding one has increased.">>
<<run _town.logMessage($libraryMsg)>>
<<else>>
<<set $libraryMsg to "You've learned all that you can about a possible hidden item.">>
<</if>>
<<audio "select" play>>
<</button>>
<<button "Read about spying techniques" "Library">>
<<if _building.readSpyInfo()>>
<<run $DayManager.tick()>>
<<set $libraryMsg to "You've learned some spy techniques and your skills in spying have increased.">>
<<run _town.logMessage($libraryMsg)>>
<<else>>
<<set $libraryMsg to "You've learned all that you can about spy techniques.">>
<</if>>
<<audio "select" play>>
<</button>>
<<button "Attack building" "Library">>
<<set $libraryMsg to "You start destroying the building.">>
<<set _building to _town.getBuilding("Library")>>
<<run _town.startDestroying(_building)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<</button>>
<</if>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<unset $centerSquareMsg>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<unset $centerSquareMsg>><<goto "KingdomDayOver">><</if>>
<<set _building to _town.getBuilding("CenterSquare")>>
@@<<print $centerSquareMsg ?? "Welcome to Center Square">>@@
<</nobr>>
<<button "Leave" "Town">><<audio "select2" play>><<unset $centerSquareMsg>><<run $KingdomManager.tick()>><<run $DayManager.quarterTick()>><</button>>
<<if _building.isDestroyed>>
<<run _building.setBackgroundImage(_building.getDestroyedImage())>>
<<elseif _building.isUnderAttack>>
<<run _building.setBackgroundImage(_building.getAttackingImage())>>
<<button "Continue attacking" "CenterSquare">>
<<set $centerSquareMsg to "You continue destroying the area.">>
<<set _building to _town.getBuilding("CenterSquare")>>
<<run _building.advanceTimedEffects(_town)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<</button>>
<<else>>
<<run _building.setBackgroundImage(_building.getBuildingImage())>>
<<button "Talk to a townsperson" "CenterSquare">>
<<if _town.talkToTownsperson()>>
<<run $DayManager.tick()>>
<<set $centerSquareMsg to "You have a pleasant conversation with a townsperson.">>
<</if>>
<<audio "select" play>>
<</button>>
<<button "Attack center square" "CenterSquare">>
<<set $centerSquareMsg to "You start destroying the area.">>
<<set _building to _town.getBuilding("CenterSquare")>>
<<run _town.startDestroying(_building)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<</button>>
<</if>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<unset $barracksMsg, $barracksState>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<unset $barracksMsg, $barracksState>><<goto "KingdomDayOver">><</if>>
<<set _building to _town.getBuilding("Barracks")>>
@@Barracks@@
<</nobr>>
<<print $barracksMsg ?? _building.troops + " troops in the barracks.">>
<<button "Leave" "Town">><<audio "select2" play>><<unset $barracksMsg, $barracksState>><<run $KingdomManager.tick()>><<run $DayManager.quarterTick()>><</button>>
<<if _building.isInDevelopment>>\
<<run _building.setBackgroundImage(_building.getDevelopmentImage())>>
<<button "Continue Building" "Barracks">>
<<audio "select" play>>
<<run _building.advanceTimedEffects(_town)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<</button>>
<<elseif _building.isDestroyed>>\
<<run _building.setBackgroundImage(_building.getDestroyedImage())>>
<<elseif _building.isUnderAttack>>\
<<run _building.setBackgroundImage(_building.getAttackingImage())>>
<<else>>\
<<run _building.setBackgroundImage(_building.getBuildingImage())>>
<<if !$barracksState>>\
<<button "Create Troops" "Barracks">><<set $barracksState to "troops">><</button>>
<<button "Deploy Troops" "Barracks">><<set $barracksState to "deploy">><</button>>
<<if _town.getSpyLevel() >= 1>>\
<<button "Create Spies" "Barracks">><<set $barracksState to "spies">><</button>>
<</if>>
<<elseif $barracksState == "spies">>\
@@Create Spies@@
<<button "Back" "Barracks">><<unset $barracksState>><</button>>
<<for _spyType range ["Dragon Soul", "Occult", "Kings Faith", "Skull", "Lion"]>>
<<nobr>>
<<if _town.getBuilding("ResearchLab")?.isClanOrFaithUnlocked(_spyType.replace(/ /g,''))>>
<<capture _spyType>>
<<set _buttonName to _spyType + " (" + window.Barracks.troopCost + " resources)">>
<<button _buttonName "Barracks">>
<<if _town.resources >= window.Barracks.troopCost>>
<<run _town.resources -= window.Barracks.troopCost>>
<<set _effectName to "createSpies" + _spyType.replace(/ /g,'')>>
<<run _building.startTimedEffect(_effectName, 100, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<run $DayManager.quarterTick()>>
<<set $barracksMsg to `Created ${_spyType} spies.`>>
<<audio "select" play>>
<</if>>
<</button>>
<</capture>>
<</if>>
<</nobr>>\
<</for>>
<<elseif $barracksState == "troops">>\
@@Create Troops@@
<<button "Back" "Barracks">><<unset $barracksState>><</button>>
<<for _clanType range ["None", "Dragon", "Skull", "Lion"]>>
<<if _town.getBuilding("ResearchLab")?.isClanOrFaithUnlocked(_clanType)>>\
<<capture _clanType>>\
<<for _troopAmount range [10, 50, 100]>>\
<<nobr>>
<<capture _troopAmount>>
<<set _buttonName to _troopAmount + " troops | " + "Clan: " + _clanType + " (" + (window.Barracks.troopCost * _troopAmount) + " resources)">>
<<button _buttonName "Barracks">>
<<if _town.resources >= window.Barracks.troopCost * _troopAmount>>
<<run _town.resources -= window.Barracks.troopCost * _troopAmount>>
<<set _effectName to "createTroops" + _clanType.replace("None","")>>
<<run _building.startTimedEffect(_effectName, _troopAmount, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<run $DayManager.quarterTick()>>
<<set $barracksMsg to `Created ${_troopAmount} troops` + (_clanType == "None" ? "." : ` for the ${_clanType} clan.`)>>
<<audio "select" play>>
<</if>>
<</button>>
<</capture>>
<</nobr>>\
<</for>>\
<</capture>>\
<</if>>
<</for>>
<<elseif $barracksState == "deploy">>\
@@Deploy Troops@@
<<button "Back" "Barracks">><<unset $barracksState>><</button>>
<<for _deployType range ["City", "Castle", "Treasure Hunt"]>>
<<capture _deployType>>\
<<for _troopAmount range [10, 50, 100]>>
<<nobr>>
<<capture _troopAmount>>
<<set _buttonName to _troopAmount + "% of troops to " + _deployType>>
<<button _buttonName "Barracks">>
<<set _effectName to "deployTroopsTo" + _deployType.replace(/ /g, '')>>
<<set _deployed to _building.troops * _troopAmount/100>>
<<run _building.startTimedEffect(_effectName, _deployed, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<run $DayManager.quarterTick()>>
<<set $barracksMsg to `Deployed ${_deployed} troops to ${_deployType}`>>
<<audio "select" play>>
<</button>>
<</capture>>
<</nobr>>\
<</for>>
<</capture>>\
<</for>>
<</if>>
<</if>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<unset $gardensMsg>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<unset $gardensMsg>><<goto "KingdomDayOver">><</if>>
<<set _building to _town.getBuilding("Gardens")>>
<<set _monuments to _town.getBuilding("Workshop")?.monuments ?? []>>
<</nobr>>
@@<<print $gardensMsg ?? "The Gardens">>@@
<blockquote><<print `You have _building.gardens gardens and _monuments.length monuments.`>></blockquote>\
<<button "Leave" "Town">><<audio "select2" play>><<unset $gardensMsg>><<run $KingdomManager.tick()>><<run $DayManager.quarterTick()>><</button>>
<<if _building.isInDevelopment>>
<<run _building.setBackgroundImage(_building.getDevelopmentImage())>>
<<button "Continue Building" "Gardens">>
<<audio "select" play>>
<<run _building.advanceTimedEffects(_town)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<<audio "select" play>>
<</button>>
<<elseif _building.isDestroyed>>\
<<run _building.setBackgroundImage(_building.getDestroyedImage())>>
<<elseif _building.isUnderAttack>>\
<<run _building.setBackgroundImage(_building.getAttackingImage())>>
<<else>>\
<<run _building.setBackgroundImage(_building.getBuildingImage())>>\
<<button "Create a garden (250 resources)" "Gardens">>
<<if _town.resources >= window.Gardens.gardenCost>>
<<run _town.resources -= window.Gardens.gardenCost>>
<<run _building.startTimedEffect("garden", .005, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $gardensMsg to "You contributed to the town by creating a new beautiful garden. You've gained some loyalty.">>
<<run $DayManager.quarterTick()>>
<<audio "select" play>>
<</if>>
<</button>>
<pre><blockquote>
<<print "Monuments:">>
<<for _monument range [...new Set(_monuments)]>><<print `-- _monument`>><br>\
<</for>>
</blockquote></pre>
<</if>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<unset $researchLabMsg, $researchLabState>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<unset $researchLabMsg, $researchLabState>><<goto "KingdomDayOver">><</if>>
<<set _building to _town.getBuilding("ResearchLab")>>
<</nobr>>
@@<<print $researchLabMsg ?? "Research Lab">>@@
<<button "Leave" "Town">><<audio "select2" play>><<unset $researchLabMsg, $researchLabState>><<run $KingdomManager.tick()>><<run $DayManager.quarterTick()>><</button>>
<<if _building.isInDevelopment>>\
<<run _building.setBackgroundImage(_building.getDevelopmentImage())>>
<<button "Continue Building" "ResearchLab">>
<<audio "select" play>>
<<run _building.advanceTimedEffects(_town)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<</button>>
<<elseif _building.isDestroyed>>\
<<run _building.setBackgroundImage(_building.getDestroyedImage())>>
<<elseif _building.isUnderAttack>>\
<<run _building.setBackgroundImage(_building.getAttackingImage())>>
<<else>>\
<<run _building.setBackgroundImage(_building.getBuildingImage())>>\
<<if !$researchLabState>>\
<<set $researchLabMsg to "What do you want to research?">>
<<button "Clans" "ResearchLab">><<set $researchLabState to "clans">><<audio "select" play>><</button>>
<<button "Faiths" "ResearchLab">><<set $researchLabState to "faiths">><<audio "select" play>><</button>>
<<button "Rituals" "ResearchLab">><<set $researchLabState to "rituals">><<audio "select" play>><</button>>
<<button "Secrets" "ResearchLab">><<set $researchLabState to "secrets">><<audio "select" play>><</button>>
<<button "Spies" "ResearchLab">><<set $researchLabState to "spies">><<audio "select" play>><</button>>
<<elseif $researchLabState == "clans">>\
<<button "Back" "ResearchLab">><<unset $researchLabState>><<unset $researchLabMsg>><<audio "select2" play>><</button>>
<<button "Skull Clan (500 resources)" "ResearchLab">>
<<if _building.unlockSkullClan>>
<<set $researchLabMsg to "You already researched this.">>
<<elseif _town.resources >= window.ResearchLab.researchCost>>
<<run _town.resources -= window.ResearchLab.researchCost>>
<<run _building.startTimedEffect("clanSkull", 0, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $researchLabMsg to "You researched the Skull Clan. New options available in other buildings.">>
<<run $DayManager.quarterTick()>>
<</if>>
<<audio "select" play>>
<</button>>
<<button "Lion Clan (500 resources)" "ResearchLab">>
<<if _building.unlockLionClan>>
<<set $researchLabMsg to "You already researched this.">>
<<elseif _town.resources >= window.ResearchLab.researchCost>>
<<run _town.resources -= window.ResearchLab.researchCost>>
<<run _building.startTimedEffect("clanLion", 0, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $researchLabMsg to "You researched the Lion Clan. New options available in other buildings.">>
<<run $DayManager.quarterTick()>>
<</if>>
<<audio "select" play>>
<</button>>
<<elseif $researchLabState == "faiths">>\
<<button "Back" "ResearchLab">><<unset $researchLabState>><<unset $researchLabMsg>><<audio "select2" play>><</button>>
<<button "King's Faith (500 resources)" "ResearchLab">>
<<if _building.unlockKingsFaith>>
<<set $researchLabMsg to "You already researched this.">>
<<elseif _town.resources >= window.ResearchLab.researchCost>>
<<run _town.resources -= window.ResearchLab.researchCost>>
<<run _building.startTimedEffect("faithKingsFaith", 0, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $researchLabMsg to "You researched the King's Faith. New options available in other buildings.">>
<<run $DayManager.quarterTick()>>
<</if>>
<<audio "select" play>>
<</button>>
<<button "Occult (500 resources)" "ResearchLab">>
<<if _building.unlockOccult>>
<<set $researchLabMsg to "You already researched this.">>
<<elseif _town.resources >= window.ResearchLab.researchCost>>
<<run _town.resources -= window.ResearchLab.researchCost>>
<<run _building.startTimedEffect("faithOccult", 0, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $researchLabMsg to "You researched the Occult faith. New options available in other buildings.">>
<<run $DayManager.quarterTick()>>
<</if>>
<<audio "select" play>>
<</button>>
<<elseif $researchLabState == "rituals">>\
<<button "Back" "ResearchLab">><<unset $researchLabState>><<unset $researchLabMsg>><<audio "select2" play>><</button>>
<<button "King's Faith" "ResearchLab">><<set $researchLabState to "king">><<audio "select" play>><</button>>
<<button "Occult" "ResearchLab">><<set $researchLabState to "occult">><<audio "select" play>><</button>>
<<button "Dragon Soul" "ResearchLab">><<set $researchLabState to "dragon">><<audio "select" play>><</button>>
<<elseif $researchLabState == "occult">>\
<<button "Back" "ResearchLab">><<set $researchLabState to "rituals">><<unset $researchLabMsg>><<audio "select2" play>><</button>>
<<for _ritual range window.RitualData.Occult>>\
<<nobr>>
<<if !_building.unlockedOccultRituals.includes(_ritual.name)>>
<<capture _ritual>>
<<set _effectString to (Math.sign(_ritual.effects[0].value) == -1 ? "-" : "+") + _ritual.effects[0].name>>
<<set _buttonName to [_ritual.name, window.ResearchLab.researchCost/2 + " resources", _effectString, "availability: " + _ritual.types.join(", ")].join(" | ")>>
<<button _buttonName "ResearchLab">>
<<if _town.resources >= window.ResearchLab.researchCost/2>>
<<run _town.resources -= window.ResearchLab.researchCost/2>>
<<run _building.startTimedEffect("ritualOccult", _ritual.name, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $researchLabMsg to "You unlocked a new ritual. Use the chapel to set rituals.">>
<<run $DayManager.quarterTick()>>
<</if>>
<<audio "select" play>>
<</button>>
<</capture>>
<</if>>
<</nobr>>\
<</for>>
<<elseif $researchLabState == "king">>\
<<button "Back" "ResearchLab">><<set $researchLabState to "rituals">><<unset $researchLabMsg>><<audio "select2" play>><</button>>
<<for _ritual range window.RitualData.King>>\
<<nobr>>
<<if !_building.unlockedKingRituals.includes(_ritual.name)>>
<<capture _ritual>>
<<set _effectString to (Math.sign(_ritual.effects[0].value) == -1 ? "-" : "+") + _ritual.effects[0].name>>
<<set _buttonName to [_ritual.name, window.ResearchLab.researchCost/2 + " resources", _effectString, "availability: " + _ritual.types.join(", ")].join(" | ")>>
<<button _buttonName "ResearchLab">>
<<if _town.resources >= window.ResearchLab.researchCost/2>>
<<run _town.resources -= window.ResearchLab.researchCost/2>>
<<run _building.startTimedEffect("ritualKing", _ritual.name, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $researchLabMsg to "You unlocked a new ritual. Use the chapel to set rituals.">>
<<run $DayManager.quarterTick()>>
<</if>>
<<audio "select" play>>
<</button>>
<</capture>>
<</if>>
<</nobr>>\
<</for>>
<<elseif $researchLabState == "dragon">>\
<<button "Back" "ResearchLab">><<set $researchLabState to "rituals">><<unset $researchLabMsg>><<audio "select2" play>><</button>>
<<for _ritual range window.RitualData.Dragon>>\
<<nobr>>
<<if !_building.unlockedDragonRituals.includes(_ritual.name)>>
<<capture _ritual>>
<<set _effectString to (Math.sign(_ritual.effects[0].value) == -1 ? "-" : "+") + _ritual.effects[0].name>>
<<set _buttonName to [_ritual.name, window.ResearchLab.researchCost/2 + " res", _effectString, "availability: " + _ritual.types.join(", ")].join(" | ")>>
<<button _buttonName "ResearchLab">>
<<if _town.resources >= window.ResearchLab.researchCost/2>>
<<run _town.resources -= window.ResearchLab.researchCost/2>>
<<run _building.startTimedEffect("ritualDragon", _ritual.name, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $researchLabMsg to "You unlocked a new ritual. Use the chapel to set rituals.">>
<<run $DayManager.quarterTick()>>
<</if>>
<<audio "select" play>>
<</button>>
<</capture>>
<</if>>
<</nobr>>\
<</for>>
<<elseif $researchLabState == "secrets">>\
<<button "Back" "ResearchLab">><<unset $researchLabState>><<unset $researchLabMsg>><<audio "select2" play>><</button>>
<<button "Hidden Item (1000 resources)" "ResearchLab">>
<<if _town.resources >= window.ResearchLab.researchCost*2>>
<<run _town.resources -= window.ResearchLab.researchCost*2>>
<<run _building.startTimedEffect("citySecrets", 0, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $researchLabMsg to "You researched town secrets. Estimated " + _building.calculateTreasureProbability() + "% probability of a hidden item in town.">>
<<run $DayManager.quarterTick()>>
<</if>>
<<audio "select" play>>
<</button>>
<<elseif $researchLabState == "spies">>\
<<button "Back" "ResearchLab">><<unset $researchLabState>><<unset $researchLabMsg>><<audio "select2" play>><</button>>
<<button "Spy Skills (500 resources)" "ResearchLab">>
<<if _town.resources >= window.ResearchLab.researchCost>>
<<run _town.resources -= window.ResearchLab.researchCost>>
<<run _building.startTimedEffect("spyTechniques", 0, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $researchLabMsg to "Your spy skills have increased, so you and your spies aren't discovered as easily.">>
<<run $DayManager.quarterTick()>>
<</if>>
<<audio "select" play>>
<</button>>
<</if>>
<</if>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<unset $chapelMsg, $chapelState, $chapelTime>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<unset $chapelMsg, $chapelState, $chapelTime>><<goto "KingdomDayOver">><</if>>
<<set _building to _town.getBuilding("Chapel")>>
<<set _timePeriods to ["morning", "day", "night", "holiday"]>>
<!-- Add monument option if player has built at least one monument -->
<<set _hasMonuments to _town.getBuilding("Workshop")?.monuments.length > 0>>
<<if _hasMonuments>><<run _timePeriods.push("monument")>><</if>>
<</nobr>>
@@<<print "Chapel">>@@
@@<<print $chapelMsg ?? "Select rituals to activate and impact the town's attributes every day.">>@@
<<button "Leave" "Town">><<audio "select2" play>><<unset $chapelMsg, $chapelState, $chapelTime>><<run $KingdomManager.tick()>><<run $DayManager.quarterTick()>><</button>>
<<if _building.isInDevelopment>>\
<<run _building.setBackgroundImage(_building.getDevelopmentImage())>>
<<button "Continue Building" "Chapel">>
<<audio "select" play>>
<<run _building.advanceTimedEffects(_town)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<</button>>
<<elseif _building.isDestroyed>>\
<<run _building.setBackgroundImage(_building.getDestroyedImage())>>
<<elseif _building.isUnderAttack>>\
<<run _building.setBackgroundImage(_building.getAttackingImage())>>
<<else>>\
<<run _building.setBackgroundImage(_building.getBuildingImage())>>\
<<if !$chapelState>>\
<<nobr>>
<<set $chapelMsg to "Set a ritual for each time period.">>
<<set _dragonName to "Dragon Soul" + (_building.currentRitualType == "Dragon" ? " (active)" : "")>>
<<set _occultName to "Occult " + (_building.currentRitualType == "Occult" ? " (active)" : "")>>
<<set _kingName to "King's Faith " + (_building.currentRitualType == "King" ? " (active)" : "")>>
<</nobr>>\
<<button _dragonName "Chapel">><<set $chapelState to "dragon">><<audio "select" play>><</button>>
<<button _occultName "Chapel">><<set $chapelState to "occult">><<audio "select" play>><</button>>
<<button _kingName "Chapel">><<set $chapelState to "king">><<audio "select" play>><</button>>
<<elseif $chapelState == "dragon">>\
<<if !$chapelTime>>
<<button "Back" "Chapel">><<unset $chapelState, $chapelMsg, $chapelTime>><<audio "select2" play>><</button>>
<<button "Set Active" "Chapel">><<run _building.currentRitualType="Dragon">><</button>>
<<for _time range _timePeriods>>
<<nobr>>
<<capture _time>>
<<set _buttonName to _building.getActiveDragonRitualUIString(_time)>>
<<button _buttonName "Chapel">><<set $chapelTime to _time>><<set $chapelMsg to "Dragon Soul Rituals">><<audio "select" play>><</button>>
<</capture>>
<</nobr>>\
<</for>>
<<else>>
<<button "Back" "Chapel">><<unset $chapelTime>><<set $chapelMsg to "Set a ritual for each time period.">><<audio "select2" play>><</button>>
<<for _ritual range _town.getBuilding("ResearchLab")?.getUnlockedDragonRituals($chapelTime).filter((r)=>!Array.from(_building.activatedDragonRituals.values()).includes(r.name)) ?? []>>\
<<nobr>>
<<capture _ritual>>
<<set _buttonName to [_ritual.name, _building.getEffectString(_ritual)].join(" | ")>>
<<button _buttonName "Chapel">>
<<run _building.setActiveDragonRitual(_ritual.name, $chapelTime)>>
<<run $DayManager.quarterTick()>>
<<unset $chapelTime>>
<<audio "select" play>>
<</button>>
<</capture>>
<</nobr>>\
<</for>>
<</if>>
<<elseif $chapelState == "occult">>\
<<if !$chapelTime>>
<<button "Back" "Chapel">><<unset $chapelState, $chapelMsg, $chapelTime>><<audio "select2" play>><</button>>
<<button "Set Active" "Chapel">><<run _building.currentRitualType="Occult">><</button>>
<<for _time range _timePeriods>>
<<nobr>>
<<capture _time>>
<<set _buttonName to _building.getActiveOccultRitualUIString(_time)>>
<<button _buttonName "Chapel">><<set $chapelTime to _time>><<audio "select" play>><</button>>
<</capture>>
<</nobr>>\
<</for>>
<<else>>
<<button "Back" "Chapel">><<unset $chapelTime>><<set $chapelMsg to "Set a ritual for each time period.">><<audio "select2" play>><</button>>
<<for _ritual range _town.getBuilding("ResearchLab")?.getUnlockedOccultRituals($chapelTime).filter((r)=>!Array.from(_building.activatedOccultRituals.values()).includes(r.name)) ?? []>>\
<<nobr>>
<<capture _ritual>>
<<set _buttonName to [_ritual.name, _building.getEffectString(_ritual)].join(" | ")>>
<<button _buttonName "Chapel">>
<<run _building.setActiveOccultRitual(_ritual.name, $chapelTime)>>
<<run $DayManager.quarterTick()>>
<<unset $chapelTime>>
<<audio "select" play>>
<</button>>
<</capture>>
<</nobr>>\
<</for>>
<</if>>
<<elseif $chapelState == "king">>\
<<if !$chapelTime>>
<<button "Back" "Chapel">><<unset $chapelState, $chapelMsg, $chapelTime>><<audio "select2" play>><</button>>
<<button "Set Active" "Chapel">><<run _building.currentRitualType="King">><</button>>
<<for _time range _timePeriods>>
<<nobr>>
<<capture _time>>
<<set _buttonName to _building.getActiveKingRitualUIString(_time)>>
<<button _buttonName "Chapel">><<set $chapelTime to _time>><<audio "select" play>><</button>>
<</capture>>
<</nobr>>\
<</for>>
<<else>>
<<button "Back" "Chapel">><<unset $chapelTime>><<set $chapelMsg to "Set a ritual for each time period.">><<audio "select2" play>><</button>>
<<for _ritual range _town.getBuilding("ResearchLab")?.getUnlockedKingRituals($chapelTime).filter((r)=>!Array.from(_building.activatedKingRituals.values()).includes(r.name)) ?? []>>\
<<nobr>>
<<capture _ritual>>
<<set _buttonName to [_ritual.name, _building.getEffectString(_ritual)].join(" | ")>>
<<button _buttonName "Chapel">>
<<run _building.setActiveKingRitual(_ritual.name, $chapelTime)>>
<<run $DayManager.quarterTick()>>
<<unset $chapelTime>>
<<audio "select" play>>
<</button>>
<</capture>>
<</nobr>>\
<</for>>
<</if>>
<</if>>
<</if>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<unset $workshopMsg>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<unset $workshopMsg>><<goto "KingdomDayOver">><</if>>
<<set _building to _town.getBuilding("Workshop")>>
<</nobr>>
@@<<print "Workshop">>@@
@@<<print $workshopMsg ?? "Build a monument to impact the town's attributes once.">>@@
<<button "Leave" "Town">><<audio "select2" play>><<unset $workshopMsg>><<run $KingdomManager.tick()>><<run $DayManager.quarterTick()>><</button>>
<<if _building.isInDevelopment>>
<<run _building.setBackgroundImage(_building.getDevelopmentImage())>>
<<button "Continue Building" "Workshop">>
<<audio "select" play>>
<<run _building.advanceTimedEffects(_town)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<</button>>
<<elseif _building.isDestroyed>>
<<run _building.setBackgroundImage(_building.getDestroyedImage())>>
<<elseif _building.isUnderAttack>>
<<run _building.setBackgroundImage(_building.getAttackingImage())>>
<<else>>
<<run _building.setBackgroundImage(_building.getBuildingImage())>>\
<<for _monumentName range ["Maiden", "Town Leader", "King", "Great Sword", "Blood Fountain", "Skull", "Dragon", "Crystal", "Lion"]>>
<<nobr>>
<<capture _monumentName>>
<<set _buttonName to _monumentName + " (500 resources) | count: " + _building.getMonumentCount(_monumentName)>>
<<button _buttonName "Workshop">>
<<if _town.resources >= window.Workshop.monumentCost>>
<<run _town.resources -= window.Workshop.monumentCost>>
<<run _building.startTimedEffect("monument"+_monumentName.replace(/ /g,''), .01, 1)>>
<<run _building.advanceTimedEffects(_town)>>
<<set $workshopMsg to "You built a new monument, and the town has reacted to it.">>
<<run $DayManager.quarterTick()>>
<<audio "select" play>>
<</if>>
<</button>>
<</capture>>
<</nobr>>\
<</for>>
<</if>><<nobr>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<run _town.clearDeadMaidens($MaidenManager)>><<run _town.collectTreasure($EggManager)>>
<<if _town.currentMaiden.captured>><<unset $mineMsg>><<goto "CaptureMaiden">><</if>>
<<if $DayManager.isNight()>><<unset $mineMsg>><<goto "KingdomDayOver">><</if>>
<<set _building to _town.getBuilding("Mine")>>
<</nobr>>
@@<<print "Mine">>@@
@@<<print $mineMsg ?? "Generate resources daily">>@@
<<button "Leave" "Town">><<audio "select2" play>><<unset $mineMsg>><<run $KingdomManager.tick()>><<run $DayManager.quarterTick()>><</button>>
<<if _building.isInDevelopment>>
<<run _building.setBackgroundImage(_building.getDevelopmentImage())>>
<<button "Continue Building" "Mine">>
<<audio "select" play>>
<<run _building.advanceTimedEffects(_town)>>
<<run $KingdomManager.tick()>>
<<run $DayManager.tick()>>
<</button>>
<<elseif _building.isDestroyed>>
<<run _building.setBackgroundImage(_building.getDestroyedImage())>>
<<elseif _building.isUnderAttack>>
<<run _building.setBackgroundImage(_building.getAttackingImage())>>
<<else>>
<<run _building.setBackgroundImage(_building.getDevelopmentImage())>>
<<set _buttonName to "Collect (" + _building.resources + ") Resources">>
<<button _buttonName "Mine">>
<<run _building.collectResources(_town)>>
<<set $mineMsg to "You collected resources from the mine.">>
<<run $DayManager.quarterTick()>>
<<audio "select" play>>
<</button>>
<</if>>@@Forage the Area@@
<<nobr>>
<<set _encounter to $EncounterManager.generateForageEncounter()>>
<blockquote>@@#introMsg;<<print _encounter.getDetailMessage()>>@@
@@#forageMsg;@@</blockquote>
<</nobr>>
<<for _feature range _encounter.getRandomFeatures()>>
<<nobr>>
<<capture _feature>>
<span @id="_feature">
<<button _feature>>
<<audio "gather" stop>>
<<audio "gather" play>>
<!-- hide button -->
<<remove `"#"+_feature`>>
<!-- add random material to inventory -->
<<set _newMaterial to setup.ItemList.generateMaterial($EncounterManager.regionIndex)>>
<<replace #introMsg>><</replace>>
<<append #forageMsg>>You found _newMaterial.fullName!<br><</append>>
<<run $Inventory.addMaterial(_newMaterial)>>
<<set _resources to $KingdomManager.generateResources($MaidenManager.maidens[$currentMaidenIndex])>>
<<append #forageMsg>>You gained _resources resources!<br><</append>>
<</button>>
</span>
<</capture>>
<</nobr>>
<</for>>
<<button "Back" "Land">><<run $DayManager.tick()>><<audio "select" play>><</button>><i>version 0.3.0</i>
<<nobr>>
<<if $KingdomManager.hasRegions()>>
<<set _town to $KingdomManager.getCurrentTown()>>
<<set _castle to $KingdomManager.getCurrentCastle()>>
<</if>>
<</nobr>>\
<<if _town && _town.currentMaiden != null>>\
<p align="left"><strong>_town.name</strong>
<i>Time: <<print $DayManager.getTimeString()>></i>
<u>Player</u>
Resources: _town.resources
Troops in Town: _town.playerTroops
Spies: <<print _town.calculateSpyPercentString()>>
<u>Town</u>
Population: _town.entity.population
Suspicion: _town.entity.suspicion
Fear: _town.entity.fear
Aggression: _town.entity.aggression
Bonds: _town.entity.bonds
Influence: _town.entity.influence
<<set _atWar to _town.inWar ? "Yes" : "No">>\
<<set _isAlly to _town.isAlly ? "Yes" : "No">>\
At War: _atWar
Town Troops: _town.troops
Land Value: <<print _town.fertility * _town.fertilityCost>>
Is Ally: _isAlly
Top Faith: <<print _town.entity.getTopFaithString()>>
Top Clan: <<print _town.entity.getTopClanString()>>
Top Loyalty: <<print _town.entity.getTopLoyaltyString()>>
<<nobr>><<button "Town Log">><<run Dialog.create("Town Log").wikiPassage("TownLog").open()>><</button>>
<<button "Info">><<run Dialog.create("Town Info").wikiPassage("TownInfo").open()>><</button>><</nobr>>
</p>\
<<elseif _castle && _castle.currentMaiden != null>>\
<p align="left"><strong>_castle.name</strong>
<i>Time: <<print $DayManager.getTimeString()>></i>
<u>Player</u>
Troops: _castle.playerTroops</p>
<<else>>\
<br><i>Time: <<print $DayManager.getTimeString()>></i>
<</if>>\<<run Config.history.maxStates = 1>>
<<set setup.ItemList to new ItemList()>>
<<set setup.AudioEngine to new AudioEngine()>>
<<run setup.ImageManager to new ImageManager()>>
<!-- init audio files -->
<<for _music range window.MusicData.concat(window.SoundData)>>
<<cacheaudio `_music.name` `_music.url`>>
<</for>>
<<createaudiogroup ":music">>
<<for _music range window.MusicData>>
<<track `_music.name`>>
<</for>>
<</createaudiogroup>>@@Welcome to Dragon Soul Maidens!@@
<i>Note: All characters depicted are over the age of 18.
In fact, dragon maidens are said to be thousands of years old.</i>
<<button "Start" "Menu">><<audio "select" play>><</button>>
<!-- Initialize variables -->
<<set $Player to new Player()>>
<<set $DayManager to new DayManager()>>
<<set $MaidenManager to new MaidenManager()>>
<<set $EggManager to new EggManager()>>
<<set $Inventory to new Inventory()>>
<<set $EncounterManager to new EncounterManager()>>
<<set $KingdomManager to new KingdomManager()>>
<!-- start with 1 random egg -->
<!-- TESTING: setup maiden -->
<<run $MaidenManager.createMaiden($EggManager.createEgg(1))>>
<<run $EggManager.developingEggs = []>>
<<set $MaidenManager.maidens[0].stats.connection.value = 20>>
<<set $MaidenManager.maidens[0].invitedToBed = true>>
<!--<<run $DayManager.setToNight()>>-->
<!-- TESTING: Add random items and materials to inventory -->
<!--
<<for _i range 100>>
<<run $Inventory.addMaterial(setup.ItemList.craftRandomMaterial(0))>>
<</for>>
<<run $Inventory.addItem(setup.ItemList.craftSpecificItem("CU", 0))>>
<<run $Inventory.addItem(setup.ItemList.craftSpecificItem("BT", 0))>>
-->
<!-- TESTING: compositing maidens -->
<!--
<<set _maiden to $MaidenManager.maidens[0]>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawConvoMain(_maiden)>>
<</done>>
-->@@Choose a location:@@
<<nobr>><<run setup.AudioEngine.enterLocationSelect($DayManager.isNight())>><</nobr>>
<<button "Home Castle" "HomeCastle">><<audio "bellHome" play>>
<<run setup.AudioEngine.exitLocationSelect($DayManager.isNight())>>
<</button>>
<<button "World Map" "WorldMap">><<audio "openMap" play>><</button>>
<<set _kingdom to $KingdomManager.getCurrentKingdom()>>
<<if _kingdom && $cachedMaidenIndex >= 0 && !$DayManager.isNight()>>\
<<button "Last Kingdom" "Kingdom">>
<<set $currentMaidenIndex to $cachedMaidenIndex>>
<<set $currentMaiden to $MaidenManager.maidens[$currentMaidenIndex]>>
<<run setup.AudioEngine.enterWorldMap()>>
<</button>>
<</if>>@@Use item@@
<<button "Back" "Bedchamber">><<audio "select2" play>><</button>>
<<button "Continue without item" "SexMusic">><<audio "select" play>><</button>>
<<for _sexItem range $Inventory.getSexItems()>>
<<nobr>>
<<capture _sexItem>>
<<button _sexItem.fullName "SexMusic">>
<<run _sexItem.used = true>>
<<run $Inventory.equippedItem = _sexItem>>
<<set $equippedItemIndex to $Inventory.items.get(_sexItem.id).indexOf(_sexItem)>>
<<run $currentMaiden.sexItem = _sexItem>>
<<audio "select" play>>
<</button>>
<</capture>>
<</nobr>>
<</for>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawBed2($currentMaiden)>>
<</done>>@@Music or No Music@@
<<createaudiogroup ":sex">>
<<track "bedLo">>
<<track "bed2Lo">>
<</createaudiogroup>>
<<button "Music 1">><<audio ":sex" stop>><<audio "bedLo" play>><<set $sexMusic to "bedLo">><<audio "select" play>><</button>>
<<button "Music 2">><<audio ":sex" stop>><<audio "bed2Lo" play>><<set $sexMusic to "bed2Lo">><<audio "select" play>><</button>>
<<button "No Music">><<audio ":sex" stop>><<audio "select" play>><</button>>
<<button "Continue" "Sex">><<audio "select" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawBed3($currentMaiden)>>
<</done>>@@<<print $currentMaiden.name>> is looking at you.@@
<<button "Kiss" "CheckSexTime">><<set $nextPassage to "Kiss">><<unset $sentMsg>><</button>>
<<button "Touch bra" "CheckSexTime">><<set $nextPassage to "TouchBra">><<unset $sentMsg>><</button>>
<<button "Grab hips" "CheckSexTime">><<set $nextPassage to "GrabHips">><<unset $sentMsg>><</button>>
<<button "Grab hand" "CheckSexTime">><<set $nextPassage to "GrabHand">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<if $DayManager.updateSexTimer($currentMaiden)>>
<<goto $nextPassage>>
<<else>>
<<set $sexOverMsg to "You release your load on the floor.">>
<<goto "SexOver">>
<</if>><<nobr>>
<<audio "kiss" play>>
<<run $currentMaiden.addFaceSkill()>>
@@<<print $sentMsg ?? "You press your lips against her soft lips.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Kiss" "CheckSexTime">><<set $nextPassage to "Kiss">><<unset $sentMsg>><</button>>
<<button "Look at chest" "ToChest">><<unset $sentMsg>><</button>>
/*3*/@@#touchBtn;<<button "Touch lips" "CheckSexTime">><<set $nextPassage to "TouchLips">><<unset $sentMsg>><</button>>@@
/*6*/@@#tongueBtn;<<button "Use tongue" "CheckSexTime">><<set $nextPassage to "Kiss">><<set $sentMsg to "You stick your tongue between her lips and lick her tongue. She responds and begins to suck on your tongue.">><</button>>@@
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#tongueBtn button").prop("", $currentMaiden.faceSkill < 3)>>
<<run $("#touchBtn button").prop("", $currentMaiden.faceSkill < 6)>>
<</done>><<nobr>>
<<run $currentMaiden.addFaceSkill()>>
@@<<print $sentMsg ?? "You feel her soft sexy lips.">>@@
<<unset $sentMsg>>
<</nobr>>
/*10*/@@#fingerBtn;<<button "Finger mouth" "CheckSexTime">><<set $nextPassage to "Kiss">><<set $sentMsg to "You push your fingers between her soft lips and feel the insides of her warm mouth and wet tongue. You press further into her throat and she chokes a little. You pull out.">><</button>>@@
<<button "Kiss" "CheckSexTime">><<set $nextPassage to "Kiss">><<unset $sentMsg>><</button>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#fingerBtn button").prop("", $currentMaiden.faceSkill < 10)>>
<</done>>@@<<print $sentMsg ?? "Her eyes are locked on you.">>@@
<<unset $sentMsg>>
<<button "Kiss" "CheckSexTime">><<set $nextPassage to "Kiss">><<unset $sentMsg>><</button>>
/*3*/@@#fingerBtn;<<button "Touch lips" "CheckSexTime">><<set $nextPassage to "TouchLips">><<unset $sentMsg>><</button>>@@
<<if $Inventory.equippedItem && $Inventory.equippedItem.areas.includes("face")>>\
<<button "Use item" "CheckSexTime">><<set $nextPassage to "UseItemFace">><<unset $sentMsg>><</button>>\
<</if>>
<<button "Look at chest" "ToChest">><<unset $sentMsg>><</button>>
<<button "Take her hand" "GrabHand">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#fingerBtn button").prop("", $currentMaiden.faceSkill < 3)>>
<</done>>
<!-- check sex timer for cum (higher time lets you cum in different places (directly connected to her stamina)) -->@@<<print "You take her smooth hand in yours.">>@@
<<button "Move it to your dick" "CheckSexTime">><<set $nextPassage to "HandDick">><<unset $sentMsg>><<audio "moan4" play>><</button>>
/*6*/@@#ballsBtn;<<button "Move it to your balls" "CheckSexTime">><<set $nextPassage to "GrabBalls">><<unset $sentMsg>><<audio "moanBrief" play>><</button>>@@
<<if $Inventory.equippedItem && $Inventory.equippedItem.areas.includes("hand")>>\
<<button "Use item" "CheckSexTime">><<set $nextPassage to "UseItemHand">><<unset $sentMsg>><</button>>\
<</if>>
<<button "Tell her to kneel down" "KneelDown">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#ballsBtn button").prop("", $currentMaiden.handSkill < 6)>>
<</done>><<nobr>>
<<run $currentMaiden.addHandSkill()>>
@@<<print $sentMsg ?? "You move her hand to your dick. She wraps her fingers around it.\nTell her to:">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Squeeze it" "CheckSexTime">><<set $nextPassage to "HandDick">><<set $sentMsg to "She squeezes your dick.">><<audio "chuckle" play>><</button>>
/*3*/@@#dickBtn;<<button "Stroke it" "CheckSexTime">><<set $nextPassage to "HandDick">><<set $sentMsg to "She strokes your dick back and forth as precum oozes out of your dick and dribbles between her fingers.">><<audio "handDick" play>><<audio "moanMm2" play>><</button>>@@
/*6*/@@#ballsBtn;<<button "Touch my balls" "CheckSexTime">><<set $nextPassage to "GrabBalls">><<unset $sentMsg>><<audio "moanBrief" play>><</button>>@@
<<button "Stop touching it" "CheckSexTime">><<set $nextPassage to "StopTouching">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#dickBtn button").prop("", $currentMaiden.handSkill < 3)>>
<<run $("#ballsBtn button").prop("", $currentMaiden.handSkill < 6)>>
<</done>><<nobr>>
<<run $currentMaiden.addHandSkill()>>
@@<<print $sentMsg ?? "You stand with your legs slightly apart as she reaches down and grabs a handful of your balls.\nYou tell her:">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Squeeze them" "CheckSexTime">><<set $nextPassage to "GrabBalls">><<set $sentMsg to "She gives you a wry small and grips your balls. Softly first then tighter.">><<audio "chuckle" play>><</button>>
/*10*/@@#ballsBtn;<<button "Rub them" "CheckSexTime">><<set $nextPassage to "GrabBalls">><<set $sentMsg to "She plays with your balls, rubbing her fingers over them and massaging them.">><<audio "moan8" play>><</button>>@@
<<button "Touch your dick" "CheckSexTime">>
<<set $nextPassage to "HandDick">>
<<set $sentMsg to "She takes her other hand and places it on your dick.\nYou tell her:">>
<<audio "moan4" play>>
<</button>>
<<button "Stop touching them" "CheckSexTime">><<set $nextPassage to "StopTouching">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#ballsBtn button").prop("", $currentMaiden.handSkill < 10)>>
<</done>>@@<<print "She lets go.">>@@
<<button "Kiss" "CheckSexTime">><<set $nextPassage to "Kiss">><<unset $sentMsg>><</button>>
<<button "Look at chest" "CheckSexTime">><<set $nextPassage to "ToChest">><<unset $sentMsg>><</button>>
<<button "Grab hips" "CheckSexTime">><<set $nextPassage to "GrabHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<if $currentMaiden.braOn>>
@@<<print "You look at her bra. It's hugging her breasts and hiding them.">>@@
<<button "Touch bra" "CheckSexTime">><<set $nextPassage to "TouchBra">><<unset $sentMsg>><</button>>
/*3*/@@#kissBtn;<<button "Kiss bra" "CheckSexTime">><<set $nextPassage to "KissBra">><<unset $sentMsg>><<audio "moanBrief" play>><</button>>@@
<<else>>
@@<<print $sentMsg ?? "You look at her sexy round breasts and perky pink nipples.">>@@<<unset $sentMsg>>
<<button "Touch breast" "CheckSexTime">><<set $nextPassage to "TouchBreast">><<unset $sentMsg>><<audio "moanTouch" play>><</button>>
/*15*/@@#breastBtn;<<button "Kiss breast" "CheckSexTime">><<set $nextPassage to "KissBreast">><<unset $sentMsg>><<audio "moan1" play>><</button>>@@
<<if $Inventory.equippedItem && $Inventory.equippedItem.areas.includes("chest")>>\
<<button "Use item" "CheckSexTime">><<set $nextPassage to "UseItemBreast">><<unset $sentMsg>><</button>>\
<</if>>
<</if>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#kissBtn button").prop("", $currentMaiden.chestSkill < 3)>>
<<run $("#breastBtn button").prop("", $currentMaiden.chestSkill < 15)>>
<</done>><<nobr>>
<<audio "moanItem" play>>
<<run $currentMaiden.addChestSkill()>>
<<set _item to $Inventory.equippedItem>>
<<if _item instanceof window.LubeItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<elseif _item instanceof window.ClampItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<else>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<</if>>
<</nobr>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<audio "moanItem" play>>
<<run $currentMaiden.addHandSkill()>>
<<set _item to $Inventory.equippedItem>>
<<if _item instanceof window.RingItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<else>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<</if>>
<</nobr>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Take her hand" "GrabHand">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<audio "moanItem" play>>
<<run $currentMaiden.addVaginaSkill()>>
<<set _item to $Inventory.equippedItem>>
<<if _item instanceof window.DildoItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<elseif _item instanceof window.LubeItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<else>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<</if>>
<</nobr>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<<button "Look at feet" "ToFeet">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<audio "moanItem" play>>
<<run $currentMaiden.addAssSkill()>>
<<set _item to $Inventory.equippedItem>>
<<if _item instanceof window.DildoItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<elseif _item instanceof window.LubeItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<elseif _item instanceof window.PlugItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<else>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<</if>>
<</nobr>>
<<button "Turn her around" "CheckSexTime">><<set $nextPassage to "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<</done>><<nobr>>
<<audio "moanItem" play>>
<<run $currentMaiden.addFaceSkill()>>
<<set _item to $Inventory.equippedItem>>
<<if _item instanceof window.DildoItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<elseif _item instanceof window.BlindfoldItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<else>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<</if>>
<</nobr>>
<<button "Look at chest" "ToChest">><<unset $sentMsg>><</button>>
<<button "Take her hand" "GrabHand">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<audio "moanItem" play>>
<<run $currentMaiden.addHipsSkill()>>
<<set _item to $Inventory.equippedItem>>
<<if _item instanceof window.LubeItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<else>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<</if>>
<</nobr>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at chest" "ToChest">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<audio "moanItem" play>>
<<run $currentMaiden.addFeetSkill()>>
<<set _item to $Inventory.equippedItem>>
<<if _item instanceof window.LubeItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<else>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<</if>>
<</nobr>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<run $currentMaiden.addChestSkill()>>
@@<<print "You glide you fingers along the curves of her bra's soft cloth and feel her hard nipples pushing out the fabric.">>@@
<</nobr>>
/*6*/@@#braBtn;<<button "Remove bra" "CheckSexTime">>
<<audio "moan4" play>>
<<set $sentMsg to "You reach behind her back and unfasten her bra. The bra falls to the floor revealing her beautiful round breasts and perky pink nipples.">>
<<run $currentMaiden.braOn=false>>
<<set $nextPassage to "ToChest">>
<</button>>@@
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#braBtn button").prop("", $currentMaiden.chestSkill < 6)>>
<</done>><<nobr>>
<<run $currentMaiden.addChestSkill()>>
@@<<print "Your lips touch the soft fabric of her bra. You move your lips across the cloth and find her big hard nipples poking out the cloth. You kiss the cloth covering her nipples.">>@@
<</nobr>>
/*6*/@@#braBtn;<<button "Remove bra" "CheckSexTime">>
<<audio "moan4" play>>
<<set $sentMsg to "You reach behind her back and unfasten her bra. The bra falls to the floor revealing her beautiful round breasts and perky pink nipples.">>
<<run $currentMaiden.braOn=false>>
<<set $nextPassage to "ToChest">>
<</button>>@@
/*4*/@@#lickBtn;<<button "Lick bra" "CheckSexTime">><<set $nextPassage to "LickBra">><<audio "suck1" play>><</button>>@@
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#braBtn button").prop("", $currentMaiden.chestSkill < 6)>>
<<run $("#lickBtn button").prop("", $currentMaiden.chestSkill < 4)>>
<</done>><<nobr>>
<<run $currentMaiden.addChestSkill()>>
@@<<print "You rub your tongue all over her bra, leaving a wet trail of saliva. Your tongue hits her covered nipple and you lick it back and forth until your saliva soaks through the cloth.">>@@
<</nobr>>
/*6*/@@#braBtn;<<button "Remove bra" "CheckSexTime">>
<<audio "moan4" play>>
<<set $sentMsg to "You reach behind her back and unfasten her bra. The bra falls to the floor revealing her beautiful round breasts and perky pink nipples.">>
<<run $currentMaiden.braOn=false>>
<<set $nextPassage to "ToChest">>
<</button>>@@
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#braBtn button").prop("", $currentMaiden.chestSkill < 6)>>
<</done>><<nobr>>
<<run $currentMaiden.addChestSkill()>>
@@<<print $sentMsg ?? "You reach out and feel her soft breast.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Grab breast" "CheckSexTime">><<set $nextPassage to "TouchBreast">><<set $sentMsg to "You grab a handful of her bouncy breast and feel your fingers sink in.">><<audio "moanBreath" play>><</button>>
/*15*/@@#breastBtn;<<button "Massage breast" "CheckSexTime">><<set $nextPassage to "TouchBreast">><<set $sentMsg to "You grab her breast and squeeze it. Working her breast with your hand, you knead and massage it.">><<audio "moanMm" play>><</button>>@@
/*20*/@@#nippleBtn;<<button "Touch nipple" "CheckSexTime">><<set $nextPassage to "TouchNipple">><<audio "moanBrief" play>><<unset $sentMsg>><</button>>@@
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#breastBtn button").prop("", $currentMaiden.chestSkill < 15)>>
<<run $("#nippleBtn button").prop("", $currentMaiden.chestSkill < 20)>>
<</done>><<nobr>>
<<run $currentMaiden.addChestSkill()>>
@@<<print $sentMsg ?? "You put your lips on her breast, kissing it all over.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Bite breast" "CheckSexTime">><<set $nextPassage to "KissBreast">><<set $sentMsg to "You take in a mouthful of her breast and gnaw on her squishy lump.">><<audio "moanBite" play>><</button>>
/*15*/@@#lickBtn;<<button "Lick breast" "CheckSexTime">><<set $nextPassage to "KissBreast">><<set $sentMsg to "You lick her bare breast, tasting her skin and leaving saliva all over her tits.">><<audio "moan3" play>><</button>>@@
/*18*/@@#suckBtn;<<button "Suck breast" "CheckSexTime">><<set $nextPassage to "KissBreast">><<set $sentMsg to "You put your mouth on her bouncy breast and suck it further into your mouth. You rub your tongue back and forth along her breast and taste her womanly scent.">><<audio "suck3" play>><<audio "moan9" play>><</button>>@@
/*20*/@@#kissBtn;<<button "Kiss nipple" "CheckSexTime">><<set $nextPassage to "KissNipple">><<unset $sentMsg>><</button>>@@
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#lickBtn button").prop("", $currentMaiden.chestSkill < 15)>>
<<run $("#suckBtn button").prop("", $currentMaiden.chestSkill < 18)>>
<<run $("#kissBtn button").prop("", $currentMaiden.chestSkill < 20)>>
<</done>><<nobr>>
<<run $currentMaiden.addChestSkill()>>
@@<<print $sentMsg ?? "You reach out and feel her hard pink nipple.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Flick nipple" "CheckSexTime">><<set $nextPassage to "TouchNipple">><<set $sentMsg to "You flick her nipple and you hear a soft moan escape from her lips.">><<audio "moan2" play>><</button>>
/*25*/@@#rubBtn;<<button "Rub nipple" "CheckSexTime">><<set $nextPassage to "TouchNipple">><<set $sentMsg to `You fondle her nipple and press it into her breast. $currentMaiden.name lets out a soft moan as you finger her nipple and twist it.`>><<audio "moan6" play>><</button>>@@
/*28*/@@#pinchBtn;<<button "Pinch nipple" "CheckSexTime">><<set $nextPassage to "TouchNipple">><<set $sentMsg to "You squeeze her nipple tightly. You relax your fingers and pinch softly, then tightly again. It feels like firm rubber between your fingers as you grip her nipple.">><<audio "moan7" play>><</button>>@@
<<button "Kiss nipple" "CheckSexTime">><<set $nextPassage to "KissNipple">><<audio "moanBreath" play>><<unset $sentMsg>><</button>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#rubBtn button").prop("", $currentMaiden.chestSkill < 25)>>
<<run $("#pinchBtn button").prop("", $currentMaiden.chestSkill < 28)>>
<</done>><<nobr>>
<<run $currentMaiden.addChestSkill()>>
@@<<print $sentMsg ?? "You press your lips against her nipple and kiss it.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Bite nipple" "CheckSexTime">><<set $nextPassage to "KissNipple">><<set $sentMsg to "You bite her nipple and pull on it, stretching her breast. You let her nipple go and her breast bounces back into place. Taking her nipple into your mouth again, you nibble on it.">><<audio "moanBite" play>><</button>>
/*25*/@@#lickBtn;<<button "Lick nipple" "CheckSexTime">><<set $nextPassage to "KissNipple">><<set $sentMsg to `You put your tongue on her nipple and start licking it. Her nipple is damp with your saliva and $currentMaiden.name softly moans as you play with her hard pink nipple using your tongue. You lick the tip of her nipple and then around the base.`>><<audio "suck4" play>><<audio "moanMultiple" play>><</button>>@@
/*30*/@@#suckBtn;<<button "Suck nipple" "CheckSexTime">><<set $nextPassage to "SuckNipple2">><<unset $sentMsg>><</button>>@@
<<button "Touch nipple" "CheckSexTime">><<set $nextPassage to "TouchNipple">><<audio "moanBrief" play>><<unset $sentMsg>><</button>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#lickBtn button").prop("", $currentMaiden.chestSkill < 25)>>
<<run $("#suckBtn button").prop("", $currentMaiden.chestSkill < 30)>>
<</done>><<nobr>>
<<audio "moanTouch" play>>
<<audio "suck1" play>>
<<run $currentMaiden.addChestSkill()>>
@@You bury your face in her breast and begin sucking her nipple.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "SuckNipple3">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<audio "moan9" play>>
<<audio "suck2" play>>
<<run $currentMaiden.addChestSkill()>>
@@$currentMaiden.name lets out a moan as you squeeze her hard nipple between your lips.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "SuckNipple4">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<audio "moanMm2" play>>
<<audio "suck3" play>>
<<run $currentMaiden.addChestSkill()>>
@@Your mouth is full of her breast, and you are licking and tasting her nipple.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "SuckNipple5">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<audio "moanBite" play>>
<<audio "suck4" play>>
<<run $currentMaiden.addChestSkill()>>
@@You squeeze and suck her nipple harder, fantasizing about sucking all her milk out of her breast.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "SuckNipple6">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
<<audio "moan10" play>>
<<audio "suck1" play>>
<<run $currentMaiden.addChestSkill()>>
@@You release her squishy breast from your mouth and a strand of spit extends from her saliva-covered nipple.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "ToChest">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<nobr>>
@@<<print $sentMsg ?? "You look at her curvy hips.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Kiss belly button" "CheckSexTime">><<set $nextPassage to "ToHips">><<run $currentMaiden.addHipsSkill()>><<set $sentMsg to "You kiss her belly button.">><<audio "chuckle" play>><</button>>
/*3*/@@#lickBtn;<<button "Lick belly button" "CheckSexTime">><<set $nextPassage to "ToHips">><<run $currentMaiden.addHipsSkill()>><<set $sentMsg to "You put your tongue in her belly button, licking it and leaving a pool of saliva inside.">><<audio "chuckleMoan" play>><</button>>@@
<<if $currentMaiden.pantiesOn>>
<<button "Grab hips" "CheckSexTime">><<set $nextPassage to "GrabHips">><<unset $sentMsg>><</button>>
/*6*/@@#pantiesBtn;<<button "Remove panties" "CheckSexTime">><<run $currentMaiden.pantiesOn = false>><<run $currentMaiden.addHipsSkill()>><<set $nextPassage to "ToHips">><<set $sentMsg to "You slowly slide her panties down around her hips and thighs, revealing her naked pussy.">><<audio "moanMm2" play>><</button>>@@
<<else>>
<<button "Grab hips" "CheckSexTime">><<set $nextPassage to "GrabHips">><<unset $sentMsg>><</button>>
<<if $Inventory.equippedItem && $Inventory.equippedItem.areas.includes("hips")>>\
<<button "Use item" "CheckSexTime">><<set $nextPassage to "UseItemHips">><<unset $sentMsg>><</button>>\
<</if>>
/*8*/@@#hipsBtn;<<button "Lick hips" "CheckSexTime">><<set $nextPassage to "ToHips">><<run $currentMaiden.addHipsSkill()>><<set $sentMsg to "You lick up and down her hips, licking around her soft curves and moistening the smooth skin of her hips with your tongue.">><<audio "moanBreath" play>><</button>>@@
<<button "Look at vagina" "ToVagina">><<unset $sentMsg>><</button>>
<</if>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at chest" "ToChest">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#lickBtn button").prop("", $currentMaiden.hipsSkill < 3)>>
<<run $("#pantiesBtn button").prop("", $currentMaiden.hipsSkill < 6)>>
<<run $("#hipsBtn button").prop("", $currentMaiden.hipsSkill < 8)>>
<</done>><<nobr>>
<<run $currentMaiden.addHipsSkill()>>
@@<<print $sentMsg ?? "You place your hands firmly around the curves of her hips.">>@@
<<unset $sentMsg>>
<</nobr>>
/*15*/@@#turnBtn;<<button "Turn her around" "CheckSexTime">><<set $nextPassage to "ToAss">><<unset $sentMsg>><<audio "moanBreath" play>><</button>>@@
<<button "Look at chest" "ToChest">><<unset $sentMsg>><</button>>
<<if !$currentMaiden.pantiesOn>>
<<button "Look at vagina" "ToVagina">><<unset $sentMsg>><</button>>
<</if>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#turnBtn button").prop("", $currentMaiden.hipsSkill < 8)>>
<</done>><<nobr>>
@@<<print $sentMsg ?? "She moves her legs apart and you see her wet pink pussy.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Touch pussy" "CheckSexTime">><<set $nextPassage to "TouchVagina">><<run $currentMaiden.addVaginaSkill()>><<set $sentMsg to "You touch her wet pussy and feel the sticky liquid between your fingers.">><<audio "moanTouch" play>><</button>>
/*3*/@@#kissBtn;<<button "Kiss pussy" "CheckSexTime">><<set $nextPassage to "KissVagina">><<unset $sentMsg>><</button>>@@
/*6*/@@#smellBtn;<<button "Smell pussy" "CheckSexTime">><<set $nextPassage to "ToVagina">><<run $currentMaiden.addVaginaSkill()>><<set $sentMsg to "She spreads her legs further and you press your nose against her pussy. You sniff deeply and inhale the powerful scent of her vagina's pungent odor.">><<audio "moanBreath" play>><</button>>@@
/*30*/@@#dickBtn;<<button "Use dick" "CheckSexTime">><<set $nextPassage to "DickVagina">><<unset $sentMsg>><</button>>@@
<<if $Inventory.equippedItem && $Inventory.equippedItem.areas.includes("vagina")>>\
<<button "Use item" "CheckSexTime">><<set $nextPassage to "UseItemVagina">><<unset $sentMsg>><</button>>\
<</if>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<<button "Look at feet" "ToFeet">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#kissBtn button").prop("", $currentMaiden.vaginaSkill < 3)>>
<<run $("#smellBtn button").prop("", $currentMaiden.vaginaSkill < 6)>>
<<run $("#dickBtn button").prop("", $currentMaiden.vaginaSkill < 30)>>
<</done>><<nobr>>
<<run $currentMaiden.addVaginaSkill()>>
@@<<print $sentMsg ?? "You put your lips on her pussy and kiss it. Your lips are damp with fluid leaking out of her pussy.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Touch pussy" "CheckSexTime">><<set $nextPassage to "TouchVagina">><<unset $sentMsg>><</button>>
/*10*/@@#lickBtn;<<button "Lick pussy" "CheckSexTime">><<set $nextPassage to "KissVagina">><<set $sentMsg to "You lick her pussy and taste the pungent juices of her scent on your tongue.">><<audio "moan3" play>><</button>>@@
/*15*/@@#suckBtn;<<button "Suck pussy" "CheckSexTime">><<set $nextPassage to "KissVagina">><<set $sentMsg to "You suck on her pussy and inhale the strong odor as you swallow her warm sour fluid.">><<audio "suck1" play>><<audio "moanHi1" play>><</button>>@@
/*25*/@@#tongueBtn;<<button "Tongue fuck" "CheckSexTime">><<set $nextPassage to "KissVagina">><<set $sentMsg to "You press your tongue between the folds of her wet pussy and push it into the warm hole. Sliding your tongue in and out, saliva and pussy juices dribble down the sides of your mouth.">><<audio "suck4" play>><<audio "moanMultiple" play>><</button>>@@
/*30*/@@#dickBtn;<<button "Use dick" "CheckSexTime">><<set $nextPassage to "DickVagina">><<unset $sentMsg>><</button>>@@
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<<button "Look at feet" "ToFeet">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#lickBtn button").prop("", $currentMaiden.vaginaSkill < 10)>>
<<run $("#suckBtn button").prop("", $currentMaiden.vaginaSkill < 15)>>
<<run $("#tongueBtn button").prop("", $currentMaiden.vaginaSkill < 25)>>
<<run $("#dickBtn button").prop("", $currentMaiden.vaginaSkill < 30)>>
<</done>><<nobr>>
<<run $currentMaiden.addVaginaSkill()>>
@@<<print $sentMsg ?? "You touch her pussy, and your fingers are moist with warm liquid.">>@@
<<unset $sentMsg>>
<</nobr>>
/*3*/@@#kissBtn;<<button "Kiss pussy" "CheckSexTime">><<set $nextPassage to "KissVagina">><<unset $sentMsg>><</button>>@@
/*8*/@@#fingerBtn;<<button "Finger pussy" "CheckSexTime">><<set $nextPassage to "TouchVagina">><<set $sentMsg to "You press your fingers into her warm wet pussy and slide them deep inside of her. You slide them out and feel your fingers covered in warm sticky liquids.">><<audio "suck2" play>><<audio "moanHi2" play>><</button>>@@
/*15*/@@#rubBtn;<<button "Rub pussy" "CheckSexTime">><<set $nextPassage to "TouchVagina">><<set $sentMsg to "You massage her pink pussy and feel her fluids dribbling down your fingers.">><<audio "moan6" play>><</button>>@@
/*30*/@@#dickBtn;<<button "Use dick" "CheckSexTime">><<set $nextPassage to "DickVagina">><<unset $sentMsg>><</button>>@@
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<<button "Look at feet" "ToFeet">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<<run $("#kissBtn button").prop("", $currentMaiden.vaginaSkill < 3)>>
<<run $("#fingerBtn button").prop("", $currentMaiden.vaginaSkill < 8)>>
<<run $("#rubBtn button").prop("", $currentMaiden.vaginaSkill < 15)>>
<<run $("#dickBtn button").prop("", $currentMaiden.vaginaSkill < 30)>>
<</done>><<nobr>>
@@<<print $sentMsg ?? "You look at her beautiful plump ass.">>@@
<<unset $sentMsg>>
<</nobr>>
<<if !$currentMaiden.pantiesOn>>
<<button "Touch ass" "CheckSexTime">><<set $nextPassage to "TouchAss">><<unset $sentMsg>><</button>>
/*3*/@@#kissBtn;<<button "Kiss ass" "CheckSexTime">><<set $nextPassage to "KissAss">><<unset $sentMsg>><<audio "chuckle" play>><</button>>@@
/*6*/@@#smellBtn;<<button "Smell ass" "CheckSexTime">><<set $nextPassage to "ToAss">><<run $currentMaiden.addAssSkill()>><<set $sentMsg to "You put your nose near her ass and smell a faint scent of berries.">><<audio "moanBreath" play>><</button>>@@
/*30*/@@#dickBtn;<<button "Use dick" "CheckSexTime">><<set $nextPassage to "DickAss">><<unset $sentMsg>><</button>>@@
<<if $Inventory.equippedItem && $Inventory.equippedItem.areas.includes("ass")>>\
<<button "Use item" "CheckSexTime">><<set $nextPassage to "UseItemAss">><<unset $sentMsg>><</button>>\
<</if>>
<</if>> /*pantiesOn*/
<<button "Turn her around" "CheckSexTime">><<set $nextPassage to "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<<run $("#kissBtn button").prop("", $currentMaiden.assSkill < 3)>>
<<run $("#smellBtn button").prop("", $currentMaiden.assSkill < 6)>>
<<run $("#dickBtn button").prop("", $currentMaiden.assSkill < 30)>>
<</done>><<nobr>>
<<run $currentMaiden.addAssSkill()>>
@@<<print $sentMsg ?? "You press your lips against the soft skin of her ass.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Touch ass" "CheckSexTime">><<set $nextPassage to "TouchAss">><<unset $sentMsg>><</button>>
/*8*/@@#biteBtn;<<button "Bite ass" "CheckSexTime">><<set $nextPassage to "KissAss">><<set $sentMsg to "You put your mouth on her ass and bite it, leaving a faint red mark.">><<audio "moanBite" play>><</button>>@@
/*10*/@@#lickBtn;<<button "Lick ass" "CheckSexTime">><<set $nextPassage to "KissAss">><<set $sentMsg to "You lick her ass cheek, leaving a wet streak from your tongue.">><<audio "moan2" play>><</button>>@@
/*12*/@@#spitBtn;<<button "Spit on ass" "CheckSexTime">><<set $nextPassage to "KissAss">><<set $sentMsg to "You spit on her dirty ass. Saliva slides down her ass cheek.">><<audio "chuckleMoan" play>><</button>>@@
/*20*/@@#holeBtn;<<button "Look at asshole" "CheckSexTime">><<set $nextPassage to "SeeAsshole">><<unset $sentMsg>><</button>>@@
<<button "Turn her around" "CheckSexTime">><<set $nextPassage to "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<<run $("#biteBtn button").prop("", $currentMaiden.assSkill < 8)>>
<<run $("#lickBtn button").prop("", $currentMaiden.assSkill < 10)>>
<<run $("#spitBtn button").prop("", $currentMaiden.assSkill < 12)>>
<<run $("#holeBtn button").prop("", $currentMaiden.assSkill < 20)>>
<</done>><<nobr>>
<<run $currentMaiden.addAssSkill()>>
@@<<print $sentMsg ?? "You brush your fingers across her smooth round ass and trace the line of her ass crack down to the bottom of her ass cheeks.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Look at ass" "CheckSexTime">><<set $nextPassage to "ToAss">><<unset $sentMsg>><</button>>
/*10*/@@#grabBtn;<<button "Grab ass" "CheckSexTime">><<set $nextPassage to "TouchAss">><<set $sentMsg to "You grab a handful of her ass cheek and squeeze it.">><<audio "moanBrief" play>><</button>>@@
/*14*/@@#rubBtn;<<button "Rub ass" "CheckSexTime">><<set $nextPassage to "TouchAss">><<set $sentMsg to "You massage her ass, rubbing her butt cheek and revealing glimpses of her pink asshole as it moves around.">><<audio "moan3" play>><</button>>@@
/*18*/@@#spankBtn;<<button "Spank ass" "CheckSexTime">><<set $nextPassage to "TouchAss">><<set $sentMsg to "You spank her ass and watch it jiggle. You spank it again and shake it to see her ass bouncing and jiggling back and forth. There's a faint red mark where you spanked her.">><<audio "moanBite" play>><</button>>@@
/*20*/@@#holeBtn;<<button "Look at asshole" "CheckSexTime">><<set $nextPassage to "SeeAsshole">><<unset $sentMsg>><</button>>@@
<<button "Turn her around" "CheckSexTime">><<set $nextPassage to "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<<run $("#grabBtn button").prop("", $currentMaiden.assSkill < 10)>>
<<run $("#rubBtn button").prop("", $currentMaiden.assSkill < 14)>>
<<run $("#spankBtn button").prop("", $currentMaiden.assSkill < 18)>>
<<run $("#holeBtn button").prop("", $currentMaiden.assSkill < 20)>>
<</done>><<nobr>>
<<run $currentMaiden.addAssSkill()>>
@@<<print $sentMsg ?? "You use your fingers to spread open her ass cheeks and see her pink hole squeezed tight.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Touch asshole" "CheckSexTime">><<set $nextPassage to "TouchAsshole">><<unset $sentMsg>><<audio "moanTouch" play>><</button>>
/*25*/@@#kissBtn;<<button "Kiss asshole" "CheckSexTime">><<set $nextPassage to "KissAsshole">><<unset $sentMsg>><<audio "moanBrief" play>><</button>>@@
/*30*/@@#smellBtn;<<button "Smell asshole" "CheckSexTime">><<set $nextPassage to "SeeAsshole">><<set $sentMsg to "You press your nose in between her ass until you feel it touch her hole. You sniff deeply and a strong scent of berries and shit hits you.">><<audio "moanBreath" play>><</button>>@@
<<button "Turn her around" "CheckSexTime">><<set $nextPassage to "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<<run $("#kissBtn button").prop("", $currentMaiden.assSkill < 25)>>
<<run $("#smellBtn button").prop("", $currentMaiden.assSkill < 30)>>
<</done>><<nobr>>
<<run $currentMaiden.addAssSkill()>>
@@<<print $sentMsg ?? "You move one hand from her ass and put your finger on her asshole.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Look at ass" "CheckSexTime">><<set $nextPassage to "ToAss">><<unset $sentMsg>><</button>>
/*28*/@@#fingerBtn;<<button "Finger asshole" "CheckSexTime">><<set $nextPassage to "TouchAsshole">><<set $sentMsg to "You press your finger into her tight asshole. You slide your finger deep inside her warm hole and back out again.">><<audio "moanHi1" play>><</button>>@@
/*35*/@@#rubBtn;<<button "Rub asshole" "CheckSexTime">><<set $nextPassage to "TouchAsshole">><<set $sentMsg to "You massage her pink asshole with your fingers. You rub around the rim of her asshole and feel the small folds of skin around her tight hole.">><<audio "moan9" play>><</button>>@@
/*40*/@@#kissBtn;<<button "Kiss asshole" "CheckSexTime">><<set $nextPassage to "KissAsshole">><<unset $sentMsg>><<audio "moanMm" play>><</button>>@@
/*50*/@@#dickBtn;<<button "Use dick" "CheckSexTime">><<set $nextPassage to "DickAss">><<unset $sentMsg>><</button>>@@
<<button "Turn her around" "CheckSexTime">><<set $nextPassage to "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<<run $("#fingerBtn button").prop("", $currentMaiden.assSkill < 28)>>
<<run $("#rubBtn button").prop("", $currentMaiden.assSkill < 35)>>
<<run $("#kissBtn button").prop("", $currentMaiden.assSkill < 40)>>
<<run $("#dickBtn button").prop("", $currentMaiden.assSkill < 50)>>
<</done>><<nobr>>
<<run $currentMaiden.addAssSkill()>>
@@<<print $sentMsg ?? "You put your lips in between her ass cheeks and kiss her asshole.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Lick asshole" "CheckSexTime">><<set $nextPassage to "KissAsshole">><<set $sentMsg to "You lick her hole and it tastes bitter.">><<audio "moanBite" play>><</button>>
<<button "Touch asshole" "CheckSexTime">><<set $nextPassage to "TouchAsshole">><<unset $sentMsg>><<audio "moan1" play>><</button>>
/*45*/@@#spitBtn;<<button "Spit on asshole" "CheckSexTime">><<set $nextPassage to "KissAsshole">><<set $sentMsg to "You spit on her hole and watch saliva drip down her wet pink asshole.">><<audio "moan7" play>><</button>>@@
/*50*/@@#dickBtn;<<button "Use dick" "CheckSexTime">><<set $nextPassage to "DickAss">><<unset $sentMsg>><</button>>@@
<<button "Look at ass" "CheckSexTime">><<set $nextPassage to "ToAss">><<unset $sentMsg>><</button>>
<<button "Turn her around" "CheckSexTime">><<set $nextPassage to "ToHips">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<<run $("#spitBtn button").prop("", $currentMaiden.assSkill < 45)>>
<<run $("#dickBtn button").prop("", $currentMaiden.assSkill < 50)>>
<</done>><<nobr>>
<<audio "insert" play>>
<<audio "moan3" play>>
<<run $currentMaiden.addVaginaSkill()>>
@@<<print $sentMsg ?? "You take your dick and press it between her thighs.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "DickVagina2">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingEyesClosed($currentMaiden)>>
<</done>><<nobr>>
<<audio "dickLoop" play>>
<<audio "moanMultiple" play>>
<<run $currentMaiden.addVaginaSkill()>>
@@Her wet pussy juice mixes with your precum and your dick slides smoothly back and forth.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "DickVagina3">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingEyesClosed($currentMaiden)>>
<</done>><<nobr>>
<<audio "dickLoop" play>>
<<audio "moanHi2" play>>
<<run $currentMaiden.addVaginaSkill()>>
@@You grab her ass and press her forward into you, her nipples and breasts pressing into your chest.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "DickVagina4">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingEyesClosed($currentMaiden)>>
<</done>><<nobr>>
<<audio "dickLoopFaster" play>>
<<audio "moanFast2" play>>
<<run $currentMaiden.addVaginaSkill()>>
@@<<print $sentMsg ?? "She trembles as your dick rubs against her pussy, dripping more warm fluids onto your dick.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "DickVagina4">><<set $sentMsg to "Creamy fluids dribble down her leg and you continue fucking her slippery meaty thighs.">><</button>>
<<button "Cum" "DickVaginaCum">><<unset $sentMsg>><</button>>
<<button "Remove your dick" "CheckSexTime">><<set $nextPassage to "ToVagina">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingEyesClosed($currentMaiden)>>
<</done>>@@$currentMaiden.name tenses and strangles your dick with her thighs. Pussy fluids squirt all over your dick, and your body twitches with tension. Squeezing her ass, you thrust your dick fully between her thighs and cum erupts from your dick onto the floor.@@
<<audio "dickLoopFaster" play>>
<<audio "climax" play>>\
<<button "Continue" "SexOver">><<set $sexOverMsg to "You released your load on the floor.">><<audio "dickLoopFaster" stop>><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingEyesClosed($currentMaiden)>>
<</done>><<nobr>>
<<audio "insert2" play>>
<<audio "moan2" play>>
<<run $currentMaiden.addAssSkill()>>
@@You take your dick and press it between her ass cheeks and thighs.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "DickAss2">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<</done>><<nobr>>
<<audio "dickLoop2" play>>
<<audio "moanBite" play>>
<<run $currentMaiden.addAssSkill()>>
@@You grab her hips and thrust your cock between her wet thighs.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "DickAss3">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<</done>><<nobr>>
<<audio "dickLoop2" play>>
<<audio "moanMultiple" play>>
<<run $currentMaiden.addAssSkill()>>
@@You rub your wet meaty dick back and forth against her pussy folds.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "DickAss4">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<</done>><<nobr>>
<<audio "dickLoop2" play>>
<<audio "moanHi3" play>>
<<run $currentMaiden.addAssSkill()>>
@@You reach up and grab her breast, fondling her nipples as you force your dick between her ass and thighs.@@
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "DickAss5">><<unset $sentMsg>><<audio "moanHi4" play>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<</done>><<nobr>>
<<audio "dickLoop2" play>>
<<run $currentMaiden.addAssSkill()>>
@@<<print $sentMsg ?? "It feels too good. Her thighs pressing against your balls and her ass bouncing against your dick.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "DickAss5">><<set $sentMsg to "You continue fucking her slippery thighs.">><</button>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "DickAssCum">><<unset $sentMsg>><</button>>
<<button "Remove your dick" "CheckSexTime">><<set $nextPassage to "ToAss">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<</done>><<nobr>>
<<audio "dickLoop3" play>>
<<audio "climax2" play>>
<</nobr>>
@@$currentMaiden.name's thighs suck in your dick, and you grab both her breasts and squeeze them tightly. Your legs tremble as you forcefully shoot your sticky load through her thighs and onto the floor.@@
<<button "Continue" "SexOver">><<set $sexOverMsg to "You released your load on the floor.">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img zoom"></canvas>
<<done>>
<<run setup.ImageManager.drawStandingBack($currentMaiden)>>
<</done>><<nobr>>
@@<<print $sentMsg ?? "You look at her sexy feet.">>@@
<<unset $sentMsg>>
<</nobr>>
<<button "Lick feet" "CheckSexTime">><<set $nextPassage to "ToFeet">><<run $currentMaiden.addFeetSkill()>><<set $sentMsg to "You put your tongue between her toes and lick the bottom of her feet.">><<audio "moan9" play>><</button>>
<<if $Inventory.equippedItem && $Inventory.equippedItem.areas.includes("feet")>>\
<<button "Use item" "CheckSexTime">><<set $nextPassage to "UseItemFeet">><<unset $sentMsg>><</button>>\
<</if>>
<<button `"Look at "+$currentMaiden.name` "ToFace">><</button>>
<<button "Look at hips" "ToHips">><<unset $sentMsg>><</button>>
<<button "Look at chest" "ToChest">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawStanding($currentMaiden)>>
<</done>><<audio "cum" play>>\
@@$sexOverMsg@@
<h4>Maiden leveled up!</h4>\
<ul><!--<li><<print "Increased sex skills by " + $currentMaiden.getTotalTempValues()>></li>-->
<<for _stat range $currentMaiden.levelUp()>>
<li><<print _stat>></li>
<</for>>
</ul>
<<audio "obtain" play>>\
<<button "Sleep" "Sleep">>
<!-- sync maiden story variable with maiden manager story variable -->
<<run $MaidenManager.maidens[$currentMaidenIndex] = $currentMaiden;>>
<<if $Inventory.equippedItem>>
<!-- sync equipped item story variable with inventory story variable -->
<<run $Inventory.sync($Inventory.equippedItem, $equippedItemIndex)>>
<<run $Inventory.equippedItem.used = true>>;
<!-- update inventory to remove used equipped item -->
<<run $Inventory.tick()>>
<</if>>
<<if $sexMusic>><<audio ":sex" fadeout>><</if>>
<<unset $sentMsg, $currentMaiden, $currentMaidenIndex, $equippedItemIndex, $sexMusic>>
<<audio "select" play>>
<</button>>@@<<print $sentMsg ?? "She gets down on her knees. Your dick is in front of her face.\n\nTell her to:">>@@
<<unset $sentMsg>>
<<button "Kiss dick" "CheckSexTime">><<set $nextPassage to "KneelKissDick">><<audio "kiss" play>><</button>>
<<button "Grab dick" "CheckSexTime">><<set $nextPassage to "KneelDickGrabbed">><<audio "moanBreath" play>><</button>>
<<button "Face in balls" "CheckSexTime">><<set $nextPassage to "KneelFaceBalls">><</button>>
<<if $currentMaiden.braOn>>
<<button "Remove bra" "CheckSexTime">>
<<audio "moan4" play>>
<<set $sentMsg to "She reaches behind her back and unfastens her bra. The bra falls to the floor revealing her beautiful round breasts and perky pink nipples.">>
<<run $currentMaiden.braOn=false>>
<<set $nextPassage to "KneelDown">>
<</button>>
<</if>>
<<button "Open mouth" "CheckSexTime">><<set $nextPassage to "KneelOpenMouth">><</button>>
<<button "Get up" "ToFace">>
<<if $currentMaiden.braOn>>
<<set $sentMsg to "You take her hands and she stands to her feet.">>
<<else>>
<<audio "moanBreath" play>>
<<set $sentMsg to "Her breasts jiggle as she stands to her feet.">>
<</if>>
<</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "Your dick is in front of her face.">>@@
<<unset $sentMsg>>
<<button "Grab your dick" "CheckSexTime">><<set $nextPassage to "KneelGrabDick">><</button>>
<<if !$currentMaiden.braOn>>
<<button "Grab her breast" "CheckSexTime">><<set $nextPassage to "KneelGrabBreast">><<audio "moan3" play>><</button>>
<</if>>
<<button "Grab her hair" "CheckSexTime">><<set $nextPassage to "KneelGrabHair">><<audio "moanBite" play>><</button>>
<<button "Look at her" "KneelDown">><<set $sentMsg to "She is on her knees in front of you. Your dick is in her face.\n\nTell her to:">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>><<nobr>>
<<audio "moanItem" play>>
<<run $currentMaiden.addFaceSkill()>>
<<set _item to $Inventory.equippedItem>>
<<if _item instanceof window.DildoItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<elseif _item instanceof window.BlindfoldItem>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<<else>>
@@<<print `Used $Inventory.equippedItem.name.`>>@@
<</if>>
<</nobr>>
<<button "Remove item" "KneelDefault">><<unset $sentMsg>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>>@@<<print "You reach behind her head and grab a clump of her hair.">>@@
<<unset $sentMsg>>
<<button "Dick in her mouth" "CheckSexTime">><<set $nextPassage to "KneelHeadToDick">><</button>>
<<button "Let go" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>><<audio "insertLips" play>>\
@@<<print "You move her head towards you and force your dick between her lips.">>@@
<<unset $sentMsg>>
<<button "Go further" "CheckSexTime">><<set $nextPassage to "KneelHeadToDick2">><</button>>
<<button "Pull out" "CheckSexTime">><<set $nextPassage to "KneelDefault">><<audio "insert" play>><<set $sentMsg to "You pull her head back and watch your dick slide out from between her lips. You let her hair go, and the head of your dick is wet with her saliva.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "insertMouth2" play>>\
@@<<print "You pull her head further towards you and watch her mouth engulf your dick.">>@@
<<button "Go further" "CheckSexTime">><<set $nextPassage to "KneelHeadToDick3">><</button>>
<<button "Pull out" "CheckSexTime">><<set $nextPassage to "KneelDefault">><<audio "pullOutMouth2" play>><<set $sentMsg to "You pull her head back and watch your dick slide out from between her lips. You let her hair go, and your dick is wet with her saliva.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "insertMouthHi" play>>\
@@<<print "You pull her in even further and feel her lips rubbing fully around your dick. Her hot breath consumes your cock as it slides across her wet tongue deeper into her mouth.">>@@
<<button "Go further" "CheckSexTime">><<set $nextPassage to "KneelHeadToDick4">><</button>>
<<button "Pull out" "CheckSexTime">><<set $nextPassage to "KneelDefault">><<audio "pullOutMouth" play>><<set $sentMsg to "You pull her head back and watch your dick slide out from between her lips. You let her hair go, and your dick is wet with her saliva.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "mouthMoan2" play>>\
@@<<print "With both hands, you take her head and force her completely onto your dick. She takes your full thick cock into her mouth and pushes it down her throat. She struggles to breathe as her throat trembles and squeezes your dick. Pre-cum dribbles down her throat and she chokes on your long cock.">>@@
<<button "Pull out" "CheckSexTime">><<set $nextPassage to "KneelDefault">><<audio "pullOutMouth3" play>><<set $sentMsg to "You pull her head back and watch your dick slide out from between her lips. She gasps for breath, and your dick is wet with her saliva.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "openMouth" play>>\
@@<<print "She opens her mouth for you.">>@@
<<unset $sentMsg>>
<<button "Spit in her mouth" "CheckSexTime">><<set $nextPassage to "KneelSpitMouth">><<audio "spit" play>><</button>>
<<button "Stroke your dick" "CheckSexTime">><<set $nextPassage to "KneelJerkOffMouth">><<audio "spit" play>><</button>>
<<if $Inventory.equippedItem && $Inventory.equippedItem.areas.includes("face")>>\
<<button "Use item" "CheckSexTime">><<set $nextPassage to "UseItemFace">><<unset $sentMsg>><</button>>\
<</if>>
<<button "Tell her to close it" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "You gather saliva in your mouth and spit it into her mouth. Some of it misses and on lands her lips. She lets your drool slide down her lips and chin.\n\nTell her to:">>@@
<<unset $sentMsg>>
<<button "Spit again" "CheckSexTime">><<set $nextPassage to "KneelSpitMouth">><<audio "spit2" play>><<set $sentMsg to "You make a mouthful of spit and let the glob fall from your lips. It falls directly into her mouth, landing on her tongue.">><</button>>
<<button "Swallow it" "CheckSexTime">><<set $nextPassage to "KneelDefault">><<audio "pullOutMouth5" play>><<set $sentMsg to "She swallows your saliva.">><</button>>
<<button "Suck your dick" "CheckSexTime">><<set $nextPassage to "KneelKissDick">><<audio "pullOutMouth" play>><<set $sentMsg to "Her mouth is full of your spit, and she lets the spit drip from her mouth onto your dick. She puts your dick into her mouth and sucks on it, using her tongue to mix your saliva with hers.">><</button>>
<<button "Close her mouth" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "You stroke your dick back and forth, looking at her inviting open mouth.">>@@
<<unset $sentMsg>>
<<button "Keep stroking" "CheckSexTime">><<set $nextPassage to "KneelJerkOffMouth">><<audio "slosh" play>><<set $sentMsg to "You keep stroking your dick, looking at her open mouth.">><</button>>
<<if !$currentMaiden.braOn>>
<<button "Grab her breast" "CheckSexTime">><<set $nextPassage to "KneelJerkOffMouth">><<audio "slosh2" play>><<audio "moan2" play>><<set $sentMsg to "As you stroke your dick, you reach down and grab one of her breasts. Squeezing it and massaging it, you grope her breast and use your fingers to rub her nipple and play with it. Pre-cum seeps between your fingers and wets your dick as you aim towards her open mouth.">><</button>>
<</if>>
<<if $DayManager.sexTimer >= 15>>
<<button "Cum" "KneelCumMouth">><</button>>
<</if>>
<<button "Stop" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "openMouth" play>><<audio "slosh" play>><<audio "suckslosh" play>>\
@@<<print `You stroke your dick harder and faster as $currentMaiden.name opens her mouth wide. Your body tenses and cum shoots from your dick into her mouth and on her tongue. More cum shoots from your dick and lands on her face and lips.`>>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<set $sexOverMsg to "Cum dribbled down her face and lips, and she swallowed the cum on her tongue.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "You reach down and grab one of her breasts. You squeeze it and play with her soft breast in your hand.">>@@
<<unset $sentMsg>>
<<button "Play with nipple" "CheckSexTime">><<set $nextPassage to "KneelGrabBreast">><<audio "moan6" play>><<set $sentMsg to "Her hard nipple slides between your fingers as you rub it back and forth. You squeeze it softly and press it into her breast.">><</button>>
<<button "Grab other breast" "CheckSexTime">><<set $nextPassage to "KneelGrabBreast2">><<audio "moanBrief" play>><</button>>
<<button "Let go" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>>@@<<print `You feel for her other breast and grab it. Both of your hands are full with her breasts and you squeeze them between your fingers. Your dick is in $currentMaiden.name's face, and she watches pre-cum leak from your dick as your grope her breasts. You move your hands back and forth and feel her breasts jiggle in your hands.`>>@@
<<unset $sentMsg>>
<<button "Tell her to suck your dick" "CheckSexTime">><<set $nextPassage to "KneelBreastsSuckDick">><</button>>
<<button "Let go" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>><<audio "insertLips" play>>\
@@<<print "While you play with her breasts, she leans forward and wraps her lips around your dick. She slowly sucks the head of your cock as you rub her nipples and massage her breasts.\n\nTell her to:">>@@
<<unset $sentMsg>>
<<button "Keep sucking" "CheckSexTime">><<set $nextPassage to "KneelSuckDick4">><<audio "insertMouth" play>><<set $sentMsg to "You squeeze her breasts again and then let your hands fall by your side as she slides her lips further down your dick.">><</button>>
<<button "Move back" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "She moves forward and presses her lips against the head of your dick.\n\nTell her to:">>@@
<<unset $sentMsg>>
<<button "Lick dick" "CheckSexTime">><<set $nextPassage to "KneelKissDick">><<audio "spit" play>><<set $sentMsg to "She places her tongue on the tip of your dick and starts licking it.">><</button>>
<<button "Suck dick" "CheckSexTime">><<set $nextPassage to "KneelSuckDick">><<audio "insertLips" play>><</button>>
<<button "Move back" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "She wraps her lips around your dick and slowly starts sucking the head of your cock.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick2">><</button>>
<<button "Move back" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "suckslosh3" play>>\
@@<<print "You feel her tongue licking the head of your dick. She opens her mouth and breathes her hot breath onto your dick before sucking on your cock again.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick3">><</button>>
<<button "Move back" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "insertLips" play>>\
@@<<print "You feel the pressure of her lips squeezing your dick head tighter as her lips slide up and down the tip of your dick.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick4">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "insertMouth3" play>>\
@@<<print "She presses her tongue against your shaft and it covers your dick in her saliva as she pushes your dick further into her mouth.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick5">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "insertMouth2" play>>\
@@<<print "She places one hand on your balls to steady herself as she sucks your cock. Her head moves up and down as she sucks pre-cum from your wet dick and mixes it with her saliva.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick6">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "insertMouthHi" play>>\
@@<<print "Her saliva dribbles down the sides of her mouth and she presses on your balls with her hand as she starts sucking your dick harder and faster.">>@@
<<unset $sentMsg>>
<<button "Grab her breasts" "CheckSexTime">><<set $nextPassage to "KneelSuckDick7Breast">><</button>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick7">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "insertMouth" play>><<audio "suckslosh2" play>>\
@@<<print `You see drops of cum and spit fall from $currentMaiden.name's mouth onto the floor as you reach for her breasts.`>>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick8Breast">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "mouthMoan2" play>>\
@@<<print "You feel her breasts in between your fingers and use your palms to massage her nipples. She manages to let out a moan with her mouth full of your dick and saliva.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick9Breast">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "pullOutMouth" play>>\
@@<<print "She wraps her arms around your thighs and sucks your full dick into her mouth and throat. You grip her breasts harder as your dick squeezes into her throat.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick10Breast">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "pullOutMouth2" play>>\
@@<<print "She chokes on your thick cock as it slides back and forth in her throat. You balls bounce against her chin as her throat squeezes cum from your dick.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDickCumBreast">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "mouthMoan" play>>\
@@<<print "She holds onto your thighs to keep your dick in her throat as you squeeze her breasts tightly and pinch her nipples. Your body tenses and you release your full load into her mouth and down her throat.">>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<audio "" play>><<set $sexOverMsg to "She swallowed the globs of cum, and you slid your dick covered in spit and cum from her mouth.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "pullOutMouth" play>>\
@@<<print `She wraps her arms around your thighs, and you see drops of cum and spit fall from $currentMaiden.name's mouth onto the floor as she sucks your full dick into her mouth and throat.`>>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDick8">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "pullOutMouth2" play>>\
@@<<print "She chokes on your thick cock as it slides back and forth in her throat. You balls bounce against her chin as her throat squeezes cum from your dick.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelSuckDickCum">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "mouthMoan" play>>\
@@<<print "She holds onto your thighs to keep your dick in her throat as you grab her shoulders to brace yourself to cum. Your body tenses and you release your full load into her mouth and down her throat.">>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<set $sexOverMsg to "She swallows the globs of cum, and you slide your dick covered in spit and cum from her mouth.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "She wraps her slender fingers firmly around your thick cock.\n\nTell her to:">>@@
<<unset $sentMsg>>
<<button "Spit on it" "CheckSexTime">><<set $nextPassage to "KneelDickGrabbed">><<audio "spit2" play>><<set $sentMsg to "She lets drool fall from her lips and land on your dick.">><</button>>
<<button "Stroke it" "CheckSexTime">><<set $nextPassage to "KneelDickGrabbed">><<audio "spit" play>><<set $sentMsg to "She strokes your dick up and down.">><</button>>
<<button "Let go" "KneelDefault">><</button>>
<<if $DayManager.sexTimer >= 15>>
<<button "Cum" "SexOver">><<set $sexOverMsg to "Your dick squirted cum all over her hands.">><</button>>
<</if>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "She leans forward and lets your dick slide across her cheek. She keeps going until her lips rest against your balls.\n\nTell her to:">>@@
<<unset $sentMsg>>
<<button "Lick balls" "CheckSexTime">><<set $nextPassage to "KneelFaceBalls">><<audio "suck4" play>><<set $sentMsg to "She presses her tongue against your balls and starts licking them. Her tongue leaves a trail of saliva as she licks up and down your balls.">><</button>>
<<button "Suck balls" "CheckSexTime">><<set $nextPassage to "KneelSuckBalls">><</button>>
<<button "Move back" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>><<audio "insertMouth" play>>\
@@<<print "She puts her mouth on one of your balls and sucks it between her lips into her mouth. She squeezes your ball between her tongue and the roof of her mouth as she tastes sweat from your balls. She releases the ball and takes your other ball into her mouth, sucking on it and rubbing the skin between her lips.\n\nTell her to:">>@@
<<unset $sentMsg>>
<<button "Lick balls" "CheckSexTime">><<set $nextPassage to "KneelFaceBalls">><<audio "suck4" play>><<set $sentMsg to "She presses her tongue against your balls and starts licking them. Her tongue leaves a trail of saliva as she licks up and down your balls.">><</button>>
<<button "Grab dick" "CheckSexTime">><<set $nextPassage to "KneelBallsGrabDick">><<audio "mouthSuck" play>><</button>>
<<button "Move back" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>>@@<<print "As she is sucking and licking your balls, she reaches out her hand and places it on your dick.\n\nTell her to:">>@@
<<unset $sentMsg>>
<<button "Stroke it" "CheckSexTime">><<set $nextPassage to "KneelBallsStrokeDick">><</button>>
<<button "Move back" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "insertMouth3" play>>\
@@<<print "Your balls are covered in her saliva, and she rolls one of them around in her mouth. As she sucks on your ball, her hand begins slowly stroking your dick up and down.\n\nTell her to:">>@@
<<unset $sentMsg>>
<<button "Keep stroking" "CheckSexTime">><<set $nextPassage to "KneelBallsStrokeDick2">><</button>>
<<button "Move back" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "handDick" play>>\
@@<<print "Her fingers slide up and down your long cock as she licks your balls back and forth.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelBallsStrokeDick3">><<audio "insertMouth" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "handDick" play>>\
@@<<print $sentMsg ?? "She focuses on stroking just the head of your penis for awhile, and you feel her tongue slip underneath your balls. Her saliva leaks between the folds of skin as you feel her tongue licking close to your anus.">>@@
<<unset $sentMsg>>
<<button "Keep stroking" "CheckSexTime">><<set $nextPassage to "KneelBallsStrokeDick3">><<set $sentMsg to "All the nerves in your body feel activated as she strokes your dick while sucking on your balls.">><</button>>
<<button "Stroke harder" "CheckSexTime">><<set $nextPassage to "KneelBallsStrokeDick4">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "suckslosh" play>>\
@@<<print "She wraps her fingers more tightly around your dick and begins stroking your shaft with slower, heavier movements. Her face is still deep in your balls, licking their dirty undersides and sucking their wet, sweaty skin.">>@@
<<unset $sentMsg>>
<<button "Stroke faster" "CheckSexTime">><<set $nextPassage to "KneelBallsStrokeDick5">><<audio "" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "pullOutMouth" play>><<audio "suckslosh3" play>>\
@@<<print "She slips one of your balls back into her and sucks on it as she begins stroking your dick harder and faster.">>@@
<<unset $sentMsg>>
<<button "Stroke faster" "CheckSexTime">><<set $nextPassage to "KneelBallsStrokeDick6">><<audio "" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "insertMouthHi" play>><<audio "suckslosh2" play>>\
@@<<print "She opens her mouth wider and fits both of your balls inside. You feel the pressure on your balls in her mouth increases as she squeezes them and sucks on them harder. Gripping your dick tightly in her hands, she rapidly jacks you up and down as pre-cum oozes from your cock and dribbles over her fingers.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelBallsStrokeDickCum">><<audio "" play>><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "cum" play>><<audio "moanHi2" play>>\
@@<<print `Your legs shake, and your balls pulsate in $currentMaiden.name's mouth as they squeeze cum through your dick and eject it all over $currentMaiden.name's hands and face.`>>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<set $sexOverMsg to "Your balls were covered in $currentMaiden.name's spit and you released your cum all over her hands and face.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "You grab your dick.">>@@
<<unset $sentMsg>>
<<button "Slap her with it" "CheckSexTime">><<set $nextPassage to "KneelGrabDick">><<audio "chuckle" play>><<set $sentMsg to "You playfully hit her face with your dick.">><</button>>
<<if !$currentMaiden.braOn>>
<<button "Bounce it on her breasts" "CheckSexTime">><<set $nextPassage to "KneelBounceDick">><<audio "chuckleMoan" play>><</button>>
<</if>>
<<button "Stroke it" "CheckSexTime">><<set $nextPassage to "KneelStrokeDick">><</button>>
<<button "Let go" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>><<audio "handDick" play>>\
@@<<print "You stroke your dick in front of her.">>@@
<<unset $sentMsg>>
<<button "Stroke it" "CheckSexTime">><<set $nextPassage to "KneelStrokeDick2">><</button>>
<<button "Let go" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>><<audio "suckslosh" play>>\
@@<<print "She watches you rub your hand up and down your long cock.">>@@
<<unset $sentMsg>>
<<button "Keep stroking" "CheckSexTime">><<set $nextPassage to "KneelStrokeDick3">><</button>>
<<button "Let go" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>><<audio "suckslosh3" play>>\
@@<<print "You feel pre-cum moistening your fingers and you jerk yourself off harder as she kneels right in front of you.">>@@
<<unset $sentMsg>>
<<button "Keep stroking" "CheckSexTime">><<set $nextPassage to "KneelStrokeDick4">><</button>>
<<button "Let go" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "suckslosh2" play>>\
@@<<print `As you stroke your dick faster with $currentMaiden.name watching you, you feel the urge to cum.`>>@@
<<unset $sentMsg>>
<<if $currentMaiden.braOn>>
<<button "Look at her bra" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBra">><</button>>
<<else>>
<<button "Look at her breasts" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBreast">><</button>>
<</if>>
<<button "Look at her face" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumFace">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "slosh3" play>>\
@@<<print `You intensely jack your dick up and down and look at $currentMaiden.name's face. You feel ready to cum all over it.`>>@@
<<unset $sentMsg>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumFace2">><</button>>
<<button "Edge" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumFaceEdge">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "slosh4" play>>\
@@<<print "You keep looking at her as you stroke your dick more slowly and hold yourself on the edge of cumming. ">>@@
<<unset $sentMsg>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumFace2">><</button>>
<<button "Edge" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumFaceEdge2">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "slosh5" play>>\
@@<<print "You exhale. You could masturbate in front of her all day.">>@@
<<unset $sentMsg>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumFace2">><</button>>
<<button "Edge" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumFaceEdge">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "cum" play>><<audio "slosh3" play>>\
@@<<print `You stroke your dick harder and cum squeezes out through your dick. Globs of jizz shoot all over $currentMaiden.name's face.`>>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<set $sexOverMsg to "You released your load all over her face.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "slosh3" play>>\
@@<<print `You intensely jack your dick up and down and look at $currentMaiden.name's breasts. You feel ready to cum all over them.`>>@@
<<unset $sentMsg>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBreast2">><</button>>
<<button "Edge" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBreastEdge">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "slosh4" play>>\
@@<<print "You keep looking at her breasts as you stroke your dick more slowly and hold yourself on the edge of cumming. ">>@@
<<unset $sentMsg>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBreast2">><</button>>
<<button "Edge" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBreastEdge2">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "slosh5" play>>\
@@<<print "You exhale. You could masturbate while looking at her breasts all day.">>@@
<<unset $sentMsg>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBreast2">><</button>>
<<button "Edge" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBreastEdge">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "cum" play>><<audio "slosh3" play>>\
@@<<print `You stroke your dick harder and cum squeezes out through your dick. Globs of jizz shoot all over $currentMaiden.name's breasts.`>>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<set $sexOverMsg to "You released your load all over her breasts.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "slosh3" play>>\
@@<<print `You intensely jack your dick up and down and look at $currentMaiden.name's bra. You feel ready to cum all over it.`>>@@
<<unset $sentMsg>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBra2">><</button>>
<<button "Edge" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBraEdge">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "slosh4" play>>\
@@<<print "You keep looking at her bra as you stroke your dick more slowly and hold yourself on the edge of cumming. ">>@@
<<unset $sentMsg>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBreast2">><</button>>
<<button "Edge" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBreastEdge2">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "slosh5" play>>\
@@<<print "You exhale. You could masturbate in front of her all day.">>@@
<<unset $sentMsg>>
<<button "Cum" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBra2">><</button>>
<<button "Edge" "CheckSexTime">><<set $nextPassage to "KneelStrokeDickCumBraEdge">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>><<audio "cum" play>><<audio "slosh3" play>>\
@@<<print `You stroke your dick harder and feel cum squeeze out through your dick. Globs of jizz shoot all over $currentMaiden.name's bra.`>>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<set $sexOverMsg to "You released your load all over her bra.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingEyesClosed($currentMaiden)>>
<</done>>@@<<print $sentMsg ?? "You bounce your dick against one of her breasts.">>@@
<<unset $sentMsg>>
<<button "Rub dick on breasts" "CheckSexTime">><<set $nextPassage to "KneelBounceDick">><<audio "moanTouch" play>><<set $sentMsg to "You press your dick into her soft breasts and rub it back and forth leaving strands of jizz on her breasts.">><</button>>
<<button "Rub dick on nipple" "CheckSexTime">><<set $nextPassage to "KneelBounceDick">><<audio "moanBrief" play>><<set $sentMsg to "You touch the head of your dick against her nipple and wiggle her nipple back and forth with your dick. You pull your dick back and a strand of jizz extends from the head of your dick to her nipple.">><</button>>
<<button "Put dick between breasts" "CheckSexTime">><<set $nextPassage to "KneelHoldBoobs">><</button>>
<<button "Let go of dick" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneeling($currentMaiden)>>
<</done>><<audio "moanMm2" play>>\
@@<<print `$currentMaiden.name uses her arm to hold up her breasts as you press your dick between her squishy breasts.`>>@@
<<unset $sentMsg>>
<<button "Fuck her breasts" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs">><</button>>
<<button "Let her rub dick" "CheckSexTime">><<set $nextPassage to "KneelDickRubBoobs">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "moan9" play>>\
@@<<print "You move your hips to push your dick further into her chest until the head of your cock disappears in between her soft tits.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs2">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "moan10" play>>\
@@<<print "You feel the friction of her breasts rubbing against your raw dick as you slowly move your shaft in and out of her chest.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs3">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "moan2" play>><<audio "spit2" play>><<audio "suck2" play>>\
@@<<print "She lets a glob of spit dribble from her mouth and onto her breasts. You rub your dick in her spit and slide it back into her tits.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs4">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "suckslosh" play>>\
@@<<print "You thrust your dick harder in between her boobs as the saliva covers your dick and spreads between her breasts.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs5">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "moanHi1" play>><<audio "suckslosh3" play>>\
@@<<print "As you massage her breasts with your dick, sticky pre-cum oozes from your cock and mixes with her saliva.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs6">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "suckslosh2" play>>\
@@<<print "Your dick is wet with her spit and pre-cum and the sticky fluids drip down your thick shaft and onto your balls.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs7">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "spit" play>><<audio "slosh4" play>>\
@@<<print "She spits another glob of saliva onto your dick as you fuck her breasts faster and harder.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs8">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "moanMultiple" play>><<audio "slosh5" play>>\
@@<<print "You grab her breasts and she lets out a moan as your sopping wet cock squeezes back and forth between her tits.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs9">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "slosh3" play>><<audio "moanHi1" play>>\
@@<<print "Your whole body tenses and your long dick tightens as it readies to shoot cum all over her boobs.">>@@
<<unset $sentMsg>>
<<button "Cum in boobs" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobsCumIn">><</button>>
<<button "Cum on boobs" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobsCumOn">><</button>>
<<button "Cum on face" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobsCumFace">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "spit" play>><<audio "cum" play>><<audio "moanHi2" play>>\
@@<<print "You grip her slippery breasts and force your dick deep in between her tits. You thrust your cock deeper as her nipples press against your thighs. Your cock twitches as cum squeezes through your shaft and spurts between her breasts.">>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<set $sexOverMsg to "You released your load in between her breasts.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "spit" play>><<audio "cum" play>><<audio "moanHi2" play>>\
@@<<print "You slide your dick from between her slippery breasts and stroke it as you look at her sexy wet titties covered in saliva and pre-cum. You stroke your dick intensely and your legs shake as cum starts shooting from your dick and onto her boobs. You keep stroking as more cum shoots onto her nipples and all over breasts.">>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<set $sexOverMsg to "You released your load all over her breasts.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "spit" play>><<audio "cum" play>><<audio "moanHi2" play>>\
@@<<print `You slide your dick from between her slippery breasts and stroke it as you look at her $currentMaiden.name's face and mouth. You stroke your dick intensely and your legs begin to shake as cum shoots from your dick and onto her face and in her mouth. You keep stroking as more cum shoots on her tongue and all over face.`>>@@
<<unset $sentMsg>>
<<button "Continue" "SexOver">><<set $sexOverMsg to "You released your load all over her face.">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "moan1" play>>\
@@<<print "She grabs her breasts and squeezes your dick with them. Your dick moves up and down as she rubs your dick with her boobs.">>@@
<<unset $sentMsg>>
<<button "Continue" "CheckSexTime">><<set $nextPassage to "KneelDickRubBoobs2">><</button>>
<<button "Fuck her breasts" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<audio "moan4" play>>\
@@<<print `You watch her nipples move up and down as $currentMaiden.name kneels in front of you and massages your dick with her breasts.`>>@@
<<unset $sentMsg>>
<<button "Fuck her breasts" "CheckSexTime">><<set $nextPassage to "KneelFuckBoobs">><</button>>
<<button "Move back" "KneelDefault">><</button>>
<canvas id="canvas" class="img"></canvas>
<<done>>
<<run setup.ImageManager.drawKneelingHoldBoobs($currentMaiden)>>
<</done>><<nobr>>
<<if $DayManager.isNight()>>
<<goto "DayOver">>
<<else>>
<<run setup.AudioEngine.enterWorldMap()>>
<</if>>
@@Choose a region:@@
<</nobr>>
<<button "Return" "Menu">><<run setup.AudioEngine.exitWorldMap()>><<audio "select2" play>><</button>>
<<button "Olterran Hills" "WorldInviteMaiden">>
<<run $EncounterManager.configureRegion(0)>>
<<audio "select" play>>
<</button>>
@@#olterraBtn;<<button "Olterran Mountains [Lvl 10 Maiden required]" "WorldInviteMaiden">><<run $EncounterManager.configureRegion(1)>><<run $Player.highestRegion = 1>><<audio "select" play>><</button>>@@
@@#zenevaBtn;<<button "Zeneva Desert [Lvl 25 Maiden required]" "WorldInviteMaiden">><<run $EncounterManager.configureRegion(2)>><<run $Player.highestRegion = 2>><<audio "select" play>><</button>>@@
<<done>>
<<run $("#olterraBtn button").prop("disabled", $MaidenManager.getHighestLevelMaiden().level < 10)>>
<<run $("#zenevaBtn button").prop("disabled", $MaidenManager.getHighestLevelMaiden().level < 25)>>
<</done>>@@Invite a maiden@@
<<button "Back" "WorldMap">>
<<audio "select2" play>>
<!-- sync maiden story variable with maiden manager story variable -->
<<run $MaidenManager.maidens[$currentMaidenIndex] = $currentMaiden>>
<<unset $currentMaiden, $currentMaidenIndex>>
<</button>>
<<for _i, _maiden range $MaidenManager.maidens>>
<<nobr>>
<<capture _i, _maiden>>
<<set _maidenName to _maiden.name + (_maiden.unavailable ? " (unavailable)" : "")>>
<<set _maidenDetails to [_maidenName, _maiden.type, "Lvl " + _maiden.level, "♥ " + _maiden.stats.connection.value].join(" | ")>>
<<button _maidenDetails>>
<<if !_maiden.unavailable>>
<<set $currentMaidenIndex to _i>>
<<set $cachedMaidenIndex to _i>>
<<set $currentMaiden to _maiden>>
<<audio "select" play>>
<<goto "Region">>
<</if>>
<</button>>
<</capture>>
<</nobr>>
<</for>><<run $EncounterManager.clearBackgroundImage()>>\
@@<<print $EncounterManager.getRegionName()>>@@
<blockquote>$currentMaiden.name's eyes begin to glow and dragon scales sprout across her whole body.
She grows a hundred times in size and giant dragon wings extend from her back.
Her heavy tail smashes the ground and she releases an earsplitting roar signifying her terrifying power.
She kneels and lets you mount her. With three heavy wingbeats, your dragon maiden launches into the sky.\
</blockquote>
<<button "Back" "WorldInviteMaiden">><<audio "select2" play>><</button>>\
<!--<<button "Forage" "Encounter">><<audio "select" play>><</button>>-->
<<if $KingdomManager.regions.has($EncounterManager.region.name)>>\
<<button "Change kingdom [warning]" "ConfirmNewKingdom">><<audio "select" play>><</button>>
<</if>>
<<button "Send maiden to nearby kingdom *NEW*" "KingdomIntro">>
<<audio "select" play>>
<<set _region to $EncounterManager.region>>
<<run $KingdomManager.initRegion(_region)>>
<</button>>@@<<print $EncounterManager.getRegionName()>>@@
<blockquote>Are you sure you want to send your maiden to a different kingdom? You can never return to the previous one.\
</blockquote>
<<button "Back" "Region">><<audio "select2" play>><</button>>
<<button "Confirm" "KingdomIntro">>
<<audio "select" play>>
<<set _region to $EncounterManager.region>>
<<run $KingdomManager.deleteRegion(_region.name)>>
<<run $KingdomManager.initRegion(_region)>>
<</button>><<nobr>>
<<run setup.AudioEngine.exitWorldMap()>>
<<audio "bellNight" play>>
@@Day Ended@@
<</nobr>>
@@#worldText;The day is over. Time to return home.@@
<<button "Return to Castle" "HomeCastle">>
<<audio "select2" play>>
<!-- sync maiden story variable with maiden manager story variable -->
<<run $MaidenManager.maidens[$currentMaidenIndex] = $currentMaiden;>>
<<unset $currentMaiden, $currentMaidenIndex>>
<</button>><<nobr>>@@<<print $EncounterManager.getRegionName()>>@@
<<if $DayManager.isNight()>>
<<goto "DayOver">>
<</if>>
<<set _encounter to $EncounterManager.generateEncounter()>>
<</nobr>>
<blockquote><<print _encounter.getIntroMessage()>></blockquote>
<<button "Approach">>
<<audio "selectEncounter" play>>
<<if _encounter instanceof window.ForageEncounter>>
<<goto "ForageEncounter">>
<<elseif _encounter instanceof window.CombatEncounter>>
<<goto "CombatEncounter">>
<<else>>
<<audio "worldRegion" fadeoverto 1 0>>
<<goto "CastleEncounter">>
<</if>>
<</button>>
<<button "Skip" "Encounter">><<run $DayManager.quarterTick()>><<audio "skip" play>><</button>>
<<button "Leave" "Region">><<audio "select2" play>><</button>>
''<<print $DayManager.getTimeString()>>''@@Forage the Area@@
<<nobr>>
<<set _encounter to $EncounterManager.getCurrentEncounter()>>
<blockquote>@@#introMsg;<<print _encounter.getDetailMessage()>>@@
@@#forageMsg;@@</blockquote>
<</nobr>>
<<for _feature range _encounter.getRandomFeatures()>>
<<nobr>>
<<capture _feature>>
<span @id="_feature">
<<button _feature>>
<<audio "gather" stop>>
<<audio "gather" play>>
<!-- hide button -->
<<remove `"#"+_feature`>>
<!-- add random material to inventory -->
<<set _newMaterial to setup.ItemList.generateMaterial($EncounterManager.regionIndex)>>
<<replace #introMsg>><</replace>>
<<append #forageMsg>>You found _newMaterial.fullName!<br><</append>>
<<run $Inventory.addMaterial(_newMaterial)>>
<</button>>
</span>
<</capture>>
<</nobr>>
<</for>>
<<button "Continue" "Encounter">><<run $DayManager.tick()>><<audio "select" play>><</button>>@@Defeat the Enemy@@
<<nobr>>
<<set _encounter to $EncounterManager.getCurrentEncounter()>>
<blockquote>@@#introMsg;<<print _encounter.getDetailMessage()>>@@</blockquote>
<</nobr>>
''Plan your Attack''
<<for _attack range _encounter.getBasicAttacks()>>
<<nobr>>
<<capture _attack>>
<span @id="_attack">
<<button _attack.getLabel($currentMaiden)>>
<<audio _attack.sfx play>>
<<set _attackResult to _encounter.performAttack(_attack, $currentMaiden)>>
<<replace #introMsg>>_attackResult.message<</replace>>
<<if _attackResult.enemyDead>>
<<goto "CombatWin">>
<</if>>
<</button>>
</span>
<</capture>>
<</nobr>>
<</for>>@@VICTORY@@
<blockquote>You defeated the enemy!</blockquote>
<<nobr>>
<<audio "combatWin" play>>
<<set _newMaterial to setup.ItemList.generateMaterial($EncounterManager.regionIndex)>>
<<run $Inventory.addMaterial(_newMaterial)>>
<blockquote><<print "You received " + _newMaterial.fullName + "!">></blockquote>
<</nobr>>
<<button "Continue" "Encounter">><<run $DayManager.tick()>><<audio "select" play>><</button>>
<!-- A series of combat encounters based on the area of the castle you choose to attack -->@@Destroy the Castle@@
<<nobr>>
<<run setup.AudioEngine.enterCastleBattle()>>
<<set _encounter to $EncounterManager.getCurrentEncounter()>>
<blockquote><<print _encounter.getDetailMessage()>></blockquote>
<<if _encounter.isCompleted()>>
<<goto "CastleWin">>
<</if>>
<</nobr>>
@@Choose a Target@@
<<for _i, _area range _encounter.getAreas()>>
<<capture _i, _area>>
<<button _area.name "CastleArea">>
<<audio "selectEncounter" play>>
<<run _encounter.chooseArea(_i)>>
<</button>>
<</capture>>
<</for>>
<<set _stamina to $currentMaiden.stats.stamina.value - $currentMaiden.damage>>
''<<print `Dragon Stamina: _stamina`>>''<<nobr>>
<<set _encounter to $EncounterManager.getCurrentEncounter()>>
@@<<print _encounter.getCurrentArea().name>>@@
<</nobr>>
<blockquote>@@#introMsg;<<print _encounter.getAreaDetailMessage()>>@@</blockquote>
@@Plan your Attack@@
<<for _attack range _encounter.getBasicAttacks()>>
<<nobr>>
<<capture _attack>>
<<button _attack.getLabel($currentMaiden)>>
<<audio _attack.sfx play>>
<<set _attackResult to _encounter.performAttack(_attack, $currentMaiden)>>
<<replace #introMsg>>_attackResult.message<</replace>>
<<set $currentMaiden to _attackResult.maiden>>
<<if _attackResult.dragonDead>>
<<run $MaidenManager.remove($currentMaiden)>>
<<goto "CastleDefeat">>
<<elseif _attackResult.areaDestroyed>>
<<goto "CastleEncounter">>
<</if>>
<</button>>
<</capture>>
<</nobr>>
<</for>>
<<button "Back" "CastleEncounter">><<audio "select2" play>><</button>>@@VICTORY@@
<blockquote>You succesfully destroyed the castle!</blockquote>
<<nobr>>
<<audio "achieve" play>>
<<audio "obtain" play>>
<<run $EggManager.createEgg($EncounterManager.region.level)>>
<blockquote>''<<print "You found a dragon egg!">>''</blockquote>
<</nobr>>
<<nobr>>
<!-- sync maiden story variable with maiden manager story variable -->
<<run $MaidenManager.maidens[$currentMaidenIndex] = $currentMaiden;>>
<<unset $currentMaiden, $currentMaidenIndex>>
<<button "Return to Castle" "HomeCastle">>
<<run $DayManager.setToNight()>>
<<run setup.AudioEngine.exitCastleBattle()>>
<<audio "select" play>>
<</button>>
<</nobr>>@@DEFEAT@@
<blockquote>Your dragon was killed!</blockquote>
<!-- clear the current maiden -->
<!-- sync maiden story variable with maiden manager story variable -->
<<run $MaidenManager.maidens[$currentMaidenIndex] = $currentMaiden;>>
<<unset $currentMaiden, $currentMaidenIndex>>
<<button "Return to Castle" "HomeCastle">>
<<run $DayManager.setToNight()>>
<<run setup.AudioEngine.exitCastleBattle()>>
<<audio "select" play>>
<</button>>