<<widget "pic">>
<<if $ShowImages>>
/* Sets the base path to _p */
<<set _p = $args[0]>>
/* check for additional pathing before defining the image */
<<if $args[1]>>
<<set _a = $args[1]>>
<<set _img = "pics/" + _p + "/" + _a>>
<<if $args[2]>>
<<set _m = $args[2]>>
<<set _img = _img + _m + ".png">>
<<else>>
<<set _img = _img + ".png">>
<</if>>
<<else>>
<<set _img = "pics/" + _p + "/default.png">>
<</if>>
/* Display the image file */
@@.pic;[img[_img]]@@
<</if>>
<</widget>><<UpdateAllMeters>>
<<if $player.stamina < $player.travelStamina and not $PassingOut>>
<<set $PassingOut to true>>
<<set $DisableMenu to true>>
<<goto "PassOut">>
<</if>>
<<if $player.health < 1>>
<<set $DisableMenu to true>>
<<set $player.health to 1>>
<<goto "PlayerDeath">>
<</if>><<if flag("CharacterCreation")>>\
''Name: '' $player.name
''Level: '' $player.level
<<showmeter "experience" `$player.exp / $player.expNext`>>\
@@.form;''Gold: '' $player.gold
''Level: ''$player.level@@
<hr>
<<if not $InCombat and not $DisableMenu>>\
@@.btnUIScale;<<button "Inventory">>\
<<run Dialog.setup("Inventory");
Dialog.wiki(Story.get("Inventory").processText());
Dialog.open();>>
<</button>>@@
@@.btnUIScale;<<button "Equipment">>\
<<run Dialog.setup("Equipment");
Dialog.wiki(Story.get("Equipment").processText());
Dialog.open();>>
<</button>>@@
<<showmeter "health" `$player.health / $player.maxHealth`>>\
<<showmeter "stamina" `$player.stamina / $player.maxStamina`>>\
<<showmeter "mana" `$player.mana / $player.maxMana`>>\
<hr>
<</if>>\
''Age: '' $player.age
$player.eyeColor eyes
$player.hairLength $player.hairColor hair
$player.skinColor skin
<hr>
<</if>>\<<set
$Release = "Alpha",
$Version = "1",
$Build = 0.000101
>>
<<set $ShowImages to true>>
<<SetupMeters>>
<<SetupInventories>>
<<SetupItems>><<widget "SetupInventories">>
<<newinv $invWeapons>>
<<newinv $invArmor>>
<<newinv $invItems>>
<</widget>><<widget "SetupItems">>
<<item "rustySword" "Rusty Sword">>
<<description>>
A rusty sword - it's seen better days. @@(<<print setup.weapon.get("rustySword").damage>> damage.)@@
<</item>>
<<item "ironSword" "Iron Sword">>
<<description>>
A shiny iron sword - it looks sharp.
<</item>>
<<item "steelSword" "Steel Sword">>
<<description>>
A heavy steel sword - it looks deadly.
<</item>>
<<item "leatherArmor" "Leather Armor">>
<<description>>
Nice leather armor - made from the finest cowhide.
<</item>>
<<item "chainMail" "Chain Mail">>
<<description>>
Heavy chain armor - it looks like it could take a beating.
<</item>>
<<item "plateArmor" "Plate Armor">>
<<description>>
Shiny plate armor - it looks like it could stop a bullet.
<</item>>
<<consumable "healthPotion" "Health Potion">>
<<run changeHealth(10)>>
<<description>>
A health potion - Restores @@10@@ health.
<</consumable>>
<<consumable "staminaPotion" "Stamina Potion">>
<<run changeStamina(10)>>
<<description>>
A stamina potion - Restores @@10@@ stamina.
<</consumable>>
<<consumable "manaPotion" "Mana Potion">>
<<run changeMana(10)>>
<<description>>
A mana potion - Restores @@10@@ mana.
<</consumable>>
<</widget>><<widget "SetupMeters">>
<<newmeter 'health'>>
<<colors 'green' 'red' 'gray'>>
<<sizing 100% 20px>>
<<label 'HEALTH: $player.health / $player.maxHealth' 'white' 'left'>>
<</newmeter>>
<<newmeter 'stamina'>>
<<colors 'orange' 'red' 'gray'>>
<<sizing 100% 20px>>
<<label 'STAMINA: $player.stamina / $player.maxStamina' 'white' 'left'>>
<</newmeter>>
<<newmeter 'mana'>>
<<colors 'blue' 'red' 'gray'>>
<<sizing 100% 20px>>
<<label 'MANA: $player.mana / $player.maxMana' 'white' 'left'>>
<</newmeter>>
<<newmeter 'experience'>>
<<colors 'cornflowerblue'>>
<<sizing 100% 10px>>
<<label 'XP: $player.exp / $player.expNext' 'white' 'left'>>
<</newmeter>>
<<newmeter 'enemyHealth'>>
<<colors 'green' 'red' 'gray'>>
<<sizing 100% 30px>>
<<label 'HP: $CurrentEnemy.hp' 'white' 'center'>>
<</newmeter>>
<</widget>><<widget "btnLink">>
<<if $args[0]>>
<<if not isString($args[0])>>
@@.btnUI;<<button $args[0]>>
<<silently>>
<<if $args.length > 1>>
<<for _i = 1; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<<else>>
@@.btnUI;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnChoice">>
<<if $args[0]>>
<<if not isString($args[0])>>
@@.btnUI;<<button $args[0]>>
<<silently>>
<<if $args.length > 1>>
<<for _i = 1; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<<else>>
@@.btnUI;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnTravel">>
<<if $args[0]>>
<<if $player.stamina < $player.travelStamina>>
<<btnDisable "Not enough stamina to travel">>
<<else>>
<<set $args[0] += " - @@($player.travelStamina Stamina)@@">>
@@.btnTravel;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<<run changeStamina(-$player.travelStamina)>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnSub">>
<<if $args[0]>>
<<if $player.isSub>>
<<set $args[0] to "@@.sf;Submissive@@ - " + $args[0]>>
@@.btnChoiceSissy;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnSissy">>
<<if $args[0]>>
<<if isSissy()>>
<<set $args[0] to "@@.sf;Sissy@@ - " + $args[0]>>
@@.btnChoiceSissy;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnDom">>
<<if $args[0]>>
<<if $player.isDom>>
<<set $args[0] to "@@.df;Dominant@@ - " + $args[0]>>
@@.btnChoiceDom;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<<elseif (not isSissy() and not $player.isVerySub) and chance(15)>>\
<<set $args[0] to "@@.df;Opportunity!@@ - " + $args[0]>>
@@.btnChoiceDom;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnBimbo">>
<<if $args[0]>>
<<if isBimbo()>>
<<set $args[0] to "@@.xxx;Bimbo@@ - " + $args[0]>>
@@.btnChoiceSissy;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnTooHorny">>
<<if $args[0]>>
<<if $player.horny >= 90 or isBimbo()>>
<<set $args[0] to "@@.xxx;Too Aroused!@@ - " + $args[0]>>
@@.btnChoiceSissy;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<<else>>
@@.btnChoice;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnNotHorny">>
<<if $args[0]>>
<<if $player.horny < 90 and not isBimbo()>>
@@.btnChoice;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnTooSub">>
<<if $args[0]>>
<<if $player.isVerySub or isSissy()>>
<<set $args[0] to "@@.sf;Submissive@@ - " + $args[0]>>
@@.btnChoiceSissy;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<<else>>
@@.btnChoice;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnNotSub">>
<<if $args[0]>>
<<if not $player.isSub and not isSissy()>>
@@.btnChoice;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnTakeover">>
<<if $args[0]>>
<<set $args[0] to "@@.xxx;Takeover!@@ - " + $args[0]>>
@@.btnUI;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<<if $sex>>
<<set $sex.takeover to true>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</widget>>
<<widget "btnBar">>
<<if $args[0]>>
<<if not isString($args[0])>>
@@.btnUIScale;<<button $args[0]>>
<<silently>>
<<if $args.length > 1>>
<<for _i = 1; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<<else>>
@@.btnUIScale;<<button $args[0] $args[1]>>
<<silently>>
<<if $args.length > 2>>
<<for _i = 2; _i < $args.length; _i++>>
<<= '<<set '+$args[_i]+'>>'>>
<</for>>
<</if>>
<</silently>>
<</button>>@@
<</if>>
<</if>>
<</widget>>
<<widget "btnBack">>
<<if $args[0]>>
<<set _linkText to $args[0]>>
<<else>>
<<set _linkText to "Back">>
<</if>>
@@.btnUI;<<button "_linkText">>
<<script>>
Engine.backward();
<</script>>
<</button>>@@
<</widget>>
<<widget "btnReturn">>
<<if $args[0]>>
<<set _linkText to $args[0]>>
<<else>>
<<set _linkText to "Return">>
<</if>>
@@.btnUI;<<button "_linkText" `previous()`>><</button>>@@
<</widget>>
<<widget "btnDisable">>
<<if $args[0]>>
@@.btnDisable;<<button $args[0]>><</button>>@@
<</if>>
<</widget>>/* Widget to initialize combat, drawing a random enemy from a provided array and initializing combat related variables */
<<widget "StartCombat">>
<<set _enemy to _args[0].random()>>
<<run loadEnemy(_enemy)>>
<<set $Turn to 'player'>>
<<set $Round to 1>>
<<set $InCombat to true>>
<</widget>>
/* Widget to end combat, unsetting the current enemy and turn variables */
<<widget "EndCombat">>
<<unset $CurrentEnemy>>
<<unset $Turn>>
<<unset $Round>>
<<unset $InCombat>>
<</widget>>
/* Widget to change the turn and increment the round */
<<widget "ChangeTurn">>
<<if $Turn is 'player'>>
<<set $Turn to 'enemy'>>
<<else>>
<<set $Turn to 'player'>>
<</if>>
<<set $Round += 1>>
<</widget>>
<<widget "EnemyUseAbility">>
<<set _ability to loadAbility($CurrentEnemy)>>
/* Display text for ability being used */
''$CurrentEnemy.name _ability.combatText''<br>
/* Take action based on ability type */
<<switch _ability.type>>
<<case "attack">>
<<if checkHit($CurrentEnemy, $player, _ability.hit)>>
<<set _damage = getDamage($CurrentEnemy, _ability)>>
<<run changeHealth(-_damage)>>
<br>''You take @@_damage@@ damage!''<br>
<<else>>
<br>''$CurrentEnemy.name misses!''<br>
<</if>>
<<case "heal">>
<<case "buff">>
<</switch>>
<</widget>>
<<widget "EnemyLoot">>
<<set _gold to $CurrentEnemy.gold>>
<<set _exp to $CurrentEnemy.exp>>
<<set _drop to $CurrentEnemy.items.random()>>
<<set _item to setup.items.get(_drop)>>
/* Update gold, exp and inventory */
<<pickup $invItems _drop 1>>
<<run changeGold(_gold)>>
<<run changeExp(_exp)>>
/* Display loot text */
''You received @@_gold@@ gold and @@_exp@@ experience!''<br>
''You found 1x @@_item.name@@!''<br>
<</widget>><<widget "Pro">>
<<set _pro to $args[0]>>
<<set _thumb to $args[1]>>
<<if _pro is $thepit>>
<<set _proImg to $thepit>>
<<else>>
<<set _proImg to $img>>
<</if>>
<<if _pro.isHidden is true>>
<<set _profileVersion to 1>>
<<else>>
<<set _profileVersion to 0>>
<</if>>
<<if isObject(_pro)>>
<<if $UseArt>>
<<if _pro is $player>>
<<if isMale()>>
<<set _profilePic to "pics/profile/Male.jpg">>
<<else>>
<<set _profilePic to "pics/profile/Female.jpg">>
<</if>>
<<else>>
<<set _profilePic to "pics/profile/" + $args[0].id + ".jpg">>
<</if>>
<<elseif _pro is $player>>
<<set _profilePic to _proImg.img["portrait"]>>
<<elseif _pro.portrait>>
<<if _pro.isSimple>>
<<set _profilePic to "pics/profile/" + _pro.portrait + ".jpg">>
<<elseif _pro.useNPC>>
<<set _profilePic to _proImg.img[_pro.portrait]>>
<<else>>
<<set _profilePic to _proImg.img[_pro.portrait]>>
<</if>>
<<elseif _pro.default and not _pro.noOutfit>>
<<set _port to _pro.default + "-pro">>
<<set _profilePic to _proImg.img[_port]>>
<<else>>
<<set _profilePic to "pics/profile/" + _pro.portrait + ".jpg">>
<</if>>
<<else>>
<<set _profilePic to "pics/profile/" + $args[0] + ".jpg">>
<</if>>
<<if isString(_profilePic)>>
<<set _profileImg to _profilePic>>
<<else>>
<<set _profileImg to _profilePic[_profileVersion]>>
<</if>>
<<if $ShowImages>>
<<if $ShowPlayerPortrait>>
<<if $UsePics and _pro is $player>>
<<DisplayCharacterThumb>>
<<else>>
<<if _thumb is true>>
@@.thumbSmall;[img[_profileImg]]@@
<<else>>
@@.pro;[img[_profileImg]]@@
<</if>>
<</if>>
<<else>>
<<if $args[0] isnot $player.portrait>>
<<if _thumb is true>>
@@.thumbSmall;[img[_profileImg]]@@
<<else>>
@@.pro;[img[_profileImg]]@@
<</if>>
<</if>>
<</if>>
<</if>>
<</widget>>
<<widget "Thought">>
<<set _tht to $args.random()>>
<blockquote><<= '@@.thought;\n_tht\n@@'>></blockquote>
<</widget>>
/* Dialogue widget */
<<widget "nm">>
/* Assign variables to friendly names */
<<set
_ValidMSG to true,
$Speaker to $args[0],
_msg to $args[1],
_thought to $args[2]
>>
/* Check to see if the speaker is a valid speaker */
<<CheckMSG $Speaker>>
<<ReturnImages $Speaker>>
/* If the speaker is valid, behave accordingly */
<<if _ValidMSG>>
<<if $Speaker is $player>>
/* Player-specific message functions */
<<if $player.isMute>>
<<set _thought to _msg>>
<<set _msg to "...">>
<</if>>
<<if _thought>>
/* If dialogue contains a thought bubble, display it */
<<= '@@.' + $Speaker.style + ';\n<<Pro $Speaker>>$Speaker.name <<moodPlayer $Speaker>><hr>\n<<Thought _thought>>_msg\n@@'>>
<<else>>\
<<= '@@.' + $Speaker.style + ';\n<<Pro $Speaker>>$Speaker.name <<moodPlayer $Speaker>><hr>\n_msg\n@@'>>
<</if>>\
<<elseif _thought>>
/* If dialogue contains a thought bubble, display it */
<<= '@@.' + $Speaker.style + ';\n<<Pro $Speaker>>$Speaker.name <<ShowAffection $Speaker "- " "high">><hr>\n<<Thought _thought>>_msg\n@@'>>
<<elseif $Speaker.isDog is true>>
/* If the speaker has the isDog attribute, replace their dialogue with randomized barking noises */
<<set _dogTalkR to random(1,6)>>
<<set _msg to "">>
<<for _dogTL=0; _dogTL < _dogTalkR; _dogTL++>>
<<set _msg += setup.dogTalk.random()>>
<</for>>
<<= '@@.' + $Speaker.style + ';\n<<Pro $Speaker>>$Speaker.name <<ShowAffection $Speaker "- " "high">><hr>\n_msg\n@@'>>
<<elseif $Speaker.isMouse>>
/* If the speaker has the isMouse attribute, replace their dialogue with randomized barking noises */
<<if chance(50)>>
<<set _msg to "@@*squeak*@@ " + _msg>>
<</if>>
<<if chance(50)>>
<<set _msg to _msg + " @@*squeak*@@">>
<</if>>
<<= '@@.' + $Speaker.style + ';\n<<Pro $Speaker>>$Speaker.name <<ShowAffection $Speaker "- " "high">><hr>\n_msg\n@@'>>
<<else>>
/* If there are no special parameters, display the message normally */
<<= '@@.' + $Speaker.style + ';\n<<Pro $Speaker>>$Speaker.name <<ShowAffection $Speaker "- " "high">><hr>\n_msg\n@@'>>
<</if>>
<</if>>
<<unset $Speaker>>
<</widget>>
<<widget "nmr">>
<<ReturnImages $Speaker>>
<<set _ValidMSG to true, $Speaker to $args[0]>>
<<CheckMSG $Speaker>>
<<if _ValidMSG>>
<<if $Speaker.pName>>
<<set $PNAME to $Speaker.pName>>
<</if>>
<<if $args.length > 1>>
<<set _mOut to random(1,$args.length-1)>>
<<else>>
<<set _mOut to "I AM ERROR">>
<</if>>
<<= '@@.' + $Speaker.style + ';\n<<Pro $Speaker>>$Speaker.name <<moodPlayer $Speaker>><hr>\n$args[_mOut]\n@@'>>
<</if>>
<</widget>>
<<widget "nmc">>
<<if $args[2]>>
<<set $SpeakerPortrait to $args[2]>>
<<else>>
<<set $SpeakerPortrait to "Unknown">>
<</if>>
<<set $SpeakerName to $args[0]>>
<<= '@@.men;\n<<Pro $SpeakerPortrait 1>>$SpeakerName<hr>\n$args[1]\n@@'>>
<</widget>>
<<widget "dl">>
/* Generates one dialogue if args[0] is true, otherwise another */
<<if $args[0] is true>>$args[1]<<else>>$args[2]<</if>>
<</widget>>
<<widget "CheckMSG">>
/* Player Checks */
<<if $args[0] is "BIMBO">>
<<if isBimbo()>>
<<set $Speaker to $player>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<<elseif $args[0] is "SISSY">>
<<if isSissy()>>
<<set $Speaker to $player>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<<elseif $args[0] is "DEFAULT">>
<<if not isSissy() and not isBimbo()>>
<<set $Speaker to $player>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<</if>>
/* Penny Checks */
<<if $args[0] is "penny-o">>
<<if $penny.isObedient>>
<<set $Speaker to $penny>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<<elseif $args[0] is "penny-w">>
<<if $penny.isWhore>>
<<set $Speaker to $penny>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<<elseif $args[0] is "penny-d">>
<<if $penny.isDom>>
<<set $Speaker to $penny>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<<elseif $args[0] is "penny">>
<<if not $penny.isObedient and not $penny.isWhore and not $penny.isDom>>
<<set $Speaker to $penny>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<</if>>
/* John Checks */
<<if $args[0] is "john-nice">>
<<if $john.isMale and dose($john,"nice")>>
<<set $Speaker to $john>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<<elseif $args[0] is "john-mean">>
<<if $john.isMale and not dose($john,"nice")>>
<<set $Speaker to $john>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<<elseif $args[0] is "john-girl">>
<<if $john.isFemale>>
<<set $Speaker to $john>>
<<else>>
<<set _ValidMSG to false>>
<</if>>
<</if>>
<</widget>>
<<widget "cough">>@@*COUGH*@@<</widget>><<widget "RoomBuyButton">>
<<set _room to $args[0]>>
<<capture _room>>
<<if canBuyRoom(_room)>>
/*<<button "$$$Rooms[_room].cost" "Home">>
<<run buyRoom(_room)>>
<</button>> - Purchase $Rooms[_room].name*/
<<run createRoomButton(_room)>>
<<else>>
<<if maxRoom(_room)>>
You already have the maximum number of $Rooms[_room].plural.
<<else>>
You need $$$Rooms[_room].cost to purchase a $Rooms[_room].name.
<</if>>
<</if>>
<</capture>>
<</widget>>
<<widget "UpdateAllMeters">>
<<updatemeter "health" `$player.health / $player.maxHealth`>>
<<updatemeter "stamina" `$player.stamina / $player.maxStamina`>>
<<updatemeter "mana" `$player.mana / $player.maxMana`>>
<<updatemeter "experience" `$player.exp / $player.expNext`>>
<</widget>>
<<widget "updatebar">>
<<silently>>
<<replace "#story-caption">>
<<display "StoryCaption">>
<</replace>>
<</silently>>
<</widget>><<StartCombat $ForestEnemies>>\
<<pic "enemy" $CurrentEnemy.img>>\
<center><h2>$player.name</h2></center>\
<<showmeter "health" `$player.health / $player.maxHealth`>>\
<<showmeter "stamina" `$player.stamina / $player.maxStamina`>>\
<<showmeter "mana" `$player.mana / $player.maxMana`>>\
<center><h2>$CurrentEnemy.name</h2></center>\
<<showmeter "enemyHealth" `$CurrentEnemy.hp / $CurrentEnemy.maxhp`>>\
<hr>\
<span id="combatText">\
<<include "Forest-Combat-Text">>\
</span>\
<hr>\<<updatemeter "enemyHealth" `$CurrentEnemy.hp / $CurrentEnemy.maxhp`>>\
<<if $Turn is 'player'>>\
''<<print $CurrentEnemy.idle.random()>>''
@@.btnChoiceDom;<<button "Attack">>\
<<replace "#combatText">>\
<<include "Forest-Combat-PlayerAction">>\
<</replace>>\
<</button>>@@\
<<else>>\
<<EnemyUseAbility>>
<<UpdateAllMeters>>\
@@.btnUI;<<button "Continue">>\
<<ChangeTurn>>\
<<replace "#combatText">>\
<<include "Forest-Combat-Text">>\
<</replace>>\
<</button>>@@\
<</if>>\''You attack the $CurrentEnemy.name! with your $player.weapon.name!''
<<if checkHit($player, $CurrentEnemy, $player.weapon.hit)>>\
<<set _damage to getDamage($player)>>\
<<set $CurrentEnemy.hp -= _damage>>\
<<updatemeter "enemyHealth" `$CurrentEnemy.hp / $CurrentEnemy.maxhp`>>\
''You deal @@_damage@@ damage!''
<<else>>\
''You miss!''
<</if>>\
<<if $CurrentEnemy.hp <= 0>>\
''You defeated the $CurrentEnemy.name!''
<<EnemyLoot>>\
<<btnLink "Continue" "Road-Forest">>\
<<EndCombat>>\
<<else>>\
@@.btnUI;<<button "Continue">>\
<<ChangeTurn>>\
<<replace "#combatText">>\
<<include "Forest-Combat-Text">>\
<</replace>>\
<</button>>@@\
<</if>>\<<StartCombat $RoadEnemies>>\
<<pic "enemy" $CurrentEnemy.img>>\
<center><h2>$player.name</h2></center>\
<<showmeter "health" `$player.health / $player.maxHealth`>>\
<<showmeter "stamina" `$player.stamina / $player.maxStamina`>>\
<<showmeter "mana" `$player.mana / $player.maxMana`>>\
<center><h2>$CurrentEnemy.name</h2></center>\
<<showmeter "enemyHealth" `$CurrentEnemy.hp / $CurrentEnemy.maxhp`>>\
<hr>\
<span id="combatText">\
<<include "Road-Combat-Text">>\
</span>\
<hr>\<<updatemeter "enemyHealth" `$CurrentEnemy.hp / $CurrentEnemy.maxhp`>>\
<<if $Turn is 'player'>>\
''<<print $CurrentEnemy.idle.random()>>''
@@.btnChoiceDom;<<button "Attack">>\
<<replace "#combatText">>\
<<include "Road-Combat-PlayerAction">>\
<</replace>>\
<</button>>@@\
<<else>>\
<<EnemyUseAbility>>
<<UpdateAllMeters>>\
@@.btnUI;<<button "Continue">>\
<<ChangeTurn>>\
<<replace "#combatText">>\
<<include "Road-Combat-Text">>\
<</replace>>\
<</button>>@@\
<</if>>\''You attack the $CurrentEnemy.name! with your $player.weapon.name!''
<<if checkHit($player, $CurrentEnemy, $player.weapon.hit)>>\
<<set _damage to getDamage($player)>>\
<<set $CurrentEnemy.hp -= _damage>>\
<<updatemeter "enemyHealth" `$CurrentEnemy.hp / $CurrentEnemy.maxhp`>>\
''You deal @@_damage@@ damage!''
<<else>>\
''You miss!''
<</if>>\
<<if $CurrentEnemy.hp <= 0>>\
''You defeated the $CurrentEnemy.name!''
<<EnemyLoot>>\
<<btnLink "Continue" "Road-Village">>\
<<EndCombat>>\
<<else>>\
@@.btnUI;<<button "Continue">>\
<<ChangeTurn>>\
<<replace "#combatText">>\
<<include "Road-Combat-Text">>\
<</replace>>\
<</button>>@@\
<</if>>\<<set _gather to ["wood","stone"].random()>>\
<<set _amount to random(2,3)>>\
<<pic "bg" "forest2">>\
''You gather materials in the forest.''
''You found @@_gather x_amount@@!''
<<pickup $invItems _gather _amount>>
<<btnTravel "Continue gathering..." "Forest-Gather">>
<<btnTravel "Return" "Road-Forest">><<pic "bg" "forest2">>\
<<run changeHealth(-20)>>\
''You hunt beasts in the forest and take some damage.''
<<btnTravel "Return to home" "Home">><<pic "bg" "outside">>
<<if visited() is 1>>\
''You step out of the shack, the sunlight cutting through the crisp air and highlighting the overgrown clearing around you. To the north, the forest stands tall and dense, its underbrush promising game and resources. To the south, a dirt path curves gently toward the distant village, barely visible past the rolling hills. The world feels quiet here, save for the rustling leaves and the faint call of distant birds. Whatever your plans, it's clear this place will demand work.''
<<else>>\
''You step outside, the clearing as overgrown as ever. The forest to the north stretches endlessly, its shadows hinting at both resources and danger. To the south, the dirt path offers a route to the village, where supplies and perhaps answers await. The day's work is ahead of you, clear and unrelenting.''
<</if>>\
<<btnTravel "Explore surrounding forest" "Road-Forest">>
<<btnTravel "Travel to nearby village" "Road-Village">><<pic "bg" "shack">>\
<<switch $Home.bedLevel>>\
<<case 1>>\
''You lay down on the bed, which is little more than a pile of straw covered in a thin blanket. It's not the most comfortable bed you've ever slept in, but it's better than nothing. You close your eyes and drift off to sleep.''
<</switch>>\
<<btnLink "Continue" "Home" "restoreAll()">><<pic "bg" "shack">>\
<<switch $player.background>>\
<<case "mercenary">>\
''You scan the dusty interior of the shack with practiced wariness. Its emptiness reminds you of old outposts and shelters you've claimed in the past—temporary, functional, and always one step ahead of pursuit. The scars of abandonment here are different, though; this isn't just a forgotten place—it feels like a tomb.''
<<case "peasant">>\
''Standing here stirs bittersweet memories. Despite the dust and decay, you recognize this as the remnants of a home—a place that once held life and purpose. You remember long-forgotten echoes of childhood, though they are faded now, swallowed by years of neglect. The air feels colder here, weighed down by what's been lost.''
<<case "scholar">>\
''You look around, noting the structural disrepair and the layer of dust on every surface. It feels alien, this place—a far cry from the pristine halls and orderly spaces you once called home. Yet, in the soft light filtering through the grimy window, you catch glimpses of possibility. This place may be broken, but it can still be restored, repurposed—a fitting metaphor for your own circumstances.''
<</switch>>\
<<btnLink "Use the crafting bench" "Crafting">>
<<btnLink "Step outside" "Home-Outside">>
<<btnLink "Sleep in bed" "Home-Sleep">><<pic "bg" "forest1">>\
<<if visited() is 1>>\
''The forest looms before you, its towering trees stretching skyward like the skeletal remains of ancient giants. A cool, damp breeze carries the earthy scent of moss and decay, mingling with the faint tang of woodsmoke on the air. The ground beneath your boots is soft, muffled by a thick carpet of leaves and tangled underbrush. Birds chirp somewhere high above, their melodies a stark contrast to the occasional rustle of movement closer to the forest floor—small animals, perhaps, or something watching you from the shadows.''
<<else>>\
''The forest greets you with its familiar chill, the towering trees casting long shadows over the underbrush. The damp air clings to your skin, heavy with the scent of moss and earth. Birds chatter overhead, and unseen creatures stir in the distance, keeping just out of sight.''
<</if>>\
<<btnTravel "Gather resources" "Forest-Gather">>
<<btnTravel "Hunt for food" "Forest-Combat">>
<<btnTravel "Return to home" "Home">><<pic "bg" "road">>\
<<btnTravel "Continue down the road" "Road-Combat">>
<<btnTravel "Return to home" "Home">>''Welcome to Brothel in the Woods''
''This is an 18+ adult game featuring mature themes, including sexual content, moral dilemmas, and a dark fantasy setting. Player discretion is advised.''
''Join our community and support development through our Patreon and Discord server!''
''By playing this game, you acknowledge that you are of legal age and comfortable with adult-oriented content.''
<<pickup $invWeapons "rustySword" 1 "ironSword" 1 "steelSword" 1>>\
<<pickup $invArmor "leatherArmor" 1 "chainMail" 1 "plateArmor" 1>>\
<<pickup $invItems "healthPotion" 5 "staminaPotion" 5 "manaPotion" 5 "wood" 10 "stone" 10>>\
<<pickup $invItems "clothScrap" 10 "boarHide" 5>>\
<<btnLink "Start Game" "CharacterCreation">><<pic "bg" "shack">>\
''Waking from you cot, you roll over and stretch, feeling the warmth of the sun on your face. You reach over and grab a dusty mirror, lined with small cracks having only just survived who knows how many years of neglect...''
''In your reflection, you see your <<listbox "$player.age" autoselect>><<optionsfrom $AGE>><</listbox>> face, framed by your <<listbox "$player.hairLength" autoselect>><<optionsfrom $HAIRLENGTH>><</listbox>> <<listbox "$player.hairColor" autoselect>><<optionsfrom $HAIRCOLOR>><</listbox>> hair.''
''You wipe some dirt off your <<listbox "$player.skinColor" autoselect>><<optionsfrom $SKINCOLOR>><</listbox>> skin, and rub your sleepy, <<listbox "$player.eyeColor" autoselect>><<optionsfrom $EYECOLOR>><</listbox>> eyes.''
''What is your name?''
<<textbox "$player.name" "Alex" "Home">>
<<btnLink "Continue" "BackgroundSelect">><<pic "bg" "shack">>\
''You sit up in bed, yawning deeply and reflecting on the events that had led you to this point...''
<<btnChoice "After my father died, I could no longer stay in the village..." "Background-Peasant" "$player.background='peasant'">>\
<<btnChoice "After my mercenary party disbanded, I attempted to live peacefully..." "Background-Soldier" "$player.background='mercenary'">>\
<<btnChoice "After being falsely accused of a crime and expelled from the academy, I sought refuge..." "Background-Scholar" "$player.background='scholar'">>\<<pic "bg" "shack">>\
<<run initStats($player.background)>>\
<<UpdateAllMeters>>\
''You think back to the days when this little shack was your whole world. The sound of your father's voice carried on the breeze as he worked the modest patch of land outside, the smell of earth clinging to his clothes when he came in for supper. Your mother, ever determined, spent her days juggling the demands of home life while chasing her dream—opening a tavern in the nearby village. Times were hard, but you were happy.''
''Then everything changed. Your father fell ill and was gone before the harvest. His absence hollowed out the heart of your small family. Struggling to keep things together, your mother sold off the farm and poured everything she had—savings, resolve, and sheer will—into bringing her dream to life. The tavern became her sanctuary, her chance at a future for both of you.''
<<Thought "Ugh, it's so early...">>\
''When the tavern finally found its rhythm, you realized it was time to leave. Life at the bar wasn't yours to live; you needed to carve out a path of your own. Yet, despite your departure, you couldn't sever the bond to your childhood home. So here you are, back in the old family shack—a place worn and weary, yet tethered to your heart. The years have not been kind to it, but neither have they erased its echoes of joy and loss.''
<<btnLink "Continue" "Home" "setFlag('CharacterCreation')">><<pic "bg" "shack">>\
<<run initStats($player.background)>>\
<<UpdateAllMeters>>\
''Your mercenary band was renowned across the northern lands, a name spoken in both awe and dread. Skilled, ruthless, and unyielding, you carved a bloody path through countless battles. But everything changed after your last mission—a routine skirmish that ended with you standing over the lifeless bodies of an innocent family, caught in the chaos. It was the moment something inside you broke. You couldn't do it anymore. The life of bloodshed and coin felt hollow, unbearable.''
''When you announced your departure, the betrayal in your comrades' eyes was searing. Loyalty meant little in a world driven by survival, and you knew turning your back on them would make you a target. So, you fled. South, as far as your legs could carry you, seeking sanctuary in the dense, sprawling forests where their reach might falter.''
<<Thought "Mmm, fuck... Where am I? Oh, right...">>\
''You groggily pulled yourself from uneasy dreams and tried to orient yourself. The air was damp, the faint smell of rot clinging to it. Before collapsing last night, you'd stumbled upon a dilapidated farmhouse, long abandoned by the looks of it. Its sagging roof barely held, and the crumbling walls offered little insulation against the night's chill. Exhausted and desperate for rest, you'd brushed off the worst of the dust from a moldy mattress in the corner and let your body give out. It wasn't much, but it had kept the rain off your head—and for now, that was enough.''
<<btnLink "Continue" "Home" "setFlag('CharacterCreation')">><<pic "bg" "shack">>\
<<run initStats($player.background)>>\
<<UpdateAllMeters>>\
''The grandeur of the academy feels like a distant memory now, like a dream you've struggled to hold onto, only to watch it slip away. You once walked its hallowed halls as a promising scholar, surrounded by the hum of machinery and the glow of alchemical contraptions. The clinking gears and hiss of steam echoed the rhythm of your life—a pursuit of knowledge and discovery. You'd worked tirelessly to prove yourself among the brightest minds, your talents promising a future as luminous as the aether lamps lining the streets of the capital.''
''Then, everything crumbled.''
''You were accused of a heinous crime: the murder of a colleague in the labs. The evidence, though scant and circumstantial, was damning enough to see you expelled in disgrace. You protested your innocence, but the academy had no interest in a trial—it was easier to discard you than to tarnish their reputation by unearthing the truth.''
''Your former peers turned their backs, and whispers of your supposed guilt followed you wherever you went. You fled, seeking solace far from the shadow of your ruined life, far from the unforgiving cities and their clattering engines of judgment.''
<<Thought "Where am I? Oh, right... this place...">>\
''Now, you find yourself in the decaying remains of a forgotten farmhouse, tucked away in the southern wilderness where the academy's reach cannot find you. The farmhouse is a ghost of its former self—timbers warped and gears of an old weather-monitoring contraption rusted beyond recognition. You found it by sheer luck, exhausted after days of running.''
''Before collapsing last night, you dusted off a grimy mattress in the corner, its springs creaking as if to complain about bearing your weight. The faint smell of oil and damp wood clings to the air. The farmhouse may be decrepit, but it offers something you've lacked for far too long: peace. If only for a while.''
<<btnLink "Continue" "Home" "setFlag('CharacterCreation')">><<nobr>>\
<span id="crafting">
<table style="width:100%">
<th style="width:20%">Recipe</th>
<th style="width:65%">Materials</th>
<th style="width:15%">Action</th>
<<for _item, _details range setup.recipes>>
<<if $knownRecipes.includes(_item)>>
<<capture _item, _details, _recipe, _inventory>>
<<if _details.inventory is "invItems">>
<<set _recipe to setup.items.get(_item)>>
<<set _inventory to $invItems>>
<<elseif _details.inventory is "invWeapons">>
<<set _recipe to setup.weapons.get(_item)>>
<<set _inventory to $invWeapons>>
<<elseif _details.inventory is "invArmor">>
<<set _recipe to setup.armor.get(_item)>>
<<set _inventory to $invArmor>>
<</if>>
<tr>
<td>_recipe.name</td>
<td>
<<for _mat, _qty range _details.materials>>
<<set _m to setup.items.get(_mat)>>
<<if $invItems.count(_mat) >= _qty>>
_m.name - [@@.gain;<<print $invItems.count(_mat)>>@@/_qty]<br>
<<else>>
_m.name - [@@.loss;<<print $invItems.count(_mat)>>@@/_qty]<br>
<</if>>
<</for>>
</td>
<td>
<<if $invItems.compare(_details.materials)>>
@@.btnUI;<<button "Craft">>
<<set $invItems.unmerge(_details.materials)>>
<<pickup _inventory _item 1>>
<<replace "#crafting">><<include "Crafting">><</replace>>
<</button>>@@
<<else>>
<<btnDisable "Craft">>
<</if>>
</td>
</tr>
<</capture>>
<</if>>
<</for>>
</table><br><br>
<<btnLink "Return" "Home">>
</span>
<</nobr>>\<span id="inventory">
<table style="width:100%">
<caption>Weapons</caption>
<th style="width:20%">Item</th>
<th style="width:5%">QTY</th>
<th style="width:60%">Description</th>
<th style="width:15%">Actions</th>
<<for _item, _amount range $invWeapons.table>>
<<capture _item>>
<<set _i to setup.weapon.get(_item)>>
<tr>
<td>_i.name</td>
<td>_amount</td>
<td>_i.desc</td>
<td>
<<if $player.weapon.name is _i.name>>
<<btnDisable "@@.gain;Equipped@@">>
<<else>>
@@.btnUI;<<button "Equip">>
<<run setup.equip("weapon",_item)>>
<<replace "#inventory">>
<<include "Equipment">>
<</replace>>
<</button>>@@
<</if>>
</td>
</tr>
<</capture>>
<</for>>
</table>
<br><br>
<table style="width:100%">
<caption>Armor</caption>
<th style="width:20%">Item</th>
<th style="width:5%">QTY</th>
<th style="width:60%">Description</th>
<th style="width:15%">Actions</th>
<<for _item, _amount range $invArmor.table>>
<<capture _item>>
<<set _i to setup.armor.get(_item)>>
<tr>
<td>_i.name</td>
<td>_amount</td>
<td>_i.desc</td>
<td>
<<if $player.armor.name is _i.name>>
<<btnDisable "@@.gain;Equipped@@">>
<<else>>
@@.btnUI;<<button "Equip">>
<<run setup.equip("armor",_item)>>
<<replace "#inventory">>
<<include "Equipment">>
<</replace>>
<</button>>@@
<</if>>
</td>
</tr>
<</capture>>
<</for>>
</table>
</span><span id="inventory">
<table style="width:100%">
<th style="width:20%">Item</th>
<th style="width:5%">QTY</th>
<th style="width:60%">Description</th>
<th style="width:15%">Actions</th>
<<for _item, _amount range $invItems.table>>
<<capture _item>>
<<set _i to setup.items.get(_item)>>
<tr>
<td>_i.name</td>
<td>_amount</td>
<td>_i.desc</td>
<td>
<<if _i.canUse>>
@@.btnUI;<<button "Use">>
<<run $invItems.use(_item)>>
<<UpdateAllMeters>>
<<replace "#inventory">>
<<include "Inventory">>
<</replace>>
<</button>>@@
<<else>>
<<btnDisable "Unusable">>
<</if>>
</td>
</tr>
<</capture>>
<</for>>
</table>
</span><<pic "bg" "shack">>\
<<run passOut()>>
''You overexerted yourself and passed out in your travels. You somehow managed to drag yourself back to your ben, though you haphazardly dropped some coins in the process.
<<switch $Home.bedLevel>>\
<<case 1>>\
''You lay down on the bed, which is little more than a pile of straw covered in a thin blanket. It's not the most comfortable bed you've ever slept in, but it's better than nothing. You close your eyes and drift off to sleep.''
<</switch>>\
<<btnLink "Continue" "Home" "restoreAll();$DisableMenu=false;$PassingOut=false">>''You have died!''