<<run UIBar.unstow()>>\
<<PlayBGM "menu">>\
\
<<SimplePic "title.png">>\
\
<<set $GameState to "menu">>\
\
<!-- prevent reload errors: needs a better solution -->\
<<set _throwaway to setup.InitForestCaves()>>\
<<set _throwaway to setup.InitDesertCaves()>>\
\
<hr>
<<set $ReturnFromMenu to passage()>>\
@@color:Gold;An Humble Pilgrimage to the Shrine of the Goddess of Primal Darkness@@
<<if $WORLD.GameVersion is "PLAYTEST">>\
<hr>\
Running <<link "version update" "Update">><</link>> is recommended for every new playtest iteration
<<elseif $WORLD.GameVersion is "24.3.18">>\
<<else>>\
<hr>
@@color:Red;Incompatible version@@:
Running <<link "version update" "Update">><</link>> is recommended
<<endif>>\
<hr>\
@@color:Gold;Character Roster@@\
<table><tr><td>\
<table><tr>\
<td>\
<<PreambleShowCharacterInterface 0>>\
</td>\
<td>\
<<PreambleShowCharacterInterface 1>>\
</td>\
<td>\
<<PreambleShowCharacterInterface 2>>\
</td>\
</tr>\
</table>\
</td>\
<td>\
<span id="CharInfo"></span>
</td>\
</tr>\
</table>\
<hr>\
@@color:Gold;World status@@
<<set $AD to setup.AD()>>\
<<if $AD.includes("file") or $AD.includes("rcdra")>>\
<<Bullet>>Highest tower level: <<if $WORLD.HTZE is 0>>Never visited<<else>><<print $WORLD.HTZE>><<endif>>
<<Bullet>>Highest forest level: <<if $WORLD.HFZE is 0>>Never visited<<else>><<print $WORLD.HFZE>><<endif>>
<<Bullet>>Highest desert level: <<if $WORLD.HDZE is 0>>Never visited<<else>><<print $WORLD.HDZE>><<endif>>
<<Bullet>>Tutorial progress: <<ShowTutorialProgress>>
<<Bullet>>Blacksmith metallurgy: <<ShowBlacksmithProgress>>
<<Bullet>>Selene progress: <<ShowSeleneProgress>>
<<Bullet>>Daphne progress: <<ShowDaphneProgress>>\
<<else>>\
@@color:Yellow;You appear to be playing Tower of Triumph on an unaffiliated website.@@
The development home and current version of Tower of Triumph may be found at <a href="https://arcdragon.com" rel="noopener noreferrer">arcdragon.com</a>.
<<endif>>\
<<unset $AD>>\
<hr>\
@@color:Gold;Controls@@
<<button "Media location">><</button>>: \
<<textbox "$ImgPath" $ImgPath>>
<<button "[Silent mode]">><<ToggleSilent>><</button>>: \
<span id="SpanToggleSilent">@@color:LightGreen;Music is ON@@</span>
\
<<link "Force generation of new Tower, Forest, and desert" "Preamble">>
<<ResetTower>>
<<set _throwaway to setup.InitForestCaves()>>\
<<set _throwaway to setup.InitDesertCaves()>>\
<<for _R to 0; _R < 3; _R++>>\
<<if $PC[_R][$PCstate] is "dead">>\
<<set $PC[_R][$PCstate] to "lost">>\
<<endif>>\
<</for>>\
<</link>> - Reset location maps, but you'll keep characters and story/quest progress
<<link "Reset world data" "Preamble">>
<<ResetWorld>>
<</link>> - This will reset all story quests and game progress, but you'll keep your characters
<<link "Clear the graveyard" "Preamble">>
<<ResetGraveyard>>
<</link>> - Erase the history of your ancestors, but retain reincarnation bonuses and achievements
<<link "Force version update check" "Update">><</link>> - If you have savefile problems this might fix them. Backup your save first.
<hr>\
@@color:Gold;Clean start@@
<<link "Unconditional full reset">>
<<AutoSaveLoad "wipe">>
<<script>>Engine.restart()<</script>>\
<</link>> - This will reset the world, remove all achievements, and delete your characters. //Cannot be undone//
<<set $DebugMode to false>>
<<if $DebugMode is true>>\
<hr>
<<link "Enable Debug Mode">>
<<set $DebugMode to true>>
<</link>>
<<endif>>\
\
\
\
\
\
<!-- web load hack meh -->\
<<set _tempname to "S64Map-E">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-ES">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-ESW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-EW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-N">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-NE">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-NES">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-NESW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-NEW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-NS">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-NSW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-NW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-S">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-SW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Map-W">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64StairsUpLeft">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64StairsUpRight">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64StairsDown">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64FloorCobble">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64FloorWhite">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64FloorBrick">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Grass1">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Grass2">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Grass3">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-TreeTrunk">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree1">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree2">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree3">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree4">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree5">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
<<script>>
/* Load Google Analytics library asynchronously */
var script = document.createElement('script');
script.async = true;
script.src = 'https://www.googletagmanager.com/gtag/js?id=G-2D28GQ85TE';
document.head.appendChild(script);
/* Configure Google Analytics after the library is loaded */
script.onload = function () {
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-2D28GQ85TE');
};
<</script>>
<<set $ImgPath to "./media/">>
<<set $AvatarPath to "./media/avatars/">>/
<<set _musicpath to "./media/">>
<<set $D to setup.AD()>>\
<<if $D.includes("C:/Users/lordb")>>\
<<set $ImgPath to "C:/Users/lordb/Desktop/twine/TransformationDungeon/media/">>
<<set _musicpath to "C:/Users/lordb/Desktop/twine/TransformationDungeon/media/">>
<<set $AvatarPath to "C:/Users/lordb/Desktop/twine/TransformationDungeon/media/avatars/">>
<<endif>>\
<<unset $D>>\
<<set _FavIcon to $ImgPath + "RinaAvatar.png">>
<link rel="shortcut icon" href="C:/Users/lordb/Desktop/twine/TransformationDungeon/media/RinaAvatar.png">
<<set $NoDoubleKeypress to 0>>
<<set $DialogOpen to false>>
<<set $PC to []>>
<<set $PC[0] to []>>
<<set $PC[1] to []>>
<<set $PC[2] to []>>
<<set $CC to 0>>
<<set $PCstate to 0>>
<<set $PCname to 1>>
<<set $PCsex to 2>>
<<set $PCgen to 3>>
<<set $PCcoins to 4>>
<<set $PChpcur to 5>>
<<set $PChpmax to 6>>
<<set $PCstr to 7>>
<<set $PCdex to 8>>
<<set $PCcon to 9>>
<<set $PCint to 10>>
<<set $PCwil to 11>>
<<set $PCx to 12>>
<<set $PCy to 13>>
<<set $PCz to 14>>
<<set $PCxp to 15>>
<<set $PClevel to 16>>
<<set $PCclass to 17>>
<<set $PCptrAVAILABLE to 18>>
<<set $PCinven to 19>>
<<set $PCmorph to 20>>
<<set $PCbp to 21>>
<<set $PCac to 22>>
<<set $PCabsorb to 23>>
<<set $PCtohit to 24>>
<<set $PCperks to 25>>
<<set $PChornycur to 26>>
<<set $PChornymax to 27>>
<<set $PChunger to 28>>
<<set $PCsexACTS to 29>>
<<set $PCmisc to 30>>
<<set $PCspellbook to 31>>
<<set $PClocation to 32>>
<<set $PCavatar to 33>>
<<set $PCunspentPoints to 34>>
<<set $PCpregnant to 35>>
<<set $PCfx to 36>>
<<set $PCfy to 37>>
<<set $PCfz to 38>>
<<set $PCmanacur to 39>>
<<set $PCmanamax to 40>>
<<set $PChtze to 41>>
<<set $PChfze to 42>>
<<set $PCkills to 43>>
<<set $PCchurchstate to 44>>
<<set $PCancestor to 45>>
<<set $PCancestraldeath to 46>>
<<set $PCretirementcap to 47>>
<<set $PCicon to 48>>
<<set $PCSeleneChat to 49>>
<<set $PCmorphQTY to 50>>
<<set $PCmorphBONI to 51>>
<<set $PCGerardChat to 52>>
<<set $PCeffects to 53>>
<<set $PCSmithDemonChat to 54>>
<<set $PCSkittersChat to 55>>
<<set $PCBoltmanChat to 56>>
<<set $PCDaphneChat to 57>>
<<set $PCdx to 58>>\
<<set $PCdy to 59>>\
<<set $PCdz to 60>>\
<<set $PChdze to 61>>
<<set $PCFlirtFromEquip to 62>>
<<set $PCparty to 63>>
<<set $PCAzaxChat to 64>>\
<<set $BPhead to 100>>
<<set $BPneck to 101>>
<<set $BPback to 102>>
<<set $BPchest to 103>>
<<set $BPwield to 104>>
<<set $BPhands to 105>>
<<set $BPring to 106>>
<<set $BPwaist to 107>>
<<set $BPlegs to 108>>
<<set $BPfeet to 109>>
<<set $BPtail to 110>>
<<set $BPhorns to 111>>
<<set $BPwings to 112>>
<<set $BPpenis to 113>>
<<set $BPboobs to 114>>
<<set $BPpussy to 115>>
<<set $BPtentacle to 116>>
<<set $BPstinger to 117>>
<<set $BPpincer to 118>>
<<set $PC[0][$PCstate] to "none">>\
<<set $PC[1][$PCstate] to "none">>
<<set $PC[2][$PCstate] to "none">>
<<InitPC 0>>
<<set $ItemPoke to {}>>
<<set $MiscPoke to 0>>
<<set $RETIREES to []>>
<<for _i to 0; _i < 10; _i++>>
<<set $RETIREES[_i] to { name: "none", gen: 0, level: 0, class: "none", gold: 0, maxforest: 0, maxtower: 0, year: 0, day: 0, won: 0, death: "" }>>
<</for>>\
<<ResetWorld>>
<<set $GameState to "menu">>
<<set $RoomPTR to "none">>
<<set $AllowNav to true>>
<<set $ReturnFromMenu to "Preamble">>
<<set $DisableMenu to false>>
<<set $ForestMap to []>>\
<<set $DesertMap to []>>\
<<set $Dungeon to []>>
<<set _HighestAchievementPTR to 78>>\
<<set $Achievements to []>>\
<<for _ACH to 0; _ACH <= _HighestAchievementPTR; _ACH++>>\
<<set $Achievements[_ACH] to 0>>\
<</for>>\
-----------------
<<set $GameLog to "">>
<<set $ComLog to []>>
<<for _i to 0; _i < 16; _i++>>
<<set $ComLog[_i] to "">>
<</for>>\
-----------------
<<set $ForceMon to ["random","random", 0]>>
<<set $Mon to {}>>
<<set $RCHelper to "">>
<<set $LogKills to 0>>
<<set $poisoned to 0>>
<<if recall('EXISTS') is true>>\
<<AutoSaveLoad "get">>
<<else>>\
<!-- first play, nothing to get -->
<<endif>>\
*************
*** Music ***
*************
<<set $SoundVolLoadOrderHack to 0>>
<<set _a to _musicpath + "menu.mp3">>
<<set _b to _musicpath + "town.mp3">>
<<set _c to _musicpath + "explore.mp3">>
<<set _d to _musicpath + "combat.mp3">>
<<set _e to _musicpath + "boss.mp3">>
<<set _f to _musicpath + "desert.mp3">>
<<cacheaudio "menu_bgm" _a>>
<<cacheaudio "town_bgm" _b>>
<<cacheaudio "explore_bgm" _c>>
<<cacheaudio "combat_bgm" _d>>
<<cacheaudio "boss_bgm" _e>>
<<cacheaudio "desert_bgm" _f>>
<<createaudiogroup ":ui">>
<<track "menu_bgm">>
<<track "town_bgm">>
<<track "explore_bgm">>
<<track "combat_bgm">>
<<track "boss_bgm">>
<<track "desert_bgm">>
<</createaudiogroup>>
*****************
*** End Music ***
*****************<<set _throwaway to setup.HideElement("menu-item-saves")>>\
<<set _throwaway to setup.HideElement("menu-item-settings")>>\
\
<<if $GameState is "menu">>\
<!-- MENU STATE -->\
@@color:Gold;Tower of Triumph@@
Version <<print $WORLD.GameVersion>>
\
\
<!-- used by character generation -->\
<span id="CapAvatar">\
<<if passage() is "CharGen">>\
<<set _CGPlaceAv to $AvatarPath + $PC[$CC][$PCavatar][0] + $PC[$CC][$PCavatar][1] +".jpg">>\
<img id="CaptionPortraitIMG" @src="_CGPlaceAv" style="width:200px">\
<<endif>>\
</span>\
\
\
\
<hr>\
<a href="https://subscribestar.adult/arcdragon" target="_blank" rel="noopener noreferrer">SubscribeStar</a>
<a href="https://arcdragon.com" target="_blank" rel="noopener noreferrer">arcdragon.com</a>
<a href="https://arcdragon.com/forum" target="_blank" rel="noopener noreferrer">Discussion Forums</a>
<a href="https://arcdragon.com/toweroftriumph/versions/" target="_blank" rel="noopener noreferrer">Download prior versions</a>
<a href="https://arcdragon.com/forum/viewtopic.php?t=4546" target="_blank" rel="noopener noreferrer">Discussion for this update</a>
@@color:Yellow;Join us on @@ <a href="https://discord.gg/AvbCAFKfzY" target="_blank" rel="noopener noreferrer">Discord</a>
<hr>\
<<link "Change Log">>
<<script>>
Dialog.setup("Change Log");
Dialog.wiki(Story.get("ChangeLog").processText());
Dialog.open();
<</script>>
<</link>>
<hr>\
<<link "Save to Disk">>\
<<set _throwaway to setup.ExportSave()>>
<</link>>
<<link "Load From Disk">>
<<script>>
jQuery(document.createElement('input'))
.prop('type', 'file')
.on('change', Save.import)
.trigger('click');
<</script>>
<</link>>
<hr>\
\
<<elseif ($GameState is "dungeon") or ($GameState is "forest") or ($GameState is "desert") or ($GameState is "combat") or ($GameState is "main")>>\
@@color:Gold;Tower of Triumph@@
<<set _throwaway to setup.ShowElement("menu-item-restart")>>\
<!-- ADVENTURE STATE -->\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<if $PC[$CC][$PCavatar][0] is "external">>\
<<set _p to $PC[$CC][$PCavatar][1]>>\
<<else>>\
<<set _p to $AvatarPath + $PC[$CC][$PCavatar][0] + $PC[$CC][$PCavatar][1] +".jpg">>\
<<endif>>\
<span id="CapAvatar"><img id="CaptionPortraitIMG" @src="_p" style="width:200px"></span>
@@color:Green;<<print $PC[$CC][$PCname]>>@@
<span id="CapSexMorph"><<ShowSexMorph>></span>\
<hr>\
\
\
\
@@color:LightGreen;Health@@: <span id ="caphealth"><<print $PC[$CC][$PChpcur]>>/<<print $PC[$CC][$PChpmax]>></span>
<div id="hpbarbkg" class="hzbarbkg"><div id="hpbar" class="hzbar"></div></div>\
<<script>>$(document).one(':passagerender', function (ev) {
Health2(100, 100, "hpbar", true, ev.content);});<</script>>\
<<run Health2($PC[$CC][$PChpcur], $PC[$CC][$PChpmax], "hpbar", true)>>\
\
@@color:LightGreen;Mana@@: <span id ="capmana"><<print $PC[$CC][$PCmanacur]>>/<<print $PC[$CC][$PCmanamax]>></span>
<div id="manabarbkg" class="hzbarbkg"><div id="manabar" class="hzbar"></div></div>\
<<script>>$(document).one(':passagerender', function (ev) {
Health2(100, 100, "manabar", true, ev.content);});<</script>>\
<<run Health2($PC[$CC][$PCmanacur], $PC[$CC][$PCmanamax], "manabar", true)>>\
\
@@color:LightGreen;Arousal@@: <span id ="caphorny"><<print $PC[$CC][$PChornycur]>>/<<print $PC[$CC][$PChornymax]>></span>
<div id="hornybarbkg" class="hzbarbkg"><div id="hornybar" class="hzbar"></div></div>\
<<script>>$(document).one(':passagerender', function (ev) {
Health2(100, 100, "hornybar", true, ev.content);});<</script>>\
<<run Health2($PC[$CC][$PChornycur], $PC[$CC][$PChornymax], "hornybar", true)>>\
\
<span id="capstaminatext"><<if $PC[$CC][$PChunger] < 2>>@@color:Red;EXHAUSTED
<<elseif $PC[$CC][$PChunger] < 100>>@@color:Yellow;Tired
<<else>>@@color:LightGreen;Stamina@@
<<endif>></span>\
<div id="hungerbarbkg" class="hzbarbkg"><div id="hungerbar" class="hzbar"></div></div>\
<<script>>$(document).one(':passagerender', function (ev) {
Health2(100, 100, "hungerbar", true, ev.content);});<</script>>\
<<run Health2($PC[$CC][$PChunger], 500, "hungerbar", true)>>\
\
<span id="capparty"><<PrintParty>></span>\
\
@@color:LightGreen;Coins@@: <span id="capcoins"><<print $PC[$CC][$PCcoins]>></span>
<span id="capinvwarning"></span>
<span id="time"><<ShowTime>></span>
<span id="capdebuginfo"></span>\
<<link "Stats">>
<<script>>
Dialog.setup("Character statistics");
Dialog.wiki(Story.get("ViewStats").processText());
Dialog.open();
<</script>>
<</link>>
<<link "Inventory">>
<<script>>
Dialog.setup("Inventory");
Dialog.wiki(Story.get("Inventory").processText());
Dialog.open();
<</script>>
<</link>>
<<link "Examine self">>
<<script>>
Dialog.setup("Body");
Dialog.wiki(Story.get("Body").processText());
Dialog.open();
<</script>>
<</link>>
<<link "Spellbook">>
<<script>>
Dialog.setup("Spellbook");
Dialog.wiki(Story.get("Spellbook").processText());
Dialog.open();
<</script>>
<</link>>
<<else>>\
caption state???
<<endif>>\
\
<!-- ALWAYS SHOW -->\
<<link "Unlockables">>
<<script>>
Dialog.setup("Unlockables");
Dialog.wiki(Story.get("Unlocks").processText());
Dialog.open();
<</script>>
<</link>>
<<link "Help">>
<<script>>
Dialog.setup("Help");
Dialog.wiki(Story.get("Help").processText());
Dialog.open();
<</script>>
<</link>>
<<if $WORLD.GameVersion is "PLAYTEST">>\
<<link "PLAYTEST info">>
<<set $DisableMenu to true>>\
<<script>>
Dialog.setup("Playtest info");
Dialog.wiki(Story.get("Playtest").processText());
Dialog.open();
<</script>>
<</link>>\
<hr>\
<<endif>>\
\
<span id="capeffects"></span>\
<<set _Pass to passage()>>\
<<if ($GameState is "combat")>>\
Cannot save during combat
<hr>\
<<elseif (_Pass is "Intro") or (_Pass is "Preamble") or (_Pass is "CharGen")>>\
<<else>>\
<<link "Save and exit to menu" "Preamble">><<AutoSaveLoad "set">><</link>>
<hr>\
<<endif>>\
<<if $WORLD.MusicEnabled is true>>\
Volume: <<volume>>\
<<endif>>\
\
<<if $DebugMode is true>>\
<!-- DEBUG ONLY -->\
<hr>\
<<link "View Error Log">>
<<script>>
Dialog.setup("Error log");
Dialog.wiki(Story.get("ViewLog").processText());
Dialog.open();
<</script>>
<</link>>
<<link "Toggle Debug">>
<<if $DebugMode is false>>
<<set $DebugMode to true>>
<<else>>
<<set $DebugMode to false>>
<<endif>>\
<<replace "#capdebugmode">>$DebugMode<</replace>>
<</link>>
<span id="capdebugmode"></span>
<<link "Map Dungeon">>
<<for _ii to 0; _ii < $WORLD.DunDimX; _ii++>>\
<<for _jj to 0; _jj < $WORLD.DunDimY; _jj++>>\
<<set $Dungeon[$PC[$CC][$PCz]][_ii][_jj][15] to 1>>\
<</for>>\
<</for>>\
<<set _throwaway to setup.DrawMap64(_px, _py, _pz, 64, $PC[$CC][$PClocation])>>\
<</link>>
<<link "Gain Levels">>
<<set $PC[$CC][$PClevel] to 6>>
<<set $PC[$CC][$PCxp] to 6000>>
<</link>>
<<link "Gain 10 XP">>
<<set $PC[$CC][$PCxp] to $PC[$CC][$PCxp] +10>>
<</link>>
<<link "Wizard">>\
<<set $PC[$CC][$PCstr] to 16>>
<<set $PC[$CC][$PCcon] to 100>>
<<set $PC[$CC][$PCcoins] to 100000>>
<<set $PC[$CC][$PChpcur] to 500>>
<<set $PC[$CC][$PChpmax] to 500>>
<<set $PC[$CC][$PCmanacur] to 1000>>
<<set $PC[$CC][$PCmanamax] to 1000>>
<<set $PC[$CC][$PChunger] to 500>>
<<ShowHealth>>
<</link>>
<<link "Learn all spells">>
<<set $PC[$CC][$PCspellbook].any to true>>\
<<set $PC[$CC][$PCspellbook].firebolt to 1>>\
<<set $PC[$CC][$PCspellbook].armor to 1>>\
<<set $PC[$CC][$PCspellbook].heal to 1>>\
<<set $PC[$CC][$PCspellbook].poison to 1>>\
<<set $PC[$CC][$PCspellbook].up to 1>>\
<<set $PC[$CC][$PCspellbook].down to 1>>\
<<set $PC[$CC][$PCspellbook].portal to 1>>\
<<set $PC[$CC][$PCspellbook].light to 1>>\
<<set $PC[$CC][$PCspellbook].map to 1>>\
<<set $PC[$CC][$PCspellbook].soultrap to 1>>\
<<set $PC[$CC][$PCspellbook].dart to 1>>\
<<set $PC[$CC][$PCspellbook].q to "firebolt">>\
<<set $PC[$CC][$PCspellbook].w to "heal">>\
<<set$PC[$CC][$PCspellbook].e to "poison">>\
<</link>>
<<link "Restock stores">>
<<Restock "all">>\
<</link>>
<<link "Transform">>\
<<set $PC[$CC][$PCbp][10].morph to "horse">>\
<<set $PC[$CC][$PCbp][10].attacktype to "blunt">>\
<<set $PC[$CC][$PCbp][10].attackdesc to "kick">>\
<<set $PC[$CC][$PCbp][10].mindam to 1>>\
<<set $PC[$CC][$PCbp][10].maxdam to 6>>\
<<set $PC[$CC][$PCbp][4].morph to "cat">>\
<<set $PC[$CC][$PCbp][4].attacktype to "cut">>\
<<set $PC[$CC][$PCbp][4].attackdesc to "claw">>\
<<set $PC[$CC][$PCbp][4].mindam to 1>>\
<<set $PC[$CC][$PCbp][4].maxdam to 6>>\
<<set $PC[$CC][$PCbp][0].morph to "spider">>\
<<set $PC[$CC][$PCbp][0].attacktype to "poison bite">>\
<<set $PC[$CC][$PCbp][0].attackdesc to "bite">>\
<<set $PC[$CC][$PCbp][0].mindam to 1>>\
<<set $PC[$CC][$PCbp][0].maxdam to 1>>\
<</link>>
<<link "AddBodyPart">>\
<<set _foo to setup.AddBodyPart($CC, $BPchest)>>
<</link>>
<<link "Advance pregnancy">>\
<<set $PC[$CC][$PCpregnant][2] to 0>>\
<<set $PC[$CC][$PCpregnant][3] to 0>>\
<</link>>
<<link "Tails">>\
<<set _Anatomy to []>>\
<<set _Anatomy[0] to { type: $BPtail, morph: "cat" }>>\
<<set _Anatomy[1] to { type: $BPtail, morph: "cat" }>>\
<<DoTransform _Anatomy>>
<</link>>
<<link "Gain Axe n Pick">>
<<set _ads to setup.GiveItem($CC, [220,107,0,0,0])>><!-- hatchet -->
<<set _ads to setup.GiveItem($CC, [115,160,3,0,0])>><!-- lockpicks -->
<</link>>
<<endif>>
<<if $GameState neq "menu">>\
<<link "I'm stuck!">>
<<set $DisableMenu to true>>\
<<set $Glinda to 0>>
<<script>>
Dialog.setup("Rescue");
Dialog.wiki(Story.get("Rescue").processText());
Dialog.open();
<</script>>
<</link>>\
<<StandardKeyboardShortcuts>>\
<<endif>>\
<span id="CapDebugInfo"></span>\
\
\
\
<<set _IPpic to $ImgPath + "IconPalette.png">>\
<img id="CapIconTilemap" height="1" style="visibility: hidden;" img @src="_IPpic"/>\<<InitPC $CC>>\
<<set _availperks to 1>>\
<<set $PC[$CC][$PCunspentPoints] to $PC[$CC][$PCretirementcap]>>\
<<if setup.AchievementHandler("Jack of All Stats", "HAS?", -1)>>\
<<set $PC[$CC][$PCunspentPoints] to $PC[$CC][$PCunspentPoints] + 1>>\
<<endif>>\
<<set _MaxSpread to 8>>\
<<if setup.AchievementHandler("Guildmaster", "HAS?", -1)>>\
<<set _MaxSpread to _MaxSpread +1>>\
<<endif>>\
<<if setup.AchievementHandler("Gamemaster", "HAS?", -1)>>\
<<set _MaxSpread to _MaxSpread +1>>\
<<endif>>\
<<if setup.AchievementHandler("Potionmaster", "HAS?", -1)>>\
<<set _MaxSpread to _MaxSpread +1>>\
<<endif>>\
<<if setup.AchievementHandler("Metal master", "HAS?", -1)>>\
<<set _MaxSpread to _MaxSpread +1>>\
<<endif>>\
\
<<set $PC[$CC][$PCsex] to either("male","female")>>\
<<set $PC[$CC][$PCsex] to "female">>\
<<set $PC[$CC][$PCname] to setup.GenName($PC[$CC][$PCsex])>>\
\
<<set $PC[$CC][$PCicon] to []>>\
<<set $PC[$CC][$PCicon][0] to [0,0]>>\
<<set $PC[$CC][$PCicon][1] to [0,0]>>\
<<set $PC[$CC][$PCicon][2] to [0,0]>>\
<<set $PC[$CC][$PCicon][3] to [0,0]>>\
<<set $PC[$CC][$PCicon][4] to "">>\
<<set _CGav to random(100, 111)>>\
<<if $PC[$CC][$PCsex] is "male">>\
<<set $PC[$CC][$PCavatar] to ["HumanM", _CGav]>>\
<<else>>\
<<set $PC[$CC][$PCavatar] to ["HumanF", _CGav]>>\
<<endif>>\
<<AssignIconByAvatar $PC[$CC][$PCavatar][0] $PC[$CC][$PCavatar][1]>>\
\
<<set _statnames to ["Strength","Dexterity","Toughness","Intellect","Willpower"]>>\
@@color:LightGreen;Name:@@ <<textbox "$PC[$CC][$PCname]" $PC[$CC][$PCname]>> <<button "[Random]">>\
<<set $PC[$CC][$PCname] to setup.GenName($PC[$CC][$PCsex])>>\
<<set _throwaway to setup.updatenametextbox()>>\
<</button>> | \
\
<<set _AllowHerm to false>>\
<<if setup.AchievementHandler("Playing both sides", "HAS?", -1) > 0>>\
<<set _AllowHerm to true>>\
<<endif>>\
\
@@color:LightGreen;Sex:@@ <span id ="sex"><<print $PC[$CC][$PCsex].toUpperFirst()>></span> \
<<button "[Male]">>\
<<replace "#sex">>Male<</replace>>\
<<set $PC[$CC][$PCsex] to "male">>\
<</button>> \
<<button "[Female]">>\
<<replace "#sex">>Female<</replace>>\
<<set $PC[$CC][$PCsex] to "female">>\
<</button>> \
<<if _AllowHerm is true>>\
<<button "[Hermaphrodite]">>\
<<replace "#sex">>Hermaphrodite<</replace>>\
<<set $PC[$CC][$PCsex] to "hermaphrodite">>\
<</button>>\
<<endif>> | @@color:LightGreen;Generation:@@ <<print $PC[$CC][$PCgen]>>\
\
<hr>\
@@color:Yellow;Avatars@@
<<set _CGPlaceAv to $AvatarPath + $PC[$CC][$PCavatar][0] + $PC[$CC][$PCavatar][1] +".jpg">>\
<<replace "#CapAvatar">><img @src="_CGPlaceAv" style="width:200px"><</replace>>\
<table>\
<tr>\
<td>\
<<button "Random">>
<<set _AIBCa to "HumanF">>\
<<set _AIBCb to random(100, 111)>>\
<<if $PC[$CC][$PCsex] is "male">>\
<<set _AIBCa to "HumanM">>\
<<endif>>\
<<AssignIconByAvatar _AIBCa _AIBCb "draw">>\
<</button>>
<<button "Customize">>
<<script>>
Dialog.setup("Avatar designer");
Dialog.wiki(Story.get("Designer").processText());
Dialog.open();
<</script>>
<</button>>
</td>\
<td> </td>
<td>\
<span id="CGenIcon">\
<canvas id="CharGenIconCanvas" width="64" height="64" style="border:0px solid #d3d3d3;">
Your browser does not support the HTML canvas tag.
</canvas>
</span>
</td>\
</tr>\
</table>\
<hr>\
\
@@color:Yellow;Attribute points available@@: <span id="avail"><<print $PC[$CC][$PCunspentPoints]>></span>, @@color:Yellow;Maximum spread:@@ _MaxSpread
<<if $PC[$CC][$PCgen] is 1>>(Tip: You can subtract points to spend them elsewhere!)<br><<endif>>\
<<for _i to 7; _i < 12; _i++>>\
<<capture _i>>\
<<button "[-]">>\
<<set _StatBlock to [$PC[$CC][$PCstr], $PC[$CC][$PCdex], $PC[$CC][$PCcon], $PC[$CC][$PCint], $PC[$CC][$PCwil]]>>\
<<set _lowest to setup.LowestIn(_StatBlock)>>\
<<set _highest to setup.HighestIn(_StatBlock)>>\
<<set _MinAllow to _highest - _MaxSpread>>\
<<set _MaxAllow to _lowest + _MaxSpread>>\
<<if _MinAllow < 1>>\
<<set _MinAllow to 1>>\
<<endif>>\
\
<<set _bar to "#" + "stat_" + _i>>\
<<if ($PC[$CC][_i] > _MinAllow)>>\
<<set $PC[$CC][$PCunspentPoints] to $PC[$CC][$PCunspentPoints] + 1>>\
<<set $PC[$CC][_i] to $PC[$CC][_i] - 1>>\
<<endif>>\
<<replace "#avail">>\
<<print $PC[$CC][$PCunspentPoints]>>\
<</replace>>\
<<replace _bar>>\
<<print $PC[$CC][_i]>>\
<</replace>>\
<<set _descstat to "#descstat" + _i>>\
<<replace _descstat>>\
<<DescribeStat _i>>\
<</replace>>\
<</button>> \
<<button "[+]">>\
<<set _StatBlock to [$PC[$CC][$PCstr], $PC[$CC][$PCdex], $PC[$CC][$PCcon], $PC[$CC][$PCint], $PC[$CC][$PCwil]]>>\
<<set _lowest to setup.LowestIn(_StatBlock)>>\
<<set _highest to setup.HighestIn(_StatBlock)>>\
<<set _MinAllow to _highest - _MaxSpread>>\
<<set _MaxAllow to _lowest + _MaxSpread>>\
\
<<set _bar to "#" + "stat_" + _i>>\
<<if ($PC[$CC][$PCunspentPoints] > 0) and ($PC[$CC][_i] < _MaxAllow)>>\
<<set $PC[$CC][$PCunspentPoints] to $PC[$CC][$PCunspentPoints] - 1>>\
<<set $PC[$CC][_i] to $PC[$CC][_i] + 1>>\
<<endif>>\
<<replace "#avail">>\
<<print $PC[$CC][$PCunspentPoints]>>\
<</replace>>\
<<replace _bar>>\
<<print $PC[$CC][_i]>>\
<</replace>>\
<<set _descstat to "#descstat" + _i>>\
<<replace _descstat>>\
<<DescribeStat _i>>\
<</replace>>\
<</button>> \
<<set _foo to "stat_" + _i>>\
<span @id =_foo><<print $PC[$CC][_i]>></span> | \
<<print _statnames[_i -7]>> \
<<set _descstat to "descstat" + _i>>\
(<span @id="_descstat"><<DescribeStat _i>></span>)\
<</capture>>\
<br>\
<</for>>\
<hr>
<<set $PC[$CC][$PCclass] to 0>>\
\
<<set _classes to []>>\
<<set _classes[0] to {allow: true, name: "Peasant",show: "An unremarkable nobody from the lower class, with no particular skills or abilities. Starts with a pitchfork and ambition.",hint: "",spoil: "You start as this"}>>\
<<set _classes[1] to {allow: false, name: "Lumberjack",show: "Good with an axe, which conveniently they start with.",hint: "",spoil: "Complete a construction project"}>>\
<<set _classes[2] to {allow: false, name: "Prostitute",show: "Good at seduction. Starts with stripper gear.",hint: "",spoil: "Win 5 victories by flirting"}>>\
<<set _classes[3] to {allow: false, name: "Warrior",show: "To-hit bonuses with weapons. Starts with a weapon, armor, and shield.",hint: "",spoil: "Hit for 20+ damage with a weapon"}>>\
<<set _classes[4] to {allow: false, name: "Scholar",show: "Levels quickly.",hint: "",spoil: "Learn any spell"}>>\
<<set _classes[5] to {allow: false, name: "Priest",show: "Extra healing. Holy symbols are twice as effective. Starts with a holy symbol and Heal.",hint: "",spoil: "Accumulate 100 total spell healing"}>>\
<<set _classes[6] to {allow: false, name: "Rogue",show: "Talented against locks and traps, and can evade special attacks.",hint: "",spoil: "Succesfully avoid 3 traps in one life."}>>\
<<set _classes[7] to {allow: false, name: "Mage",show: "Lots of mana. Starts with magic dart.",hint: "",spoil: "Know every spell at once"}>>\
<<set _classes[8] to {allow: false, name: "Barbarian",show: "Bonuses to unarmed combat, plus damage absorbtion.",hint: "",spoil: "Defeat a tower monster while naked"}>>\
<<set _classes[9] to {allow: false, name: "Monk",show: "Dodges attacks when unarmored.",hint: "",spoil: "Defeat a tower monster with empty hands"}>>\
<<set _classes[10] to {allow: false, name: "Ninja",show: "Chance to critical strike with weapons. Starts with ninja uniform and sword.",hint: "",spoil: "One-shot a tower monster with a physical attack before it can act"}>>\
<<set _classes[11] to {allow: false, name: "Paladin",show: "Immune to transformation. Starts with heal, light, holy symbol, weapon, armor, and shield. ",hint: "",spoil: "Reach level 7 while still a virgin, having previously reached level 7 as both warrior and priest."}>>\
<<set _classes[12] to {allow: false, name: "Guardian",show: "Very durable. Starts with heavy armor",hint: "",spoil: "Reach 200 maximum health"}>>\
\
<!-- assemble list of all? perks -->\
<<set _CharGenPerkList to []>>\
<<set _AllowThatPerk to []>>\
<<set _AllowThatPerk[0] to true>>\
<<set _PerksSelectedDuringGen to []>>\
<<set _CharGenPerkList[0] to
{
name: "Starter",
does: "Start with some slightly better gear",
type: "perk",
show: "y",
hint: "You start with this",
clue: "You start with this",
spoil: "You start with this",
id: 0
}>>\
<<set _ArrayPos to 1>>\
\
<<set _MOO to setup.AchievementHandler(-1, "FETCH ALL DATA", -1)>>\
<<for _i to 0; _i < _MOO.length; _i++>>\
<<if _MOO[_i].type is "class">>\
<<for _j to 1; _j < _classes.length; _j++>>\
<<if _classes[_j].name is _MOO[_i].name>>\
<<if $Achievements[_i] > 0>>\
<<set _classes[_j].allow to true>>\
<<endif>>\
<<endif>>\
<</for>>\
<<elseif _MOO[_i].type is "perkpoints">>\
<<if $Achievements[_i] > 0>>\
<<set _availperks to _availperks +1>>\
<<endif>>\
<<elseif _MOO[_i].type is "perk">>\
<<set _CharGenPerkList[_ArrayPos] to _MOO[_i]>>\
<<if $Achievements[_i] is 1>>\
<<set _AllowThatPerk[_ArrayPos] to true>>\
<<else>>\
<<set _AllowThatPerk[_ArrayPos] to false>>\
<<endif>>\
<<set _PerksSelectedDuringGen[_ArrayPos] to false>>\
<<set _ArrayPos to _ArrayPos +1>>\
<<endif>>\
<</for>>\
\
<<button "[Class info]">>\
<<script>>
Dialog.setup("Class info");
Dialog.wiki('<<ShowHelpClasses>>');
Dialog.open();
<</script>>
<</button>> @@color:Gold;Character class@@: <span id="charclass">None</span>
<span id="classdesc">You are an unremarkable nobody from the lower class, with no particular learned skills or abilities.</span>
<<for _i to 0; _i < _classes.length; _i++>>\
<<if _classes[_i].allow is true>>\
<<capture _i>>\
<<set _btext to "[" + _classes[_i].name + "]">>\
<<set _spanid to "class" + _i>>\
<span @id="_spanid">\
<<button _btext>>
<<set _UnmarkThisButton to "class" + $PC[$CC][$PCclass]>>
<<set _asd to setup.ChangeButtonClass(_UnmarkThisButton,"blueb")>>
<<set $PC[$CC][$PCclass] to _i>>\
<<set _BlueThisButton to "class" + $PC[$CC][$PCclass]>>
<<set _asd to setup.ChangeButtonClass(_BlueThisButton,"highlightb")>>
<<replace "#charclass">><<print _classes[_i].name>><</replace>>\
<<replace "#classdesc">><<print _classes[_i].show>><</replace>>\
<<replace "#hint">>@@color:LightGreen;Unlocked by:@@ <<print _classes[_i].spoil>><</replace>>\
<</button>> \
</span>\
<</capture>>\
<<else>>\
<<if (_classes[_i].name is "Paladin") or (_classes[_i].name is "Ninja")>>\
<<else>>\
<<capture _i>>\
<<set _btext to "[" + _classes[_i].name + "]">>\
<<set _spanid to "class" + _i>>\
<span class="grayb" @id="_bspanid">\
<<button "_btext">>
<<replace "#hint">>@@color:LightGreen;To unlock:@@ <<print _classes[_i].spoil>><</replace>>\
<</button>> \
</span>\
<</capture>>\
<<endif>>\
<<endif>>\
<</for>>
<span id ="hint"><br></span>\
\
<hr>\
\
@@color:Yellow;Perks@@: <span id="availperks">_availperks</span>
<span id="perkdesc"><br></span>\
<!-- display perk list from above-->\
<<for _i to 0; _i < _CharGenPerkList.length; _i++>>\
<<if (_AllowThatPerk[_i] is true) and (_CharGenPerkList[_i].show is "y")>>\
<<capture _i>>\
\
<<if _CharGenPerkList[_i].name is "Explorer">>\
<<set _CharGenPerkList[_i].does to "Start with the light spell, if you're a class capable of casting it">>\
<<endif>>\
\
<<set _btext to "[" + _CharGenPerkList[_i].name + "]">>\
<<set _spanid to "perk" + _i>>\
<span @id="_spanid">\
<<button _btext>>
<<set _bID to "perk" + _i>>\
<<if _PerksSelectedDuringGen[_i] is true>>
<<set _PerksSelectedDuringGen[_i] to false>>\
<<set _availperks to _availperks +1>>\
<<replace "#perkdesc">><br><</replace>>\
<<replace "#perkhint">><br><</replace>>\
<<set _asd to setup.ChangeButtonClass(_bID, "blueb")>>\
<<elseif _availperks < 1>>
<<replace "#perkhint">>You don't have any perk points left<</replace>>\
<<else>>
<<set _PerksSelectedDuringGen[_i] to true>>\
<<set _availperks to _availperks -1>>
<<replace "#perkdesc">><<print _CharGenPerkList[_i].does>><br><</replace>>\
<<replace "#perkhint">>@@color:LightGreen;Unlocked by:@@ <<print _CharGenPerkList[_i].spoil>><</replace>>\
<<set _asd to setup.ChangeButtonClass(_bID, "highlightb")>>
<<endif>>
<<replace "#availperks">>_availperks<</replace>>\
<</button>> \
</span>\
<</capture>>\
<<else>>\
<<if _CharGenPerkList[_i].show is "y">>\
<<capture _i>>\
<span class="grayb">\
<<set _btext to "[" + _CharGenPerkList[_i].name + "]">>\
<<button _btext>>
<<replace "#perkhint">>@@color:LightGreen;Unlocked by:@@ <<print _CharGenPerkList[_i].spoil>><</replace>>\
<</button>> \
</span>\
<</capture>>\
<<endif>>\
<<endif>>\
<</for>>\
<br>\
<span id="perkhint"><br></span>\
<hr>\
<span id="KeypOne">\
<<link "1) Save and continue" "Preamble">>
<<set $PC[$CC][$PCperks] to []>>
<<set _PutItWhere to 0>>\
<<for _i to 0; _i < _PerksSelectedDuringGen.length; _i++>>
<<if _PerksSelectedDuringGen[_i] is true>>
<<set $PC[$CC][$PCperks][_PutItWhere] to _CharGenPerkList[_i].name>>
<<set _PutItWhere to _PutItWhere +1>>
<<endif>>\
<</for>>
<!-- sexes -->
<<set _Boobs to $PC[$CC][$PCstr]+$PC[$CC][$PCcon]>>
<<set _BaseSexOrgan to Math.trunc(_Boobs / 5)>>\
<<if $PC[$CC][$PCsex] is "male">>
<<set _nextbp to setup.getnextbodypart()>>\
<<set $PC[_initwho][$PCbp][_nextbp] to
{ type: $BPpenis, equip: [0,0,0,0,0], equippable: false, morph: "human", mascfem: 0, hair: "", size: _BaseSexOrgan, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<elseif $PC[$CC][$PCsex] is "female">>
<<set _nextbp to setup.getnextbodypart()>>\
<<set $PC[_initwho][$PCbp][_nextbp] to
{ type: $BPboobs, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: _Boobs, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][_nextbp+1] to
{ type: $BPpussy, equip: [0,0,0,0,0], equippable: false, morph: "human", mascfem: 0, hair: "", size: _BaseSexOrgan, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<else>>\
<<set _nextbp to setup.getnextbodypart()>>\
<<set $PC[_initwho][$PCbp][_nextbp] to
{ type: $BPpenis, equip: [0,0,0,0,0], equippable: false, morph: "human", mascfem: 0, hair: "", size: _BaseSexOrgan, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][_nextbp+1] to
{ type: $BPboobs, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: _Boobs, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][_nextbp+2] to
{ type: $BPpussy, equip: [0,0,0,0,0], equippable: false, morph: "human", mascfem: 0, hair: "", size: _BaseSexOrgan, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<endif>>
<<set $PC[$CC][$PCunspentPoints] to 0>>
<<if setup.PlayerHasPerk("Genetic Lottery") is true>>\
<<set $PC[$CC][$PCunspentPoints] to 2>>
<<endif>>\
<!-- perms -->\
<<if setup.AchievementHandler("Starve to death", "HAS?", -1) > 0>>>\
<<set _ads to setup.GiveItem($CC, [141,0,1,0,0])>><!-- cheese -->
<<endif>>\
<!-- perks -->
<<if setup.PlayerHasPerk("Starter") is true>>
<!-- starter perk -->
<<set _ads to setup.GiveItem($CC, [134,0,1,0,0])>><!-- apple -->
<<set _ads to setup.GiveItem($CC, [231,160,0,0,0])>><!-- spear -->
<<set _ads to setup.GiveItem($CC, [240,160,0,0,0])>><!-- small shield -->
<<endif>>\
<!-- note interaction with mage class -->
<<if setup.PlayerHasPerk("Black Mage") is true>>\
<<set $PC[$CC][$PCspellbook].firebolt to 1>>
<<set $PC[$CC][$PCspellbook].any to true>>
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "mage">>
<<set $PC[$CC][$PCspellbook].w to "firebolt">>
<<else>>\
<<set $PC[$CC][$PCspellbook].q to "firebolt">>
<<endif>>\
<<endif>>\
<!-- classes -->
<<set _job to setup.PtrToClass($PC[$CC][$PCclass])>>
<<if _job is "peasant">>\
<<set _ads to setup.GiveItem($CC, [250,160,0,0,0])>><!-- pitchfork -->
<<if $PC[$CC][$PCsex] is "male">>
<<set _ads to setup.GiveItem($CC, [300,160,0,0,0])>><!-- shirt -->
<<set _ads to setup.GiveItem($CC, [303,160,0,0,0])>><!-- pants -->
<<set _ads to setup.GiveItem($CC, [305,160,0,0,0])>><!-- shoes -->
<<elseif $PC[$CC][$PCsex] is "female">>
<<set _ads to setup.GiveItem($CC, [301,160,0,0,0])>><!-- blouse -->
<<set _ads to setup.GiveItem($CC, [304,160,0,0,0])>><!-- skirt -->
<<set _ads to setup.GiveItem($CC, [306,160,0,0,0])>><!-- boots -->
<<else>>\
<<set _ads to setup.GiveItem($CC, [300,160,0,0,0])>><!-- shirt -->
<<set _ads to setup.GiveItem($CC, [304,160,0,0,0])>><!-- skirt -->
<<set _ads to setup.GiveItem($CC, [305,160,0,0,0])>><!-- shoes -->
<<endif>>\
<<elseif _job is "lumberjack">>\
<<set _ads to setup.GiveItem($CC, [220,160,0,0,0])>><!-- hatchet -->
<<if $PC[$CC][$PCsex] is "male">>
<<set _ads to setup.GiveItem($CC, [300,160,0,0,0])>><!-- shirt -->
<<set _ads to setup.GiveItem($CC, [303,160,0,0,0])>><!-- pants -->
<<set _ads to setup.GiveItem($CC, [305,160,0,0,0])>><!-- shoes -->
<<elseif $PC[$CC][$PCsex] is "female">>
<<set _ads to setup.GiveItem($CC, [301,160,0,0,0])>><!-- blouse -->
<<set _ads to setup.GiveItem($CC, [304,160,0,0,0])>><!-- skirt -->
<<set _ads to setup.GiveItem($CC, [306,160,0,0,0])>><!-- boots -->
<<else>>\
<<set _ads to setup.GiveItem($CC, [300,160,0,0,0])>><!-- shirt -->
<<set _ads to setup.GiveItem($CC, [304,160,0,0,0])>><!-- skirt -->
<<set _ads to setup.GiveItem($CC, [305,160,0,0,0])>><!-- shoes -->
<<endif>>\
<<elseif _job is "prostitute">>\
<<if $PC[$CC][$PCsex] is "male">>
<<set _ads to setup.GiveItem($CC, [314,160,0,0,0])>><!-- g-string -->
<<set _ads to setup.GiveItem($CC, [125,160,1,0,0])>><!-- penis growth -->
<<elseif $PC[$CC][$PCsex] is "female">>
<<set _ads to setup.GiveItem($CC, [314,160,0,0,0])>><!-- g-string -->
<<set _ads to setup.GiveItem($CC, [315,160,0,0,0])>><!-- nipple stickers -->
<<set _ads to setup.GiveItem($CC, [316,160,0,0,0])>><!-- high heels -->
<<set _ads to setup.GiveItem($CC, [127,160,1,0,0])>><!-- breast growth -->
<<else>>\
<<set _ads to setup.GiveItem($CC, [314,160,0,0,0])>><!-- g-string -->
<<set _ads to setup.GiveItem($CC, [315,160,0,0,0])>><!-- nipple stickers -->
<<set _ads to setup.GiveItem($CC, [316,160,0,0,0])>><!-- high heels -->
<<set _ads to setup.GiveItem($CC, [125,160,1,0,0])>><!-- penis growth -->
<<set _ads to setup.GiveItem($CC, [127,160,1,0,0])>><!-- breast growth -->
<<endif>>\
<<elseif _job is "warrior">>\
<<set _ads to setup.GiveItem($CC, [212,160,0,0,0])>><!-- claymore -->
<<set _ads to setup.GiveItem($CC, [241,160,0,0,0])>><!-- medium shield -->
<<set _ads to setup.GiveItem($CC, [352,160,0,0,0])>><!-- hauberk -->
<<elseif _job is "scholar">>\
<<set _ads to setup.GiveItem($CC, [300,160,0,0,0])>><!-- shirt -->
<<set _ads to setup.GiveItem($CC, [303,160,0,0,0])>><!-- pants -->
<<set _ads to setup.GiveItem($CC, [305,160,0,0,0])>><!-- shoes -->
<<elseif _job is "priest">>\
<<set _ads to setup.GiveItem($CC, [104,160,0,0,0])>><!-- holy symbol -->
<<set _ads to setup.GiveItem($CC, [317,160,0,0,0])>><!-- priest robes -->
<<set $PC[$CC][$PCspellbook].heal to 1>>
<<set $PC[$CC][$PCspellbook].q to "heal">>
<<set $PC[$CC][$PCspellbook].any to true>>
<<elseif _job is "rogue">>\
<<set _ads to setup.GiveItem($CC, [300,160,0,0,0])>><!-- shirt -->
<<set _ads to setup.GiveItem($CC, [303,160,0,0,0])>><!-- pants -->
<<set _ads to setup.GiveItem($CC, [305,160,0,0,0])>><!-- shoes -->
<<set _ads to setup.GiveItem($CC, [115,160,3,0,0])>><!-- lockpicks -->
<<elseif _job is "mage">>\
<<set $PC[$CC][$PCspellbook].dart to 1>>
<<set $PC[$CC][$PCspellbook].q to "dart">>
<<set $PC[$CC][$PCspellbook].any to true>>
<<elseif _job is "barbarian">>\
<<set _foo to setup.GiveItem($CC, [102,0,3,101,0])>>
<<set _foo to setup.GiveItem($CC, [102,0,3,102,0])>>
<<set _foo to setup.GiveItem($CC, [102,0,3,103,0])>>
<<elseif _job is "monk">>\
<<set $PC[$CC][$PCcoins] to 0>>
<<elseif _job is "ninja">>\
<<set _ads to setup.GiveItem($CC, [252,160,0,0,0])>><!-- katana -->
<<set _ads to setup.GiveItem($CC, [319,160,0,0,0])>><!-- ninja uniform -->
<<set _ads to setup.GiveItem($CC, [320,160,0,0,0])>><!-- ninja cowl -->
<<set _ads to setup.GiveItem($CC, [321,160,0,0,0])>><!-- ninja pants -->
<<set _ads to setup.GiveItem($CC, [322,160,0,0,0])>><!-- black belt -->
<<set _ads to setup.GiveItem($CC, [323,160,0,0,0])>><!-- tabi -->
<<elseif _job is "paladin">>\
<<set $PC[$CC][$PCwil] to $PC[$CC][$PCwil] +2>>
<<set _ads to setup.GiveItem($CC, [104,160,0,0,0])>><!-- holy symbol -->
<<set _ads to setup.GiveItem($CC, [202,160,0,0,0])>><!-- warhammer -->
<<set _ads to setup.GiveItem($CC, [211,160,0,0,0])>><!-- tower shield -->
<<set _ads to setup.GiveItem($CC, [352,160,0,0,0])>><!-- hauberk -->
<<set $PC[$CC][$PCspellbook].heal to 1>>
<<set $PC[$CC][$PCspellbook].light to 1>>
<<set $PC[$CC][$PCspellbook].q to "heal">>
<<set $PC[$CC][$PCspellbook].any to true>>
<<elseif _job is "guardian">>\
<<set _ads to setup.GiveItem($CC, [242,160,0,0,0])>><!-- tower shield -->
<<set _ads to setup.GiveItem($CC, [352,160,0,0,0])>><!-- hauberk -->
<<set _ads to setup.GiveItem($CC, [311,160,0,0,0])>><!-- heavy helm -->
<<set _ads to setup.GiveItem($CC, [353,160,0,0,0])>><!-- leggings -->
<<set $PC[$CC][$PCspellbook].any to true>>
<<set $PC[$CC][$PCspellbook].armor to 1>>
<<set $PC[$CC][$PCspellbook].q to "armor">>
<<endif>>\
<<if setup.PlayerHasPerk("Explorer") is true>>
<<if setup.CanClassLearnSpell(_job, "light") is true>>
<<set $PC[$CC][$PCspellbook].light to 1>>
<<set $PC[$CC][$PCspellbook].any to true>>
<<endif>>\
<<endif>>\
<<set $PC[$CC][$PCstate] to "alive">>
<<Recalc>>
<<set $PC[$CC][$PChpcur] to $PC[$CC][$PChpmax]>>
<<set $PC[$CC][$PCmanacur] to $PC[$CC][$PCmanamax]>>
<<set $PC[$CC][$PChornymax] to $PC[$CC][$PCwil] * 10>>\
<<set _th to $PC[$CC][$PCdex] - 10>>\
<<set $PC[$CC][$PCtohit] to _th * 5>>
<<set _ScholarHack to setup.AchievementHandler("Best Scholar", "HAS?", -1)>>\
<<if _ScholarHack > 9>>\
<<set $PC[$CC][$PClevel] to 2>>\
<<set $PC[$CC][$PCunspentPoints] to $PC[$CC][$PCunspentPoints] +1>>\
<<Recalc>>\
<<endif>>\
<<UpdateACandFlirts>>\
<<GetPlayerAbsorption>>\
<<AutoSaveLoad "set">>
<</link>>\
</span>
<span id="debug"></span>\
<<timed 500ms>>\
<<script>>
if (setup.DrawCharIcon(State.variables.PC[State.variables.CC][State.variables.PCicon], "CharGenIconCanvas") == 0) {
};
<</script>>\
<</timed>>\
<<set _throwaway to setup.FavIcon($ImgPath)>>\
<<script>>State.expired.splice(0, State.expired.length);<</script>>\
\
<<set $WORLD.CharLocs to []>>\
<<PlaceCharForMultiChar 0>>\
<<PlaceCharForMultiChar 1>>\
<<PlaceCharForMultiChar 2>>\
\
<<PlayBGM "menu">>\
<<run UIBar.stow()>>\
<<set $ReturnFromMenu to passage()>>\
<<if $WORLD.GameVersion is "PLAYTEST">>\
<center>\
<<set _pic to $ImgPath + "23-12-01.jpg">>\
<img @src="_pic"/>
@@color:Gold;An Humble Pilgrimage to the Shrine of the Goddess of Primal Darkness@@
<hr>\
@@color:Orange;WARNING: Your save file is from a playtest@@:
You can proceed, but it is strongly recommended that you restore from the backup you made before the playtest.
<span id="KeypOne">\
<<link "1) Continue" "Preamble">>
<<set $WORLD.MobileMode to 0>>
<</link>>\
</span>
<span id="KeypOne">\
<<link "Play in Mobile Compatibilty mode (experimental)" "Preamble">>
<<set $WORLD.MobileMode to 1>>
<</link>>\
</span>
Please post feedback and bug reports for this version <a href="https://arcdragon.com/forum/viewtopic.php?t=4546" target="_blank" rel="noopener noreferrer">here</a>.
</center>\
<<elseif $WORLD.GameVersion is "24.3.18">>\
<center>\
<<set _pic to $ImgPath + "24-2-18.jpg">>\
<img @src="_pic"/>
@@color:Gold;An Humble Pilgrimage to the Shrine of the Goddess of Primal Darkness@@
<hr>\
<span id="KeypOne">\
<<link "1) Continue" "Preamble">>
<<set $WORLD.MobileMode to 0>>
<</link>>\
</span>
<span id="KeypOne">\
<<link "Play in Mobile Compatibilty mode (experimental)" "Preamble">>
<<set $WORLD.MobileMode to 1>>
<</link>>\
</span>
Please post feedback and bug reports for this version <a href="https://arcdragon.com/forum/viewtopic.php?t=4546" target="_blank" rel="noopener noreferrer">here</a>.
</center>\
<hr>\
\
@@color:Gold;Legends@@ claim that in times long forgotten, when the Goddess of Primal Darkness gave birth to world, the Tower of Triumph was left as the point of contact forever linking the mortal world with that of the divine.
@@color:Gold;Few@@ who enter ever return, but those who do are always changed by their experience. Some become rich beyond all measure, others become learned and filled with great power, while still others escape as twisted wretches with their mind barely intact. But all agree that it is a place wherein great change, whether for good or bad, is possible. It is a place where the hopeful can meet with their dreams, the heroic can prove their worthiness, and the desperate can meet with salvation, or death.
@@color:Gold;You@@ have journeyed far from your home to at last reach the fabled village of Crescentheart. Its dilapidated shanties and empty shops fall far short of the grand stories that brought you here. But seeing it now with your own eyes you cannot deny the majesty of the Tower itself: A behemoth of umblemished stone clawing upwards into the sky as far as your eyes can see. And at its apex lay your final destination: the Shrine of the Goddess, the source of all wishes, the fountain of immortality...even to path to godhood. And yet also, the bringer of death and tragedy to all who fail to master its beautiful and treacherous mysteries.
<<else>>\
<center>\
<<set _pic to $ImgPath + "24-2-18.jpg">>\
<img @src="_pic"/>
<hr>
@@color:Gold;Welcome to the March 18, 2024 update for Tower of Triumph!@@
This is primarily a bugfix update, containing 29 bug fixes, with a scattering of rule and UI changes. As always, a full change log is available on the menu.
Thank you for playing Tower of Triumph!
<hr>\
<<link "[Update your save for the new version]" "Update">><</link>>
Click here to <<link "Backup your save file">><<set _throwaway to setup.ExportSave()>><</link>>\
<hr>
Support further development on <a href="https://subscribestar.adult/arcdragon" target="_blank" rel="noopener noreferrer">SubscribeStar</a>!
Join us on <a href="https://discord.gg/AvbCAFKfzY" target="_blank" rel="noopener noreferrer">Discord</a>
<a href="https://arcdragon.com/forum/viewtopic.php?t=4546" target="_blank" rel="noopener noreferrer">Discussion and bug reports for this update</a>
</center>\
<<endif>>\<<AddToLog "Arriving in DunGen">>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
\
<<if $WORLD.dungenned[_pz] > 0>>\
@@color:Red;Error: Request to generate a level that already exists@@
Proceeding anyway...
<<set _foo to "Requesting regen of zlevel: " + _pz>>\
<<AddToLog _foo>>\
<<endif>>\
\
<<set $WORLD.dungenned[$PC[$CC][$PCz]] to 1>>\
\
<<set $Dungeon[_pz] to []>>\
<<set _WhyIsThisNeeded to setup.Snake()>>\
<<set $Dungeon[_pz] to clone(_WhyIsThisNeeded)>>\
\
<<set _MessageQty to Math.trunc(($WORLD.DunDimX * $WORLD.DunDimY) / 15)>>\
<<set _dgcount to 0>>\
<<for _i to 0; _i < _MessageQty; _i++>>\
<<set _MessX to random(0, ($WORLD.DunDimX -1))>>\
<<set _MessY to random(0, ($WORLD.DunDimY -1))>>\
<<if $Dungeon[_pz][_MessX][_MessY][8] is 0>>\
<<set $Dungeon[_pz][_MessX][_MessY][8] to random(1,48)>>\
<<endif>>\
<</for>>\
\
<<set _throwaway to setup.PlaceLostTowerCorpses(_pz)>>\
\
<<set $WORLD.dungenned[_pz +1] to 0>>\
<<widget "SimplePic">>\
<<set _pic to $ImgPath + _args[0]>>\
<div id="right-img"><img @src="_pic"/></div>\
<</widget>>\
<<widget "CenterPic">>\
<<set _pic to $ImgPath + _args[0]>>\
<img @src="_pic"/>\
<</widget>>\
<<widget "RightPic">>\
<<if $WORLD.MobileMode is 1>>\
<<else>>\
<<set _RightPic to $ImgPath + _args[0]>>\
<<replace "#right-img">><img @src="_RightPic"/><</replace>>\
<<endif>>\
<</widget>>\
<<widget "ToggleSilent">>\
<<if $WORLD.MusicEnabled is true>>\
<<set $WORLD.MusicEnabled to false>>\
<<masteraudio stop>>\
<<replace "#SpanToggleSilent">>\
@@color:Red;Music is OFF@@\
<</replace>>\
<<else>>\
<<set $WORLD.MusicEnabled to true>>\
<<PlayBGM "menu">>\
<<replace "#SpanToggleSilent">>\
@@color:LightGreen;Music is ON@@\
<</replace>>\
<<endif>>\
<</widget>>\
<<widget "FullyHeal">>\
<!-- debuffs? -->\
<<if setup.GetEffect("plague curse") > 0>>\
<<else>>\
<<set $PC[$CC][$PChpcur] to $PC[$CC][$PChpmax]>>\
<<endif>>\
<<set $PC[$CC][$PCmanacur] to $PC[$CC][$PCmanamax]>>\
<<set $PC[$CC][$PChornycur] to 0>>\
<<set $PC[$CC][$PChunger] to 500>>\
<<for _FHP to 0; _FHP < $PC[$CC][$PCparty].length; _FHP++>>\
<!-- implement: undead shouldn't heal from rest -->\
<<set $PC[$CC][$PCparty][_FHP].hpcur to $PC[$CC][$PCparty][_FHP].hpmax>>\
<<if $PC[$CC][$PCparty][_FHP].stance is "Down">>\
<<set $PC[$CC][$PCparty][_FHP].stance to "Hide">>\
<<endif>>\
<</for>>\
<</widget>>\
<<widget "GainGold">>\
<<set $PC[$CC][$PCcoins] to $PC[$CC][$PCcoins] + $args[0]>>\
<<ShowCoins>>\
<<if $PC[$CC][$PCcoins] > 999>>\
<<AwardAchievement "Rich">>\
<<endif>>\
<</widget>>\
<<widget "Bullet">>\
• \
<</widget>>\
<<widget "FormatPosNeg">>\
<<if _args[0] < 0>>@@color:Red;<<print _args[0]>><<if _args[1]>>_args[1]<<endif>>@@\
<<elseif $PC[$CC][$PCac][0] > 0>>@@color:LightGreen;+<<print _args[0]>><<if _args[1]>><<print _args[1]>><<endif>>@@\
<<else>><<print _args[0]>>\
<<endif>>\
<</widget>>\
<<widget "ShowBlacksmithProgress">>\
<<if $WORLD.smith is 0>>Not visited\
<<else>>\
<<if $WORLD.smithLevel is 0>>Brass\
<<elseif $WORLD.smithLevel is 1>>Iron\
<<elseif $WORLD.smithLevel is 2>>Steel\
<<elseif $WORLD.smithLevel is 3>>Mithril\
<<elseif $WORLD.smithLevel is 4>>Scalar\
<<else>> @@color:Red;Error: unrecognized state: ($WORLD.smithLevel)@@\
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "ShowSeleneProgress">>\
<<set _SSPmin to 0>>\
<!-- set _SSPmax to $WORLD.SeleneQuests.length -->\
<<set _SSPmax to 7>>\
<<for _i to 0; _i < _SSPmax; _i++>>\
<<if $WORLD.SeleneQuests[_i] is 3>>\
<<set _SSPmin to _SSPmin +1>>\
<<endif>>\
<</for>>\
<<if _SSPmin is 0>>\
None\
<<elseif _SSPmin is _SSPmax>>\
Tier 1 complete!\
<<else>>\
<<set _SSP to Math.trunc(_SSPmin / _SSPmax * 100)>>\
Tier 1: <<print _SSP>>%\
<<endif>>\
<</widget>>\
<<widget "ShowDaphneProgress">>\
<<set _SSPmin to 0>>\
<<set _SSPmax to $WORLD.DaphneQuests.length>>\
<<for _i to 0; _i < 6; _i++>>\
<<if $WORLD.DaphneQuests[_i] is 3>>\
<<set _SSPmin to _SSPmin +1>>\
<<endif>>\
<</for>>\
<<if _SSPmin is 0>>\
None\
<<elseif _SSPmin is _SSPmax>>\
Complete!
<<else>>\
<<set _SSP to Math.trunc(_SSPmin / _SSPmax * 100)>>\
Tier 1: <<print _SSP>>%\
<<endif>>\
<</widget>>\
<<widget "ShowTutorialProgress">>\
<<set _STPmin to 0>>\
<<set _STPmax to $WORLD.quests.length>>\
<<for _i to 0; _i < $WORLD.quests.length; _i++>>\
<<if $WORLD.quests[_i].state is "complete">>\
<<set _STPmin to _STPmin +1>>\
<<endif>>\
<</for>>\
<<if _STPmin is 0>>\
None \
<<elseif _STPmin is _STPmax>>\
100%\
<<else>>\
<<set _STP to Math.trunc(_STPmin / _STPmax * 100)>>\
<<print _STP>>%\
<<endif>>\
<</widget>>\
<<widget "ResetTower">>\
<<for _RT to 0; _RT < 3; _RT++>>\
<<set $PC[_RT][$PChfze] to 0>>\
<<set $PC[_RT][$PChtze] to 0>>\
<<set $PC[_RT][$PChdze] to 0>>\
<<if ($PC[_RT][$PClocation] is "tower")>>\
<<if $PC[_RT][$PCstate] is "alive">>\
<<set $PC[_RT][$PClocation] to "town">>\
<<set $WORLD.CharLocs[_RT][0] to "town">>\
<<elseif $PC[_RT][$PCstate] is "dead">>\
<<set $PC[_RT][$PCstate] to "lost">>\
<<set $WORLD.CharLocs[_RT][0] to "lost">>\
<<endif>>\
<<endif>>\
<</for>>\
<<set $WORLD.HFZE to 0>>\
<<set $WORLD.HTZE to 0>>\
<<set $WORLD.HDZE to 0>>\
<<set $WORLD.DunDims to []>>\
<<set $WORLD.DunDimX = 14>>\
<<set $WORLD.DunDimY = 14>>\
<<set $WORLD.TowerOrigin to [0,7]>>\
<<set $WORLD.PortalTarget to [-1, -1, -1]>>\
<<set $WORLD.Circle to 0>>\
<<set $Dungeon to []>>\
<<set $WORLD.dungenned to [0,0]>>\
<<set $WORLD.dungeonthemes to []>>\
<<set $WORLD.dungeonthemes[0] to ["Brick","Random"]>>\
<<set $WORLD.dungeonthemes[1] to ["Brick","Random"]>>\
<</widget>>\
<<widget "ResetGraveyard">>\
<<set $RETIREES to []>>
<<for _i to 0; _i < 10; _i++>>
<<set $RETIREES[_i] to { name: "none", gen: 0, level: 0, class: "none", gold: 0, maxforest: 0, maxtower: 0, year: 0, day: 0, won: 0, death: "" }>>
<</for>>\
<<run memorize('RETIREES', $RETIREES)>>\
<</widget>>\
<<widget "AddToLog">>\
<<set $GameLog to $GameLog + $args[0]>>\
<</widget>>\
<<widget "PlaceCharForMultiChar">>\
<<set _PlaceWho to _args[0]>>\
<<set $WORLD.CharLocs[_PlaceWho] to []>>\
<<set $WORLD.CharLocs[_PlaceWho][0] to $PC[_PlaceWho][$PClocation]>>\
<<if $WORLD.CharLocs[_PlaceWho][0] is "forest">>\
<<set $WORLD.CharLocs[_PlaceWho][1] to $PC[_PlaceWho][$PCfx]>>\
<<set $WORLD.CharLocs[_PlaceWho][2] to $PC[_PlaceWho][$PCfy]>>\
<<set $WORLD.CharLocs[_PlaceWho][3] to $PC[_PlaceWho][$PCfz]>>\
<<set $WORLD.CharLocs[_PlaceWho][4] to $PC[_PlaceWho][$PCicon]>>\
<<elseif $WORLD.CharLocs[_PlaceWho][0] is "desert">>\
<<set $WORLD.CharLocs[_PlaceWho][1] to $PC[_PlaceWho][$PCdx]>>\
<<set $WORLD.CharLocs[_PlaceWho][2] to $PC[_PlaceWho][$PCdy]>>\
<<set $WORLD.CharLocs[_PlaceWho][3] to $PC[_PlaceWho][$PCdz]>>\
<<set $WORLD.CharLocs[_PlaceWho][4] to $PC[_PlaceWho][$PCicon]>>\
<<elseif $WORLD.CharLocs[_PlaceWho][0] is "tower">>\
<<set $WORLD.CharLocs[_PlaceWho][1] to $PC[_PlaceWho][$PCx]>>\
<<set $WORLD.CharLocs[_PlaceWho][2] to $PC[_PlaceWho][$PCy]>>\
<<set $WORLD.CharLocs[_PlaceWho][3] to $PC[_PlaceWho][$PCz]>>\
<<set $WORLD.CharLocs[_PlaceWho][4] to $PC[_PlaceWho][$PCicon]>>\
<<elseif $WORLD.CharLocs[_PlaceWho][0] is "town">>\
<<set $WORLD.CharLocs[_PlaceWho][1] to -1>>\
<<set $WORLD.CharLocs[_PlaceWho][2] to -1>>\
<<set $WORLD.CharLocs[_PlaceWho][3] to -1>>\
<<set $WORLD.CharLocs[_PlaceWho][4] to $PC[_PlaceWho][$PCicon]>>\
<<else>>\
<<set $WORLD.CharLocs[_PlaceWho][0] to "lost">>\
<<set $WORLD.CharLocs[_PlaceWho][1] to -1>>\
<<set $WORLD.CharLocs[_PlaceWho][2] to -1>>\
<<set $WORLD.CharLocs[_PlaceWho][3] to -1>>\
<<set $WORLD.CharLocs[_PlaceWho][4] to 1>>\
<<endif>>\
<</widget>>\
<<widget "AutoSaveLoad">>\
<<if $args[0] is "get">>\
<<set $PC to recall('PC')>>\
<<set $WORLD to recall('WORLD')>>\
<<set $STORE to recall('STORE')>>\
<<set $RETIREES to recall('RETIREES')>>\
<<set $Dungeon to recall('Dungeon')>>\
<<set $Achievements to recall('Achievements')>>\
<<elseif $args[0] is "set">>\
<<PlaceCharForMultiChar 0>>\
<<PlaceCharForMultiChar 1>>\
<<PlaceCharForMultiChar 2>>\
\
<<run memorize('PC', $PC)>>\
<<run memorize('WORLD', $WORLD)>>\
<<run memorize('STORE', $STORE)>>\
<<run memorize('RETIREES', $RETIREES)>>\
<<run memorize('Dungeon', $Dungeon)>>\
<<run memorize('Achievements', $Achievements)>>\
<<run memorize('EXISTS', true)>>\
<<elseif $args[0] is "wipe">>\
<<run forget('PC')>>\
<<run forget('WORLD')>>\
<<run forget('STORE')>>\
<<run forget('RETIREES')>>\
<<run forget('Dungeon')>>\
<<run forget('Achievements')>>\
<<run forget('EXISTS')>>\
<<else>>\
<<AddToLog "@@color:red;ERROR in AutoSaveLoad: are we getting or setting?@@">>\
<<endif>>\
<</widget>>\
<<widget "MaleVirginity">>\
<<set _AchCheck to false>>\
<<if $PC[$CC][$PCsexACTS].malevirgin[1] is true>>\
<br>@@color:Pink;You have given your virginity to <<print $args[0]>>!@@
<<set $PC[$CC][$PCsexACTS].malevirgin to []>>\
<<set $PC[$CC][$PCsexACTS].malevirgin[0] to $Mon.morph>>\
<<set $PC[$CC][$PCsexACTS].malevirgin[1] to $args[0]>>\
<<set _AchCheck to true>>\
<<endif>>\
<<if (_AchCheck is true) and ($PC[$CC][$PCsexACTS].vaginalreceived > 0)>>\
<<AwardAchievement "Playing both sides">>\
<<endif>>\
<</widget>>\
<<widget "FemaleVirginity">>\
<<set _AchCheck to false>>\
<<if $PC[$CC][$PCsexACTS].femalevirgin[1] is true>>\
@@color:Pink;You have given up your virginity to <<print $args[0]>>!@@
<<set $PC[$CC][$PCsexACTS].femalevirgin to []>>\
<<set $PC[$CC][$PCsexACTS].femalevirgin[0] to $Mon.morph>>\
<<set $PC[$CC][$PCsexACTS].femalevirgin[1] to $args[0]>>\
<<set _AchCheck to true>>\
<<endif>>\
<<if (_AchCheck is true) and ($PC[$CC][$PCsexACTS].vaginalgiven > 0)>>\
<<AwardAchievement "Playing both sides">>\
<<endif>>\
<<TryPregnancy>>\
<</widget>>\
<<widget "TryPregnancy">>\
<<if $Mon.SpecialPregnancy is true>>\
<<set $PC[$CC][$PCpregnant] to [0, "", -1, -1, -1, -1]>>\
<<endif>>\
<<if $PC[$CC][$PCpregnant][0] > 0>>\
<<elseif setup.PlayerHasPerk("Barren") is true>>\
<<elseif setup.GetEffect("arren") > 0>>\
<<else>>\
<<set _Pchance to $Mon.fertility>>\
<<set _Pterm to $Mon.pterm>>\
<<if setup.PlayerHasPerk("Fertile") is true>>\
<<set _Pchance to 60>>\
<<endif>>\
<<if setup.PlayerHasPerk("Breeder") is true>>\
<<set _Pterm to Math.trunc(_Pterm)>>\
<<endif>>\
<<if $PC[$CC][$PCsexACTS].femalevirgin[0] is $Mon.morph>>\
<<set _Pchance to _Pchance + 40>>\
<<endif>>\
<<set $Conception to setup.TryPregnancy($CC, $Mon.morph, _Pchance, _Pterm)>>\
<<endif>>\
<</widget>>\
<<widget "BirthCheck">>\
<<if $DebugMode is true>>\
Debug, pregnancy status: <<print $PC[$CC][$PCpregnant]>>
Debug, active effects: <<print $PC[$CC][$PCeffects].length>>
Debug, effect array: <<print $PC[$CC][$PCeffects]>>
<<endif>>\
<<if $PC[$CC][$PCpregnant][0] > 0>>\
<<set _TotalDaysA to ($PC[$CC][$PCpregnant][2] * 365) + $PC[$CC][$PCpregnant][3]>>\
<<set _TotalDaysB to ($WORLD.year * 365) + $WORLD.day>>\
<!-- if _TotalDaysB gte _TotalDaysA -->\
<<if setup.DaysUntilBirth($CC) < 1>>\
<<script>>
Dialog.setup("Giving birth");
Dialog.wiki(Story.get("Birth").processText());
Dialog.open();
<</script>>
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "InitPC">>\
<<set _initwho to $args[0]>>\
\
<!-- reincarnation handled here -->\
<<if $PC[_initwho][$PCstate] is "none">>\
<<set $PC[_initwho][$PCgen] to 1>>\
<<set $PC[_initwho][$PCancestor] to "">>\
<<set $PC[_initwho][$PCname] to setup.GenName($PC[_initwho][$PCsex])>>\
<<set $PC[_initwho][$PCsex] to "male">>\
<<set $PC[_initwho][$ancestraldeath] to "">>\
<<set $PC[$CC][$PCretirementcap] to 1>>\
<<elseif $PC[_initwho][$PCstate] is "retired">>\
<<set $PC[_initwho][$PCgen] to $PC[_initwho][$PCgen] +1>>\
<<set $PC[_initwho][$PCancestor] to $PC[_initwho][$PCname]>>\
<<set $PC[_initwho][$ancestraldeath] to "retirement">>\
<<elseif ($PC[_initwho][$PCstate] is "dead") or ($PC[_initwho][$PCstate] is "lost")>>\
<<set $PC[_initwho][$PCgen] to $PC[_initwho][$PCgen] +1>>\
<<set $PC[_initwho][$PCancestor] to $PC[_initwho][$PCname]>>\
<<else>>\
<<script>>UI.alert("InitPC was requested for a character who is neither dead, lost retired, nor in the 'none' state. Something is probably very wrong.")<</script>>\
<<endif>>\
\
<<set $PC[_initwho][$PCstate] to "none">>\
<!-- name -->\
<!-- sex -->\
<!-- gen handled above -->\
<<set $PC[_initwho][$PCcoins] to 20>>\
<<set $PC[_initwho][$PChpcur] to 10>>\
<<set $PC[_initwho][$PChpmax] to 10>>\
<<set $PC[_initwho][$PCstr] to 12>>\
<<set $PC[_initwho][$PCdex] to 12>>\
<<set $PC[_initwho][$PCcon] to 10>>\
<<set $PC[_initwho][$PCint] to 8>>\
<<set $PC[_initwho][$PCwil] to 8>>\
<<set $PC[_initwho][$PCx] to 0>>\
<<set $PC[_initwho][$PCy] to 0>>\
<<set $PC[_initwho][$PCz] to -1>>\
<<set $PC[_initwho][$PCxp] to 0>>\
<<set $PC[_initwho][$PClevel] to 1>>\
<<set $PC[_initwho][$PCclass] to "peasant">>\
<<set $PC[_initwho][$PCinven] to []>>\
<<set $PC[_initwho][$PCinven][0] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCinven][1] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCinven][2] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCinven][3] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCinven][4] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCinven][5] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCinven][6] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCinven][7] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCinven][8] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCinven][9] to [0,0,0,0,0]>>\
<<set $PC[_initwho][$PCmorph] to "human">>\
<<set $PC[_initwho][$PCbp] to []>>\
<<set $PC[_initwho][$PCac] to 0>>\
<<set $PC[_initwho][$PCabsorb] to 0>>\
<<set $PC[_initwho][$PCperks] to []>>\
<<set $PC[$CC][$PCtohit] to $PC[_initwho][$PCdex] - 10>>\
<<set _hcolor to either("red","brown","blonde","black")>>\
<<set _hair to random(0, 3)>>\
<<set _style to either("straight", "curly")>>\
<<set $PC[_initwho][$PCbp][0] to
{ type: $BPhead, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: _hcolor, size: _hair, style: _style, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][1] to
{ type: $BPneck, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][2] to
{ type: $BPback, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][3] to
{ type: $BPchest, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][4] to
{ type: $BPwield, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "punch", attacktype: "blunt", mindam: 1, maxdam: 2}>>\
<<set $PC[_initwho][$PCbp][5] to
{ type: $BPwield, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "punch", attacktype: "blunt", mindam: 1, maxdam: 2}>>\
<<set $PC[_initwho][$PCbp][6] to
{ type: $BPhands, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][7] to
{ type: $BPring, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][8] to
{ type: $BPring, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][9] to
{ type: $BPwaist, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][10] to
{ type: $BPlegs, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PCbp][11] to
{ type: $BPfeet, equip: [0,0,0,0,0], equippable: true, morph: "human", mascfem: 0, hair: "", size: 0, attackdesc: "", attacktype: "", mindam: 0, maxdam: 0}>>\
<<set $PC[_initwho][$PChornycur] to 0>>\
<<set $PC[_initwho][$PChornymax] to 80>>\
<<set $PC[_initwho][$PChunger] to 500>>\
<<set $PC[_initwho][$PCsexACTS] to { malevirgin: ["", true], femalevirgin: ["", true], bjgiven: 0, bjreceived: 0, pussylickgiven: 0, pussylickreceived: 0, vaginalgiven: 0, vaginalreceived: 0, analgiven: 0, analreceived: 0, semengiven: 0, semenreceived: 0, milked: 0, scissored: 0, birthed: 0, fathered: 0}>>\
<<set $PC[_initwho][$PCmisc] to { battles: 0, battleslost: 0, battleswon: 0, battlesfled: 0, traptrigger: 0, trapavoid: 0, gold: 0, chests: 0, deaths: 0, flirtvictory: 0, repeatquests: 0}>>\
<<set $PC[_initwho][$PCspellbook] to { any: false, firebolt: 0, heal: 0, armor: 0, poison: 0, up: 0, down: 0, portal: 0, light: 0, map: 0, passwall: 0, soultrap: 0, dart: 0, q: "", w: "", e: "", totalheal: 0 }>>\
<<set $PC[_initwho][$PClocation] to "town">>\
<<set $PC[_initwho][$PCunspentPoints] to 0>>\
<<set $PC[_initwho][$PCpregnant] to [0, "", -1, -1, -1, -1]>>\
<<set $PC[_initwho][$PChtze] to 0>>\
<<set $PC[_initwho][$PChfze] to 0>>\
<<set $PC[_initwho][$PChdze] to 0>>\
<<set $PC[_initwho][$PCkills] to [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]>>\
<<set $PC[_initwho][$PCchurchstate] to 0>>\
\
<<set $PC[_initwho][$PCavatar] to ["Human", 100]>>\
<<set $PC[_initwho][$PCicon] to [0,0,0,0,""]>>\
<!-- ancestor handled above -->\
<<set $PC[_initwho][$PCSeleneChat] to [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]>>\
<<set $PC[_initwho][$PCGerardChat] to [0,0,0,0,0,0,0,0,0,0,0,0]>>\
<<set $PC[_initwho][$PCSmithDemonChat] to [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]>>\
<<set $PC[_initwho][$PCeffects] to []>>\
<<set $PC[_initwho][$PCSkittersChat] to [0,0,0,0,0,0,0,0,0,0]>>\
<<set $PC[_initwho][$PCBoltmanChat] to [0,0,0,0,0,0]>>\
<<set $PC[_initwho][$PCDaphneChat] to [0,0,0,0,0,0,0,0,0,0]>>\
<<set $PC[_initwho][$PCAzaxChat] to [0,0,0,0,0,0,0,0,0,0,0,0]>>\
<<set $PC[_initwho][$PCparty] to []>>\
\
<<UpdateMorphs>>\
<</widget>>\
<<widget "AdvanceTime">>\
<<set $PC[$CC][$PChunger] to $PC[$CC][$PChunger] - _args[0]>>\
<<if $PC[$CC][$PChunger] < 1>>\
<<set $PC[$CC][$PChunger] to 0>>\
<<set $PC[$CC][$PChpcur] to $PC[$CC][$PChpcur] -1>>\
<<ShowHealth>>\
<<else>>\
<<ShowHunger>>\
<<endif>>\
<<set $WORLD.minute to $WORLD.minute + _args[0]>>\
<<for _AdvT to 0; _AdvT < 24; _AdvT++>>\
<<if $WORLD.minute > 59>>\
<<set $WORLD.minute to $WORLD.minute - 60>>\
<<set $WORLD.hour to $WORLD.hour +1>>\
<<else>>\
<<set _AdvT to 99>>\
<<endif>>\
<</for>>\
<<if $WORLD.hour > 23>>\
<<set $WORLD.hour to $WORLD.hour - 24>>\
<<set $WORLD.day to $WORLD.day +1>>\
<<endif>>\
<<if $WORLD.day > 365>>\
<<set $WORLD.day to $WORLD.day - 365>>\
<<set $WORLD.year to $WORLD.year +1>>\
<<set $WORLD.restock to 0>>\
<<endif>>\
<<if $WORLD.restock < $WORLD.day>>\
<<Restock "all">>\
<<endif>>\
<<DecrementEffects _args[0]>>\
<<set _PlagueCurse to setup.GetEffect("plague curse")>>\
<<if _PlagueCurse > 0>>\
<<set _PlagueCurse to (_PlagueCurse * -1)>>\
<<ChangeStat $PChpcur _PlagueCurse>>\
<<endif>>\
<</widget>>\
<<widget "ShowTime">>\
<<set _m to $WORLD.minute>>\
<<set _h to $WORLD.hour>>\
<<set _d to $WORLD.day>>\
<<set _y to $WORLD.year>>\
<<set _ampm to "am">>\
<<if _h is 24>>
<<set _h to 12>>\
<<elseif _h > 11>>\
<<set _ampm to "pm">>\
<<set _h to _h - 12>>\
<<endif>>\
<<if _h is 0>>\
<<set _h to 12>>\
<<endif>>\
<<if _m < 10>>\
<<set _m to "0" + _m>>\
<<endif>>\
<<if _y > 1>>\
Year: <<print _y>>, Day: <<print _d>>, <<print _h>>:<<print _m>> _ampm\
<<elseif _d > 1>>\
Day: <<print _d>>, <<print _h>>:<<print _m>> _ampm\
<<else>>\
_h:_m _ampm\
<<endif>>\
<</widget>>\
<<widget "ShowHunger">>\
<<replace "#capstaminatext">>\
<<if $PC[$CC][$PChunger] < 2>>@@color:Red;EXHAUSTED
<<elseif $PC[$CC][$PChunger] < 100>>@@color:Yellow;Tired
<<else>>@@color:LightGreen;Stamina@@
<<endif>>\
<</replace>>\
<<run Health2($PC[$CC][$PChunger], 500, "hungerbar", true)>>\
<</widget>>\
<<widget "DescribeStat">>\
<<set _ds to $PC[$CC][$args[0]] -10>>\
<<if $args[0] is $PCstr>>\
<<if _ds > 0>>\
+<<print _ds>> melee damage/carry limit\
<<elseif _ds < 0>>\
_ds melee damage\
<<else>>\
base damage\
<<endif>>\
<<elseif $args[0] is $PCdex>>\
<<if _ds > 0>>\
+<<print _ds * 5>>% defense, +<<print _ds * 5>>% to hit, +<<print $PC[$CC][$args[0]]>>% flee\
<<elseif _ds < 0>>\
<<print _ds * 5>>% defense, <<print _ds * 5>>% to hit, +<<print $PC[$CC][$args[0]]>>% flee\
<<else>>\
+<<print $PC[$CC][$args[0]]>>% flee\
<<endif>>\
<<elseif $args[0] is $PCcon>>\
<<print $PC[$CC][$args[0]]>> hp per level \
<<elseif $args[0] is $PCint>>\
<<print $PC[$CC][$args[0]]>> max mana\
<<elseif $args[0] is $PCwil>>\
+<<print $PC[$CC][$args[0]]>> flirt resist, <<print $PC[$CC][$args[0]] * 10>> max arousal, <<print Math.trunc($PC[$CC][$args[0]] / 5)>> max party size\
<<else>>\
@@color:Red;Error in DescribeStat: <<print $args[0]>>@@\
<<endif>>\
<</widget>>\
<<widget "ChangeStat">>\
<<set _cs to $args[0]>>\
<<set _csamt to $args[1]>>\
<<if setup.IsNan(_cs) is true>>\
@@color:Yellow;Error:@@ ChangeStat received a request to change stat (_cs) by (_csamt), but _csamt is not a number
The passage that made the request appears to be: <<print passage()>>
<<else>>
<<set $PC[$CC][_cs] to $PC[$CC][_cs] + _csamt>>\
<<if $PC[$CC][_cs] < 0>>\
<<set $PC[$CC][_cs] to 0>>\
<<elseif $PC[$CC][$PChpcur] > $PC[$CC][$PChpmax]>>\
<<set $PC[$CC][$PChpcur] to $PC[$CC][$PChpmax]>>\
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "ShowHealth">>\
<<replace "#caphealth">>\
<<if $PC[$CC][$PChpcur] < $PC[$CC][$PChpmax]>>\
@@color:Yellow;\
<<print Health: $PC[$CC][$PChpcur]>> / <<print $PC[$CC][$PChpmax]>>@@\
<<else>>\
@@color:LightGreen;\
<<print Health: $PC[$CC][$PChpcur]>> / <<print $PC[$CC][$PChpmax]>>@@\
<<endif>>\
<</replace>>\
<<run Health2($PC[$CC][$PChpcur], $PC[$CC][$PChpmax], "hpbar", true)>>\
<</widget>>\
<<widget "ShowMana">>\
<<replace "#capmana">>\
<<if $PC[$CC][$PCmanacur] < $PC[$CC][$PCmanamax]>>\
@@color:Yellow;\
<<print Mana: $PC[$CC][$PCmanacur]>> / <<print $PC[$CC][$PCmanamax]>>@@\
<<else>>\
@@color:LightGreen;\
<<print Mana: $PC[$CC][$PCmanacur]>> / <<print $PC[$CC][$PCmanamax]>>@@\
<<endif>>\
<</replace>>\
<<run Health2($PC[$CC][$PCmanacur], $PC[$CC][$PCmanamax], "manabar", true)>>\
<</widget>>\
<<widget "ShowHorny">>\
<<replace "#caphorny">>\
<<if $PC[$CC][$PChornycur] < $PC[$CC][$PChornymax]>>\
@@color:Yellow;\
<<print Arousal: $PC[$CC][$PChornycur]>> / <<print $PC[$CC][$PChornymax]>>@@\
<<else>>\
@@color:LightGreen;\
<<print Arousal: $PC[$CC][$PChornycur]>> / <<print $PC[$CC][$PChornymax]>>@@\
<<endif>>\
<</replace>>\
<<run Health2($PC[$CC][$PChornycur], $PC[$CC][$PChornymax], "hornybar", true)>>\
<</widget>>\
<<widget "ShowCoins">>\
<<replace "#capcoins">>\
@@color:LightGreen;<<print $PC[$CC][$PCcoins]>>\
<</replace>>\
<</widget>>\
<<widget "ShowCapInv">>\
<<replace "#capinvwarning">><</replace>>\
<</widget>>\
\
\
<<widget "UpdateMorphs">>\
<<set _head to setup.getbpqty($CC, $BPhead)>>\
<<set _neck to setup.getbpqty($CC, $BPneck)>>\
<<set _chest to setup.getbpqty($CC, $BPback)>>\
<<set _back to setup.getbpqty($CC, $BPchest)>>\
<<set _arms to setup.getbpqty($CC, $BPwield)>>\
<<set _hands to setup.getbpqty($CC, $BPhands)>>\
<<set _fingers to setup.getbpqty($CC, $BPring)>>\
<<set _waist to setup.getbpqty($CC, $BPwaist)>>\
<<set _legs to setup.getbpqty($CC, $BPlegs)>>\
<<set _feet to setup.getbpqty($CC, $BPfeet)>>\
<<set _tail to setup.getbpqty($CC, $BPtail)>>\
<<set _horns to setup.getbpqty($CC, $BPhorn)>>\
<<set _wings to setup.getbpqty($CC, $BPwings)>>\
<<set _penis to setup.getbpqty($CC, $BPpenis)>>\
<<set _breast to setup.getbpqty($CC, $BPboobs)>>\
<<set _pussy to setup.getbpqty($CC, $BPpussy)>>\
\
<<set _bunny to setup.getparttypeqty($CC, "bunny")>>\
<<set _cat to setup.getparttypeqty($CC, "cat")>>\
<<set _fox to setup.getparttypeqty($CC, "fox")>>\
<<set _wolf to setup.getparttypeqty($CC, "wolf")>>\
<<set _horse to setup.getparttypeqty($CC, "horse")>>\
<<set _human to setup.getparttypeqty($CC, "human")>>\
<<set _goblin to setup.getparttypeqty($CC, "goblin")>>\
<<set _slime to setup.getparttypeqty($CC, "slime")>>\
<<set _spider to setup.getparttypeqty($CC, "spider")>>\
<<set _imp to setup.getparttypeqty($CC, "imp")>>\
<<set _hellhound to setup.getparttypeqty($CC, "hellhound")>>\
<<set _cow to setup.getparttypeqty($CC, "cow")>>\
<<set _drider to setup.getparttypeqty($CC, "drider")>>\
<<set _tentacle to setup.getparttypeqty($CC, "tentacle")>>\
<<set _demon to setup.getparttypeqty($CC, "demon")>>\
<<set _insect to setup.getparttypeqty($CC, "insect")>>\
<<set _snake to setup.getparttypeqty($CC, "snake")>>\
<<set _troll to setup.getparttypeqty($CC, "troll")>>\
<<set _dinosaur to setup.getparttypeqty($CC, "dinosaur")>>\
<<set _ratkin to setup.getparttypeqty($CC, "ratkin")>>\
\
<<set $PC[$CC][$PCmorphQTY] to {human: -1, bunny: -1, cat: -1, fox: -1, wolf: -1, horse: -1, goblin: -1, slime: -1, spider: -1, imp: -1, hellhound: -1, cow: -1, tentacle: -1, demon: -1, insect: -1, snake: -1, dinosaur: -1, ratkin: -1, troll: -1}>>\
<<set $PC[$CC][$PCmorphQTY].human to _human>>\
<<set $PC[$CC][$PCmorphQTY].bunny to _bunny>>\
<<set $PC[$CC][$PCmorphQTY].cat to _cat>>\
<<set $PC[$CC][$PCmorphQTY].fox to _fox>>\
<<set $PC[$CC][$PCmorphQTY].wolf to _wolf>>\
<<set $PC[$CC][$PCmorphQTY].horse to _horse>>\
<<set $PC[$CC][$PCmorphQTY].goblin to _goblin>>\
<<set $PC[$CC][$PCmorphQTY].slime to _slime>>\
<<set $PC[$CC][$PCmorphQTY].spider to _spider>>\
<<set $PC[$CC][$PCmorphQTY].imp to _imp>>\
<<set $PC[$CC][$PCmorphQTY].hellhound to _hellhound>>\
<<set $PC[$CC][$PCmorphQTY].cow to _cow>>\
<<set $PC[$CC][$PCmorphQTY].tentacle to _tentacle>>\
<<set $PC[$CC][$PCmorphQTY].demon to _demon>>\
<<set $PC[$CC][$PCmorphQTY].insect to _insect>>\
<<set $PC[$CC][$PCmorphQTY].snake to _snake>>\
<<set $PC[$CC][$PCmorphQTY].ratkin to _ratkin>>\
<<set $PC[$CC][$PCmorphQTY].dinosaur to _dinosaur>>\
<<set $PC[$CC][$PCmorphQTY].troll to _troll>>\
\
<<set $PC[$CC][$PCmorphBONI] to {ac: 0, hp: 0, th: 0, bodyth: 0, bodydam: 0, flirtth: 0, flirtdam: 0, lessdamage: 0, fireresist: 0}>>\
<<set $PC[$CC][$PCmorphBONI].ac to ($PC[$CC][$PCmorphQTY].insect * 2)>>\
<<set $PC[$CC][$PCmorphBONI].th to ($PC[$CC][$PCmorphQTY].spider * 2)>>\
<<set $PC[$CC][$PCmorphBONI].hp to $PC[$CC][$PCmorphQTY].wolf + ($PC[$CC][$PCmorphQTY].horse * 2) + ($PC[$CC][$PCmorphQTY].cow * 2) + ($PC[$CC][$PCmorphQTY].dinosaur * 3)>>\
<<set $PC[$CC][$PCmorphBONI].bodyth to $PC[$CC][$PCmorphQTY].fox>>\
<<set $PC[$CC][$PCmorphBONI].bodydam to $PC[$CC][$PCmorphQTY].cat>>\
<<set $PC[$CC][$PCmorphBONI].flirtth to $PC[$CC][$PCmorphQTY].bunny>>\
<<set $PC[$CC][$PCmorphBONI].flirtdam to $PC[$CC][$PCmorphQTY].goblin>>\
<<set $PC[$CC][$PCmorphBONI].lessdamage to $PC[$CC][$PCmorphQTY].slime>>\
<<set $PC[$CC][$PCmorphBONI].fireresist to $PC[$CC][$PCmorphQTY].hellhound + $PC[$CC][$PCmorphQTY].demon>>\
<<set $PC[$CC][$PCmorphBONI].disengage to $PC[$CC][$PCmorphQTY].snake * 3>>\
\
\
<<set _morph to "misshapen monstrosity">>\
<<set _foundation to false>>\
<<if (_head is 1) and (_neck is 1) and (_chest is 1) and (_waist is 1) and (_legs is 1) and (_arms > 1)>>\
<<set _foundation to true>>\
<<set _morph to "humanoid">>\
<<endif>>\
\
\
<!-- EXACTLY HUMAN -->\
<<if (_foundation is true) and (_horns is 0) and (_tail is 0) and (_feet is 1) and (_hands is 1) and (_arms is 2)>>\
<<set _morph to "human">>\
<<if (_wings > 0) and (_demon is 0)>>\
<<set _morph to "angel-morph">>\
<<endif>>\
<<endif>>\
<!-- ANIMAL MORPHS -->\
<<if _foundation is true>>\
<<if _bunny > (_cat + _fox + _wolf + _horse + _ratkin + _insect)>>\
<<set _morph to "bunny-morph">>\
<<elseif _cat > (_bunny + _fox + _wolf + _horse + _ratkin + _insect)>>\
<<set _morph to "cat-morph">>\
<<elseif _fox > (_bunny + _cat + _wolf + _horse + _ratkin + _insect)>>\
<<set _morph to "fox-morph">>\
<<elseif _wolf > (_bunny + _cat + _fox + _horse + _ratkin + _insect)>>\
<<set _morph to "wolf-morph">>\
<<elseif _horse > (_bunny + _cat + _fox + _wolf + _ratkin + _insect)>>\
<<set _morph to "horse-morph">>\
<<elseif _ratkin > (_bunny + _cat + _fox + _wolf + _horse + _insect)>>\
<<set _morph to "rat-morph">>\
<<elseif _insect > (_bunny + _cat + _fox + _wolf + _horse + _ratkin)>>\
<<set _morph to "insect-morph">>\
<<elseif _dinosaur > (_bunny + _cat + _fox + _wolf + _horse + _ratkin + _insect)>>\
<<set _morph to "dinosaur-morph">>\
<<elseif (_bunny + _cat + _fox + _wolf + _horse + _ratkin + _cow) > 0>>\
<<set _morph to "animal-morph">>\
<<endif>>\
<<endif>>\
<!-- MINOTAUR -->\
<<if (_foundation is true) and _cow > (_bunny + _cat + _fox + _wolf + _horse + _ratkin + _insect)>>\
<<set _morph to "minotaur">>\
<<endif>>\
<!-- HORSE and CENTAUR-->\
<<if _horse > 3>>\
<<if (_head is 1) and (_neck is 1) and (_chest is 1) and (_waist is 1)>>\
<<if (_legs is 2) and (_insect is 0) and (_spider is 0)>>\
<<if _arms > 0>>\
<<set _morph to "centaur">>\
<<else>>\
<<set _morph to "horse">>\
<<endif>>\
<<endif>>\
<<endif>>\
<<endif>>\
\
<!-- DOGS-->\
<<if (_legs > 1) and (_legs < 4) and (_arms + _hands + _fingers < 3) and (_wolf + _hellhound > _insect)>>\
<<if _wolf > 2>>\
<<set _morph to "wolf">>\
<<elseif _hellhound > 2>>\
<<set _morph to "hellhound">>\
<<endif>>\
<<endif>>\
\
<!-- DEMON types -->\
<<if (_foundation is true) and (_demon > 3)>>\
<<if (_breast > 0) and (_pussy > 0) and (_penis is 0)>>\
<<set _morph to "succubus">>\
<<elseif (_penis > 0) and (_pussy is 0) and (_breast is 0)>>\
<<set _morph to "incubus">>\
<<elseif (_penis > 0) and (_breast > 0) and (_pussy > 0)>>\
<<set _morph to "omnibus">>\
<<else>>\
<<set _morph to "demon-morph">>\
<<endif>>\
<<endif>>\
\
<!-- SNAKE and NAGA -->\
<<if (_snake > 2) and (_legs is 0) and (_feet is 0) and (_tail > 0)>>\
<<if (_arms is 0)>>\
<<set _morph to "snake-morph">>\
<<else>>\
<<set _morph to "naga">>\
<<endif>>\
<<endif>>\
<!-- INSECT-->\
<<if _insect > (_human + _bunny + _cat + _fox + _wolf + _horse + _ratkin)>>\
<<if (_legs is 3)>>\
<<set _morph to "insect">>\
<<elseif _legs is 4>>\
<<set _morph to "scorpion">>\
<<endif>>\
<<endif>>\
<!-- GOBLIN -->\
<<if (_foundation is true) and (_goblin > _human)>>\
<<set _morph to "goblin">>\
<<endif>>\
<!-- SLIME -->\
<<if (_slime > _human) and (_slime > _bunny + _cow + _cat + _fox + _wolf + _horse + _ratkin + _insect)>>\
<<if (_foundation is true) >>\
<<set _morph to "slime-morph">>\
<<else>>\
<<set _morph to "slime">>\
<<endif>>\
<<endif>>\
<!-- SPIDER -->\
<<if (_spider > 2) and (_legs > 3)>>\
<<set _morph to "spider-morph">>\
<<if (_head is 0) and (_arms is 0)>>\
<<set _morph to "spider">>\
<<endif>>\
<<endif>>\
\
\
<!-- SEX -->\
<<set _sex to "hermaphrodite">>\
<<if (_penis > 0) and (_breast > 0) and (_pussy is 0)>>\
<<set _sex to "dick-girl">>\
<<elseif (_penis is 0) and (_pussy > 0)>>\
<<set _sex to "female">>\
<<elseif (_penis > 0) and (_pussy is 0)>>\
<<set _sex to "male">>\
<<elseif (_penis + _breast + _pussy) is 0>>\
<<set _sex to "sexless">>\
<<endif>>\
\
<<set $PC[$CC][$PCmorph] to _morph>>\
<<set $PC[$CC][$PCsex] to _sex>>\
\
<<if setup.TypeOf($GameState) is "string">>\
<<if $GameState neq "menu">>\
<<replace "#CapSexMorph">><<ShowSexMorph>><</replace>>\
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "ShowSexMorph">>\
<<if $PC[$CC][$PCsex] is "male">>\
@@color:DeepSkyBlue;Male <<print $PC[$CC][$PCmorph]>>@@
<<elseif $PC[$CC][$PCsex] is "female">>\
@@color:Pink;Female <<print $PC[$CC][$PCmorph]>>@@
<<else>>\
@@color:DarkOrchid;<<print $PC[$CC][$PCsex].toUpperFirst()>> <<print $PC[$CC][$PCmorph]>>@@
<<endif>>\
<</widget>>\
<<widget "Recalc">>\
<<UpdateMorphs>>\
<<set $PC[$CC][$PChpmax] to ($PC[$CC][$PClevel] * $PC[$CC][$PCcon]) + $PC[$CC][$PCmorphBONI].hp>>\
<<set $PC[$CC][$PCtohit] to 5 *($PC[$CC][$PCdex] - 10)>>\
<<set _ClassName to setup.PtrToClass($PC[$CC][$PCclass])>>\
<<if _ClassName is "peasant">>\
<<set $PC[$CC][$PChpmax] to $PC[$CC][$PChpmax] + $PC[$CC][$PClevel] >>\
<<endif>>\
<<set _BestPeasant to setup.AchievementHandler("Best Peasant", "HAS?", -1)>>\
<<if _BestPeasant > 0>>\
<<set $PC[$CC][$PChpmax] to $PC[$CC][$PChpmax] + _BestPeasant>>\
<<endif>>\
<<set _BestGuardian to setup.AchievementHandler("Best Guardian", "HAS?", -1)>>\
<<if _BestGuardian > 0>>\
<<set $PC[$CC][$PChpmax] to $PC[$CC][$PChpmax] + (_BestGuardian * 2)>>\
<<endif>>\
\
<<set $PC[$CC][$PCmanamax] to $PC[$CC][$PCint]>>\
<<set _BestMage to setup.AchievementHandler("Best Mage", "HAS?", -1)>>\
<<if _BestMage > 0>>\
<<set $PC[$CC][$PCmanamax] to $PC[$CC][$PCmanamax] + _BestMage>>\
<<endif>>\
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "mage">>\
<<set $PC[$CC][$PCmanamax] to $PC[$CC][$PCmanamax] + $PC[$CC][$PClevel]>>\
<<endif>>\
\
<<set _EnchantBonuses to setup.GetEnchantBonuses($CC)>>\
<<if _EnchantBonuses.Health > 0>>\
<<set $PC[$CC][$PChpmax] to $PC[$CC][$PChpmax] + _EnchantBonuses.Health>>\
<<endif>>\
<<if _EnchantBonuses.ManaBonus > 0>>\
<<set $PC[$CC][$PCmanamax] to $PC[$CC][$PCmanamax] + _EnchantBonuses.ManaBonus>>\
<<endif>>\
\
<<if $PC[$CC][$PChpmax] > 199>>\
<<AwardAchievement "Guardian">>\
<<endif>>\
<</widget>>\
<<widget "AwardPartyXP">>\
<<set _PartyWho to _args[0]>>\
<<set _GainXP to _args[1]>>\
<<if _GainXP > 0>>\
<<if $PC[$CC][$PCparty].length >= _PartyWho>>\
<<set $PC[$CC][$PCparty][_PartyWho].xp to $PC[$CC][$PCparty][_PartyWho].xp + _GainXP>>\
@@color:LightGreen;<<print $PC[$CC][$PCparty][_PartyWho].name>> receives <<print _GainXP>> xp@@\
<<set _xpneed to setup.XpNeeded($PC[$CC][$PCparty][_PartyWho].level)>>\
<<if $PC[$CC][$PCparty][_PartyWho].xp >= _xpneed>>, and has @@color:LightGreen;gained a level!@@\
<<set $PC[$CC][$PCparty][_PartyWho].level to $PC[$CC][$PCparty][_PartyWho].level +1>>\
<<set $PC[$CC][$PCparty][_PartyWho].xp to $PC[$CC][$PCparty][_PartyWho].xp - _xpneed>>\
<<set $PC[$CC][$PCparty][_PartyWho].hpcur to $PC[$CC][$PCparty][_PartyWho].hpcur +1>>\
<<set $PC[$CC][$PCparty][_PartyWho].hpmax to $PC[$CC][$PCparty][_PartyWho].hpmax +1>>\
<<else>><br><<endif>>\
<<if $PC[$CC][$PCparty][_PartyWho].level > 6>>\
<<AwardAchievement "Iron Army">>\
<<endif>>\
<<else>>\
@@color:Red;Error: attempting to award xp to party member _PartyWho but there isn't one@@
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "AwardXP">>\
<<set _xpneed to setup.XpNeeded($PC[$CC][$PClevel])>>\
<<set _AXPgain to $args[0]>>\
<<set _AXPsource to $args[1]>>\
\
<<set _ReportPartyGains to []>>\
<!-- implement: delete this? We have a dedicated partyxp widget now -->\
<<if (_AXPsource is "combat") and (_AXPgain > 99999)>>\
<<set _DrainedXPMulti to 10>>\
<<set _MemberGainXP to Math.trunc(_AXPgain / 5)>>\
<<set _PartyQTY to $PC[$CC][$PCparty].length>>\
<<for _PartyLoops to 0; _PartyLoops < _PartyQTY; _PartyLoops++>>\
<<if $PC[$CC][$PCparty][_PartyLoops].state is "Alive">>\
<<set _DrainedXPMulti to _DrainedXPMulti -1>>\
<<set $PC[$CC][$PCparty][_PartyLoops].xp to $PC[$CC][$PCparty][_PartyLoops].state + _MemberGainXP>>\
<<set _ReportPartyGains[_ReportPartyGains.length -1] to _PartyLoops>>\
<<endif>>\
<</for>>\
<<set _AXPgain to Math.trunc(_AXPgain * (_DrainedXPMulti / 10))>>\
<<endif>>\
\
<<set $PC[$CC][$PCxp] to $PC[$CC][$PCxp] + _AXPgain>>\
<<if (_AXPsource is "combat") and (setup.PlayerHasPerk("Power Leveler") is true)>>\
<<set $PC[$CC][$PCxp] to $PC[$CC][$PCxp] + 1>>\
@@color:LightGreen;You have gained <<print _AXPgain>>@@ @@color:MediumSlateBlue;(+1)@@ @@color:LightGreen;experience. @@\
<<else>>\
@@color:LightGreen;You have gained <<print _AXPgain>> experience. @@\
<<endif>>\
<<if _ReportPartyGains.length > 0>>\
<br>\
<<for _PartyLoops to 0; _PartyLoops < _ReportPartyGains.length; _PartyLoops++>>\
<<set _pPTR to _ReportPartyGains[_PartyLoops]>>\
<<if $PC[$CC][$PCparty][_pPTR].state is "Alive">>\
@@color:LightGreen;<<print $PC[$CC][$PCparty][_PartyLoops].name>> has gained <<print _MemberGainXP>> experience \@@
<<set _PMXPneeded to ((2 ** $PC[$CC][$PCparty][_PartyLoops].level) * 10) -10>>\
<<if $PC[$CC][$PCparty][_pPTR].xp > _PMXPneeded>>\
<<set $PC[$CC][$PCparty][_pPTR].level to $PC[$CC][$PCparty][_pPTR].level +1>>\
and is now level <<print $PC[$CC][$PCparty][_pPTR].level>>\
<<set $PC[$CC][$PCparty][_pPTR].hpcur to $PC[$CC][$PCparty][_pPTR].hpcur + $PC[$CC][$PCparty][_pPTR].level>>\
<<set $PC[$CC][$PCparty][_pPTR].hpmax to $PC[$CC][$PCparty][_pPTR].hpmax + $PC[$CC][$PCparty][_pPTR].level>>\
<<else>><br>\
<<endif>>\
<<else>>\
@@color:Yellow;Error in AwardXP: non-living party member gained xp
<<endif>>\
<</for>>\
<<endif>>\
\
<<set _Leveled to false>>\
<<set _StatGains to 0>>\
<<for _AX to 0; _AX < 3; _AX++>>\
<<if $PC[$CC][$PCxp] >= _xpneed>>\
<<set $PC[$CC][$PCunspentPoints] to $PC[$CC][$PCunspentPoints] +1>>\
<<set $PC[$CC][$PClevel] to $PC[$CC][$PClevel] +1>>\
<<set $PC[$CC][$PCxp] to $PC[$CC][$PCxp] - _xpneed>>\
<<set $PC[$CC][$PChpcur] to $PC[$CC][$PChpcur] + $PC[$CC][$PCcon]>>\
<<set _xpneed to setup.XpNeeded($PC[$CC][$PClevel])>>\
<<set _Leveled to true>>\
<<set _StatGains to _StatGains +1>>\
<<endif>>\
<</for>>\
\
<<if _Leveled is true>>\
<<Recalc>>\
@@color:LightGreen;You are now level $PC[$CC][$PClevel]!@@
Maximum health is now $PC[$CC][$PChpmax], and you have gained +<<print _StatGains>> stat point<<if _StatGains > 1>>s<<endif>>.
<<if $PC[$CC][$PClevel] > 6>>\
<<set _ClassName to setup.PtrToClass($PC[$CC][$PCclass])>>\
<<set _AchName to "fail">>\
<<if _ClassName is "peasant">>\
<<set _AchName to "Peasant Proficiency">>\
<<elseif _ClassName is "lumberjack">>\
<<set _AchName to "Lumberjacked up!">>\
<<elseif _ClassName is "prostitute">>\
<<set _AchName to "World's Oldest Professon">>\
<<elseif _ClassName is "warrior">>\
<<set _AchName to "Swords and spears">>\
<<elseif _ClassName is "scholar">>\
<<set _AchName to "Scholarly pursuits">>\
<<elseif _ClassName is "priest">>\
<<set _AchName to "Parson">>\
<<elseif _ClassName is "rogue">>\
<<set _AchName to "Sneaky McSneakerson">>\
<<elseif _ClassName is "mage">>\
<<set _AchName to "Magiferous Magery">>\
<<elseif _ClassName is "barbarian">>\
<<set _AchName to "Driven Before You">>\
<<elseif _ClassName is "monk">>\
<<set _AchName to "Peace in the Calm of the Horny">>\
<<elseif _ClassName is "ninja">>\
<<set _AchName to "Stabby Stealther">>\
<<elseif _ClassName is "paladin">>\
<<set _AchName to "Pally Power!">>\
<<elseif _ClassName is "guardian">>\
<<set _AchName to "Panzerheitschaftlichkeit">>\
<<endif>>\
\
<<if _AchName is "fail">>\
@@color:Red;Error in AwardXP achievement check: unrecognized class ID: " + _ClassName@@
<<else>>\
<<AwardAchievement _AchName>>\
<<endif>>\
<<elseif $PC[$CC][$PClevel] > 9>>\
<<AwardAchievement "Power Leveler">>\
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "UpdateACandFlirts">>\
<<set _LightFromEquip to 0>>\
<<set _AcFromDex to ($PC[$CC][$PCdex] - 10) * 5>>\
<<set _AcFromEquip to 0>>\
<<set _AcFromMagic to setup.GetEffect("armor")>>\
<<set _BestMonk to setup.AchievementHandler("Best Monk", "HAS?", -1)>>\
<<if _BestMonk > 0>>\
<<set _AcFromBestMonk to _BestMonk * 5>>\
<<else>>\
<<set _AcFromBestMonk to 0>>\
<<endif>>\
<<set _BestGuardian to setup.AchievementHandler("Best Guardian", "HAS?", -1)>>\
<<if _BestGuardian > 0>>\
<<set _AcFromBestGuardian to _BestGuardian * 2>>\
<<else>>\
<<set _AcFromBestGuardian to 0>>\
<<endif>>\
<<set _AcFromPotions to 0>>\
<<if setup.GetEffect("stoneskin") > 0>>\
<<set _AcFromPotions to $PC[$CC][$PClevel] * 5>>\
<<endif>>\
<<if setup.GetEffect("rage") > 0>>\
<<set _AcFromPotions to _AcFromPotions -50>>\
<<endif>>\
\
<<set _EnchantBonuses to setup.GetEnchantBonuses($CC)>>\
<<set _AcFromEnchants to _EnchantBonuses.Defense>>\
\
<<set _FlirtFromEquip to 0>>\
\
<<set _MonkArmor to 0>>\
<<set _IsMonk to false>>\
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "monk">>\
<<set _IsMonk to true>>\
<<endif>>\
\
<<set _bpqty to $PC[$CC][$PCbp].length>>\
<<for _i to 0; _i < _bpqty; _i++>>\
<<set _bp to $PC[$CC][$PCbp][_i]>>\
<<if _bp.equippable is true>>\
<<if $PC[$CC][$PCbp][_i].equip[0] neq 0>>\
<<DescribeItem $PC[$CC][$PCbp][_i].equip>>\
<<set _AcFromEquip to _AcFromEquip + $ItemPoke.armor>>\
<<set _FlirtFromEquip to _FlirtFromEquip + $ItemPoke.flirt>>\
<<if $ItemPoke.tooleffect is 23>>\
<<set _LightFromEquip to _LightFromEquip +1>>\
<<endif>>\
<<elseif _IsMonk is true>>\
<<set _MonkArmor to _MonkArmor + $PC[$CC][$PClevel]>>\
<<endif>>\
<<endif>>\
<</for>>\
<<set $PC[$CC][$PCac] to [_AcFromDex, _AcFromEquip, $PC[$CC][$PCmorphBONI].ac, _AcFromMagic, _AcFromBestMonk, _AcFromPotions, _AcFromEnchants, _MonkArmor, _AcFromBestGuardian]>>\
<<set $PC[$CC][$PCFlirtFromEquip] to _FlirtFromEquip>>\
<<PurgeOneEffect "antern">>\
<<if _LightFromEquip > 0>>\
<<ApplyEffect "Lantern" _LightFromEquip>>\
<<endif>>\
<</widget>>\
<<widget "GetPlayerAbsorption">>\
<<set _AbsVal to 0>>\
<<set _AbsText to "">>\
<<set _AbsCount to 0>>\
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "barbarian">>\
<<set _AbsVal to _AbsVal +1>>\
<<set _AbsText to "Barbarian: (+1)<br>">>\
<<set _AbsCount to _AbsCount +1>>\
<<endif>>\
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "guardian">>\
<<set _AbsVal to _AbsVal + $PC[$CC][$PClevel]>>\
<<set _AbsText to "Guardian: (+" + $PC[$CC][$PClevel] + ")<br>">>\
<<set _AbsCount to _AbsCount +1>>\
<<endif>>\
<<if setup.PlayerHasPerk("Pacifist") is true>>\
<<set _AbsVal to _AbsVal +1>>\
<<set _AbsText to _AbsText + "Perk: Pacifist: (+1)<br>">>\
<<set _AbsCount to _AbsCount +1>>\
<<endif>>\
<<if setup.PlayerHasPerk("Durable") is true>>\
<<set _AbsVal to _AbsVal +1>>\
<<set _AbsText to _AbsText + "Perk: Durable (+1)<br>">>\
<<set _AbsCount to _AbsCount +1>>\
<<endif>>\
<<set $PC[$CC][$PCabsorb] to _AbsVal>>\
<<if _AbsCount > 1>>\
<<set _AbsText to "" + _AbsVal + "<br>" + _AbsText>>\
<<endif>>\
<<if _args[0] is "show">>\
<<if _AbsCount > 0>>\
<<print _AbsText>>\
<<else>>\
None
<<endif>>\
<<endif>>\
<<set $PC[$CC][$PCabsorb] to _AbsVal>>\
<</widget>>\
<<widget "PreambleAvatarClick">>\
<<set _Who to $args[0]>>\
<<replace "#CharInfo">>\
<<if $PC[_Who][$PCstate] is "alive">>\
@@color:Yellow;<<print $PC[_Who][$PCname]>>@@ (Alive)
Level <<print $PC[_Who][$PClevel]>> <<print setup.PtrToClass($PC[_Who][$PCclass])>>, <<print $PC[_Who][$PCxp]>>/<<print setup.XpNeeded($PC[_Who][$PClevel])>> xp
Generation: <<print $PC[_Who][$PCgen]>>, reincarnation bonus: <<print $PC[_Who][$PCretirementcap]>>
<<if $PC[_who][$PClocation] is "town">>\
Location: The Town of Crescentheart
<<elseif $PC[_who][$PClocation] is "tower">>\
Location: Tower of Triumph, level <<print $PC[_who][$PCz]>>
<<elseif $PC[_who][$PClocation] is "forest">>\
Location: Enchanted Forest, level <<print $PC[_who][$PCfz]>>
<<elseif $PC[_who][$PClocation] is "desert">>\
Location: Southern desert, level <<print $PC[_who][$PCdz]>>
<<else>>\
@@error: unrecognized location: $PC[_who][$PClocation]@@
<<endif>>\
<<elseif $PC[_Who][$PCstate] is "dead">>\
@@color:Yellow;<<print $PC[_Who][$PCname]>>@@ @@color:Red;(Dead)@@
Level <<print $PC[_Who][$PClevel]>> <<print setup.PtrToClass($PC[_Who][$PCclass])>>, <<print $PC[_Who][$PCxp]>>/<<print setup.XpNeeded($PC[_Who][$PClevel])>> xp
Generation: <<print $PC[_Who][$PCgen]>>, reincarnation bonus: <<print $PC[_Who][$PCretirementcap]>>
<<if $PC[_who][$PClocation] is "town">>\
Location: Church of Immaculate Rebirth, Crescentheart
<<elseif $PC[_who][$PClocation] is "tower">>\
Location: Tower of Triumph, level <<print $PC[_who][$PCz]>>
<<elseif $PC[_who][$PClocation] is "forest">>\
Location: Enchanted Forest, level <<print $PC[_who][$PCfz]>>
<<elseif $PC[_who][$PClocation] is "desert">>\
Location: Southern desert, level <<print $PC[_who][$PCdz]>>
<<else>>\
@@error: unrecognized location: $PC[_who][$PClocation]@@
<<endif>>\
<<elseif $PC[_Who][$PCstate] is "retired">>\
@@color:Yellow;Ready to reincarnate!@@
Generation: <<print $PC[_Who][$PCgen] +1>>, reincarnation bonus: <<print $PC[_Who][$PCretirementcap]>>
<<elseif $PC[_Who][$PCstate] is "lost">>\
@@color:Yellow;<<print $PC[_Who][$PCname]>>@@ (Lost)
Level <<print $PC[_Who][$PClevel]>> <<print setup.PtrToClass($PC[_Who][$PCclass])>>, <<print $PC[_Who][$PCxp]>>/<<print setup.XpNeeded($PC[_Who][$PClevel])>> xp
Generation: <<print $PC[_Who][$PCgen]>>, reincarnation bonus: <<print $PC[_Who][$PCretirementcap]>>
<<if $PC[_who][$PClocation] is "town">>\
Last known location: Church of Immaculate Rebirth, Crescentheart
<<elseif $PC[_who][$PClocation] is "tower">>\
Last known location: Tower of Triumph, level <<print $PC[_who][$PCz]>>
<<elseif $PC[_who][$PClocation] is "forest">>\
Last known location: Enchanted Forest, level <<print $PC[_who][$PCfz]>>
<<elseif $PC[_who][$PClocation] is "desert">>\
Last known location: Southern desert, level <<print $PC[_who][$PCdz]>>
<<else>>\
Last known location @@error: unrecognized location: $PC[_who][$PClocation]@@
<<endif>>\
<<elseif $PC[_Who][$PCstate] is "in transit">>\
@@color:Yellow;<<print $PC[_Who][$PCname]>>@@ (In transit)
<<set _PickupPTR to $PC[_Who][$PCz]>>\
This character's body was picked up by <<print $PC[_PickupPTR][$PCname]>>, and is currently in transit.
<<else>>\
<<if _Who is 0>>\
@@color:Yellow;Character slot is available!@@
<<elseif _Who is 1>>\
<<if setup.AchievementHandler("I feel your loss", "HAS?", -1) > 0>>\
@@color:Yellow;Character slot is available!@@
<<else>>\
@@color:Yellow;Character slot is locked@@
(Try progressing through the tutorial quests at the guild to unlock it)
<<endif>>\
<<elseif _Who is 2>>\
<<if setup.AchievementHandler("Three's Company", "HAS?", -1) > 0>>\
@@color:Yellow;Character slot is available!@@
<<else>>\
@@color:Yellow;Character slot is locked@@
(Try progressing through the tutorial quests at the guild to unlock it)
<<endif>>\
<<else>>\
@@color:Interface error: PreambleAvatarClick request for: (_Who))
<<endif>>\
<<endif>>\
<</replace>>\
<</widget>>\
<<widget "PreambleShowCharacterInterface">>\
<<set _who to $args[0]>>\
<<set _action to "default">>\
<<if $PC[_who][$PCstate] is "alive">>\
<<if $PC[_who][$PCavatar][0] is "external">>\
<<set _p to $PC[_who][$PCavatar][1]>>\
<<else>>\
<<set _p to $AvatarPath + $PC[_who][$PCavatar][0] + $PC[_who][$PCavatar][1] +".jpg">>\
<<endif>>\
<<if $PC[_who][$PClocation] is "tower">>\
<<set _LinkText to "Play!">>\
<<set _action to "Dungeon64">>\
<<elseif $PC[_who][$PClocation] is "town">>\
<<set _LinkText to "Play!">>\
<<set _action to "TownSquare">>\
<<elseif $PC[_who][$PClocation] is "forest">>\
<<set _LinkText to "Play!">>\
<<set _action to "Forest">>\
<<elseif $PC[_who][$PClocation] is "desert">>\
<<set _LinkText to "Play!">>\
<<set _action to "Desert">>\
<<endif>>\
<<elseif $PC[_who][$PCstate] is "dead">>\
<<set _p to $ImgPath + "boxdead.jpg">>\
<<set _LinkText to "Reincarnate!">>\
<<set _action to "CharGen">>\
<<elseif $PC[_who][$PCstate] is "lost">>\
<<set _p to $ImgPath + "boxdead.jpg">>\
<<set _LinkText to "Reincarnate!">>\
<<set _action to "CharGen">>\
<<elseif $PC[_who][$PCstate] is "in transit">>\
<<set _p to $ImgPath + "boxavail.jpg">>\
<<set _LinkText to "Body in transit">>\
<<set _action to "none">>\
<<elseif $PC[_who][$PCstate] is "retired">>\
<<set _p to $ImgPath + "boxavail.jpg">>\
<<set _LinkText to "Reincarnate!">>\
<<set _action to "CharGen">>\
<<elseif $PC[_who][$PCstate] is "none">>\
<<if _who is 0>>\
<<set _p to $ImgPath + "boxavail.jpg">>\
<<set _LinkText to "Create">>\
<<set _action to "CharGen">>\
<<elseif _who is 1>>\
<<if setup.AchievementHandler("I feel your loss", "HAS?", -1) > 0>>\
<<set _p to $ImgPath + "boxavail.jpg">>\
<<set _LinkText to "Create">>\
<<set _action to "CharGen">>\
<<else>>\
<<set _p to $ImgPath + "boxlocked.jpg">>\
<<set _LinkText to "(Slot locked)">>\
<<set _action to "none">>\
<<endif>>\
<<elseif _who is 2>>\
<<if setup.AchievementHandler("Three's Company", "HAS?", -1) > 0>>\
<<set _p to $ImgPath + "boxavail.jpg">>\
<<set _LinkText to "Create">>\
<<set _action to "CharGen">>\
<<else>>\
<<set _p to $ImgPath + "boxlocked.jpg">>\
<<set _LinkText to "(Slot locked)">>\
<<set _action to "none">>\
<<endif>>\
<<else>>\
@@color:Error in interface: who is: _who@@
<<endif>>\
<<endif>>\
\
<<capture _who>>\
<span class="PreambleImgWrapper">\
<span id="ReplaceThis">\
<<link [img[_p]]>>
<<PreambleAvatarClick _who>>
<</link>>\
</span>\
</span>\
<</capture>>\
<<if _action is "none">>\
<<print _LinkText>>\
<<else>>\
<<set _SpanTexts to ["KeypOne","KeypTwo","KeypThree"]>>\
<<set _KeyChars to ["1","2","3"]>>\
<span @id="_SpanTexts[_who]">\
<<set _LinkText to _KeyChars[_who] + ") " + _LinkText>>\
<<capture _who>>\
<<link _LinkText _action>>
<<set $CC to _who>>
<</link>>
<</capture>>\
</span>\
<<endif>>\
<</widget>>\
<<widget "KickFromTower">>\
<<set $PC[$CC][$PClocation] to "town">>\
<<set $PC[$CC][$PCz] to 0>>\
<<set $PC[$CC][$PCx] to $WORLD.TowerOrigin[0]>>\
<<set $PC[$CC][$Pyx] to $WORLD.TowerOrigin[1]>>\
<</widget>>\
<<widget "AssignHumanoidAnatomyToMon">>\
<<set _Atype to $args[0]>>\
<<set _Asex to $args[1]>>\
<<set _Abonus to $args[2]>>\
<<set $Mon.anatomy to []>>\
<<if _Asex is "male">>\
<<set $Mon.anatomy[0] to { type: $BPhead, morph: _Atype }>>\
<<set $Mon.anatomy[1] to { type: $BPneck, morph: _Atype }>>\
<<set $Mon.anatomy[2] to { type: $BPback, morph: _Atype }>>\
<<set $Mon.anatomy[3] to { type: $BPchest, morph: _Atype }>>\
<<set $Mon.anatomy[4] to { type: $BPwield, morph: _Atype }>>\
<<set $Mon.anatomy[5] to { type: $BPwield, morph: _Atype }>>\
<<set $Mon.anatomy[6] to { type: $BPhands, morph: _Atype }>>\
<<set $Mon.anatomy[7] to { type: $BPring, morph: _Atype }>>\
<<set $Mon.anatomy[8] to { type: $BPring, morph: _Atype }>>\
<<set $Mon.anatomy[9] to { type: $BPwaist, morph: _Atype }>>\
<<set $Mon.anatomy[10] to { type: $BPlegs, morph: _Atype }>>\
<<set $Mon.anatomy[11] to { type: $BPfeet, morph: _Atype }>>\
<<set $Mon.anatomy[12] to { type: $BPpenis, morph: _Atype }>>\
<<elseif _Asex is "female">>\
<<set $Mon.anatomy[0] to { type: $BPhead, morph: _Atype }>>\
<<set $Mon.anatomy[1] to { type: $BPneck, morph: _Atype }>>\
<<set $Mon.anatomy[2] to { type: $BPback, morph: _Atype }>>\
<<set $Mon.anatomy[3] to { type: $BPchest, morph: _Atype }>>\
<<set $Mon.anatomy[4] to { type: $BPwield, morph: _Atype }>>\
<<set $Mon.anatomy[5] to { type: $BPwield, morph: _Atype }>>\
<<set $Mon.anatomy[6] to { type: $BPhands, morph: _Atype }>>\
<<set $Mon.anatomy[7] to { type: $BPring, morph: _Atype }>>\
<<set $Mon.anatomy[8] to { type: $BPring, morph: _Atype }>>\
<<set $Mon.anatomy[9] to { type: $BPwaist, morph: _Atype }>>\
<<set $Mon.anatomy[10] to { type: $BPlegs, morph: _Atype }>>\
<<set $Mon.anatomy[11] to { type: $BPfeet, morph: _Atype }>>\
<<set $Mon.anatomy[12] to { type: $BPboobs, morph: _Atype }>>\
<<set $Mon.anatomy[13] to { type: $BPpussy, morph: _Atype }>>\
<<elseif _Asex is "herm">>\
<<set $Mon.anatomy[0] to { type: $BPhead, morph: _Atype }>>\
<<set $Mon.anatomy[1] to { type: $BPneck, morph: _Atype }>>\
<<set $Mon.anatomy[2] to { type: $BPback, morph: _Atype }>>\
<<set $Mon.anatomy[3] to { type: $BPchest, morph: _Atype }>>\
<<set $Mon.anatomy[4] to { type: $BPwield, morph: _Atype }>>\
<<set $Mon.anatomy[5] to { type: $BPwield, morph: _Atype }>>\
<<set $Mon.anatomy[6] to { type: $BPhands, morph: _Atype }>>\
<<set $Mon.anatomy[7] to { type: $BPring, morph: _Atype }>>\
<<set $Mon.anatomy[8] to { type: $BPring, morph: _Atype }>>\
<<set $Mon.anatomy[9] to { type: $BPwaist, morph: _Atype }>>\
<<set $Mon.anatomy[10] to { type: $BPlegs, morph: _Atype }>>\
<<set $Mon.anatomy[11] to { type: $BPfeet, morph: _Atype }>>\
<<set $Mon.anatomy[12] to { type: $BPpenis, morph: _Atype }>>\
<<set $Mon.anatomy[13] to { type: $BPboobs, morph: _Atype }>>\
<<set $Mon.anatomy[14] to { type: $BPpussy, morph: _Atype }>>\
<<else>>\
@@color:Red;Error in AssignHumanoidAnatomyToMon: (_Atype, _Asex)
<<endif>>\
<<if _Abonus is "tail">>\
<<set $Mon.anatomy[$Mon.anatomy.length] to { type: $BPtail, morph: _Atype }>>\
<<endif>>\
<</widget>>\
<<widget "AddToGraveyard">>\
<<for _i to 9; _i > 0; _i-->>
<<set $RETIREES[_i] to $RETIREES[_i -1]>>\
<</for>>\
<<set $RETIREES[0] to {
name: $PC[$CC][$PCname],
gen: $PC[$CC][$PCgen],
level: $PC[$CC][$PClevel],
class: setup.PtrToClass($PC[$CC][$PCclass]),
gold: $PC[$CC][$PCcoin],
maxforest: $PC[$CC][$PChfze],
maxtower: $PC[$CC][$PChtze],
maxdesert: $PC[$CC][$PChdze],
year: $WORLD.year,
day: $WORLD.day,
won: $PC[$CC][$PCmisc].battleswon,
death: "retired"
}>>\
<</widget>>\
<<widget "PlayBGM">>\
<<if $WORLD.MusicEnabled is false>>\
<<masteraudio stop>>\
<<else>>\
<<if $args[0] is $WORLD.music>>\
<<else>>\
<<set $WORLD.music to $args[0]>>\
<<if $args[0] is "menu">>\
<<masteraudio stop>>\
<<audio "menu_bgm" volume 0.4 play loop>>\
<<elseif $args[0] is "town">>\
<<masteraudio stop>>\
<<audio "town_bgm" volume 0.4 play loop>>\
<<elseif $args[0] is "explore">>\
<<masteraudio stop>>\
<<audio "explore_bgm" volume 0.4 play loop>>\
<<elseif $args[0] is "combat">>\
<<masteraudio stop>>\
<<audio "combat_bgm" volume 0.4 play loop>>\
<<elseif $args[0] is "boss">>\
<<masteraudio stop>>\
<<audio "boss_bgm" volume 0.4 play loop>>\
<<elseif $args[0] is "desert">>\
<<masteraudio stop>>\
<<audio "desert_bgm" volume 0.4 play loop>>\
<<else>>\
<<masteraudio stop>>\
<<endif>>\
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "SpellbookQWE">>\
<<set _Spell = $args[0]>>\
<<set _QWE to $args[1]>>\
<<set _CssStuff to "grayb">>\
<<set _ButtonText to "[" + _QWE + "]">>\
<<set _SpanID to _QWE + _Spell>>\
<<if $PC[$CC][$PCspellbook][_QWE] is _Spell>>\
<<set _CssStuff to "blueb">>\
<<endif>>\
<span @class="_CssStuff" @id="_SpanID">\
<<capture _Spell, _QWE>>\
<<button _ButtonText>>\
<<set _SpellSpans to ["firebolt","heal","armor","poison","soultrap","dart","portal"]>>\
<<for _SBI to 0; _SBI < _SpellSpans.length; _SBI++>>\
<<set _SpellKey to _SpellSpans[_SBI]>>\
<<if $PC[$CC][$PCspellbook][_SpellKey] > 0>>
<<set _GrayThisButton to _QWE + _SpellSpans[_SBI]>>\
<<set _asd to setup.ChangeButtonClass(_GrayThisButton,"grayb")>>
<<endif>>
<</for>>\
<<if $PC[$CC][$PCspellbook][_QWE] is _Spell>>\
<<set $PC[$CC][$PCspellbook][_QWE] to "">>\
<<else>>\
<<set _BlueThisButton to _QWE + _Spell>>\
<<set _asd to setup.ChangeButtonClass(_BlueThisButton,"blueb")>>
<<set $PC[$CC][$PCspellbook][_QWE] to _Spell>>\
<<endif>>\
<</button>>\
<</capture>>\
</span>\
<</widget>>\
<<widget "ClearTemporaryEffects">>\
<<for _CBE to $PC[$CC][$PCeffects].length -1; _CBE > -1; _CBE-->>\
<<if $PC[$CC][$PCeffects][_CBE][0].includes("ebbed")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<elseif $PC[$CC][$PCeffects][_CBE][0].includes("oison")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<elseif $PC[$CC][$PCeffects][_CBE][0].includes("rmor")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<elseif $PC[$CC][$PCeffects][_CBE][0].includes("raying")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<elseif $PC[$CC][$PCeffects][_CBE][0].includes("soul")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<elseif $PC[$CC][$PCeffects][_CBE][0].includes("toneskin")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<elseif $PC[$CC][$PCeffects][_CBE][0].includes("esist")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<elseif $PC[$CC][$PCeffects][_CBE][0].includes("rage")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<elseif $PC[$CC][$PCeffects][_CBE][0].includes(" walk")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<elseif $PC[$CC][$PCeffects][_CBE][0].includes(" breath")>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_CBE)>>\
<<endif>>\
<</for>>\
<</widget>>\
<<widget "DecrementEffects">>\
<<for _DE to $PC[$CC][$PCeffects].length -1; _DE > -1; _DE-->>\
<<if $PC[$CC][$PCeffects][_DE][0].includes("ight")>>\
<<set $PC[$CC][$PCeffects][_DE][1] to $PC[$CC][$PCeffects][_DE][1] - _args[0]>>\
<<elseif $PC[$CC][$PCeffects][_DE][0].includes("roused")>>\
<<set $PC[$CC][$PCeffects][_DE][1] to $PC[$CC][$PCeffects][_DE][1] - _args[0]>>\
<<elseif $PC[$CC][$PCeffects][_DE][0].includes("ttract")>>\
<<set $PC[$CC][$PCeffects][_DE][1] to $PC[$CC][$PCeffects][_DE][1] - _args[0]>>\
<<elseif $PC[$CC][$PCeffects][_DE][0].includes("ertile")>>\
<<set $PC[$CC][$PCeffects][_DE][1] to $PC[$CC][$PCeffects][_DE][1] - _args[0]>>\
<<elseif $PC[$CC][$PCeffects][_DE][0].includes("arren")>>\
<<set $PC[$CC][$PCeffects][_DE][1] to $PC[$CC][$PCeffects][_DE][1] - _args[0]>>\
<<elseif $PC[$CC][$PCeffects][_DE][0].includes("rage")>>\
<<set $PC[$CC][$PCeffects][_DE][1] to $PC[$CC][$PCeffects][_DE][1] - _args[0]>>\
<<elseif $PC[$CC][$PCeffects][_DE][0].includes(" walk")>>\
<<set $PC[$CC][$PCeffects][_DE][1] to $PC[$CC][$PCeffects][_DE][1] - _args[0]>>\
<<elseif $PC[$CC][$PCeffects][_DE][0].includes(" breath")>>\
<<set $PC[$CC][$PCeffects][_DE][1] to $PC[$CC][$PCeffects][_DE][1] - _args[0]>>\
<<endif>>\
<<if $PC[$CC][$PCeffects][_DE][1] < 1>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_DE)>>\
<<endif>>\
<</for>>\
<<ShowActiveEffects>>\
<</widget>>\
<<widget "PurgeOneEffect">>\
<<set _PurgeThis to _args[0]>>\
<<for _POE to $PC[$CC][$PCeffects].length -1; _POE > -1; _POE-->>\
<<if $PC[$CC][$PCeffects][_POE][0].includes(_PurgeThis)>>\
<<set _throwaway to $PC[$CC][$PCeffects].deleteAt(_POE)>>\
<<endif>>\
<</for>>\
<<ShowActiveEffects>>\
<</widget>>\
<<widget "ShowActiveEffects">>\
<<if $PC[$CC][$PCeffects].length > 0>>\
<<replace "#capeffects">>\
@@color:Gold;Active effects@@
<<for _SAE to 0; _SAE < $PC[$CC][$PCeffects].length; _SAE++>>\
<<print $PC[$CC][$PCeffects][_SAE][0]>>: <<print $PC[$CC][$PCeffects][_SAE][1]>>
<</for>>\
<hr>\
<</replace>>\
<<else>>\
<<replace "#capeffects">><</replace>>\
<<endif>>\
<</widget>>\
<<widget "ApplyEffect">>\
<<set _AEwhich to $args[0]>>\
<<set _AEweight to $args[1]>>\
<<set _AEtarget to -1>>\
<<set _AElength to $PC[$CC][$PCeffects].length>>\
<<for _AEi to 0; _AEi < _AElength; _AEi++>>\
<<if $PC[$CC][$PCeffects][_AEi][0] is _AEwhich>>\
<<set _AEtarget to _AEi>>\
<<set _AEi to 999>>\
<<endif>>\
<</for>>\
<<if _AEtarget > -1>>\
<<set $PC[$CC][$PCeffects][_AEtarget][1] to $PC[$CC][$PCeffects][_AEtarget][1] + _AEweight>>\
<<else>>\
<<set $PC[$CC][$PCeffects][_AElength] to [_AEwhich, _AEweight]>>\
<<endif>>\
<</widget>>\
<<widget "SpellAchieveCheck">>\
<<AwardAchievement "Scholar">>\
<<set _SAC to 0>>\
<<set _MageReady to true>>\
<<set _SpellList to ["firebolt","armor","poison","heal","up","down","portal","map","light","soultrap"]>>\
<!-- cure? -->\
<!-- passwall? -->
<<set _SACfails to 0>>\
<<for _SACi to 0; _SACi < _SpellList.length; _SACi++>>\
<<set _key to _SpellList[_SACi]>>\
<<if $PC[$CC][$PCspellbook][_key] is 0>>\
<<set _MageReady to false>>\
<<set _SACfails to _SACfails +1>>\
<<endif>>\
<</for>>\
<<if _MageReady is true>>\
<<AwardAchievement "Mage">>\
<<endif>>\
<</widget>>\
<<widget "ResetWorld">>\
<<set $WORLD to {}>>
<<set $WORLD.GameVersion to "24.3.18">>
<<set $WORLD.VersionCounter to 2>>
<<set $WORLD.MusicEnabled to true>>
<<set $WORLD.intro to 0>>
<<set $WORLD.selene to 0>>
<<set $WORLD.SeleneQuests to [0,0,0,0,0,0,0,0,0,0]>>\
<<set $WORLD.DaphneQuests to [0,0,0,0,0,0,0,0,0,0]>>\
<<set $WORLD.BoltmanQuests to [0,0,0,0,0]>>\
<<set $WORLD.smith to 0>>
<<set $WORLD.smithLevel to 0>>
<<set $WORLD.SmithQuests to [either(0,1),0]>>
<<set $WORLD.market to 0>>
<<set $WORLD.gstore to 0>>
<<set $WORLD.pawn to 0>>
<<set $WORLD.house to {state: 0, piggybank: -1, bed: 0, storage: 0}>>\
<<set $WORLD.guild to 0>>
<<set $WORLD.tsquare to 0>>
<<set $WORLD.bridge to 0>>
<<set $WORLD.MobileMode to 0>>
<<set $WORLD.orphanage to 0>>
<<set $WORLD.orphans to []>>\
<<set $WORLD.CombatInterrupt to "">>\
<<set $WORLD.quests to []>>
<<set $WORLD.quests[0] to { state: "avail" }>>
<<set $WORLD.quests[1] to { state: "avail", target: "bunny-morph", startat: 0 }>>
<<set $WORLD.quests[2] to { state: "avail", target: "bunny-morph", progress: 0 }>>
<<set $WORLD.quests[3] to { state: "inactive" }>>
<<set $WORLD.quests[4] to { state: "inactive" }>>
<<set $WORLD.quests[5] to { state: "inactive", reward: 50, gen: 1 }>>
<<set $WORLD.quests[6] to { state: "inactive" }>>
<<set $WORLD.quests[7] to { state: "inactive", harmony: -1 }>>
<<set $WORLD.RepeatableQuests to []>>
<<set $WORLD.RepeatableQuests[0] to { state: "avail", target: "", startat: 0, need: 0, lastupdate: 0 }>>
<<set $WORLD.RepeatableQuests[1] to { state: "avail", target: "", startat: 0, need: 0, lastupdate: 0 }>>
<<set $WORLD.RepeatableQuests[2] to { state: "avail", target: "", need: 0, lastupdate: 0, xpreward: 0, goldreward: 0 }>>
<<set $WORLD.RepeatableQuests[3] to { state: "avail", target: "", need: 0, lastupdate: 0 }>>
<<set $WORLD.MainQuest to []>>
<<set $WORLD.MainQuest[0] to { state: "inactive" }>>
<<set $WORLD.MainQuest[1] to { state: "inactive" }>>
<<set $WORLD.MainQuest[2] to { state: "inactive" }>>
<<set $WORLD.MainQuest[3] to { state: "inactive" }>>
<<set $WORLD.MainQuest[4] to { state: "inactive" }>>
<<set $WORLD.MainQuest[5] to { state: "inactive" }>>
<<set $WORLD.MainQuest[6] to { state: "inactive" }>>
<<set $WORLD.MainQuest[7] to { state: "inactive" }>>
<<set $WORLD.datapasser to 0>>
<<set $WORLD.charslots to 1>>
<<set $WORLD.turnssincecombat to 0>>
<<set $WORLD.Bodyview to 0>>
<<set $WORLD.minute to 0>>
<<set $WORLD.hour to 8>>
<<set $WORLD.day to 1>>
<<set $WORLD.year to 1>>
<<set $WORLD.dundim to 6>>
<<set $WORLD.DunDims to []>>
<<set $WORLD.DunDimX = 14>>
<<set $WORLD.DunDimY = 14>>
<<set $WORLD.dungenned to [0,0]>>
<<set $WORLD.dungeonthemes to []>>
<<set $WORLD.dungeonthemes[0] to ["Brick","Random"]>>
<<set $WORLD.dungeonthemes[1] to ["Brick","Random"]>>
<<set $WORLD.Circle to 0>>\
<<set $WORLD.restock to 0>>
<<set _a to either("The Barfing ", "The Irresponsible ", "The Lethargic ", "The Irreverent ", "The Peppy ")>>
<<set _b to either("Yak ","Pangolin ","Shrew ","Wombat ","Porpoise ")>>
<<set _c to either("Tavern","Inn","Inn and Tavern")>>
<<set $WORLD.tavernname to _a + _b + _c>>
<<set $WORLD.tavern to 0>>
<<set $WORLD.diedby to "">>
<<set $WORLD.dialogue to 0>>
<<set $WORLD.HTZE to 0>>\
<<set $WORLD.HFZE to 0>>\
<<set $WORLD.HDZE to 0>>\
<<set $WORLD.Piggybank to 0>>
<<set $WORLD.LegacyVault to 0>>
<<set $WORLD.VaultGold to 0>>
<<set $WORLD.ForestTheme to 1>>
<<set $WORLD.ForestDims to []>>
<<set $WORLD.ForestDims[0] to 14>>
<<set $WORLD.ForestDims[1] to 7>>
<<set $WORLD.TreeCutter to false>>
<<set $WORLD.LightRadius to 1>>
<<set $WORLD.TowerOrigin to [0,7]>>
<<set $WORLD.PortalTarget to [-1, -1, -1]>>
<<set $WORLD.DesertDims to []>>
<<set $WORLD.DesertDims[0] to 14>>
<<set $WORLD.DesertDims[1] to 14>>
<<set $WORLD.CharLocs to []>>
<<for _i to 0; _i < 3; _i++>>
<<PlaceCharForMultiChar _i>>
<</for>>
<<set $STORE to []>>
<<set $Selene to 0>>
<<set $Smith to 1>>
<<set $GStore to 2>>
<<set $Tavern to 3>>
<<set $Pawn to 4>>
<<set $House to 5>>
<<set $LumberMill to 6>>
<<set $Daphne to 7>>
<<set $LegacyVault to 8>>
<<set $SmithArmor to 9>>
<<set $STORE[$Selene] to []>>
<<set $STORE[$Smith] to []>>
<<set $STORE[$GStore] to []>>
<<set $STORE[$Tavern] to []>>
<<set $STORE[$Pawn] to []>>
<<set $STORE[$House] to []>>
<<set $STORE[$LumberMill] to []>>
<<set $STORE[$Daphne] to []>>
<<set $STORE[$LegacyVault] to []>>
<<set $STORE[$SmithArmor] to []>>
<<for _i to 0; _i < 10; _i++>>
<<set $STORE[$Selene][_i] to [0,0,0,0,0]>>\
<<set $STORE[$Smith][_i] to [0,0,0,0,0]>>\
<<set $STORE[$GStore][_i] to [0,0,0,0,0]>>\
<<set $STORE[$Tavern][_i] to [0,0,0,0,0]>>\
<<set $STORE[$Pawn][_i] to [0,0,0,0,0]>>\
<<set $STORE[$LumberMill][_i] to [0,0,0,0,0]>>\
<<set $STORE[$Daphne][_i] to [0,0,0,0,0]>>\
<!-- no legacy vault here -->\
<<set $STORE[$SmithArmor][_i] to [0,0,0,0,0]>>\
<</for>>
<<for _i to 0; _i < 20; _i++>>
<<set $STORE[$House][_i] to [0,0,0,0,0]>>\
<</for>>\
<<Restock "all">>
<</widget>>
<<widget "StandardKeyboardShortcuts">>\
<span id="KeypZ">\
<<link "">>\
<<script>>
Dialog.setup("Character statistics");
Dialog.wiki(Story.get("ViewStats").processText());
Dialog.open();
<</script>>
<</link>>\
</span>\
<span id="KeypI">\
<<link "">>\
<<script>>
Dialog.setup("Inventory");
Dialog.wiki(Story.get("Inventory").processText());
Dialog.open();
<</script>>\
<</link>>\
</span>\
<span id="KeypX">\
<<link "">>\
<<script>>
Dialog.setup("Body");
Dialog.wiki(Story.get("Body").processText());
Dialog.open();
<</script>>\
<</link>>\
</span>\
<span id="KeypB">\
<<link "">>\
<<script>>
Dialog.setup("Spellbook");
Dialog.wiki(Story.get("Spellbook").processText());
Dialog.open();
<</script>>
<</link>>\
</span>\
<span id="KeypU">\
<<link "">>\
<<script>>
Dialog.setup("Unlocks");
Dialog.wiki(Story.get("Unlocks").processText());
Dialog.open();
<</script>>
<</link>>\
</span>\
<</widget>>\
<<widget "PrintParty">>\
<<set _PPcur to $PC[$CC][$PCparty].length>>\
<<if _PPcur > 0>>\
<<set _PPmax to setup.GetPartyLimit($CC)>>\
<<set _CurPassage to passage()>>\
@@color:Yellow;Party (<<print _PPcur>>/<<print _PPmax>>)@@
<<for _SPi to 0; _SPi < _PPcur; _SPi++>>\
<<set _Name to $PC[$CC][$PCparty][_SPi].name>>\
<<set _Stance to "[" + $PC[$CC][$PCparty][_SPi].stance + "]">>\
<<set _Hp to $PC[$CC][$PCparty][_SPi].hpcur + "/" + $PC[$CC][$PCparty][_SPi].hpmax>>\
\
<<set _SpanID to "ToggleStance" + _SPi>>\
<<set _CssStuff to "blueb">>\
<<capture _SPi>>\
<<if _CurPassage is "Orphanage">>\
<<set _CssStuff to "redb">>\
<<endif>>\
<span @class="_CssStuff" @id="_SpanID">\
<<if _CurPassage is "Orphanage">>\
<<button "[Drop]">>\
<<set _NextSlot to $WORLD.orphans.length>>\
<<set $WORLD.orphans[_NextSlot] to $PC[$CC][$PCparty][_SPi]>>\
<<set $WORLD.orphans[_NextSlot].hpmax to 1 + $WORLD.orphans[_NextSlot].level>>
<<set $WORLD.orphans[_NextSlot].hpcur to $WORLD.orphans[_NextSlot].hpmax>>
<<if $WORLD.orphans[_NextSlot].stance is "Down">>\
<<set $WORLD.orphans[_NextSlot].stance to "Hide">>\
<<endif>>\
<<set _throwaway to $PC[$CC][$PCparty].deleteAt(_SPi)>>\
<<replace "#OrphanagePortal">><<ShowOrphans>><</replace>>\
<<ShowParty>>\
<</button>>\
<<else>>\
<<button _Stance>>\
<<if $PC[$CC][$PCparty][_SPi].stance is "Att">>\
<<set $PC[$CC][$PCparty][_SPi].stance to "Prot">>\
<<elseif $PC[$CC][$PCparty][_SPi].stance is "Prot">>\
<<set $PC[$CC][$PCparty][_SPi].stance to "Hide">>\
<<elseif $PC[$CC][$PCparty][_SPi].stance is "Down">>\
<<else>>\
<<set $PC[$CC][$PCparty][_SPi].stance to "Att">>\
<<endif>>\
<<ShowParty>>\
<</button>>\
<<endif>>\
</span> \
<</capture>>\
<<print _Name>>, hp: <<print _Hp>>
<</for>>\
<<endif>>\
<</widget>>\
<<widget "ShowParty">>\
<<replace "#capparty">><<PrintParty>><</replace>>\
<</widget>>
<<widget "ShowOrphans">>\
<<set _SPlen to $WORLD.orphans.length>>\
<<if _SPlen > 0>>\
<<set _MaxParty to setup.GetPartyLimit($CC)>>\
<<set _CurParty to $PC[$CC][$PCparty].length>>\
<<if $TEMPBUTTON is "delete">>\
<<set _CssStuff to "redb">>\
<<set _Join to "[Expel]">>\
<<else>>\
<<set _CssStuff to "blueb">>\
<<set _Join to "[Join]">>\
<<if _CurParty gte _MaxParty>>\
<<set _CssStuff to "grayb">>\
<<set _Join to "[Full]">>\
<<endif>>\
<<endif>>\
@@color:Yellow;Orphans@@
<<for _SPi to 0; _SPi < _SPlen; _SPi++>>\
<<set _SpanID to "Join" + _SPi>>\
<<capture _SPi>>\
<span @class="_CssStuff" @id="_SpanID">\
<<button _Join>>\
<<if $TEMPBUTTON is "delete">>\
<<set _throwaway to $WORLD.orphans.deleteAt(_SPi)>>\
<<replace "#OrphanagePortal">><<ShowOrphans>><</replace>>\
<<ShowParty>>\
<<else>>\
<<set _CurParty to $PC[$CC][$PCparty].length>>\
<<set _MaxParty to setup.GetPartyLimit($CC)>>\
<<if _CurParty < _MaxParty>>\
<<AwardAchievement "Leader">>\
<<AwardAchievement "Leader-II">>\
<<AwardAchievement "Leader-III">>\
<<set _NextSlot to $PC[$CC][$PCparty].length>>\
<<set $PC[$CC][$PCparty][_NextSlot] to $WORLD.orphans[_SPi]>>\
<<set $PC[$CC][$PCparty][_NextSlot].hpmax to 1 + $PC[$CC][$PCparty][_NextSlot].level>>
<<if setup.PlayerHasPerk("Iron Army") is true>>\
<<set $PC[$CC][$PCparty][_NextSlot].hpmax to $PC[$CC][$PCparty][_NextSlot].hpmax +2>>
<<endif>>\
<<set $PC[$CC][$PCparty][_NextSlot].hpcur to $PC[$CC][$PCparty][_NextSlot].hpmax>>
<<set _throwaway to $WORLD.orphans.deleteAt(_SPi)>>\
<<replace "#OrphanagePortal">><<ShowOrphans>><</replace>>\
<<ShowParty>>\
<<endif>>\
<<endif>>\
<</button>> \
</span>\
<<set _Name to $WORLD.orphans[_SPi].name>>\
<<set _Stance to "[" + $WORLD.orphans[_SPi].stance + "]">>\
<<set _Hp to $WORLD.orphans[_SPi].hpcur + "/" + $WORLD.orphans[_SPi].hpmax>>\
<<set _Parentage to $WORLD.orphans[_SPi].parent>>\
<<if _Parentage is "">>\
<<set _Parentage to "unknown parentage">>\
<<endif>>\
<<set _SpawnOf to $WORLD.orphans[_SPi].morph + " son of " + _Parentage>>\
<<if $WORLD.orphans[_SPi].sex is "female">>\
<<set _SpawnOf to $WORLD.orphans[_SPi].morph + " daughter of " + _Parentage>>\
<<endif>>\
<<textbox "$WORLD.orphans[_SPi].name" $WORLD.orphans[_SPi].name>>, <<print _SpawnOf>>
Level: <<print $WORLD.orphans[_SPi].level>>, XP: <<print $WORLD.orphans[_SPi].xp>>, Hp: <<print _Hp>>
<</capture>>\
<</for>>\
<hr>
<span id="OrphanageText"></span>
<<else>>\
The orphanage is empty
<<endif>>\
<</widget>>\
<<widget "DescribeHairHack">>\
<<replace "#DescGoeshere">><<DescribeHair _args[0] _args[1] _args[2]>><</replace>>\
<</widget>>\
<<widget "DescribeHair">>\
<<set _DHlength to _args[0]>>\
<<set _DHstyle to _args[1]>>\
<<set _DHcolor to _args[2]>>\
\
<<if _DHstyle is "straight">>\
<<if _DHlength is 0>>very short _DHcolor hair\
<<elseif _DHlength is 1>>short _DHcolor hair\
<<elseif _DHlength is 2>>_DHcolor hair reaching halfway down your back\
<<elseif _DHlength is 3>>long _DHcolor hair reaching nearly to your waist\
<<else>>an elegant wave of long, voluminous _DHcolor reaching nearly to the ground\
<<endif>>\
<<elseif _DHstyle is "curly">>\
<<if _DHlength is 0>>very short curly _DHcolor hair\
<<elseif _DHlength is 1>>short curly _DHcolor hair\
<<elseif _DHlength is 2>>curly _DHcolor hair\
<<elseif _DHlength is 3>>long curly _DHcolor hair reaching nearly to your waist\
<<else>>a mountain of curly _DHcolor hair flowing in cascades behind you\
<<endif>>\
<<elseif _DHstyle is "braided">>\
<<if _DHlength is 0>>short _DHcolor hair with an inch-long braid\
<<elseif _DHlength is 1>>short _DHcolor braided hair\
<<elseif _DHlength is 2>>braided _DHcolor hair\
<<elseif _DHlength is 3>>a thick _DHcolor braid nearly to your waist\
<<else>>a thick pair of braids sprouting from either side of your head, reaching nearly to the ground\
<<endif>>\
<<elseif _DHstyle is "frizzy">>\
<<if _DHlength is 0>>very short frizzy _DHcolor hair\
<<elseif _DHlength is 1>>short frizzy _DHcolor hair\
<<elseif _DHlength is 2>>shoulder-length plumes of frizzy _DHcolor hair\
<<elseif _DHlength is 3>>a big poofball of frizzy _DHcolor hair\
<<else>>a giant frizzy poofball of _DHcolor hair that nearly triples the size of your head\
<<endif>>\
<<elseif _DHstyle is "mohawk">>\
<<if _DHlength is 0>>a short strip of _DHcolor down the middle of your head\
<<elseif _DHlength is 1>>a short _DHcolor mohawk\
<<elseif _DHlength is 2>>an impressive _DHcolor mohawk\
<<elseif _DHlength is 3>>a _DHcolor mohawk that adds a good foot to your total height\
<<else>>a staggeringly long spiky _DHcolor mohawk that adds several feet to your total height\
<<endif>>\
<<elseif _DHstyle is "pigtails">>\
<<if _DHlength is 0>>itty-bitty _DHcolor pigtails\
<<elseif _DHlength is 1>>short _DHcolor pigtails\
<<elseif _DHlength is 2>>_DHcolor pigtails gracefully brushing your shoulders\
<<elseif _DHlength is 3>>long _DHcolor pigtails bouncing gloriously behind you\
<<else>>magnificent _DHcolor double-bun pigtails that nearly reach the ground\
<<endif>>\
<<elseif _DHstyle is "ponytail">>\
<<if _DHlength is 0>>an itty-bitty _DHcolor ponytail\
<<elseif _DHlength is 1>>a short _DHcolor ponytail\
<<elseif _DHlength is 2>>a _DHcolor ponytail\
<<elseif _DHlength is 3>>a thick _DHcolor ponytail bouncing gracefully behind you\
<<else>>a huge _DHcolor ponytail sprouting from your head that nearly reaches the ground\
<<endif>>\
<<else>>\
Error: unrecognized hair style
<<endif>>\
<</widget>>\
<<widget "DescribeTail">>\
<<set _Taillength to _args[0]>>\
<<set _Tailstyle to _args[1]>>\
<<set _Tailcolor to _args[2]>>\
\
<<if _Tailstyle is "plain">>\
<<if _Taillength is 0>>very short _Tailcolor hair\
<<elseif _Taillength is 1>>short _Tailcolor hair\
<<elseif _Taillength is 2>>_Tailcolor hair reaching halfway down your back\
<<elseif _Taillength is 3>>long _Tailcolor hair \
<<else>>long _Tailcolor hair trailling on the ground behind you\
<<endif>>\
<<elseif _Tailstyle is "braided">>\
<<if _Taillength is 0>>very short braided _Tailcolor hair\
<<elseif _Taillength is 1>>short braided _Tailcolor hair\
<<elseif _Taillength is 2>>braided _Tailcolor hair\
<<elseif _Taillength is 3>>long braided _Tailcolor hair\
<<else>>long braided hair trailing behind you in thick waves of _Tailcolor\
<<endif>>\
<<elseif _Tailstyle is "ribbons">>\
<<if _Taillength is 0>>short _Tailcolor hair with cute little ribbons in it\
<<elseif _Taillength is 1>>short _Tailcolor with small ribbons\
<<elseif _Taillength is 2>>_Tailcolor hair with a bright pink ribbon\
<<elseif _Taillength is 3>>long _Tailcolor hair with a big poofy ribbon\
<<else>>long hair sporting a dozen ribbons woven into its length\
<<endif>>\
<<elseif _Tailstyle is "poofy">>\
<<if _Taillength is 0>>an itty-bitty _Tailcolor poofball at the end\
<<elseif _Taillength is 1>>a small _Tailcolor poofball at the end\
<<elseif _Taillength is 2>>a _Tailcolor poofball at the end\
<<elseif _Taillength is 3>>a thick _Tailcolor poofball at the end that bounced with your every step\
<<else>>a giant _Tailcolor poofball at the end that silhouettes your frame wherever you go\
<<endif>>\
<<elseif _Tailstyle is "elegant">>\
<<if _Taillength is 0>>small, but elegant _Tailcolor hair\
<<elseif _Taillength is 1>>small poofy _Tailcolor hair\
<<elseif _Taillength is 2>>an elegant plume of _Tailcolor hair that bounces behind you\
<<elseif _Taillength is 3>>a splendid cascade of lovely _Tailcolor hair trailing behind you\
<<else>>glorious cascades of thick _Tailcolor hair that charm all who behold their magnificence\
<<endif>>\
<<elseif _Tailstyle is "none">>\
<<elseif _Tailstyle is "flowers">>\
unimplemented tail type
<<elseif _Tailstyle is "regal">>\
unimplemented tail type
<<elseif _Tailstyle is "radiant">>\
unimplemented tail type
<<elseif _Tailstyle is "thick">>\
unimplemented tail type
<<else>>\
Error: unercognized tail style: _Tailstyle
<<endif>>\
<</widget>>\
<<widget "ProstXP">>
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "prostitute">>\
<<if setup.TypeOf($Mon.level) is "number">>\
<<AwardXP $Mon.level "sex">>\
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "UnnaturalPregnancy">>\
<!-- barren achievement being called manually -->\
<<set _UPwho to _args[0]>>\
<<set _UPmorph to _args[1]>>\
<<set _UPdaystobirth to _args[2]>>\
<<set _UPbirthyear to $WORLD.year>>\
<<set _UPbirthday to $WORLD.day + _UPdaystobirth>>\
<<if _UPbirthday > 365>>\
<<set _UPbirthyear to _UPbirthyear + 1>>\
<<set _UPbirthday to _UPbirthday -365 1>>\
<<endif>>\
<<set $PC[_UPwho][$PCpregnant] to [1, _UPmorph, _UPbirthyear, _UPbirthday, $WORLD.year, $WORLD.day]>>\
<</widget>>\
<<widget "AllowedSpellsTempArray">>\
<<set _Class to setup.PtrToClass($PC[$CC][$PCclass])>>\
<<if _Class is "peasant">>\
<<set _AllowedSpells to ["dart","light"]>>\
<<elseif _Class is "lumberjack">>\
<<set _AllowedSpells to ["dart","armor","light","up","down","map"]>>\
<<elseif _Class is "prostitute">>\
<<set _AllowedSpells to ["dart","armor","poison","up","down","soultrap"]>>\
<<elseif _Class is "warrior">>\
<<set _AllowedSpells to ["dart","armor","poison","firebolt","heal"]>>\
<<elseif _Class is "scholar">>\
<<set _AllowedSpells to ["dart","armor","poison","firebolt","heal","light","up","down","map","portal","soultrap"]>>\
<<elseif _Class is "priest">>\
<<set _AllowedSpells to ["dart","armor","heal","light","up","down","map","portal","soultrap"]>>\
<<elseif _Class is "rogue">>\
<<set _AllowedSpells to ["dart","poison","up","down","map","soultrap"]>>\
<<elseif _Class is "mage">>\
<<set _AllowedSpells to ["dart","armor","poison","firebolt","light","up","down","map","portal","soultrap"]>>\
<<elseif _Class is "barbarian">>\
<<set _AllowedSpells to ["dart","poison","light","up","down","soultrap"]>>\
<<elseif _Class is "monk">>\
<<set _AllowedSpells to ["dart","armor","firebolt","heal","light","up","down","portal"]>>\
<<elseif _Class is "guardian">>\
<<set _AllowedSpells to ["armor","heal","light"]>>\
<<elseif _Class is "ninja">>\
<<set _AllowedSpells to [""]>>\
<<elseif _Class is "paladin">>\
<<set _AllowedSpells to [""]>>\
<<elseif _Class is "druid">>\
<<set _AllowedSpells to [""]>>\
<<elseif _Class is "necromancer">>\
<<set _AllowedSpells to [""]>>\
<<else>>\
@@color:Red;Error: unrecognized class: <<print $PC[$CC][$PCclass]>>@@
<<endif>>\
<</widget>>\<<set _MOO to setup.AchievementHandler(-1, "FETCH ALL DATA", -1)>>\
\
<span id="KeypESC">\
<<link "esc) close window">>
<<script>>
Dialog.close();
document.activeElement.blur();
<</script>>
<</link>>\
</span>
<<button "[Perms]">>
<<replace "#AchievementPortal">><<ShowAchPerms>><</replace>>\
<</button>> | \
<<button "[New character unlocks]">>
<<replace "#AchievementPortal">><<ShowAchChargen>><</replace>>\
<</button>> | \
<<button "[Perks]">>
<<replace "#AchievementPortal">><<ShowAchPerks>><</replace>>\
<</button>> | \
<<button "[Perk points]">>
<<replace "#AchievementPortal">><<ShowAchPerkPoints>><</replace>>\
<</button>> | \
<<button "[Highest level as class]">>
<<replace "#AchievementPortal">><<ShowAchHighestLevels>><</replace>>\
<</button>>
<hr>\
<span id="AchievementPortal"><<ShowAchPerms>></span>
<span id="debuginfo">\
<<if $DebugMode>>\
Achievements array:
<<print $Achievements>>
<<print _MOO.length>>
<<print $Achievements.length>>
<<for _i to 0; _i < _MOO.length; _i++>>\
_i) <<print _MOO[_i].name>><br>
<</for>>\
<<endif>>\
</span>\<span id="KeypESC">\
<<link "esc) close window">>
<<script>>
Dialog.close();
document.activeElement.blur();
<</script>>
<</link>>\
</span>\
<br>\
<<button "[Player]">>
<<replace "#StatsPortal">><<ShowStatsMain>><</replace>>\
<</button>> | \
<<button "[Party]">>
<<replace "#StatsPortal">><<ShowStatsParty>><</replace>>\
<</button>>\
\
<hr>\
<span id="StatsPortal"><<ShowStatsMain>></span>\
<<if $PC[$CC][$PCz] < 0>>\
<<set $PC[$CC][$PCz] to 0>>\
<<endif>>\
\
<<if $WORLD.dungenned[$PC[$CC][$PCz]] < 1>>\
<<include "DunGen">>\
<<endif>>\
\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
\
<<set $DisableMenu to false>>\
<<set $ReturnFromMenu to passage()>>\
<<set $GameState to "dungeon">>\
<<set $WORLD.dialogue to 0>>
<<set $Dungeon[_px][_py][15] to 1>>\
\
@@color:LightGreen;Tower of Triumph, Shrine of the Goddess @@ \
<<if _pz is 0>>\
Ground floor\
<<else>>\
Level _pz\
<<endif>>\
<hr>\
@@color:LightGreen;Map@@
<canvas id="myCanvas" width="226" height="226" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML canvas tag.
</canvas>
<hr>\
<span id ="roomdesc"></span>\
<span id ="eventtext"></span>
<hr>\
<span id="navcontrols">\
@@color:LightGreen;Navigation@@
<<ShowNavControls>>\
</span>
\
<<set _tempname to "Map-Blank">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-E">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-ES">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-ESW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-EW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-N">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-NE">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-NES">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-NESW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-NEW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-NS">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-NSW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-NW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-S">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-SW">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "Map-W">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "UpStairsTop">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "UpStairsBottom">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "DownStairs">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="30" style="visibility: hidden;" img @src="_pic"/>\
<span id="debug"></span>\
<<timed 200ms>>\
<<MoveRefresh>>\
<<set _throwaway to setup.DrawMap(_px, _py)>>\
<</timed>>\
<!-- magic fountain -->\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $AllowNav to true>>\
<<set $RoomPTR to passage()>>\
\
<<RightPic "eventfountain.jpg">>\
\
<<replace "#eventtext">>\
<<if $Dungeon[_pz][_px][_py][12] is 0>>\
<<set $Dungeon[_pz][_px][_py][12] to random(1,3)>>\
<<endif>>\
<<if $Dungeon[_pz][_px][_py][12] is 1>>\
<!-- heal -->\
@@color:LightGreen;Bubbling fountain@@
The centerpiece of this room is a large bubbling fountain of what looks like pure water. Of course, looks can be deceiving.
<span id="KeypOne">\
<<link "1) Drink from the fountain">>
<<set $Dungeon[_pz][_px][_py][12] to 201>>\
<<replace "#eventtext">>\
@@color:LightGreen;Fountain of healing@@
<<if $PC[$CC][$PChpcur] < $PC[$CC][$PChpmax]>>\
You drink deeply from the fountain, feeling refreshed as the water restores your body and heals all injuries.
<<set $PC[$CC][$PChpcur] to $PC[$CC][$PChpmax]>>\
<<ShowHealth>>\
<br>\
@@color:LightGreen;Health restored to full!@@
<br>\
As you breath a refreshing sigh, the water of the fountain slows to a trickle, and then stops. It seems that the fountain's magic is now depleted.
<<else>>\
You drink from the fountain. The water is clean and refreshing, but you don't feel any differently.
<<endif>>\
<</replace>>\
<</link>>\
</span>\
<<elseif $Dungeon[_pz][_px][_py][12] is 2>>\
<!-- gender bender -->\
@@color:LightGreen;Bubbling fountain@@
The centerpiece of this room is a large bubbling fountain of what looks like pure water. Of course, looks can be deceiving.
<span id="KeypOne">\
<<link "1) Drink from the fountain">>
<<set $Dungeon[_pz][_px][_py][12] is 202>>\
<<set _Target to []>>\
<<if $PC[$CC][$PCsex] is "male">>
<<set _Target[0] to { type: $BPpussy, morph: either("cow","slime","snake") }>>\
<<set _Target[1] to { type: $BPboobs, morph: either("cow","slime","snake") }>>\
<<set _Target[2] to { type: $BPpussy, morph: either("cow","slime","snake") }>>\
<<set _Target[3] to { type: $BPboobs, morph: either("cow","slime","snake") }>>\
<<set _Target[4] to { type: $BPpussy, morph: either("cow","slime","snake") }>>\
<<set _Target[5] to { type: $BPboobs, morph: either("cow","slime","snake") }>>\
<<set _Target[6] to { type: $BPpussy, morph: either("cow","slime","snake") }>>\
<<set _Target[7] to { type: $BPboobs, morph: either("cow","slime","snake") }>>\
<<set _Target[8] to { type: $BPpussy, morph: either("cow","slime","snake") }>>\
<<set _Target[9] to { type: $BPboobs, morph: either("cow","slime","snake") }>>\
<<set _Target[10] to { type: $BPpussy, morph: either("cow","slime","snake") }>>\
<<set _Target[11] to { type: $BPboobs, morph: either("cow","slime","snake") }>>\
<<set _Target[12] to { type: $BPpussy, morph: either("cow","slime","snake") }>>\
<<set _Target[13] to { type: $BPboobs, morph: either("cow","slime","snake") }>>\
<<set _Target[14] to { type: $BPboobs, morph: either("cow","slime","snake") }>>\
<<set _Target[15] to { type: $BPboobs, morph: either("cow","slime","snake") }>>\
<<elseif $PC[$CC][$PCsex] is "female">>
<<set _Target[0] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[1] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[2] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[3] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[4] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[5] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[6] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[7] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[8] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[9] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[10] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[11] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[12] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[13] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[14] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<set _Target[15] to { type: $BPpenis, morph: either("cow","horse","tentacle","spider") }>>\
<<else>>\
<<set _Target[0] to { type: $BPpussy, morph: either("spider","slime","tentacle") }>>\
<<set _Target[1] to { type: $BPboobs, morph: either("cow","horse") }>>\
<<set _Target[2] to { type: $BPpenis, morph: either("cow","slime","tentacle") }>>\
<<set _Target[3] to { type: $BPpussy, morph: either("spider","slime","tentacle") }>>\
<<set _Target[4] to { type: $BPboobs, morph: either("cow","horse") }>>\
<<set _Target[5] to { type: $BPpenis, morph: either("cow","slime","tentacle") }>>\
<<set _Target[6] to { type: $BPpussy, morph: either("spider","slime","tentacle") }>>\
<<set _Target[7] to { type: $BPboobs, morph: either("cow","horse") }>>\
<<set _Target[8] to { type: $BPpenis, morph: either("cow","slime","tentacle") }>>\
<<set _Target[9] to { type: $BPpussy, morph: either("spider","slime","tentacle") }>>\
<<set _Target[10] to { type: $BPboobs, morph: either("cow","horse") }>>\
<<set _Target[11] to { type: $BPpenis, morph: either("cow","slime","tentacle") }>>\
<<set _Target[12] to { type: $BPpussy, morph: either("spider","slime","tentacle") }>>\
<<set _Target[13] to { type: $BPboobs, morph: either("cow","horse") }>>\
<<set _Target[14] to { type: $BPpenis, morph: either("cow","slime","tentacle") }>>\
<<set _Target[15] to { type: $BPpenis, morph: either("cow","slime","tentacle") }>>\
<<endif>>\
<<replace "#eventtext">>\
@@color:LightGreen;Fountain of gender-bending@@
You drink from the fountain and immediately transform: <<DoTransform _Target "fountain">>\
<</replace>>\
<</link>>\
</span>\
<<elseif $Dungeon[_pz][_px][_py][12] is 3>>\
<!-- gain stat -->\
@@color:LightGreen;Bubbling fountain@@
The centerpiece of this room is a large bubbling fountain of what looks like pure water. Of course, looks can be deceiving.
<<set _Cap to 53 + $PC[_Who][$PCretirementcap] + $PC[_Who][$PCgen]>>\
<<if setup.PlayerHasPerk("Genetic Lottery") is true>>\
<<set _Cap to _SoftCap +2>>\
<<endif>>\
<<if setup.AchievementHandler("Jack of All Stats", "HAS?", -1)>>\
<<set _Cap to _SoftCap +1>>\
<<endif>>\
<<set _PCtotal to $PC[$CC][$PCstr] + $PC[$CC][$PCdex] + $PC[$CC][$PCcon] + $PC[$CC][$PCint] + $PC[$CC][$PCwil]>>\
<span id="KeypOne">\
<<link "1) Drink from the fountain">>
<<set $Dungeon[_pz][_px][_py][12] to 203>>\
<<if _Cap > _PCTotal>>\
<<replace "#eventtext">>\
@@color:LightGreen;Fountain of Excessive Fountain-Grinding@@:
You drink from the fountain and are immediately filled with a sense of vague foreboding. Looking over yourself you wonder if perhaps you should stop while you're ahead.\
<</replace>>\
<<else>>\
<<set _Target to either($PCstr, $PCdex, $PCcon, $PCint, $PCwil)>>\
<<set $PC[$CC][_Target] to $PC[$CC][_Target] +1>>\
<<replace "#eventtext">>\
<<if _Target is $PCstr>>\
@@color:LightGreen;Fountain of Strength@@: +1 strength
You drink from the fountain and are immediately filled with a sense of strength. Looking yourself over you have become visibly more muscled. \
<<elseif _Target is $PCdex>>\
@@color:LightGreen;Fountain of Dexterity@@: +1 dexterity
You drink from the fountain and immediately feel more fleet of foot and coordinated. \
<<elseif _Target is $PCcon>>\
@@color:LightGreen;Fountain of Toughness@@: +1 toughness
You drink from the fountain and feel like you could take on the world. Looking yourself over, you seem to be a bit thicker than before.\
<<elseif _Target is $PCint>>\
@@color:LightGreen;Fountain of Intellect@@: +1 intellect
Visions of equations and spiraling galaxies fill your mind. You have become more intelligent.\
<<else>>\
@@color:LightGreen;Fountain of Willpower@@: +1 willpower
@@color:Red;"Come, join the dark side!"@@ you hear a voice beckon in your mind. You tell it no.
The experience has improved your strength of will. You are now better able to resist the influence of others.\
<<endif>>\
<</replace>>\
<<endif>>\
<</link>>\
</span>\
<<elseif $Dungeon[_pz][_px][_py][12] is 201>>\
@@color:LightGreen;Dried up fountain@@
The healing waters have gone dry.\
<<elseif $Dungeon[_pz][_px][_py][12] is 202>>\
@@color:LightGreen;Dried up fountain@@
The gender-bending waters have gone dry.\
<<elseif $Dungeon[_pz][_px][_py][12] is 203>>\
@@color:LightGreen;Dried up fountain@@
The powerful water has gone dry.\
<<else>>\
@@color:Red;Error in Event100: unrecognized state: <<print $Dungeon[_pz][_px][_py][12]>>@@
<<endif>>\
<</replace>>\<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $AllowNav to true>>\
<<set $RoomPTR to passage()>>\
\
<<RightPic "eventpuddle.jpg">>\
\
<<replace "#eventtext">>\
@@color:LightGreen;Strange puddle@@
<<if $Dungeon[_pz][_px][_py][12] is 0>><!-- start state-->\
The tile floor here is heavily eroded and gives way to a puddle of murky green liquid near the center of the room.
<hr>\
<span id="KeypOne">\
<<link "1) Inspect the puddle" $RoomPTR>>
<<set $Dungeon[_pz][_px][_py][12] to 1>>\
<</link>>\
</span>\
<<elseif $Dungeon[_pz][_px][_py][12] is 1>><!-- inspect-->\
<<set $Dungeon[_pz][_px][_py][12] to 99>>
<<set _result to random(1,4)>>\
<<if _result is 1>>\
You fish around through the puddle, half expecting it to turn into a slime monster or something. Fortunately luck is with you and instead you simply find some money somebody dropped.
<<set _c to 20 + random(0,10)>>\
@@color:Yellow;You find _c gold coins!@@
<<GainGold _c>>\
<<elseif _result is 2>>\
You reach into the puddle and immediately jump back in pain. Apparently it's not water. It's @@color:Green;acid@@.
<<set _evdam to random(5,10)>>\
@@color:Yellow;You take _evdam points of damage!@@
<<ChangeStat $PChpcur _evdam>>\
<<ShowHealth>>\
<<if $PC[$CC][$PChpcur] < 1>>\
<<set $AllowNav to false>>\
<span id="KeypSpace">\
<<link "Press space to continue" "Death">>
<<set $WORLD.diedby to "Touched an acid puddle">>
<</link>>\
</span>\
<<else>>\
<<endif>>\
<<elseif _result is 3>>\
You reach into the puddle, hoping it isn't harboring some sort of slime monster.
<<set $ForceMon to ["slime", setup.GetStandardSex()]>>\
<<GetMon $ForceMon>>\
@@color:Red;You are attacked by a slime!@@
<span id="KeypOne">\
<<link "1) Fight" "Combat">>
<</link>>\
</span>\
<<elseif _result is 4>>\
<<set $Dungeon[_pz][_px][_py][12] to 98>>\
You reach into the puddle, hoping it isn't harboring some sort of slime monster. On the bright side, it isn't. On the not-so-bright side, there doesn't seem to be much of anything in there except murky water, plus whatever is in it that's making it green. \
<<set _BottleSlot to setup.HasBottle()>>\
<<if _BottleSlot > -1>>\
<<set _PutItHere to setup.getnextinvslot($CC)>>\
<<if (_PutItHere < 0) and ($PC[$CC][$PCinven][_BottleSlot][2] > 1)>>\
You're pretty sure you could scoop it up and put it in a bottle, but you should probably clear some inventory space first.
<<else>>\
If you'd like, you could probably scoop up a sample of the liquid in an empty bottle.
@@color:Gold;Options@@
<span id="KeypT">\
<<link "t) take some liquid">>
<<set $Dungeon[_pz][_px][_py][12] to 99>>
<<set _throwaway to setup.RemoveOneItemFromInv($CC, _BottleSlot)>>\
<<set _Liquid to [136,0,1,0,0]>>
<<set _foo to setup.GiveItem($CC, _Liquid)>>\
<<replace "#eventtext">>You scoop up the liquid into a bottle.<</replace>>\
<</link>>\
</span>\
<<endif>>\
<<else>>\
Unfortunately you don't have anything suitabe for carrying liquid.
<<endif>>\
<<else>>\
Error in event 101: random out of bounds
<<endif>>\
<<elseif $Dungeon[_pz][_px][_py][12] is 98>><!-- perma murky water -->\
The pool of murky water you found earlier is still here. Still murky and still green. \
<<set _BottleSlot to setup.HasBottle()>>\
<<if _BottleSlot > -1>>\
<<set _PutItHere to setup.getnextinvslot($CC)>>\
<<if (_PutItHere < 0) and ($PC[$CC][$PCinven][_BottleSlot][2] > 1)>>\
You're pretty sure you could scoop it up and put it in a bottle, but you should probably clear some inventory space first.
<<else>>\
If you'd like, you could probably scoop up a sample of the liquid in an empty bottle.
@@color:Gold;Options@@
<span id="KeypT">\
<<link "t) take some water">>
<<set $Dungeon[_pz][_px][_py][12] to 99>>
<<set _throwaway to setup.RemoveOneItemFromInv($CC, _BottleSlot)>>\
<<set _Liquid to [136,0,1,0,0]>>
<<set _foo to setup.GiveItem($CC, _Liquid)>>\
<<replace "#eventtext">>You scoop up the liquid into a bottle.<</replace>>\
<</link>>\
</span>\
<<endif>>\
<<else>>\
Unfortunately you don't have anything suitabe for carrying liquid.
<<endif>>\
<<elseif $Dungeon[_pz][_px][_py][12] is 99>><!-- used-->\
The tile floor here is heavily eroded, with a few moist traces of liquid.
<<else>>\
@@color:Red;Error in Event101: state <<print $Dungeon[_pz][_px][_py][12]>> is not recognized@@
<<endif>>\
<</replace>>\<!--
Found this in an obsolete widget, hopefully still correct:
x,y defintions
0,1,2,3 = n,e,s,w exit id
4,5,6,7 = exit special attributes
8,9,10= room descriptions/traits
11,12= encounter id, state
13,14= loot id, state (13 used only by chests, which doesn't use 14?)
15=visited
-->\
<<widget "ShowNavControls">>\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<if $PC[$CC][$PChpcur] < 1>>\
<<set _PlagueCurse to setup.GetEffect("plague curse")>>\
<<if _PlagueCurse > 0>>\
<<set $WORLD.diedby to "Plague Curse">>\
@@color:Purple;You have died from the plague curse!@@
Congrats an beating Neris, but unfortunately that curse doesn't just go away.\
<hr>
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) continue" "Death">>
<<AutoSaveLoad "set">>
<</link>>
</span>\
<<elseif $PC[$CC][$PChunger] < 1>>\
<<set $WORLD.diedby to "Starved to death">>\
@@color:Red;You have starved to death!@@
It's unfortunate, but you do need to eat. If food is too expensive, you could try carrying around a butcher knife to carve up some of those monsters you keep fighting. Of course, that probably has side effects.\
<<AwardAchievement "Starve to death">>\
<hr>
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) continue" "Death">>
<<AutoSaveLoad "set">>
<</link>>
</span>\
<<else>>\
<!-- note: trap deaths will fall through to here-->\
<<endif>>\
<<elseif $AllowNav is true>>\
@@color:LightGreen;Navigation@@
<<set _n to $Dungeon[_pz][_px][_py][0]>>\
<<set _e to $Dungeon[_pz][_px][_py][1]>>\
<<set _s to $Dungeon[_pz][_px][_py][2]>>\
<<set _w to $Dungeon[_pz][_px][_py][3]>>\
\
<<if _n > 0 or ($DebugMode is true)>>\
<span id="KeypNorth"><span id="KeypUP">\
<<link "w) North">>
<<AdvanceTime 1>>
<<PressurePlateStepOffCheck>>
<<set _py to _py -1>>
<<set $PC[$CC][$PCy] to _py>>\
<<set $Dungeon[_pz][_px][_py][15] to 1>>\
<<set _CanBeExplorer to setup.DrawMap64(_px, _py, _pz, 64, $PC[$CC][$PClocation])>>\
<<MoveRefresh>>
<</link>>\
</span></span>
<<else>>\
North - blocked
<<endif>>\
<<if _e > 0 or ($DebugMode is true)>>\
<span id="KeypEast"><span id="KeypRIGHT">\
<<link "d) East">>
<<AdvanceTime 1>>
<<PressurePlateStepOffCheck>>
<<set _px to _px + 1>>
<<set $PC[$CC][$PCx] to _px>>\
<<set $Dungeon[_pz][_px][_py][15] to 1>>\
<<set _CanBeExplorer to setup.DrawMap64(_px, _py, _pz, 64, $PC[$CC][$PClocation])>>\
<<MoveRefresh>>
<</link>>\
</span></span>
<<else>>\
East - blocked
<<endif>>\
<<if _s > 0 or ($DebugMode is true)>>\
<span id="KeypSouth"><span id="KeypDOWN">\
<<link "s) South">>\
<<AdvanceTime 1>>\
<<PressurePlateStepOffCheck>>
<<set _py to _py + 1>>\
<<set $PC[$CC][$PCy] to _py>>\
<<set $Dungeon[_pz][_px][_py][15] to 1>>\
<<set _CanBeExplorer to setup.DrawMap64(_px, _py, _pz, 64, $PC[$CC][$PClocation])>>\
<<MoveRefresh>>\
<</link>>\
</span></span>
<<else>>\
South - blocked
<<endif>>\
<<if _w > 0 or ($DebugMode is true)>>\
<span id="KeypWest"><span id="KeypLEFT">\
<<link "a) West">>
<<AdvanceTime 1>>
<<PressurePlateStepOffCheck>>
<<set _px to _px - 1>>
<<set $PC[$CC][$PCx] to _px>>\
<<set $Dungeon[_pz][_px][_py][15] to 1>>\
<<set _CanBeExplorer to setup.DrawMap64(_px, _py, _pz, 64, $PC[$CC][$PClocation])>>\
<<MoveRefresh>>
<</link>>\
</span></span>
<<else>>\
West - blocked
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "MoveRefresh">>\
<<set $WORLD.turnssincecombat to $WORLD.turnssincecombat +1>>\
<<replace "#time">>\
<<ShowTime>>\
<</replace>>\
<<ShowHunger>>\
<<ShowHealth>>\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
\
<<set _market to "">>\
<<set _marker to "" + $Dungeon[_pz][_px][_py][11]>>\
\
<<if $DebugMode is true>>\
<<replace "#capdebuginfo">>\
@@color:Gold;Debug info@@
x,y,z: <<print $PC[$CC][$PCx]>>, <<print $PC[$CC][$PCy]>>, <<print $PC[$CC][$PCz]>>
0: <<print $Dungeon[_pz][_px][_py][0]>>
1: <<print $Dungeon[_pz][_px][_py][1]>>
2: <<print $Dungeon[_pz][_px][_py][2]>>
3: <<print $Dungeon[_pz][_px][_py][3]>>
4: <<print $Dungeon[_pz][_px][_py][4]>>
5: <<print $Dungeon[_pz][_px][_py][5]>>
6: <<print $Dungeon[_pz][_px][_py][6]>>
7: <<print $Dungeon[_pz][_px][_py][7]>>
8: <<print $Dungeon[_pz][_px][_py][8]>>
11: <<print $Dungeon[_pz][_px][_py][11]>>
12: <<print $Dungeon[_pz][_px][_py][12]>>
13: <<print $Dungeon[_pz][_px][_py][13]>>
marker: <<print _marker>>
Theme: <<print $WORLD.dungeonthemes[_pz]>>
Since Last combat: <<print $WORLD.turnssincecombat>>
<</replace>>\
<<endif>>\
\
<<if _marker.includes("StairsUp")>>\
<<set $AllowNav to true>>\
<<replace "#roomdesc">><</replace>>\
<<RightPic "towerstairs.jpg">>\
<<include "StairsUp">>\
<<elseif _marker.includes("StairsDown")>>\
<<set $AllowNav to true>>\
<<replace "#roomdesc">><</replace>>\
<<RightPic "towerstairs.jpg">>\
<<include "StairsDown">>\
<<elseif _marker.includes("Trap")>>\
<<set $AllowNav to true>>\
<<replace "#roomdesc">><</replace>>\
<<RightPic "towercorridor.png">>\
<<include "Trap">>\
<<elseif _marker is "Landing">>\
<<set $AllowNav to true>>\
<<replace "#roomdesc">><</replace>>\
<<replace "#right-img">><</replace>>\
<<include "Landing">>\
<<elseif _marker.includes("Monster")>>\
<<set $AllowNav to false>>\
<<replace "#roomdesc">><</replace>>\
<<replace "#eventtext">>\
<<set $ForceMon to [$Dungeon[_pz][_px][_py][12], "random"]>>\
<<GetMon $ForceMon>>\
<<set $NoInventoryHack to 1>>\
@@color:Gold;Monster encounter: encamped <<print $Dungeon[_pz][_px][_py][12]>>!@@
<span id="KeypOne">\
<<link "1) Fight" "Combat">>
<<unset NoInventoryHack>>
<<set $DisableMenu to true>>\
<</link>>\
</span>\
<<set _DisengageChance to setup.DisengageChance()>>\
<<if _DisengageChance > 0>>\
<br><<if random(1, 100) < _DisengageChance>>\
<span id="KeypTwo">\
<<link "2) Avoid" "Dungeon64">>
<<unset NoInventoryHack>>
<<set $WORLD.turnssincecombat to 0>>
<</link>> (<<print _DisengageChance>>% chance)\
</span>\
<<else>>\
<span id="KeypTwo">\
<<link "2) Avoid" "Combat">>
<<unset NoInventoryHack>>
<<set $WORLD.turnssincecombat to 0>>
<<set $DisableMenu to true>>
<</link>> (<<print _DisengageChance>>% chance)\
</span>\
<<endif>>\
<<endif>>\
<<if $DebugMode is true>>\
<hr>\
@@color:Gold;Debug info@@
(Fixed encounter)
Turns since last combat: <<print $WORLD.turnssincecombat>>
Forcing monster type: $ForceMon
<<endif>>\
<</replace>>\
<<elseif _marker.includes("Zehtalia")>>\
<<set $AllowNav to true>>\
<<replace "#roomdesc">><</replace>>\
<<RightPic "Zehtalia.png">>\
<<include "Zehtalia">>\
<<elseif _marker.includes("Neris")>>\
<<set $AllowNav to true>>\
<<replace "#roomdesc">><</replace>>\
<<RightPic "Neris.jpg">>\
<<include "Neris">>\
<<elseif _marker is "Magic Circle">>\
<<if $WORLD.datapasser is "Don't auto-teleport back">>\
<<set $AllowNav to true>>\
<<set $WORLD.datapasser to "">>\
<<else>>\
<<set $NoSuffixBecauseCircle to true>>\
<<include "MagicCircle">>\
<<endif>>\
<<elseif _marker.includes("PlayerCorpse")>>\
<<include "PlayerCorpse">>\
<<elseif _marker.includes("StatueDemon")>>\
<<set $AllowNav to true>>\
<!-- Zehtalia room hack: where is this globally reset and why isn't it working here? Problem probably will occur elsewhere. -->\
<<replace "#eventtext">><</replace>>\
\
<<replace "#roomdesc">>@@color:LightGreen;Statue of a demon@@<br>The statue of a demon. At its base is a plaque bearing words in a language you don't recognize.<</replace>>\
<<elseif _marker.includes("StatueKnight")>>\
<<set $AllowNav to true>>\
<<replace "#roomdesc">>@@color:LightGreen;Statue of an angel@@<br>A statue of an armored knight.<</replace>>\
<<elseif _marker.includes("StatueAngel")>>\
<<set $AllowNav to true>>\
<<replace "#roomdesc">>@@color:LightGreen;Statue of a knight@@<br>A beautiful statue of a stone angel. The angel is weeping.<</replace>>\
<<elseif _marker.includes("Fountain")>>\
<<replace "#roomdesc">><</replace>>\
<<include "Fountain">>\
<<elseif _marker.includes("Puddle")>>\
<<replace "#roomdesc">><</replace>>\
<<include "Puddle">>\
<<elseif _marker.includes("Bedroom")>>\
<<replace "#roomdesc">><</replace>>\
<<include "Bedroom">>\
<<elseif _marker.includes("Chest")>>\
<<replace "#roomdesc">><</replace>>\
<<include "Chest">>\
<<elseif _marker.includes("Barrel")>>\
<<replace "#roomdesc">><</replace>>\
<<include "Barrel">>\
<<elseif _marker.includes("Bookcase")>>\
<<replace "#roomdesc">><</replace>>\
<<include "Bookcase">>\
<<elseif _marker.includes("Statue")>>\
<<replace "#roomdesc">><</replace>>\
<<include "Statue">>\
<<elseif _marker.includes("Lever")>>\
<<replace "#roomdesc">><</replace>>\
<<include "Lever">>\
<<elseif _marker.includes("Plate")>>\
<<replace "#roomdesc">><</replace>>\
<<include "PressurePlate">>\
<<elseif _marker is "0">>\
<<RightPic "towercorridor.png">>\
<<set _ModdedTurnsSinceCombat to $WORLD.turnssincecombat - $PC[$CC][$PCmorphQTY].ratkin>>\
<<if _ModdedTurnsSinceCombat > 20>>\
<<if random(20,50) < _ModdedTurnsSinceCombat>>\
<<set $AllowNav to false>>\
<<replace "#roomdesc">><</replace>>\
<<replace "#eventtext">>\
<<if $Dungeon[_pz][_px][_py][8] is 100>>\
<<set _LocalMonLevel to _pz +1>>\
<<set $ForceMon to ["random", "random", _LocalMonLevel]>>\
<<GetMon $ForceMon>>\
@@color:Gold;Monster encounter: random <<print $Mon.name>>!@@
@@color:Red;The blood on the floor here has attracted a powerful monster!@@
<<elseif $Dungeon[_pz][_px][_py][8] is 104>>\
<<set _LocalMonLevel to _pz +1>>\
<<set $ForceMon to ["random", "random", _LocalMonLevel]>>\
<<GetMon $ForceMon>>\
@@color:Gold;Monster encounter: random <<print $Mon.name>>!@@
@@color:Red;The sexual fluids on the floor here have attracted a powerful monster!@@
<<elseif $Dungeon[_pz][_px][_py][8] is 106>>\
<<set _LocalMonLevel to _pz +2>>\
<<set $ForceMon to ["random", "random", _LocalMonLevel]>>\
<<GetMon $ForceMon>>\
@@color:Gold;Monster encounter: random <<print $Mon.name>>!@@
@@color:Red;The blood and sexual fluids on the floor here have attracted a very powerful monster!@@
<<else>>\
<<set $ForceMon to ["random", "random"]>>\
<<GetMon $ForceMon>>\
@@color:Gold;Monster encounter: random <<print $Mon.name>>!@@
<<endif>>\
<<set $NoInventoryHack to 1>>\
<span id="KeypOne">\
<<link "1) Fight" "Combat">>
<<unset NoInventoryHack>>
<<set $WORLD.turnssincecombat to 0>>
<<set $DisableMenu to true>>
<</link>>\
</span>\
<<if _DisengageChance > 0>>\
<br><<set _DisengageChance to setup.DisengageChance()>>\
<<if random() < _DisengageChance>>\
<span id="KeypTwo">\
<<link "2) Avoid" "Dungeon64">>
<<unset NoInventoryHack>>
<<set $WORLD.turnssincecombat to 0>>
<</link>> (<<print _DisengageChance>>% chance)\
</span>\
<<else>>\
<span id="KeypTwo">\
<<link "2) Avoid" "Combat">>
<<unset NoInventoryHack>>
<<set $WORLD.turnssincecombat to 0>>
<<set $DisableMenu to true>>
<</link>> (<<print _DisengageChance>>% chance)\
</span>\
<<endif>>\
<<endif>>\
<<if $DebugMode is true>>\
<hr>\
@@color:Gold;Debug info@@
(Random encounter)
Turns since last combat: <<print $WORLD.turnssincecombat>>
'Force' data being set: $ForceMon
<<endif>>\
<</replace>>\
<<else>>\
<<set $AllowNav to true>>\
<<replace "#eventtext">><</replace>>\
<<ShowRoomDesc>>\
<<endif>>\
<<else>>\
<<set $AllowNav to true>>\
<<replace "#roomdesc">><</replace>>\
<<RightPic "towercorridor.png">>\
<<replace "#eventtext">><</replace>>\
<<ShowRoomDesc>>\
<<endif>>\
<<else>>\
<<replace "#eventtext">>@@color:Yellow;Error in MoveRefresh: I don't know what this dungeon tile is (_px, _py, _pz): _marker@@
Dungeon array for this xyz is: <<print $Dungeon[_pz][_px][_py]>>
<</replace>>\
<<endif>>\
<<if $NoSuffixBecauseCircle>>\
<<unset $NoSuffixBecauseCircle>>\
<<else>>\
<<replace "#navcontrols">><<ShowNavControls>><</replace>>\
<<endif>>\
<</widget>>\
<<widget "ShowRoomDesc">>\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set _srm to $Dungeon[_pz][_px][_py][8]>>\
<<set _srmtxt to "">>\
<<if _srm is 0>>\
<<elseif _srm is 1>>\
<<set _srmtxt to "The floor here is covered in rat droppings. But strangely, you don't see any rats.">>\
<<elseif _srm is 2>>\
<<set _srmtxt to "A small trickle of water flows from the ceiling here.">>\
<<elseif _srm is 3>>\
<<set _srmtxt to "Several of the floor tiles here are broken, as if shattered by a tremendous force.">>\
<<elseif _srm is 4>>\
<<set _srmtxt to "Dusty cobwebs adorn the walls here.">>\
<<elseif _srm is 5>>\
<<set _srmtxt to "The air here is clear, and there is a slight breeze.">>\
<<elseif _srm is 6>>\
<<set _srmtxt to "The air here is foggy and cold.">>\
<<elseif _srm is 7>>\
<<set _srmtxt to "A few scattered bones litter the floor here.">>\
<<elseif _srm is 8>>\
<<set _srmtxt to "The air here is slightly smoky, lit by a small basin of hot coals burning in one corner, illuminating everything in a spookly red light.">>\
<<elseif _srm is 9>>\
<<set _srmtxt to "This corridor is lit by a small torch hanging from a wall sconce, casting irregular shadows across all it sees.">>\
<<elseif _srm is 10>>\
<<set _srmtxt to "The floor here is slightly angled towards the center, leading to a foot-deep crater of shattered stone.">>\
<<elseif _srm is 11>>\
<<set _srmtxt to "A few rats scurry about the edges of this chamber.">>\
<<elseif _srm is 12>>\
<<set _srmtxt to "The air here is dry and stagnant.">>\
<<elseif _srm is 13>>\
<<set _srmtxt to "This corridor smells slightly of decay, and you think you see some old, blackened blood splatters on one of the walls.">>\
<<elseif _srm is 14>>\
<<set _srmtxt to "An old tapestry adorns the eastern wall here. It is heavily frayed, but appears to depict a man on horseback riding into a forest.">>\
<<elseif _srm is 15>>\
<<set _srmtxt to "An empty wall sconce sits on the far wall, its shallow candle wick long since depleted.">>\
<<elseif _srm is 16>>\
<<set _srmtxt to "There is a tile mosiac stretching in a simple pattern across half the floor here, and a few spare tiles rest near a wall. It seems whatever renovation was intended here, it was never finished.">>\
<<elseif _srm is 17>>\
<<set _srmtxt to "There is a small, abandoned firepit here.">>\
<<elseif _srm is 18>>\
<<set _srmtxt to "A small, rocky outcrop pokes through the floor here.">>\
<<elseif _srm is 19>>\
<<set _srmtxt to "The wall in one corner of this room lays shattered as if from a tremendous blow, with jagged chunks of rock left spread from the impact.">>\
<<elseif _srm is 20>>\
<<set _srmtxt to "This room is full of spiderwebs, with a few black spiders nearly as big as your hand scattered across.">>\
<<elseif _srm is 21>>\
<<set _srmtxt to "A glowing green moss adorns the walls here, lighting the room reasonably well but also giving the air an unhealthy moistness.">>\
<<elseif _srm is 22>>\
<<set _srmtxt to "This corridor is brightly lit by a single lantern hanging from the ceiling. While its oil is low, the fact that it is burning at all suggests that someone must have passed through here.">>\
<<elseif _srm is 23>>\
<<set _srmtxt to "This corridor is in better condition than most, with a few brightly-lit wall sconces illuminating a floral pattern engraved directly into the stone floor. The craftsmanship is quite good, and leaves you wondering about its engraver.">>\
<<elseif _srm is 24>>\
<<set _srmtxt to "The floor here is covered in a fine black dust, and the room is filled with an overpowering scent of rotting vegetation.">>\
<<elseif _srm is 25>>\
<<set _srmtxt to "Half of what appears to have once been an astrological chart adorns the northern wall, with tattered strips of cloth and leather dangling from its torn edges.">>\
<<elseif _srm is 26>>\
<<set _srmtxt to "This room glows with an ambient light from an unidentifiable source.">>\
<<elseif _srm is 27>>\
<<set _srmtxt to "A few bats hang from the ceiling here.">>\
<<elseif _srm is 28>>\
<<set _srmtxt to "Hanging from the center of this room is what appears to be the shattered remains of what was once a large glass chandelier, with a few of its fallen pieces strewn across the room.">>\
<<elseif _srm is 29>>\
<<set _srmtxt to "The floor here is obscured by several inches of rolling mist.">>\
<<elseif _srm is 30>>\
<<set _srmtxt to "The air here is dusty and hot, making it uncomfortable to breathe.">>\
<<elseif _srm is 31>>\
<<set _srmtxt to "This room smells faintly of lavender.">>\
<<elseif _srm is 32>>\
<<set _srmtxt to "Water trickles from the ceiling here, collecting on the damp ground.">>\
<<elseif _srm is 33>>\
<<set _srmtxt to "This room is filled with the overpowering smell of chlorine.">>\
<<elseif _srm is 33>>\
<<set _srmtxt to "The faint remains of some sort of magical circle drawn in chalk are apparent, with what appear to be little melted bits of wax at regular intervals.">>\
<<elseif _srm is 34>>\
<<set _srmtxt to "You're not completely certain, but if you're very quiet, you can faintly hear what sounds like a cow mooing in the distance.">>\
<<elseif _srm is 35>>\
<<set _srmtxt to "Bits of dust descend from a small hole in the ceiling here.">>\
<<elseif _srm is 36>>\
<<set _srmtxt to "You can hear the sound of something very large moving around on the floor above you.">>\
<<elseif _srm is 37>>\
<<set _srmtxt to "The air is noticeably cold here.">>\
<<elseif _srm is 38>>\
<<set _srmtxt to "The air is noticeable warm here">>\
<<elseif _srm is 39>>\
<<set _srmtxt to "A scattering of ash covers the floor here, as if a large bonfire was allowed to burn down to nothing.">>\
<<elseif _srm is 40>>\
<<set _srmtxt to "A set of chains are attached to the walls here, with broken manacles dangling from them.">>\
<<elseif _srm is 41>>\
<<set _srmtxt to "This room smells faintly of wine.">>\
<<elseif _srm is 42>>\
<<set _srmtxt to "A large boulder lies at the center of this room. It is several feet wider than the corridors, so it's unclear how it came to be here.">>\
<<elseif _srm is 43>>\
<<set _srmtxt to "This room smells strongly of horse urine.">>\
<<elseif _srm is 44>>\
<<set _srmtxt to "Small spiders adorn the walls and ceiling here. It makes your skin crawl just to be here.">>\
<<elseif _srm is 45>>\
<<set _srmtxt to "The walls here are coated with a layer of foul-smelling black moss. You probably shouldn't linger.">>\
<<elseif _srm is 46>>\
<<set _srmtxt to "This room has a small pile of debris in one corner, with little bits of splintered wood and stone messily strewn about.">>\
<<elseif _srm is 47>>\
<<set _srmtxt to "The smell of rotting wood fills your nostrils, and you see the splintered remains of what might once have been some sort of furniture.">>\
<<elseif _srm is 48>>\
<<set _srmtxt to "The stone walls here have been heavily sanded down to a fine smoothness.">>\
<<elseif _srm is 100>>\
<<set _srmtxt to "There are a few fresh splatters of blood here, as if a battle happened recently.">>\
<<elseif _srm is 101>>\
<<set _srmtxt to "There is a small hole bored into a wall here, just large enough for a crossbow bolt to pass through.">>\
<<elseif _srm is 102>>\
<<set _srmtxt to "There is a small bit of cut string anchored to the walls the door here, possibly once connected to a trap of some kind.">>\
<<elseif _srm is 103>>\
<<set _srmtxt to "There is an open pit trap here, which you carefully avoid.">>\
<<elseif _srm is 104>>\
<<set _srmtxt to "There are a few splatters of fluid on the floor here.">>\
<<elseif _srm is 105>>\
<<set _srmtxt to "There's a small pile of dust here that smells faintly of ozone.">>\
<<elseif _srm is 106>>\
<<set _srmtxt to "A puddle of blood and assorted fluids has collected on the floor here.">>\
<<endif>>\
<<replace "#roomdesc">><<print _srmtxt>><<if _CanBeExplorer is true>><<AwardAchievement "Explorer">><<endif>><</replace>>\
<</widget>>\
<<widget "ProcessLever">>\
<<set _LeverActions to _args[0]>>\
<<for _PL to 0; _PL < _LeverActions.length; _PL++>>\
<<set _DunXtoChange to _LeverActions[_PL][0]>>\
<<set _DunYtoChange to _LeverActions[_PL][1]>>\
<<set _ArrayPosToChange to _LeverActions[_PL][2]>>\
<<set _NewValue to _LeverActions[_PL][3]>>\
<<set $Dungeon[_pz][_DunXtoChange][_DunYtoChange][_ArrayPosToChange] to clone(_NewValue)>>\
<</for>>\
<</widget>>\
<<widget "ShowLever">>\
<<set _WhichLever to _args[0]>>\
<<if _args[0] is "LeverLeftUp">>\
<<set _CurrentState to "'up'">>\
<<set _ChangeTo to "LeverLeftDown">>\
<<set _WhichTwelveArrayToProcess to 1>>\
<<RightPic "eventleverup.png">>\
<<elseif _args[0] is "LeverLeftDown">>\
<<set _CurrentState to "'down'">>\
<<set _ChangeTo to "LeverLeftUp">>\
<<set _WhichTwelveArrayToProcess to 0>>\
<<RightPic "eventleverdown.png">>\
<<elseif _args[0] is "LeverRightUp">>\
<<set _CurrentState to "'up'">>\
<<set _ChangeTo to "LeverRightDown">>\
<<set _WhichTwelveArrayToProcess to 1>>\
<<RightPic "eventleverup.png">>\
<<elseif _args[0] is "LeverRightDown">>\
<<set _CurrentState to "'down'">>\
<<set _ChangeTo to "LeverRightUp">>\
<<set _WhichTwelveArrayToProcess to 0>>\
<<RightPic "eventleverdown.png">>\
<<else>>
<<endif>>\
@@color:LightGreen;Lever@@
There is a lever here. It is currently in the <<print _CurrentState>> position.
<span id="KeypOne">\
<<link "1) Pull the lever">>
<<set $Dungeon[_pz][_px][_py][11] to _ChangeTo>>\
<<set _LeverAction to $Dungeon[_pz][_px][_py][12][_WhichTwelveArrayToProcess]>>\
<<ProcessLever _LeverAction>>\
<<replace "#eventtext">>\
<<ShowLever _ChangeTo>>\
<</replace>>\
<<set _throwaway to setup.DrawMap64(_px, _py, _pz, 64, $PC[$CC][$PClocation])>>\
<</link>>\
</span>\
<</widget>>\
<<widget "TogglePressurePlate">>\
<<set _PlateActions to _args[0]>>\
<<for _PL to 0; _PL < _PlateActions.length; _PL++>>\
<<set _DunXtoChange to _PlateActions[_PL][0]>>\
<<set _DunYtoChange to _PlateActions[_PL][1]>>\
<<set _ArrayPosToChange to _PlateActions[_PL][2]>>\
<<set _NewValue to 0>>\
<<if $Dungeon[_pz][_DunXtoChange][_DunYtoChange][_ArrayPosToChange] is 0>>\
<<set _NewValue to 1>>\
<<endif>>\
<<set $Dungeon[_pz][_DunXtoChange][_DunYtoChange][_ArrayPosToChange] to clone(_NewValue)>>\
<</for>>\
\
<<set _throwaway to setup.DrawMap64(_px, _py, _pz, 64, $PC[$CC][$PClocation])>>\
\
@@color:LightGreen;Pressure plate@@
You hear the sound of stone sliding on stone.
<</widget>>\
<<widget "PressurePlateStepOffCheck">>\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set _StandingOn to $Dungeon[_pz][_px][_py]>>\
<<if _StandingOn[11] is "PressurePlate">>\
<<set _CharsOnFirst to 0>>\
<<for _AllPCS to 0; _AllPCS < 3; _AllPCS++>>\
<<if setup.CharacterExists(_AllPCS) is true>>\
<<if $PC[_AllPCS][$PClocation] is "tower">>\
<<if $PC[_AllPCS][$PCz] is _pz>>\
<<if $PC[_AllPCS][$PCx] is _px>>\
<<if $PC[_AllPCS][$PCy] is _py>>\
<<set _CharsOnFirst to _CharsOnFirst +1>>\
<<endif>>\
<<endif>>\
<<endif>>\
<<endif>>\
<<endif>>\
<</for>>\
<<if _CharsOnFirst < 2>>\
<<TogglePressurePlate _StandingOn[12]>>\
<<endif>>\
<<endif>>\
<</widget>>\<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $RoomPTR to passage()>>\
<<set $AllowNav to true>>\
\
<<RightPic "eventbed.jpg">>\
\
<<replace "#eventtext">>\
@@color:LightGreen;Shattered bedroom@@
<<if $Dungeon[_pz][_px][_py][12] is 0>>\
You're in the remains of what appears to have once been an elegant bedroom, but that has fallen into extreme disrepair. Yet while the stone walls of this room are shattered and full of holes, the linens on the bed look clean and inviting, and the pillow appears to have been recently fluffed.
<hr>\
<span id="KeypOne">\
<<link "1) Take a nap" $RoomPTR>>
<<set $Dungeon[_pz][_px][_py][12] to 1>>
<</link>>\
</span>\
<<elseif $Dungeon[_pz][_px][_py][12] is 1>><!-- sleep request-->\
<<if _pz > random(1,10)>>\
<<set _whichmon to either("goblin","slime","hellhound","spider")>>\
<<if _whichmon is "goblin">>\
<<if $PC[$CC][$PCsex] is "male">>\
You curl up under the covers to take a refreshing nap, but your sleep is disturbed by an unpleasant dream about being constipated. It's the scent that really gets to you though. You've never smelled something so intensely in a dream before. That's when you wake up to see your legs spread wide and a goblin already balls deep inside your ass with a long line of drool dripping from his tongue to your stomach.
<<set $PC[$CC][$PCsexACTS].analreceived to $PC[$CC][$PCsexACTS].analreceived +1>>\
<<else>>\
You curl up under the covers to take a refreshing nap, but your sleep is disturbed by a a dream that is somehow both erotic...and yet also strangely uncomfortable. It's the sounds that really gets to you though. It sounds like...someone cheering? It That's when you wake up to your ankles wrapped around a goblin's neck as he thrusts his cock balls deep inside you.
<<FemaleVirginity _whichmon>>
<<set $PC[$CC][$PCsexACTS].vaginalreceived to $PC[$CC][$PCsexACTS].vaginalreceived +1>>\
<<endif>>\
<<elseif _whichmon is "hellhound">>\
<<if $PC[$CC][$PCsex] is "male">>\
You curl up under the covers to take a refreshing nap, quickly falling into a peculiar dream about sinking into lava. You're completely submerged up to the waist, and trails of smoke and heat roll across your face. And yet somehow despite the heat, the smoky bits seems strangely wet. Bursting suddenly to full awareness, you find yourself with a fiery red hellhound between your legs eagerly licking your cock.
<<else>>\
You curl up under the covers to take a refreshing nap, quickly falling into a peculiar dream about sinking into lava. You're completely submerged up to the waist, and trails of smoke and heat roll across your face. And yet somehow despite the heat, the smoky bits seem strangely wet. Bursting suddenly to full awareness, you find yourself with a fiery red hellhound between your legs. His forepaws are wrapped aroudn your and he's thrusting his cock in search of a hole, while happily licking your face.
Seeing that you're now awake, the hellhound tightens his grip on your hips even as his tongue lols out the side of his mouth and his head arches upwards in pleasure.
<<endif>>\
<<elseif _whichmon is "slime">>\
<<if $PC[$CC][$PCsex] is "male">>\
Resting down into the covers for a nice nap, you find your sleep disturbed by a strange dream. You're riding a boat in choppy waters, and every time you roll over a wave, the boat violently splashes into the water. There's so much water that your clothes are drenched and you're finding it difficult to breath. Thats when you open your eyes to find a slime monster with a tentacle down yous throat and thrusting in and out of your ass hole.
<<else>>\
Resting down into the covers for a nice nap, you find your sleep disturbed by a strange dream. You're riding a sailboat in choppy waters, and every time you roll over a wave, the boat violently splashes into the water. Over and over this happens, until finally you wake up to discover that a slime has slipped beneath the covers and is fucking both your ass and pussy together.
<<FemaleVirginity _whichmon>>
<<set $PC[$CC][$PCsexACTS].vaginalreceived to $PC[$CC][$PCsexACTS].vaginalreceived +1>>\
<<set $PC[$CC][$PCsexACTS].analreceived to $PC[$CC][$PCsexACTS].analreceived +1>>\
<<endif>>\
<<elseif _whichmon is "spider">>\
You quickly fall alseep into a dream about being wrapped so tightly in blankets that you can barely breath. Shifting uncomfortably, you open your eyes to the sight of a giant spider above you, in the process of wrapping your torso in webbing while an grotesque barbed cock dangles beneath it.
<<elseif _whichmon is "minotaur">>\
@@color:Yellow;No longer used@@
Curling up under the covers to take a refreshing nap, it's not long before you're awaked by the sensation of the bedsheets being yanked off the bed. Jolting upright, the first thing you see is a massive horse cock whacking you across the face and knocking you back down. Moments later a meaty minotaur hand engulfs your face and forces you the back of your head down onto a pillow, and you feel that same impossibly large horse cock now roughly probing its way up your thighs.
Drowsy and dazed, you offer up barely any struggle as the minotaur tosses one of your ankles up over his shoulders and begins probing his cock into your pelvis, trying to squeeze it inside. You almost want to try to rationally explain to him that it can't possibly fit, and yet to your growing dread his pre-cum moistens your pussy folds and slowly begins to make headway.
<<FemaleVirginity _whichmon>>
<<set $PC[$CC][$PCsexACTS].vaginalreceived to $PC[$CC][$PCsexACTS].vaginalreceived +1>>\
Unable to see, but feeling every inch of his two foot long member now sliding its length up and down your pussy, you can't help but wonder at the mechanics involved if a creature this large somehow makes you pregnant.
<<else>>\
bed event, implement whatever monster this is: _whichmon
<<endif>>\
\
<<set $AllowNav to false>>\
\
<!-- both options need it: whether for combat or for pregnancy -->\
<<set $ForceMon[0] to _whichmon>>
<<set $ForceMon[1] to "male">>
<<GetMon $ForceMon>>\
\
<hr>\
@@color:Gold;Options@@
<span id="KeypOne">\
<<link "1) Struggle" "Combat">>
<<set $Dungeon[_pz][_px][_py][12] to 9999>>\
<</link>>\
</span>\
<<if $PC[$CC][$PCsex] neq "male">>\
<span id="KeypTwo">\
<<link "2) Ride it out" $RoomPTR>>
<<set $Dungeon[_pz][_px][_py][12] to 3>>
<<set $WORLD.datapasser to _whichmon>>
<</link>>\
</span>\
<<endif>>\
<<else>>\
You curl up under the covers and take a refreshing nap, disturbed only slighly by an erotic dream you only dimly recall.
@@color:LightGreen;Health restored!@@
<<set $Dungeon[_pz][_px][_py][12] to 0>>\
<<set $PC[$CC][$PChpcur] to $PC[$CC][$PChpmax]>>\
<<set $PC[$CC][$PCmanacur] to $PC[$CC][$PCmanamax]>>\
<<ShowHealth>><<ShowMana>>\
<<endif>>\
<<elseif $Dungeon[_pz][_px][_py][12] is 2>><!-- old error condition-->\
<<set $Dungeon[_pz][_px][_py][12] to 0>>\
@@color:Red;Warning!@@ You appear to have an //old// error condition left over from prior versions of the game. If you haven't reset the tower since 2023, then it's not a big deal. Your bed state has now been reset to an unvisited state. Walk off and come back, and everything should be back to normal. If you've reset the tower //after// the February 2024 update, something is very wrong and you should report this as a bug.
<<elseif $Dungeon[_pz][_px][_py][12] is 3>><!-- ride it out-->\
<<set _whichmon to $WORLD.datapasser>>\
<<set $PC[$CC][$PChornycur] to 0>>\
<<set $Dungeon[_pz][_px][_py][12] to 9999>>\
<<if _whichmon is "goblin">>\
<<if $PC[$CC][$PCsex] is "male">>\
<<set $PC[$CC][$PCsexACTS].semenreceived to $PC[$CC][$PCsexACTS].semenreceived + _pz>>\
Deciding not to struggle, you relax your anus as the goblin continues to pounds his way at your insides. You're disappointed when he quickly ejaculates mere seconds later, then collapses in an exhausted heap on top of you. His cock is still plugged up tightly inside you however, it takes a couple minutes of awkward manouvering to squeeze him out and off of you.
<<else>>\
<<set $PC[$CC][$PCsexACTS].semenreceived to $PC[$CC][$PCsexACTS].semenreceived +1>>\
Relaxing and pushing your hips up against the goblin, you're disappointed when he quickly ejaculates then collapses in a sleeping heap on top of you. His cock is still inside you however, and despite your growing concern over its presence holding a pool of warm, virile semen inside you, it neverthless takes you a couple minutes to manouver his bulk off of you.
You do the best you can to clean the mess now dripping down your thighs, but if his seed was going to take, surely it's already done so.
<<endif>>\
<<elseif _whichmon is "hellhound">>\
<<if $PC[$CC][$PCsex] is "male">>\
<<set $PC[$CC][$PCsexACTS].bjreceived to $PC[$CC][$PCsexACTS].bjreceived +1>>\
<<set $PC[$CC][$PCsexACTS].semengiven to $PC[$CC][$PCsexACTS].semengiven + 1>>\
Not one to turn down a blowjob, you pat the hound on the head and offer murmurings of support then close your eyes and relax as its slippery dog-tongue quickly laps its way up and down your cock. He brings you to a swift climax, then licks your clean and runs off down a corridor, his tail wagging.
<<else>>\
<<set $PC[$CC][$PCsexACTS].vaginalreceived to $PC[$CC][$PCsexACTS].vaginalreceived +1>>\
<<set $PC[$CC][$PCsexACTS].semenreceived to $PC[$CC][$PCsexACTS].semenreceived + _pz>>\
Rotating your hips upwards to better receive him, the hellhound accepts your cooperation as his cue to breed you. Pressing his thick neck own against yours, you feel the large bulb at the base of his cock struggling to fit inside you. Spreading your legs sligthly to give him better access, there's a tiny bit of pain as he squeezes it intde you, and then to your shock it very obviously grows somehow //larger// in order to solidly lock you in coitus. Looking down at you with a grin and knowing that you cannot possibly escape without tearing out your insides, the hellhound gleefully fucks you on the single inch or two of play he has, his knot bouncing incessenetly at the inside of your vagina every time he pulls back.
<<FemaleVirginity _whichmon>>\
You instantly climax, but he doesn't let up. Now licking your face and neck with a trail of slobber, you feel a growing heat deep inside you as of his enormous cock tickles maddeningly at your cervix. When at last his climax cums it's like a gallon of lava gushing across your insides with a tingly sensation that spreads throughout your entire body. Finally he collapses on top of you, but still knotted tightly together you can do nothing but carry his bulk for another 20 minutes while he cheerfully licks your face and the inside of your mouth.
At some point you pass out, and when you awaken, you are alone in the bed with a pool of reddish semen dripping out from between your legs.
<<endif>>\
<<elseif _whichmon is "slime">>\
<<if $PC[$CC][$PCsex] is "male">>\
imeplement male
<<set $PC[$CC][$PCsexACTS].bjgiven to $PC[$CC][$PCsexACTS].bjgiven +1>>\
<<set $PC[$CC][$PCsexACTS].analreceived to $PC[$CC][$PCsexACTS].analreceived +1>>\
<<set $PC[$CC][$PCsexACTS].semenreceived to $PC[$CC][$PCsexACTS].semenreceived + (_pz * 2)>>\
<<else>>\
<<set $PC[$CC][$PCsexACTS].vaginalreceived to $PC[$CC][$PCsexACTS].vaginalreceived +1>>\
<<set $PC[$CC][$PCsexACTS].analreceived to $PC[$CC][$PCsexACTS].analreceived +1>>\
<<set $PC[$CC][$PCsexACTS].semenreceived to $PC[$CC][$PCsexACTS].semenreceived + (_pz * 2)>>\
Having had worse dreams you try to go back to sleep, but the slime continues unabated. Eventually it ejaculates in both your holes, then slips away. Your thighs and the bedsheets are now messily drenched in slime goo.
<<endif>>\
<<elseif _whichmon is "spider">>\
<<if $PC[$CC][$PCsex] is "male">>\
imeplement male
<<else>>\
<<FemaleVirginity _whichmon>>\
<<set $PC[$CC][$PCsexACTS].vaginalreceived to $PC[$CC][$PCsexACTS].vaginalreceived +1>>\
Hardly able to move already, you're unsurprised when the _whichmon secretes webbing on your ankles. You //are// surprised that it does this with your legs wrapped around its body to anchor you in place around it. Now webbed securely in place, there's little you can do but take his cock as he slips it slowly inside you and immediately begins a long, slow ejaculation. There is no thrusting, no heavy breathing or cries of pleasure, only calm silence with intent to ''breed'' you.
The flow of semen is slow and steady, a constant trickle drawn out over minutes as you feel a warm pool of it growing inside you. At first there is no pleasure, but the before long the calm, calculating nature of the act intended only to breed you overwhelms you and you can't help but climax. The _whichmon looks at you with amusement, then secretes a fluid to dissolve the webbing from your ankles which fall unceremoniously to the bed between his legs. At last slipping his cock out, he then applies a fliud to your pussy which quickly hardens, locking his semen inside you for a short but crucial time until it dissolves. And then he leaves, as silently as he came.
<<endif>>\
<<elseif _whichmon is "minotaur">>\
@@color:Yellow;No longer used@@
<<if $PC[$CC][$PCsex] is "male">>\
<<else>>\
<<set $PC[$CC][$PCsexACTS].vaginalreceived to $PC[$CC][$PCsexACTS].vaginalreceived +1>>\
<<set $PC[$CC][$PCsexACTS].semenreceived to $PC[$CC][$PCsexACTS].semenreceived + _pz>>\
Feeling it would be hopeless to try to resist such a massive beast, you relax and try to be as compliant as possible. It makes no difference though, as the minotaur simply continues plowing away with a massively flared horse cock between your increasingly bruised thighs. Struggling to breath around his hand on your face, you're surprised when he cums almost immediately, your stomach bulging with the massive spray of semen now painted across your insides.
Then without so much as a grunt, he gets up off you and walks away, leaving you bewildered and shocked at the backwards stream of his semen sprayed across the sheets fully two feet away from your battered pussy.
<<endif>>\
<<else>>\
implement whichever sex event this is: _whichmon
<<endif>>\
On the bright side, your arousal has been thoroughly sated.
<<elseif $Dungeon[_pz][_px][_py][12] is 9999>><!-- struggled-->\
The bed here is messy and unkept, not having been made since your last sketchy attempt at sleep. You're reluctant to sleep here again given how the last attempt ended with a monster between your legs, but surely it wouldn't happen again, would it?
<span id="KeypOne">\
<<link "1) Risk it" $RoomPTR>>
<<set $Dungeon[_pz][_px][_py][12] to 1>>
<</link>>\
</span>\
<<else>>\
Error in event 102: unrecognized state: $Dungeon[_pz][_px][_py][12]
<<endif>>\
<</replace>>\<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $AllowNav to true>>\
<<set $RoomPTR to passage()>>\
<<set _AllowGenericLinks to false>>\
\
<<RightPic "eventchest.jpg">>\
\
<!-- general values -->\
<<set _LockDiff to _pz + 15>>\
<<set _SmashPower to $PC[$CC][$PCstr]>>\
<<set _PickPower to $PC[$CC][$PCdex]>>\
<<set _SmashPowerWithHammer to _SmashPower>>\
<<set _PickPowerWithPick to _PickPower>>\
<<set _HasHammer to false>>\
<<if setup.HasHammer() > -1>>\
<<set _HasHammer to true>>\
<<set _SmashPowerWithHammer to _SmashPower +3>>\
<<endif>>\
<<set _PickPTR to setup.HasPick()>>\
<<if _PickPTR > -1>>\
<<set _PickPowerWithPick to _PickPower +3>>\
<<endif>>\
<<set _IsRogue to false>>\
<<set _RogueAUTO to false>>\
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "rogue">>
<<set _IsRogue to true>>\
<<if $PC[$CC][$PClevel] > 6>>\
<<set _RogueAUTO to true>>\
<<endif>>\
<<endif>>\
\
<!-- version update fixer -->\
<<if $Dungeon[_pz][_px][_py][12] is 2>>\
<<set $Dungeon[_pz][_px][_py][12] to 0>>\
<<endif>>\
\
<<replace "#eventtext">>\
<<if $Dungeon[_pz][_px][_py][12] is 0>>\
@@color:LightGreen;Treasure chest!@@
Prominently placed in the center of this room is a large wooden chest. Surely that's not suspicious at all, right? Still, what valuable and useful goodies might be inside?\
<<set _AllowGenericLinks to true>>\
<<elseif $Dungeon[_pz][_px][_py][12] < 5>>\
<<set _GiveLoot to false>>\
<<set _DoTrap to false>>\
\
<<if $Dungeon[_pz][_px][_py][12] is 1>>\
<!-- strength only -->\
@@color:Yellow;Target difficulty:@@ <<print _LockDiff>>
@@color:LightGreen;Strength:@@ <<print $PC[$CC][$PCstr]>>
<<if _HasHammer is true>>\
@@color:LightGreen;Hammer:@@ +3
<<else>>\
@@color:Red;No hammer!@@
<<endif>>\
<<if _RogueAUTO is true>>\
@@color:Aqua;Rogue level 7 bonus:@@ Auto success!
As a skilled rogue, you effortlessly pick the lock and dismarm the trap.
<<set _GiveLoot to true>>\
<<set _DoTrap to false>>\
<<else>>\
<<if $PC[$CC][$PCstr] gte _LockDiff>>\
<<set _GiveLoot to true>>\
<<set _DoTrap to true>>\
@@color:LightGreen;Success!@@
You jam your fingers into the slit between the base and lid of the chest and pry them apart with such force that the lock is ripped out from its mounting in the wood. \
<<elseif _SmashPowerWithHammer gte _LockDiff>>\
<<set _GiveLoot to true>>\
<<set _DoTrap to true>>\
@@color:LightGreen;Success!@@
It takes a couple swings with your hammer, but you eventually manage to smash the lock and open the chest. \
<<elseif $DebugMode is true>>\
<<set _GiveLoot to true>>\
<<set _DoTrap to true>>\
@@color:Orange;Debug Mode Auto Success@@
You wave your hands and the chest opens
<<else>>\
<<set _AllowGenericLinks to true>>\
<<set $Dungeon[_pz][_px][_py][12] to 0>>\
@@color:Yellow;Failed to open the chest!@@
<<if _HasHammer is true>>\
You spend several minutes smacking the lock with your hammer, but you're just not strong enough to break it. \
<<else>>\
You jam your fingers into the slit between the base and lid of the chest, but you're not strong enough to pry it open. \
<<endif>>\
<<endif>>\
<<endif>>\
<<elseif $Dungeon[_pz][_px][_py][12] is 3>>\
<!-- pick -->\
@@color:Yellow;Target difficulty:@@ _LockDiff
<<if _RogueAUTO is true>>\
@@color:Aqua;Rogue level 7 bonus:@@ Auto success!
As a skilled rogue, you effortlessly pick the lock and disarm the trap.
<<set _GiveLoot to true>>\
<<set _DoTrap to false>>\
<<else>>\
@@color:LightGreen;Dexterity:@@ $PC[$CC][$PCdex]
<<if _IsRogue is true>>\
@@color:LightGreen;Rogue level bonus:@@ +<<print $PC[$CC][$PClevel]>>
<<else>>\
@@color:Red;Not a rogue@@
<<endif>>\
<<if _PickPTR > -1>>\
@@color:LightGreen;Using lockpicks:@@ +3>>
<<else>>\
@@color:Red;No lockpicks@@
<<endif>>\
<<if _PickPower gte _LockDiff >>\
@@color:Aqua;Success!@@
You make quick work of the lock \
<<set _GiveLoot to true>>\
<<set _DoTrap to true>>\
<<elseif _PickPowerWithPick gte _LockDiff >>\
@@color:LightGreen;Success!@@
It takes several minutes, but eventually you manage to pick the lock \
<<set _GiveLoot to true>>\
<<set _DoTrap to true>>\
<<else>>\
<<set $Dungeon[_pz][_px][_py][12] to 0>>\
@@color:Red;Failure!@@
You spend several minutes fiddling with the lock, but fail to open it. \
<<set _GiveLoot to false>>\
<<set _DoTrap to false>>\
<<endif>>\
<<endif>>\
<<elseif $Dungeon[_pz][_px][_py][12] is 4>>\
The chest is sitting open, and thankfully the treasure is still inside. \
<<set _GiveLoot to true>>\
<<set _DoTrap to false>>\
<<endif>>\
\
<<if _DoTrap is true>>\
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "rogue">>\
The chest is trapped, but as a rogue you manage to disarm it without difficulty. \
<<else>>\
<<set _WhichTrap to random(1,3)>>\
<<if _WhichTrap is 1>>\
You're feeling pretty good about yourself when the trap mechanism suddenly sprays your face with acid. \
<<set _InCaseofDeath to "an acid-trapped chest">>\
<<set _Damage to random(_pz, _pz * 5)>>\
<<set _Damage to _Damage * -1>>\
<<ChangeStat $PChpcur _Damage>>\
<<ShowHealth>>\
<<elseif _WhichTrap is 2>>\
That's when a burst of magic discharges from the trap mechanic, and draining your mana reserves. \
<<set _Damage to random(_pz, _pz * 5)>>\
<<set _Damage to _Damage * -1>>\
<<ChangeStat $PCmanacur _Damage>>\
<<ShowMana>>\
<<else>>\
<<set _Target to []>>\
<<set _Morphs to ["human", "human", "goblin", "slime","rat-morph","spider"]>>\
<<if _pz > 15>>\
<<set _Morphs to ["human", "human", "demon", "tentacle","drider","hydra","snake"]>>\
<<elseif _pz > 10>>\
<<set _Morphs to ["human", "human", "minotaur", "naga", "rat-morph", "hellhound", "troll", "drider"]>>\
<<elseif _pz > 5>>\
<<set _Morphs to ["human", "human", "goblin", "slime", "spider","rat-morph", "minotaur", "naga"]>>\
<<endif>>\
<<set _Target to []>>\
<<for _Poss to 0; _Poss < $PC[$CC][$PCbp].length; _Poss++>>\
<<set _foo to $PC[$CC][$PCbp][_Poss].type>>\
<<set _bar to either(_Morphs)>>\
<<set _Target[_Poss] to { type: _foo, morph: _bar }>>\
<</for>>\
Unfortunately, right as you're about to check out the loot a small needle you missed injects you with a strange transformative liquid.
@@color:Yellow;* <<DoTransform _Target "chest">>!@@
@@color:Yellow;* <<DoTransform _Target "chest">>!@@
@@color:Yellow;* <<DoTransform _Target "chest">>!@@
<<endif>>\
<<if $PC[$CC][$PChpcur] < 1>>\
<<set _GiveLoot to false>>\
<<set $AllowMove to false>>\
<br><br>\
@@color:Red;You have died!@@
<<set $WORLD.diedby to _InCaseOfDeath>>\
<span id="KeypSpace">\
<<link "space) Continue" "Death">>
<<set $Dungeon[_pz][_px][_py][12] to 4>>
<</link>>
</span>\
<<else>>\
<<endif>>\
<<endif>>\
<<endif>>\
<<if _GiveLoot is true>>\
<<set $Dungeon[_pz][_px][_py][12] to 99>>\
<br>\
@@color:LightGreen;Chest opened!@@
<<set $PC[$CC][$PCmisc].chests to $PC[$CC][$PCmisc].chests +1>>\
<<if $PC[$CC][$PCmisc].chests > 3>>\
<<AwardAchievement "Archeologist">>\
<<endif>>\
<<set _evgold to random(99, _pz * 100)>>\
<<set _AllowLoot to false>>\
<<set _Loot to $Dungeon[_pz][_px][_py][13]>>\
<<if random(1,3) is 1>>\
<<set _AllowLoot to true>>\
<<elseif setup.PlayerHasPerk("Archeologist") is true>>\
<<set _AllowLoot to true>>\
<<elseif $DebugMode is true>>\
<<set _AllowLoot to true>>\
@@color:Orange;Debug: forcing chest loot@@
<<endif>>\
\
<<if _Loot.length is 4>>\
@@color:Orange;Warning: chest somehow generated with old, pre-23Nov style loot format. Fixing.@@
<<set _Loot to setup.GenLoot("chest", "none", _pz, "tower")>>\
<<elseif _Loot.length is 5>>\
<<else>>\
@@color:Orange;Warning: chest generated with invalid loot: (<<print _Loot>>) Fixing.@@
<<set _Loot to setup.GenLoot("chest", "none", _pz, "tower")>>\
<<endif>>\
\
<<if _AllowLoot is true>>\
<<DescribeItem _Loot>>\
Inside you find _evgold gold and a <<print $ItemPoke.fullname>>!\
<<GainGold _evgold>>\
<<set _foo to setup.GiveItem($CC, _Loot)>>\
<<else>>\
Inside the chest you find _evgold gold!\
<<GainGold _evgold>>\
<<endif>>\
<<endif>>\
<<elseif $Dungeon[_pz][_px][_py][12] is 99>>\
There is an empty chest here.\
<<else>>\
@@color:Red;Error in room: unrecognized state@@\
<<endif>>\
\
<<if _AllowGenericLinks is true>>\
<br>\
<<if _HasHammer is true>>\
<span id="KeypOne">\
<<link "1) Smash the lock with your hammer" $RoomPTR>>
<<set $Dungeon[_pz][_px][_py][12] to 1>>
<</link>>
</span>\
<<else>>\
<span id="KeypOne">\
<<link "1) Try to force it open" $RoomPTR>>
<<set $Dungeon[_pz][_px][_py][12] to 1>>
<</link>>
</span>\
<<endif>>\
<<if (_IsRogue is true) or (_PickPTR > -1)>>\
<span id="KeypTwo">\
<<link "2) Pick the lock" $RoomPTR>>\
<<set $Dungeon[_pz][_px][_py][12] to 3>>
<</link>>\
</span>\
<<else>>\
2) Cannot pick the lock\
<<endif>>\
<<endif>>\
<</replace>>\<!-- food barrel -->\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $AllowNav to true>>\
<<set $RoomPTR to passage()>>\
\
<<RightPic "eventbarrel.jpg">>\
\
<<replace "#eventtext">>\
<<if $Dungeon[_pz][_px][_py][12] is 0>>\
<<set $Dungeon[_pz][_px][_py][12] to random(1,3)>>\
<<endif>>\
<<if $Dungeon[_pz][_px][_py][12] < 10>>\
@@color:LightGreen;Wooden barrel@@
This room appears to be be an old, mostly abandoned pantry. However, one prominent barrel is sealed, and looks like it might contains some goodies.
<span id="KeypOne">\
<<link "1) Open it">>
<<set $Dungeon[_pz][_px][_py][12] to 99>>\
<<replace "#eventtext">>\
@@color:LightGreen;Raiding the pantryg@@
<<if $Dungeon[_pz][_px][_py][12] is 1>>\
<<set _Item to [102, 199, random(2,4), 0, 0]>>\
<<set _foo to setup.GiveItem($CC, _Item)>>\
You find a couple chunks of unidentifiable meat. No idea what they're from, but at least they smell ok.
<<elseif $Dungeon[_pz][_px][_py][12] is 2>>\
<<set _Item to [109, 400, 1, 0, 0]>>\
<<set _foo to setup.GiveItem($CC, _Item)>>\
You find an unlabeled bottle containing some sort of greenish-blue liquid. No idea what it is.
<<else>>\
<<set _Item to [107,0,1,0,0]>>\
<<set _foo to setup.GiveItem($CC, _Item)>>\
You find a roll of cheese wrapped in wax. It seems to be seemed well enough, so it's probably safe to eat.
<<endif>>\
<</replace>>\
<</link>>\
</span>\
<<else>>\
@@color:LightGreen;Wooden barrel@@
There is an old, empty barrel here.
<<endif>>\
<</replace>>\<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $AllowNav to true>>\
<<set $RoomPTR to passage()>>\
\
<<replace "#eventtext">>\
<<if $Dungeon[_pz][_px][_py][12] is 0>>\
<<set _PickFrom to ["bunnyF","bunnyM","catF","catM","foxF","foxM","wolfM"]>>\
<<set _Picked to _PickFrom[random(0, PickFrom.length])>>\
<<if _Picked is "bunnyF">>\
<<set _next to { which: "bunny", sex: "boy", answer: 0, img: "bunnyF.jpg" }>>\
<<elseif _Picked is "bunnyM">>\
<<set _next to { which: "bunny", sex: "boy", answer: 0, img: "bunnyM.jpg" }>>\
<<elseif _Picked is "catF">>\
<<set _next to { which: "cat", sex: "boy", answer: 0, img: "catF.jpg" }>>\
<<elseif _Picked is "catM">>\
<<set _next to { which: "cat", sex: "boy", answer: 0, img: "catM.jpg" }>>\
<<elseif _Picked is "foxF">>\
<<set _next to { which: "fox", sex: "boy", answer: 0, img: "foxF.jpg" }>>\
<<elseif _Picked is "foxM">>\
<<set _next to { which: "fox", sex: "boy", answer: 0, img: "foxM.jpg" }>>\
<<else>>\
<<set _next to { which: "wolf", sex: "man", answer: 0, img: "wolfM.jpg" }>>\
<<endif>>\
@@color:LightGreen;Friendly <<print _next.which>>-<<print _next.sex>>!@@
<<set $AllowNav to false>>\
\
<<SimplePic _next.img>>\
\
<hr>
<<set _npc to _next.which + "-" + _next.sex>>\
<<if _next.sex is "girl">>\
As you enter this room you're surprised to see a half-naked _npc on her knees, desperately clutching at her bare breasts. When she sees you, her eyes light up in hope.
"Please help me!" she cries, clearly in pain. "I triggered a breast-growth trap and I desperately need to be milked! Would you suck my <<print either("boobs","tits")>> dry?
Do you help?
<span id="KeypOne">\
<<link "1) Decline to help" $RoomPTR>>
<<set _next.answer to "decline">>\
<<set $Dungeon[_pz][_px][_py][12] to _next>>\
<</link>>\
</span>
<span id="KeypTwo">\
<<link "2) Yes, suck her dry" $RoomPTR>>
<<set _next.answer to "sucktits">>\
<<set $Dungeon[_pz][_px][_py][12] to _next>>\
<</link>>\
</span>
<span id="KeypThree">\
<<link "3) Milk her with your hands only" $RoomPTR>>
<<set _next.answer to "milkhands">>\
<<set $Dungeon[_pz][_px][_py][12] to _next>>\
<</link>>\
</span>\
<<else>>
As you enter the room, you're surprised to see a _npc with his pants down, <<print either("jacking off","masturbating") freely.
"Oh, thank <<print either("goodness","the divines","goddess")>> someone is here!" he exclaims in relief. "I just beat a <<print either("lusty","horny")>> succubus, but she left me <<print either("horny as hell","like this","with an erection so huge I can barely walk")>>. I need to <<print either("get my rocks off","deal with this","get a handle on this")>> fast or else the next monster I encounter is going to have its way with me. Please, won't you help me?"
Do you help him?
<span id="KeypOne">\
<<link "1) Decline to help" $RoomPTR>>
<<set _next.answer to "decline">>\
<<set $Dungeon[_pz][_px][_py][12] to _next>>\
<</link>>\
</span>
<span id="KeypTwo">\
<<link "2) Yes, suck his cock and swallow his load" $RoomPTR>>
<<set _next.answer to "suckcock">>\
<<set $Dungeon[_pz][_px][_py][12] to _next>>\
<</link>>\
</span>
<span id="KeypThree">\
<<link "3) Suck his dick, but don't swallow" $RoomPTR>>
<<set _next.answer to "sucknoswallow">>\
<<set $Dungeon[_pz][_px][_py][12] to _next>>\
<</link>>\
</span>\
<<endif>>\
<<elseif $Dungeon[_pz][_px][_py][12].hasOwnProperty("answer") is true>>\
<<set _next to $Dungeon[_pz][_px][_py][12]>>\
<<set _npc to _next.which + _next.sex>>\
debug: npc is _npc
<<else>>\
@@color:Red;Something went wrong in Event105, clearing event@@
<<set $AllowNav to true>>\
<<set $Dungeon[_pz][_px][_py][11] to 0>>
<<set $Dungeon[_pz][_px][_py][12] to 0>>
<<endif>>\
<</replace>>\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $RoomPTR to passage()>>\
\
<<set _sb to $PC[$CC][$PCspellbook]>>\
<<set _combat to _sb.firebolt + _sb.armor + _sb.poison + _sb.heal + _sb.dart>>\
<<set _transport to _sb.up + _sb.down + _sb.portal>>\
<<set _utility to _sb.map + _sb.light + _sb.passwall>>\
\
<<if _combat is 0>>\
<<set _book to either("firebolt","poison","armor","heal", "soul trap", "dart")>>\
<<elseif _utility is 0>>\
<<set _book to either("light","map")>>\
<<elseif _transport is 0>>
<<set _book to either("up","down","portal")>>\
<<else>>\
<<set _book to either("firebolt","poison","armor","heal","light","map","up","down","portal","dart")>>\
<<endif>>\
\
<<replace "#eventtext">>\
<<if $Dungeon[_pz][_px][_py][12] is 0>>\
@@color:Gold;Abandoned bookcase@@
<hr>
You find a small bookshelf with a small book in it
<span id="KeypOne">\
<<link "1) Take it" $RoomPTR>>
<<set $Dungeon[_pz][_px][_py][12] to 2>>
<</link>>\
</span>
<<elseif $Dungeon[_pz][_px][_py][12] is 1>>\
@@color:LightGreen;Abandoned bookcase@@
This bookcase state is no longer used
<<set $Dungeon[_pz][_px][_py][12] to 99>>\
<<print setup.LearnSpell(_book)>>\
<<SpellAchieveCheck>>\
<<elseif $Dungeon[_pz][_px][_py][12] is 2>>\
@@color:LightGreen;Abandoned bookcase@@
<<set $Dungeon[_pz][_px][_py][12] to 99>>\
<<set _BookD to setup.SpellbookLookup(_book)>>\
<<set _foo to setup.GiveItem($CC, [111, 0, 0, _BookD, 0])>>\
You pick up a spellbook of _book.
<<elseif $Dungeon[_pz][_px][_py][12] is 99>>\
@@color:LightGreen;Abandoned bookcase@@
There is an empty bookcase here.
<<else>>\
@@Error in event 106: unrecognized state: <<print $Dungeon[_pz][_px][_py][12]>>
<<endif>>\
<</replace>>\
<<replace "#eventtext">>\
@@color:Gold;Implement Event 107@@
Cage
<hr>
<</replace>>\<!-- statue -->\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $AllowNav to true>>\
<<set $RoomPTR to passage()>>\
\
<<RightPic "eventstatue.jpg">>\
\
<<replace "#eventtext">>\
<<if $Dungeon[_pz][_px][_py][12] is 0>>\
@@color:LightGreen;Statue of an Angel@@
A white marble statue of an angel fills the center of this room. She wears a long skirt and dense robe, and carries a small rectangular piece of paper with something written on it.
<span id="KeypOne">\
<<link "1) Read the paper">>
<<set $Dungeon[_pz][_px][_py][12] to 99>>\
<<replace "#eventtext">>\
<<set _WhichCharm to random(1,3)>>\
<<if _WhichCharm is 1>>\
@@color:LightGreen;Received Blessing of Fire@@
The charm burns to white ash when read, but fills your body with warmth. You will take less damage from fire during your next encounter.
<<ApplyEffect "resist fire" 1>>\
<<ShowActiveEffects>>\
<<elseif _WhichCharm is 1>>\
@@color:LightGreen;Received Blessing of Magic@@
The charm burns to white ash when read, but fills your body with a sense of power. You will take less damage from magic during your next encounter.
<<ApplyEffect "resist magic" 1>>\
<<ShowActiveEffects>>\
<<else>>\
@@color:LightGreen;Received Blessing of Stone@@
The charm burns to white ash when read, but fills you with a sense of being grounded. You will be harder to hit with melee attacks during your next encounter.
<<ApplyEffect "stoneskin" 1>>\
<<ShowActiveEffects>>\
<<endif>>\
<</replace>>\
<</link>>\
</span>\
<<elseif $Dungeon[_pz][_px][_py][12] is 99>>\
@@color:LightGreen;Statue of a Shrine Maiden@@
A white marble statue of an angel fills the center of this room. She wears a long skirt and dense robe, but the paper charm she once carried has been burned to ashes.
<<else>>\
@@color:Red;Error in Event108: unrecognized state: <<print $Dungeon[_pz][_px][_py][12]>>@@
<<endif>>\
<</replace>>\@@color:Gold;Implement Event 109@@
<hr>
Throne<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $RoomPTR to passage()>>\
\
<<replace "#eventtext">>\
@@color:Gold;Implement Event 110@@
<hr>
@@color:LightGreen;Salon@@
<<if $Dungeon[_pz][_px][_py][12] is 0>>
initial event state
<<elseif $Dungeon[_pz][_px][_py][12] is 1>>
<<else>>\
@@color:Red;Error in room: unrecognized state@@
<<endif>>\
<hr>\
<span id="KeypOne">\
<<link "1) Do stuff" $RoomPTR>>
<</link>>\
</span>\
<</replace>>\
<<replace "#eventtext">>\
@@color:Gold;Implement Event 111@@
<hr>
<</replace>>\<<replace "#eventtext">>\
@@color:Gold;Implement Event 112@@
<hr>
<</replace>>\<<replace "#eventtext">>\
@@color:Gold;Implement Event 113@@
<hr>
<</replace>>\<<replace "#eventtext">>\
@@color:Gold;Implement Event 114@@
<hr>
<</replace>>\<<replace "#eventtext">>\
@@color:Gold;Implement Event 115@@
<hr>
<</replace>>\<<replace "#eventtext">>\
@@color:Gold;Implement Event 116@@
<hr>
<</replace>>\<<replace "#eventtext">>\
@@color:Gold;Implement Event 117@@
<hr>
<</replace>>\<<replace "#eventtext">>\
@@color:Gold;Implement Event 118@@
<hr>
<</replace>>\<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set $RoomPTR to passage()>>\
<<set _ExitLinks to "none">>
\
<<if $WORLD.SmithQuests[0] is 0>>\
<<set _RightPic to "auction.png">>\
<<set _SuccessPic to "MONhumanM1.jpg">>\
<<set _EventSex to "male">>\
<<set _AdvenHeShe to "he">>\
<<set _AdvenHimHer to "him">>\
<<set _AdvenHisHer to "his">>\
<<set _AdvenGuyGirl to "guy">>\
<<elseif $WORLD.SmithQuests[0] is 1>>\
<<set _RightPic to "auction.png">>\
<<set _SuccessPic to "MONhumanF4.jpg">>\
<<set _EventSex to "female">>\
<<set _AdvenHeShe to "she">>\
<<set _AdvenHimHer to "her">>\
<<set _AdvenHisHer to "her">>\
<<set _AdvenGuyGirl to "girl">>\
<<endif>>\
\
<<set _BeerItemPTR to -1>>\
<<set _BeerQTY to 0>>\
<<for _B to 0; _B < $PC[$CC][$PCinven].length; _B++>>\
<<if ($PC[$CC][$PCinven][_B][0] is 109) and ($PC[$CC][$PCinven][_B][3] is 402)>>\
<<set _BeerItemPTR to _B>>\
<<set _BeerQTY to $PC[$CC][$PCinven][_BeerItemPTR][2]>>\
<<endif>>\
<</for>>\
\
<<if $WORLD.CombatInterrupt is "defeated smith omnibus">>\
<<set _ExitLinks to none">>\
<!-- no: handled below for replace matching: set $WORLD.CombatInterrupt to "" -->
<<set $WORLD.datapasser to "">>\
<<set $WORLD.SmithQuests[1] to "success">>
<<endif>>\
\
<<if $DebugMode is true>>\
<<replace "#capdebuginfo">>SmithQuest is: <<print $WORLD.SmithQuests[1]>><</replace>>\
<<endif>>\
<<if $WORLD.SmithQuests[1] is 0>>\
<<set $WORLD.datapasser to "">>\
<<RightPic _RightPic>>\
<<replace "#eventtext">>\
@@color:LightGreen;Encounter@@
You find a demon with huge tits and a cock guarding an adventurer in a cage. Seeing you, she glances over at you.
@@color:Red;Demon@@: "<<print either("Hey, sexy. You here to buy, or you just here to stare at the merchandise?","Hey, I've got one genuine human adventurer for sale over here. Slightly used though.")>>"
\
<span id="KeypT">\
<<link "t) Talk" "EventSmith">>
<<AdvanceTime 5>>
<<set $WORLD.datapasser to 0>>
<<set $WORLD.SmithQuests[1] to "demontalk">>
<</link>>\
</span>
<span id="KeypF">\
<<link "f) Fight" "Combat">>
<<set $DisableMenu to true>>\
<<set $WORLD.CombatInterrupt to "smith quest omnibus", 1>>\
<<set $WORLD.SmithQuests[1] to 98>>
<<set $ForceMon to ["Charyss","herm"]>>
<<GetMon $ForceMon>>\
<<AdvanceTime 5>>
<</link>>\
</span>\
<</replace>>\
<<elseif $WORLD.SmithQuests[1] is "demontalk">>\
@@color:LightGreen;Chatting with a demon in the forest@@
<hr>\
<<SimplePic "auction.png">>\
<<set _ExitLinks to "questions">>\
<<set _CurrentQuestion to $WORLD.datapasser>>\
<<if _CurrentQuestion is 0>>\
<<if $Charyss is 1>>\
<<unset $Charyss>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hello again, Charyss."
@@color:Red;Charyss@@: "Oh, you remembered my name? I'm flattered."
<<else>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hi, I'm $PC[$CC][$PCname]."
@@color:Red;Demon@@: "What, are we on a first name basis already? Usually I fuck first, but if this is how you humans do things, then whatever I guess. I'm Charyss."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Are you a demon?"
@@color:Red;Charyss@@: "Well duh, what gave it away?" she laughs. "Was it my outrageously good looks? My lovely hair? The way the sun glints off my cock, maybe? Oh, I don't know...how about the horns and and tail and bright red skin? Yes, I'm an omnibus. What's it to you?"
<<endif>>\
<!-- Unlocks -->\
<<if $PC[$CC][$PCSmithDemonChat][1] is 0>>\
<<set $PC[$CC][$PCSmithDemonChat][1] to 1>><!-- What are you doing out here in the forest? -->\
<<endif>>\
<<if $PC[$CC][$PCSmithDemonChat][2] is 0>>
<<set $PC[$CC][$PCSmithDemonChat][2] to 1>><!-- Why are you trying to sell an adventurer? -->\
<<endif>>\
<<if $PC[$CC][$PCSmithDemonChat][3] is 0>>\
<<set $PC[$CC][$PCSmithDemonChat][3] to 1>><!-- What's an omnibus? -->\
<<endif>>\
<<if $PC[$CC][$PCGerardChat][4] is 2>>\
<<set $PC[$CC][$PCSmithDemonChat][6] to 1>><!-- Zehtalia, from Gerard (implement should only offer question if she's still alive) -->\
<<endif>>\
<<elseif _CurrentQuestion is 1>>\
<<set $PC[$CC][$PCSmithDemonChat][1] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What are you doing out here in the forest?"
@@color:Red;Charyss@@: "I'm hosting a lemonade stand and soliciting donations for blind, orphaned girl scouts," she rolls her eyes. "No seriously, I'm trying to sell a sex slave. What does it look like I'm doing?"
@@color:LightGreen;Adventurer@@: "Please help me!" the adventurer begs.
@@color:Red;Charyss@@: "Oh shut up, you. You're going to be a sex slave and you're going to like it. Remember when I jammed my cock down your throat and face-fucked you until you passed out? It'll probably be like that every day. If only all humans could be so lucky."
@@color:LightGreen;Adventurer@@: *whimpers*
<!-- Unlocks -->\
<<set $PC[$CC][$PCSmithDemonChat][5] to 1>><!-- Slavery is wrong! -->\
<<if $PC[$CC][$PCSmithDemonChat][10] is 0>>\
<<set $PC[$CC][$PCSmithDemonChat][10] to 1>><!-- How much? -->\
<<endif>>\
<<elseif _CurrentQuestion is 2>>\
<<set $PC[$CC][$PCSmithDemonChat][2] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Why exactly are you trying to sell an adventurer?"
@@color:Red;Charyss@@: "I need beer money," she shrugs.
@@color:LightGreen;Adventurer@@: "Please just kill me."
<<if _BeerQTY > 0>>\
<<set $PC[$CC][$PCSmithDemonChat][4] to 1>><!-- I have some beer -->\
<<endif>>\
<<elseif _CurrentQuestion is 3>>\
<<set $PC[$CC][$PCSmithDemonChat][3] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What's an omnibus?"
@@color:Red;Charyss@@: "You ever heard of a succubus?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Of course. That's a kind of female sex demon."
@@color:Red;Charyss@@: "You ever heard of an incubus?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "That's a male sex demon?"
@@color:Red;Charyss@@: "Yep. Now, you ever heard of an omnivore?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "That's something that eats both plants and meat, right?"
@@color:Red;Charyss@@: "Exactly. 'Omni' is from the Latin, 'omnis,' meaning 'all' or 'everything.' For example, to be omnipotent means to be all powerful. To be omniscient means to know everything. But omnivore doesn't usually mean 'eat everything' like you might think. For example, bears are omnivourous but they don't eat pussy. Instead it means, like you said, they eat both plants and meat. Actually, succubus and incubus relate to the Latin, succubare and incubare, meaning to lie underneath, and to lie upon. As in, to have sex with. Me, an omnibus, see my gorgeous tits? See my glistening cock? And if I bend over you'd see that I have a pussy hidden underneath it. I have the parts to sex up just about anybody in any way I want to. Not literally everything, of course. I don't typically fuck rocks just like an omnivore doesn't eat them. But I'll fuck most things that breath, anyway. So, omni-bus from omni-bare, meaning one who lies with anything."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Huh. Thanks for the...surprisingly thorough explanation."
<<elseif _CurrentQuestion is 4>>\
<<set _ExitLinks to "none">>\
<<set $PC[$CC][$PCSmithDemonChat][4] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I have some beer here," you pull out a bottle. "I'll trade it to you for that _AdvenGuyGirl in the cage."
The demoness immediately starts drooling at the sight of it and walking towards you with outstretched hands like a zombie. Before she takes it, however, she stops and frowns as if realizing something.
@@color:Red;Charyss@@: "That's a really bad deal," she whines, clearly conflicted, then throws up her hands in frustration. "Arrghh!! I've never been good at this whole delayed gratification thing. I want beer. You have beer. That seems like an easy win. But if I can sell this nitwit for 300 gold, I could buy a //lot// of beer."
You glance around at the forest.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "And how many offers had you had so far?"
@@color:Red;Charyss@@: "Alright, alright," she grumbles. "But the only reason I'm not just killing you and taking it is...uhh, hmm. Actually, now that I think about it...why aren't I doing that?"
<hr>\
@@color:Gold;Options@@
<span id="KeypOne"><<link "1) Appeal to her better nature" "EventSmith">>
<<set $WORLD.datapasser to 100>>
<<set $WORLD.SmithQuests[1] to "demontalk">>
<</link>></span>
<span id="KeypTwo"><<link "2) Try to outsmart her" "EventSmith">>
<<set $WORLD.datapasser to 101>>
<<set $WORLD.SmithQuests[1] to "demontalk">>
<</link>></span>
<span id="KeypThree"><<link "3) Try to intimidate her" "EventSmith">>
<<set $WORLD.datapasser to 102>>
<<set $WORLD.SmithQuests[1] to "demontalk">>
<</link>></span>
<<if _BeerQTY > 1>>\
<span id="KeypFour"><<link "4) Offer her ALL your beer" "EventSmith">>
<<set $WORLD.datapasser to 103>>
<<set $WORLD.SmithQuests[1] to "demontalk">>
<</link>></span>
<<endif>>\
<<elseif _CurrentQuestion is 5>>\
<<set $PC[$CC][$PCSmithDemonChat][5] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Slavery is wrong!"
<<if random(1,2) is 1>>\
@@color:Red;Charyss@@: "...yeah?" she looks at you confused. "So is rape and murder. And those are at least four of my top five favorite things."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Only four? Whats the fifth one?"
She frowns for a moment and starts counting on her fingers.
@@color:Red;Charyss@@: "No, my bad," she admits. "It's all five."
<<else>>\
@@color:Red;Charyss@@: "HELLOOOO!!!!" she waves a hand in front of your face. "Demon, remember? I'm //supposed// to be bad."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Well, yeah," you mumble. "But you still shouldn't."
@@color:Red;Charyss@@: "Oh, spare me," she rolls her eyes. "Next you'll be telling me I should kill my puppies before I eat them," she makes air quotes with her fingers... "for 'humane' reasons. Like, seriously, do you have any idea how much their kicking and screeaming on the way down adds to the exprience? I don't even chew. You seriously think I care about a little human trafficking?"
The adventurer buries <<print _AdvenHisHer>> face in <<print _AdvenHisHer>> hands.
<<endif>>\
<<elseif _CurrentQuestion is 6>>\
<<set $PC[$CC][$PCSmithDemonChat][6] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Do you know the Demon Queen of Spiders?"
@@color:Red;Charyss@@: "Spiders don't have a demon queen," she frowns for a moment, before the corners of her mouth turn up in amusement. "Wait, you're not talking about Zehtalia, are you? Flat-chested, 8 legs, like to hang out in the tower?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Not sure about the flat-chested part, but I think so, yes?"
@@color:Red;Charyss@@: "Zehtalia isn't queen of anything, let alone spiders," she laughs. "That whole 'queen of spiders' thing was a joke after she got so drunk she lost a fight to a drider and gained a bunch of legs. Wow, is she really calling herself that now? That'a hilarious. I can't wait to get back to hell to tell everyone."
<<elseif _CurrentQuestion is 7>>\
<<set _ExitLinks to "questions">>\
<<set $PC[$CC][$PCSmithDemonChat][7] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What can you tell me about the tower"
@@color:Red;Charyss@@: "The Tower of Triumph?" she blinks. "What makes you think I can tell you anything about it? "
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You seem like you're in the know."
@@color:Red;Charyss@@: "Huh. Alirght, well, back in the day the good ol' days before this whole mortal realm nonsense started, everything existed as unmanifest poential. Then one day, and I used the term 'day' loosely since there weren't any planets or stars at the time. And I use the term 'time'loosely because, well...you get it. Anyway, one day Tenebrarius bumped into a...uhh, hmm. And she...uhh, puked? Made love to? Discharged? It's actually kind of hard to explain this to a mortal. You don't have any basis of comparison."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Who's Tenebrarius?"
@@color:Red;Charyss@@: "I think you people call her the Goddess of Primal Darkness. It's...not a terrible translation of her name, but it kind of misses the point. When it's dark, you can't see. But this isn't about not being able to see. It's about ''what'' you can't see."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What is it we can't see?"
@@color:Red;Charyss@@: "Everything. Atleast, before she puked. After she did, you still couldn't see most things. But you could see some things. And there was a ''you'' to see stuff."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Sounds like you're talking about the creation of the world."
@@color:Red;Charyss@@: "Ehh, kind of."
<!-- Unlocks -->\
<<elseif _CurrentQuestion is 8>>\
<<set $PC[$CC][$PCSmithDemonChat][8] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What does any of that have to do with the tower?"
@@color:Red;Charyss@@: "Oh, right. The tower is the...channel? That she puked/gave birth through. Birth canal? Yeah, that's a good way of putting it. Sort of. Anyway, because of that, the tower happens to be an easy away to reach...well, anything that doesn't exist, I guess. For example, I don't have a beer in my hand rigth now. if I climbed the tower, I could, uhh...bring back 'me with a beer in my hand' to the world, and ''POOF!'' I'd have a beer in my hand."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You mean it grants wishes?"
@@color:Red;Charyss@@: "Ehh, no not exactly. But sort of, yeah. I mean, granting wishes is a thing that it can do, yeah. But anything you wouldn't wish for is possible too, so long as it doesn't already materially exist."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How do you make sure to get a wish you want granted instead of a wish you don't want granted?"
@@color:Red;Charyss@@: "Beats me. I'm just a demon in desperate need of a beer."
@@color:LightGreen;Adventurer@@: "If you let me go I'll buy you all the beer in town!"
@@color:Red;Charyss@@: "Quiet!" she kicks the cage.
<<elseif _CurrentQuestion is 9>>\
<<set $PC[$CC][$PCSmithDemonChat][9] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What's hell like?"
@@color:Red;Charyss@@: "Which part?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hell has different parts?"
@@color:Red;Charyss@@: "Oh right," she rolls her eyes. "All of hell is just fire and lava and tortued souls gnashing their teeth. Seriously, what's with you people?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Sorry for assuming."
@@color:Red;Charyss@@: "Seriously, it's only like 98% of it's like that. The rest of it's actually pretty nice. A little overpopulated though. You have no idea what it's like to listen to some dead guy constantly whining about 'torture' this and 'eternal damnation' that. So everybody wants a place in the city where none of that happens, which drives rent through the ceiling."
<<elseif _CurrentQuestion is 10>>\
<<set $PC[$CC][$PCSmithDemonChat][10] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So, how much?"
<<set _PCaddress to "good girl">>\
<<if $PC[$CC][$PCsex] is "male">><<set _PCaddress to "proper cumslut">><<endif>>\
@@color:Red;Charyss@@: "How much for what? You mean <<print either("how much to let you suck my dick? That's free. Although if you want to pay me for it, I'll allow it.","how much to let you fondle my tits? Ehh, tell you want...you suck my duck and swallow like a " + _PCaddress + " and I'll toss in some titty fondling for free.","how much for your soul? Doesn't look like it's worth much to me, but I'm feeling generous so if you you suck my dick I'll take it off your hands so you don't have to deal with it anymore.")>>"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "No, I meant for that adventurer you're selling. How much?"
@@color:Red;Charyss@@: "You mean you actually want to buy <<print _AdvenHimHer>>? Wow, ok. That's great! But, uhhh...hmm. Ok look, I'm gonna be honest here. I hadn't actually thought that far ahead. Wasn't really expecting to find a buyer out here in the middle of the forest."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Really? Then why are you even here? This isn't all just some tease to get <<print _AdvenHisHer>> hopes up so you can stomp on them, is it?"
@@color:LightGreen;Adventurer@@: "Oh, please no."
@@color:Red;Charyss@@: "Look, of course I want to sell <<print _AdvenHimHer>>. And it'd be super convient for me to pawn <<print _AdvenHimHer>> off onto you so I don't have to haul <<print _AdvenHimHer>> all the way down to the slave markets down south. But demons aren't exactly known for long-term planning, alright? So I just haven't come up with a specific number I'm happy with yet. So how about make me an offer, and if I like what I hear maybe two of the three of us can walk away happy."
<!-- Unlocks -->\
<<set $PC[$CC][$PCSmithDemonChat][11] to 1>><!-- Slave markets? -->\
<<if $PC[$CC][$PCSmithDemonChat][12] is 0>>\
<<set $PC[$CC][$PCSmithDemonChat][12] to 1>><!-- make an offer -->\
<<endif>>\
<<elseif _CurrentQuestion is 11>>\
<<set $PC[$CC][$PCSmithDemonChat][11] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What's this about a slave market?"
@@color:Red;Charyss@@: "Yeah, Talven down south has a whole big setup for it. Gladiator pit and everything. Too hot for wheat to grow down there, so no beer, but they make a pretty decent drink out of the cactus. They don't take too kindly to demons though. Or much of anything that isn't completely human, really."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How do you manage it?"
@@color:Red;Charyss@@: "Uhh..." she thinks. "Hmm. Now that you mention it, yeah that could be a problem. All the more reason for you to buy cock gobbler here and save me the trouble, right?"
<!-- unlocks -->\
<<if $PC[$CC][$PCSmithDemonChat][12] is 0>>\
<<set $PC[$CC][$PCSmithDemonChat][12] to 1>><!-- make an offer -->\
<<endif>>\
<<elseif _CurrentQuestion is 12>>\
<<set _ExitLinks to "questions">>\
<<set $PC[$CC][$PCSmithDemonChat][12] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Ok. I'd like to buy your adventurer."
@@color:Red;Charyss@@: "Woo!" she cheers. "How much?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Well, how much do you want?"
@@color:Red;Charyss@@: "Are you serious?" her eyes boggle. "I want infinity gold plus a blowjob! Also I want to be ruler of hell and for all humans to worship me. Also I want a pony. With a big dick. No, wait...two dicks! Definitely a pony with two dicks. And they should each be like three feet long, with a double pair of basketball-sized testicles all mounted rotary-cannon style so they can rapid-fire ejaculate half a dozen gallons of tasty horse spunk one after another all in one go. Wow, that would be awesome. Payable immediately, and cock muncher here's all yours."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Let me rephrase the question: how many gold coins can I give you that would be enough for you to give me that adventurer right now?"
@@color:Red;Charyss@@: "Oh," she seems disappointed. "Gotta admit, anything you could realistically pay would be a huge letdown after asking me what I want. I don't know, how about make me an offer and if I don't like it, I'll bite your dick off. Or I guess if you don't have enough money you could come back later. I'm not in a big hurry to go anywhere when I have dick munch here to keep my balls dry."
@@color:LightGreen;Adventurer@@: *whimpers*
<!-- unlocks -->\
<<set $PC[$CC][$PCSmithDemonChat][13] to 1>><!-- Offer 100 gold -->\
<<set $PC[$CC][$PCSmithDemonChat][14] to 1>><!-- Offer 300 gold -->\
<<set $PC[$CC][$PCSmithDemonChat][15] to 1>><!-- Offer 500 gold -->\
<<elseif _CurrentQuestion is 13>>\
<<set $PC[$CC][$PCSmithDemonChat][13] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Would you take 100 gold?"
She frowns and kicks the cage.
<<set _PCheshe to "She">>\
<<if $PC[$CC][$PCsex] is "male">>\
<<set _PCheshe to "He">>\
<<endif>>\
@@color:Red;Charyss@@: "Do you hear that, slave?" she shouts. "<<print _PCheshe>> says you're only worth 100 gold! Why did I even waste my time with you!"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "It's not a bad deal," you point out. "Beer is only what, 8-10 gold or so? That's ten or twelve beers worth."
@@color:Red;Charyss@@: "Math isn't something I've great at," she admits. "But even if you're right, that's still a lot less than I was hoping for."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Well, you asked me to make an offer, so made an offer. If you're going to insist on more, you should have just said so up front. You might have got what you asked for."
@@color:Red;Charyss@@: "Maybe," she shrugs. "But I was kinda hoping you'd assume I'd carry through on that dick biting threat if you only offered 100, and that you'd offer me something crazy like 500 instead."
<<if $PC[$CC][$PCcoins] < 500>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I don't even have that much. Will you take the 100?"
@@color:Red;Charyss@@: "Nahh, I'm not in a hurry. If you're poor, I'll just wait for a better buyer."
<<else>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I didn't though. So have we got a deal?"
@@color:Red;Charyss@@: "Nahh, if that's all <<print _AdvenHeShe>>'s worth to you, I'll wait for a better buyer."
<<endif>>\
<<elseif _CurrentQuestion is 14>>\
<<if $PC[$CC][$PCcoins] < 300>>\
<<set _ExitLinks to "force combat">>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How does 300 gold sound?"
@@color:Red;Charyss@@: "Ehh," she shrugs. "It's not a bad offer, but it's less than I was hoping for."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Oh good," you mumble, digging through your coinpurse. "Looks like I don't even have that much anyway."
@@color:Red;Charyss@@: "...then why did you..." she trails off in annoyance. "You know what? I think I'm going to kill you now."
<<else>>\
<<set _ExitLinks to "blind repeat">>\
<<set $WORLD.SmithQuests[1] to "success">>\
<<set $PC[$CC][$PCcoins] to $PC[$CC][$PCcoins] - 300>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How does 300 gold sound?"
She thinks it over, then nods.
@@color:Red;Charyss@@: "Yeah, I guess that's a fair price for used goods."
You hand over the gold. The omnibus lifts the cage off the groudn and casually tosses it aside. You frown and turn to the adventurer.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Wait, if it was that easy to get out, why didn't you just run?
@@color:Red;Charyss@@: "It's more fun if they try to escape. That way I get to punish them."
The adventurer rubs _AdvenHisHer ass and looks away in shame.
@@color:Red;Charyss@@: "Anyway, enjoy your new master, slave," she then turns to you. "And maybe I'll see you around again sometime."
<<endif>>\
<<elseif _CurrentQuestion is 15>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How about 500 gold?" you offer.
<<if $PC[$CC][$PCcoins] < 500>>\
<<set _ExitLinks to "force combat">>\
@@color:Red;Charyss@@: "500?" she grins. "You've got a deal!"
You reach into your coin purse, but quickly realize you don't have that much.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Wait, sorry. Turns out I don't have 500."
@@color:Red;Charyss@@: "Then why in the blazes did you offer that much?" she seems annoyed. "Now I'll have to kill you. Not that I have anything wrong with killing people. I rather enjoy it, actually. But I'm really in more of a 'get drunk then kill some innocent bystanders and rifle through their pockets' mood than a 'kill somebody then rifle through a corpses pockets to see if there's enough money to get drunk on' mood. Sometimes the order you do these things in makes all the difference."
<<if $PC[$CC][$PCcoins] > 99>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Wait!" you hand her your coinpurse. "I do have <<print $PC[$CC][$PCcoins]>>! Would you take that instead?"
@@color:Red;Charyss@@: "Absolutely I'll take that," she cracks her knuckles. "Just give me a minute to kill you first before I rifle through your pockets for it."
<<else>>\
<!-- no action required? -->\
<<endif>>\
<<else>>\
<<set _ExitLinks to "blind repeat">>\
<<set $WORLD.SmithQuests[1] to "success">>\
<<set $PC[$CC][$PCcoins] to $PC[$CC][$PCcoins] - 500>>\
@@color:Red;Charyss@@: "Woo, score!" she cheers. "Do you hear that, slave? You've got a new master!"
You count out the coins and hand them over to the omnibus, who lifts the cage off the ground and tosses it aside. Apparently it was simply resting on the ground. You're a bit perplexed at that, but the omnibus is already rushing off in the wrong direction if she wants to go back to town, and you decide to simply let her go rather than ask questions.
<<endif>>\
<<elseif _CurrentQuestion is 100>>\
<<set $WORLD.SmithQuests[1] to 98>>\
<<set _ExitLinks to "force combat">>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I have faith in you," you smile convincingly. "You're a better person than that."
She blinks a couple times.
@@color:Red;Charyss@@: "Wait, you're serious?" she starts laughing. "Oh my devil, that's hilarious! I think I'm going to eat you now. And then wash you down with your own beer."
<<elseif _CurrentQuestion is 101>>\
<<set $WORLD.SmithQuests[1] to 98>>\
<<if $PC[$CC][$PCint] < 15>>\
<<set _ExitLinks to "force combat">>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Because I'm a tactical genius," you tap your head. "And there's no way you could outsmart me."
@@color:Red;Charyss@@: "Hmm, now that you point it out," stares at your head where you've tapped it, "that beer would taste a lot better if I drink it out of your skull."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You're not getting my skull without a fight."
@@color:Red;Charyss@@: "Your terms are acceptable."
<<else>>\
<<set _ExitLinks to "questions">>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Look, you want beer, right?"
@@color:Red;Charyss@@: "Yes?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "And if you sell that adventurer, how much beer could you buy?"
@@color:Red;Charyss@@: "Uhh," she starts counting on her fingers. "A lot?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Ok. Now suppose you fight me, and you win. How much beer will you get to drink?"
@@color:Red;Charyss@@: "So long as I sell this sex slave, I'll still get to drink all the same beer as if I don't fight you," she points out. "But I'll get to drink all that beer later, //and// I'll get to drink that beer you're holding while I'm waiting for a buyer to show up. A lot of beer plus one, is more than just a lot of beer."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Sure," you nod amicably. "But it's not a sure thing. Suppose I beat you in the fight, and take that adventurer with me. Then you won't get any beer at all. True, we dont'know who would win the fight. You might win and get this one extra beer. But you might lose, and miss out completely on that 'lot of beer' you'll have the moment you sell that adventurer. Why take the chance of losing everything to at best maybe gain only a single beer? It's a bad gamble."
@@color:Red;Charyss@@: "Hmm," she frowns. "Point taken. So...wanna buy <<print _AdvenHimHer>>?"
<<if $PC[$CC][$PCSmithDemonChat][10] is 0>>\
<<set $PC[$CC][$PCSmithDemonChat][10] to 1>><!-- How much? -->\
<<endif>>\
<<endif>>\
<<elseif _CurrentQuestion is 102>>\
<<set $WORLD.SmithQuests[1] to 98>>\
<<if $PC[$CC][$PCstr] < 15>>\
<<set _ExitLinks to "force combat">>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Because I'm incredibly strong," you flex your biceps at her. "And there's no way you could overpower me."
The omnibus looks at your flex, and her cock visibly hardens.
@@color:Red;Charyss@@: "Let's test that, shall we?" she strokes herself off. "Winner gets to fuck the loser. The best part of this is that it doesn't matter whether I win or you lose. Either way, I win."
<<else>>\
<<set _ExitLinks to "questions">>\
You glance over the omnibus with an air of casual indifference.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Go and and try if you want," you dismiss. "But I don't think you can beat me."
@@color:Red;Charyss@@: "I think you're bluffing," she frowns uncertainly. "But I also think a singlebeer isn't worth taking the chance."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Smart choice."
@@color:Red;Charyss@@: "Of course," she continues. "You could make this all of this a whole lot simpler for everybody if you'd buy this cock-gobbler off me yourself."
<<if $PC[$CC][$PCSmithDemonChat][10] is 0>>\
<<set $PC[$CC][$PCSmithDemonChat][10] to 1>><!-- How much? -->\
<<endif>>\
<<endif>>\
<<elseif _CurrentQuestion is 103>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What if instead of one beer," you start pulling out more bottles. "What if I offered you _BeerQTY beers?"
<<set $PC[$CC][$PCinven][_BeerItemPTR] to [0,0,0,0,0]>>\
<<if _BeerQTY > random(1,9)>>\
<<set _ExitLinks to "blind repeat">>\
<<set $WORLD.SmithQuests[1] to "success">>\
@@color:Red;Charyss@@: "Where in the nine hells did you get that much beer?" she marvels at your offering.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Do you really care?"
@@color:Red;Charyss@@: "You know what?" she blinks. "You're absolutely right. I don't. Gimmme!"
You start handling bottles over to her, which she immediately starts guzzling.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So...about that adventurer."
@@color:Red;Charyss@@: "Hmm? Oh, yeah...here you go. No refunds."
With one hand she casually lifts the cage off the ground and tosses it aside. Apparently it wasn't anchored to anything.
<<else>>\
<<set $WORLD.SmithQuests[1] to 98>>\
@@color:Red;Charyss@@: "I'm not saying it's a bad deal," she frowns, clearly conflicted. Then she chugs a beer, and instantly cheers up. "But is that really the best you can do? I think you can do better."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "This would be a lot simpler if you'd simply tell me what you want so I could get it for you."
@@color:Red;Charyss@@: "We already tried that, but I still don't see a rotary cannon dick pony anywhere."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Point taken."
@@color:Red;Charyss@@: "I like what you're doing with this bringing me beer thing though," she opens another bottle. "How about you keep doing it, and I'll let you have the adventurer."
You can't but notice that she intends to keep everything you've offered up so far.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How much is enough? I don't want to just keep giving you beer over and over and never get what I want out of it."
@@color:Red;Charyss@@: "Wait, you'd do that?" she looks at you incredulously, then turns suspicious. "Ordinarily I'd take that deal in a heartbeat, but it sounds a little too good to be true. So how about this: bring me //ten// more, and you can have cock gobbler here. Probably."
<<endif>>\
<<endif>>\
\
\
<<elseif $WORLD.SmithQuests[1] is "success">>\
<<if $WORLD.CombatInterrupt is "defeated smith omnibus">>\
<<replace "#eventtext">>\
<<set _ExitLinks to "none">>
<<include "SmithSuccess">>\
<</replace>>\
<<set $WORLD.CombatInterrupt to "">>\
<<else>>\
<<set _ExitLinks to "none">>
<<include "SmithSuccess">>\
<<endif>>\
<<elseif $WORLD.SmithQuests[1] is 98>>\
<<set $WORLD.datapasser to "">>\
<<set _ExitLinks to "none">>
<<RightPic _RightPic>>\
<<replace "#eventtext">>\
@@color:LightGreen;Chatting with a demon in the forest@@
<hr>\
@@color:Red;Charyss@@: <<print either("Hello again.","Hey.")>> <<print ("What bring you here again?","Couldn't stay away, hmm?","You just here to check out the merchandise, or are you buying?","Wanna buy an adventurer?")>>
<hr>\
@@color:Gold;Options@@
<span id="KeypT">\
<<link "t) Talk" "EventSmith">>
<<AdvanceTime 5>>
<<set $WORLD.datapasser to 0>>
<<set $WORLD.SmithQuests[1] to "demontalk">>
<<set $Charyss to 1>>
<</link>>\
</span>
<span id="KeypF">\
<<link "f) Fight" "Combat">>
<<set $DisableMenu to true>>\
<<set $WORLD.CombatInterrupt to "smith quest omnibus", 1>>\
<<set $WORLD.SmithQuests[1] to 98>>
<<set $ForceMon to ["Charyss","herm"]>>
<<GetMon $ForceMon>>\
<<AdvanceTime 5>>
<</link>>\
</span>\
<</replace>>\
<<elseif $WORLD.SmithQuests[1] is 99>>\
<<replace "#eventtext">>\
The cage is now empty.
<</replace>>\
<<else>>\
<<if $DebugMode is true>>\
@@color:Yellow;Warning@@ Smith event state is <<print $WORLD.SmithQuests[1]>>. If that's one of the of 'who has it' outcomes, that's probably ok. This check mostly exists to prevent unwanted dead ends.
<<endif>>\
<<endif>>\
\
<<if _ExitLinks is "force combat">>\
<hr>\
@@color:Gold;Options@@
<span id="KeypF">\
<<link "f) Fight" "Combat">>
<<set $DisableMenu to true>>\
<<set $WORLD.CombatInterrupt to "smith quest omnibus", 1>>\
<<set $ForceMon to ["Charyss","herm"]>>
<<GetMon $ForceMon>>\
<<set $WORLD.SmithQuests[1] to 98>>
<<AdvanceTime 5>>
<</link>>\
</span>\
<<elseif _ExitLinks is "none">>\
<<elseif _ExitLinks is "blind repeat">>\
<hr>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) continue" "EventSmith">>
<</link>>\
</span>\
<<elseif _ExitLinks is "return to forest, clear event">>\
<hr>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) Continue" "Forest">>
<<set $WORLD.smith to 4>>
<<AdvanceTime 5>>
<</link>>\
</span>\
<<elseif _ExitLinks is "questions">>\
<<set _AskTheseQuestions to []>>\
<<set _CurrentQuestionPTR to 0>>\
\
<<set _UnaskedCantAsk to 0>>\
<<set _UnaskedCANAsk to 1>>\
<<set _AlreadyAnswered to 2>>\
\
<!-- this is here to handle varying beer durign repeat visits -->\
<<if ($PC[$CC][$PCSmithDemonChat][12] is 2) and (_BeerQTY > 0)>>\
<<set $PC[$CC][$PCSmithDemonChat][4] to 1>><!-- Offer beer -->\
<<endif>>\
\
<<for _i to 0; _i < $PC[$CC][$PCSmithDemonChat].length; _i++>>\
<<if $PC[$CC][$PCSmithDemonChat][_i] is 1>>\
<<set _AskTheseQuestions[_CurrentQuestionPTR] to _i>>\
<<set _CurrentQuestionPTR to _CurrentQuestionPTR +1>>\
<<endif>>\
<</for>>\
\
<<set _QuestionPool to []>>\
<<set _QuestionPool[0] to "start">>\
<<set _QuestionPool[1] to "What are you doing out here in the forest?">>\
<<set _QuestionPool[2] to "Why are you trying to sell an adventurer?">>\
<<set _QuestionPool[3] to "What's an omnibus?">>\
<<set _QuestionPool[4] to "Offer her some beer">>\
<<set _QuestionPool[5] to "Slavery is wrong!">>\
<<set _QuestionPool[6] to "Do you know the Demon Queen of Spiders?">>\
<<set _QuestionPool[7] to "Ask about the tower">>\
<<set _QuestionPool[8] to "What does any of that have to do with the tower?">>\
<<set _QuestionPool[9] to "Ask about hell">>\
<<set _QuestionPool[10] to "So, how much?">>\
<<set _QuestionPool[11] to "What's this about a slave market?">>\
<<set _QuestionPool[12] to "I'm ready to buy the adventurer">>\
<<set _QuestionPool[13] to "Offer 100 gold for the adventurer">>\
<<set _QuestionPool[14] to "Offer 300 gold for the adventurer">>\
<<set _QuestionPool[15] to "Offer 500 gold for the adventurer">>\
\
<hr>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) Leave" "Forest">>
<<set $WORLD.SmithQuests[1] to 98>>\
<<AdvanceTime 5>>
<</link>>
</span>\
<span id="KeypF">\
<<link "f) Fight!" "Combat">>
<<set $DisableMenu to true>>\
<<set $WORLD.CombatInterrupt to "smith quest omnibus", 1>>\
<<set $ForceMon to ["Charyss","herm"]>>
<<GetMon $ForceMon>>\
<<set $WORLD.SmithQuests[1] to 98>>
<<AdvanceTime 5>>
<</link>>
</span>\
<<set _SpanTexts to ["KeypOne","KeypTwo","KeypThree","KeypFour","KeypFive","KeypSix","KeypSeven","KeypEight"]>>\
<<set _KeyChars to ["1) ","2) ","3) ","4) ","5) ","6) ","7) ","8) "]>>\
\
<hr>\
<<if _AskTheseQuestions.length > 0>>\
@@color:Gold;Conversation@@
<<set _NextQuestion to 0>>\
<<for _i to 0; _i < _AskTheseQuestions.length; _i++>>\
<span @id="_SpanTexts[_NextQuestion]">\
<<set _NextQuestion to _NextQuestion +1>>\
<<set _LinkText to _KeyChars[_i] + _QuestionPool[_AskTheseQuestions[_i]]>>\
<<capture _i>>\
<<link _LinkText "EventSmith">>
<<set $WORLD.datapasser to _AskTheseQuestions[_i]>>\
<</link>>
<</capture>>\
</span>\
<</for>>\
<<endif>>\
<<else>>\
@@color:Red;Error:@@ unrecognized exitlinks request: _ExitLinks
<span id="KeypSpace">\
<<link "space) Continue" "Forest">>
<<set $WORLD.SmithQuests[1] to 98>>\
<<AdvanceTime 5>>
<</link>>\
</span>\
<<endif>>\
<<if $DebugMode is true>>\
Debug: <<print $PC[$CC][$PCSmithDemonChat]>>
<<for _i to 0; _i < $PC[$CC][$PCSmithDemonChat].length; _i++>>\
<<print _i>>) <<print $PC[$CC][$PCSmithDemonChat][_i]>><br>\
<</for>>
<<endif>>\<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set _trapmaster to setup.PlayerHasPerk("Trapmaster")>>\
<<set _trapdiff to _pz>>\
<<set _RoomPTR to passage()>>\
<<set _ExitLink to "continue">>\
<<set $AllowNav to false>>\
\
<!-- assign new trap if none present -->\
<<if $Dungeon[_pz][_px][_py][12] is 0>>\
<<if _pz is 1>>\
<<set $Dungeon[_pz][_px][_py][12] to random(1,2)>>\
<<elseif $Dungeon[_pz-1][_px][_py][11] is 0>>\
<<set $Dungeon[_pz][_px][_py][12] to random(1,3)>>\
<<else>>\
<<set $Dungeon[_pz][_px][_py][12] to random(1,2)>>\
<<endif>>
<<endif>>\
\
<<set _whichtrap to $Dungeon[_pz][_px][_py][12]>>\
\
<<set _AvoidChance to ($PC[$CC][$PCdex] - 13) - _pz>>\
<<set _RogueMod to 0>>
<<set _RogueAUTO to false>>\
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "rogue">>\
<<set _RogueMod to 3>>\
<<set _AvoidChance to _AvoidChance + $PC[$CC][$PClevel]>>\
<<if $PC[$CC][$PClevel] > 6>>\
<<set _RogueAUTO to true>>\
<<endif>>\
<<endif>>\
<<set _PZafterRogue to _pz - _RogueMod>>\
\
<<replace "#eventtext">>\
<<if _whichtrap is "pitfall landing">>\
<<set $AllowNav to true>>\
<<set _ExitLink to "none">>\
<<set $Dungeon[_pz][_px][_py][12] to 105>>\
<!-- duplicate rogue assignment was here? -->
<<set _TminDam to 5 * (1 + _pz - _RogueMod)>>\
<<set _TmaxDam to 10 * (1 + _pz - _RogueMod)>>\
<<set _TrapDamage to random(_TminDam, _TmaxDam)>>\
<<if _RogueAUTO is true>>\
@@color:Aqua;Rogue auto success!@@
You deftly hit the ground in a roll and take no damage.
<<else>>\
@@color:Red;Hard landing@@
You land on the floor below, taking @@color:Yellow;<<print _TrapDamage>> damage@@. \
<<set _TrapDamage to (_TrapDamage * -1)>>\
<<ChangeStat $PChpcur _TrapDamage>>\
<<ShowHealth>>\
<<if $PC[$CC][$PChpcur] < 1>>\
<<set $AllowNav to false>>\
Unfortunately, that's more health than you have. You die.
<span id="KeypSpace">\
<<link "Press space to continue" "Death">>
<<set $WORLD.diedby to "Falling into a pit trap">>
<</link>>\
</span>\
<<endif>>\
<<endif>>\
<<elseif _whichtrap is 1>>\
<<set $AllowNav to false>>\
<<set $Dungeon[_pz][_px][_py][12] to 101>>\
<<if _RogueAUTO is true>>\
@@color:Aqua;Rogue level 7 bonus:@@ Auto success!
As a skilled rogue, you scoff at the obvious pressure plate in the floor and effortlessly disarm it.
<<TrapAchieveTester "avoid">>\
<<elseif _AvoidChance > 0>>\
@@color:LightGreen;Trap disarmed!@@
While walking through this room, notice a suspicious pressure plate. Standing a safe distance away, you toss a loose rock onto it which causes a crossbow bolt to fire harmlessly against a wall.
<<TrapAchieveTester "avoid">>\
<<elseif (_RogueMod is 3) and (_pz < 4)>>\
@@color:Yellow;Trap activated!@@
You carelessly step on a trigger plate which fires a crossbow bolt at your head. However, as a rogue you're experienced with these matters, and instantly duck underneath it.
<<TrapAchieveTester "trigger">>\
<<else>>\
@@color:Red;Trap activated!@@
While walking through this room, you step on a pressure plate that triggers a bolt to fly at you from a hidden crossbow.
<<set _TrapDamage to random(_PZafterRogue, _PZafterRogue * 5)>>\
<<if _trapmaster is true>>\
<<set _Trapdamage to Math.trunc(_TrapDamage / 2)>>\
<<if _Trapdamage < 1>>\
<<set _TrapDamage to 1>>\
<<endif>>\
Your @@color:LightGreen;Trapmaster perk@@ reduces the damage to only @@color:Red;<<print _TrapDamage>>@@.
<<set _TrapDamage to (_TrapDamage * -1)>>\
<<ChangeStat $PChpcur _TrapDamage>>\
<<ShowHealth>>\
<<TrapAchieveTester "trigger">>\
<<else>>\
@@color:Red;You are struck for _TrapDamage damage!@@
<<set _TrapDamage to (_TrapDamage * -1)>>\
<<ChangeStat $PChpcur _TrapDamage>>\
<<ShowHealth>>\
<<TrapAchieveTester "trigger">>\
<<endif>>\
<<if $PC[$CC][$PChpcur] < 1>>\
<<set _ExitLink to "none">>\
Unfortunately, that's more health than you have. You die.
<span id="KeypSpace">\
<<link "Press space to continue" "Death">>
<<set $WORLD.diedby to "Crossbow bolt trap">>
<</link>>\
</span>\
<<endif>>\
<<endif>>\
<<elseif _whichtrap is 2>>\
<<if _RogueAUTO is true>>\
<<set $Dungeon[_pz][_px][_py][12] to 120>>\
@@color:Aqua;Rogue level 7 bonus:@@ Auto success!
As a skilled rogue, you roll your eyes an at obvious tripwire and effortlessly step over it.
<<TrapAchieveTester "avoid">>\
<<elseif _AvoidChance > 0>>\
<<set $Dungeon[_pz][_px][_py][12] to 120>>\
@@color:LightGreen;Trap avoided!@@
You notice a small tripwire at the entrance to this room. Carefully stepping over it, you make a point to avoid it in the future.
<<TrapAchieveTester "avoid">>\
<<elseif (_RogueMod is 3) and (_pz < 4)>>\
<<set $Dungeon[_pz][_px][_py][12] to 121>>\
@@color:Yellow;Tripwire trap activated!@@
You fail to notice a tripwire and carelessly trip over it. Your rogue instincts kick in however, and you deftly roll out of the fall, avoiding a large rock falling from the ceiling in the process.
<<TrapAchieveTester "trigger">>\
<<else>>\
<<set $Dungeon[_pz][_px][_py][12] to 121>>\
@@color:Yellow;Tripwire trap activated!@@
<<if random(1,2) is 1>>\
You trip over a razor-thin wire which shreds into you and causes you to trip and fall on your face \
<<else>>\
You trip over a wire which triggers a large rock to fall from a recess onto your head. \
<<endif>>\
<<set _TrapDamage to random(_PZafterRogue, _PZafterRogue * 5)>>\
<<if _trapmaster is true>>\
<<set _Trapdamage to Math.trunc(_TrapDamage / 2)>>\
<<if _Trapdamage < 1>>\
<<set _TrapDamage to 1>>\
<<endif>>\
Your @@color:LightGreen;Trapmaster perk@@ reduces the damage to only @@color:Red;<<print _TrapDamage>>@@.
<<set _TrapDamage to (_TrapDamage * -1)>>\
<<ChangeStat $PChpcur _TrapDamage>>\
<<ShowHealth>>\
<<TrapAchieveTester "trigger">>\
<<else>>\
@@color:Red;You are struck for _TrapDamage damage!@@
<<set _TrapDamage to (_TrapDamage * -1)>>\
<<ChangeStat $PChpcur _TrapDamage>>\
<<ShowHealth>>\
<<TrapAchieveTester "trigger">>\
<<endif>>\
<<if $PC[$CC][$PChpcur] < 1>>\
<<set _ExitLink to "none">>\
Unfortunately, that's more health than you have. You die.
<span id="KeypSpace">\
<<link "Press space to continue" "Death">>
<<set $WORLD.diedby to "Crossbow bolt trap">>
<</link>>\
</span>\
<<endif>>\
<<endif>>\
<<elseif _whichtrap is 3>>\
<<if _RogueAUTO is true>>\
@@color:Aqua;Rogue level 7 bonus:@@ Auto success!
As a skilled rogue, your gaze is immediately drawn to a weakened section of the floor.
<<TrapAchieveTester "avoid">>\
@@color:Gold;Options@@
<span id="KeypOne">\
<<link "1) Tiptoe around it" _RoomPTR>>
<<set $Dungeon[_pz][_px][_py][8] to 103>>\
<<set $Dungeon[_pz][_px][_py][11] to 0>>\
<</link>>
</span>\
<<set _ExitLink to "none">>\
<span id="KeypTwo">\
<<link "2) Stomp up and down on it" _RoomPTR>>
<<set $Dungeon[_pz][_px][_py][12] to 104>>\
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] -1>>\
<<set _pz to $PC[$CC][$PCz]>>\
\
<<if $Dungeon[_pz][_px][_py][11] is 0>>\
<<set $Dungeon[_pz][_px][_py][11] to "Trap">>\
<<set $Dungeon[_pz][_px][_py][12] to "pitfall landing">>\
<<else>>\
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] +1>>\
<<set $Dungeon[_pz][_px][_py][12] to 999>>\
<<endif>>\
<</link>>\
</span>\
<<elseif _AvoidChance > 0>>\
@@color:LightGreen;Trap avoided!@@
You notice the peculiar discoloration of a section of tiles that you suspect indicates they were added later. Looking more closely you notice that the entire floor dips towards the middle of the discoloration, as if nothing solid supports it from beneath.
<<TrapAchieveTester "avoid">>\
@@color:Gold;Options@@
<span id="KeypOne">\
<<link "1) Tiptoe around it" _RoomPTR>>
<<set $Dungeon[_pz][_px][_py][8] to 103>>\
<<set $Dungeon[_pz][_px][_py][11] to 0>>\
<</link>>
</span>\
<<set _ExitLink to "none">>\
<span id="KeypTwo">\
<<link "2) Stomp up and down on it" _RoomPTR>>
<<set $Dungeon[_pz][_px][_py][12] to 104>>\
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] -1>>\
<<set _pz to $PC[$CC][$PCz]>>\
\
<<if $Dungeon[_pz][_px][_py][11] is 0>>\
<<set $Dungeon[_pz][_px][_py][11] to "Trap">>\
<<set $Dungeon[_pz][_px][_py][12] to "pitfall landing">>\
<<else>>\
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] +1>>\
<<set $Dungeon[_pz][_px][_py][12] to 999>>\
<<endif>>\
<</link>>\
</span>\
<<elseif (_RogueMod is 3) and (_pz < 4)>>\
<<set $Dungeon[_pz][_px][_py][12] to 104>>\
@@color:Yellow;Trap activated!@@
You carelessly step on a weak section of the floor which collapses from under your feet. Your rogue skills are sharp, however, and you instantly twist around to grab a still-intact section fo floor behind you and crawl back up.
<<TrapAchieveTester "trigger">>\
<<else>>\
<<set $Dungeon[_pz][_px][_py][12] to 104>>\
@@color:Red;Trap activated!@@
You carelessly step on a weak section of the floor which collapses from under your feet, sending you tumbling to the floor below.
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] -1>>\
<<set _pz to $PC[$CC][$PCz]>>\
\
<<if $Dungeon[_pz][_px][_py][11] is 0>>\
<<set $Dungeon[_pz][_px][_py][11] to "Trap">>\
<<set $Dungeon[_pz][_px][_py][12] to "pitfall landing">>\
<<else>>\
<<set _ExitLink to "continue">>\
@@color:Red;Error in pit trap@@: landing site cannot be cleared, it is a: <<print $Dungeon[_pz][_px][_py][11]>>
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] +1>>\
<<set $Dungeon[_pz][_px][_py][12] to 999>>\
<<endif>>\
<<set _TrapDamage to random(_PZafterRogue, _PZafterRogue * 5)>>\
<<if _trapmaster is true>>\
<<set _Trapdamage to Math.trunc(_TrapDamage / 2)>>\
<<if _Trapdamage < 1>>\
<<set _TrapDamage to 1>>\
<<endif>>\
Your @@color:LightGreen;Trapmaster perk@@ reduces the damage to only @@color:Red;<<print _TrapDamage>>@@.
<<set _TrapDamage to (_TrapDamage * -1)>>\
<<ChangeStat $PChpcur _TrapDamage>>\
<<ShowHealth>>\
<<TrapAchieveTester "trigger">>\
<<else>>\
@@color:Red;You are struck for _TrapDamage damage!@@
<<set _TrapDamage to (_TrapDamage * -1)>>\
<<ChangeStat $PChpcur _TrapDamage>>\
<<ShowHealth>>\
<<TrapAchieveTester "trigger">>\
<<endif>>\
<<if $PC[$CC][$PChpcur] < 1>>\
<<set _ExitLink to "none">>\
Unfortunately, that's more health than you have. You die.
<span id="KeypSpace">\
<<link "Press space to continue" "Death">>
<<set $WORLD.diedby to "Falling into a pit trap">>
<</link>>\
</span>\
<<endif>>\
<<endif>>\
<<elseif _whichtrap is 101>>\
<<set $AllowNav to true>>\
<<set _ExitLink to "none">>\
There is a a depressed pressure plate from a crossbow trap here.\
<<elseif _whichtrap is 103>>\
<<set $AllowNav to true>>\
<<set _ExitLink to "none">>\
You tiptoe carefully around a weak section of floor.\
<<elseif _whichtrap is 104>>\
<<set _ExitLink to "none">>\
<<set $AllowNav to true>>\
@@color:Gold;Collapsed floor@@
<<set _Rope to setup.HasRope()>>\
<<if _Rope > -1>>\
A huge section of the floor has collapsed here, revealing a way down to the floor below. You have some rope with you. There's a solid-looking chunk of the floor you could probably tie it to if you wanted to get down safely.
<<else>>\
A huge section of the floor has collapsed here, revealing a way down to the floor below. Perhaps if you had some rope you could tie it to something make make a safe way down.
<<endif>>\
@@color:Gold;Options@@
<span id="KeypOne">\
<<link "1) Jump down like an idiot" _RoomPTR>>
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] -1>>\
<</link>>
</span>\
<<if _Rope > -1>>\
<span id="KeypTwo">\
<<link "2) Secure a way down" _RoomPTR>>
<<set _throwaway to setup.RemoveOneItemFromInv($CC, _Rope)>>
<<set $Dungeon[_pz][_px][_py][12] to 106>>\
<<set $Dungeon[_pz -1][_px][_py][12] to 107>>\
<</link>>\
</span>\
<<endif>>\
<<elseif _whichtrap is 105>>\
<<set $AllowNav to true>>\
<<set _ExitLink to "none">>\
@@color:Gold;Collapsed ceiling@@
The floor here is littered with rock debris and dust, and there is a clear hole in the ceiling leading to the floor above you.\
<<elseif _whichtrap is 106>>\
<<set $AllowNav to true>>\
<<set _ExitLink to "none">>\
@@color:Gold;A safe way down@@
A large section of the floor has collapsed here, but there is a secure rope leading to the next floor down.
@@color:Gold;Options@@
<span id="KeypOne">\
<<link "1) Climb down" _RoomPTR>>
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] -1>>\
<</link>>\
</span>\
<<elseif _whichtrap is 107>>\
<<set $AllowNav to true>>\
<<set _ExitLink to "none">>\
@@color:Gold;A safe way up@@
A large section of the ceiling has collapsed here, but there is a secure rope leading to the next floor up.
@@color:Gold;Options@@
<span id="KeypOne">\
<<link "1) Climb up" _RoomPTR>>
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] +1>>\
<</link>>\
</span>\
<<elseif _whichtrap is 120>>\
<<set $AllowNav to true>>\
<<set _ExitLink to "none">>\
There is a tripwire here which you carefully avoid.\
<<elseif _whichtrap is 121>>\
<<set $AllowNav to true>>\
<<set _ExitLink to "none">>\
There is a tripwire trap here already torn from previous activation.\
<<elseif _whichtrap is 999>>\
<<set $AllowNav to true>>\
<<set _ExitLink to "none">>\
@@color:Red;(Bugged pit trap has been removed)@@\
<<else>>\
Implement trap id: _whichtrap\
<<endif>>\
\
<<if _ExitLink is "continue">>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) continue" _RoomPTR>>
<</link>>\
</span>\
<<endif>>\
<</replace>>\<<replace "#eventtext">>\
<<if $PC[$CC][$PCz] > 99>>\
@@color:Gold;Stairs Up@@
This is it! The final level!
<hr>\
<span id="KeypOne">\
<<link "1) Climb to the roof" "Ascend">>
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] +1>>
<</link>>\
</span>\
<<elseif $PC[$CC][$PClocation] is "forest">>\
<!-- handled by forest widget -->\
<<else>>\
@@color:Gold;Stairs Up@@
A set of stairs lead up towards harder opponents, but also towards the prize at the top.
<hr>\
<span id="KeypOne">\
<<link "1) Go up the stairs" "Dungeon64">>
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] +1>>
<</link>>\
</span>\
<<endif>>\
<</replace>>\<<replace "#eventtext">>\
@@color:Gold;Stairs Down@@
<<if $PC[$CC][$PCz] > 1>>\
A set of stairs lead downward towards easier opponents, and eventually, back to town.\
<hr>\
<span id="KeypOne">\
<<link "1) Go down the stairs" "Dungeon64">>
<<set $PC[$CC][$PCz] to $PC[$CC][$PCz] -1>>
<</link>>\
</span>\
<<elseif $PC[$CC][$PClocation] is "forest">>\
<!-- handled by forest widget -->\
<<elseif $PC[$CC][$PCz] is 1>>\
The exit stairs are here, leading back to town.
<hr>\
<span id="KeypOne">\
<<link "1) Leave the dungeon" "TownSquare">>
<<set $PC[$CC][$PCz] to 0>>
<<set $PC[$CC][$PClocation] to "town">>
<</link>>\
</span>\
<<else>>\
@@color:Red;Error in stairs down: pcz is <<print $PC[$CC][$PCz]>>
<<endif>>\
<</replace>>\<span id="KeypESC">\
<<link "esc) close window">>
<<unset $InvenMode>>
<<script>>
Dialog.close();
document.activeElement.blur();
<</script>>
<</link>> \
<<button "Toggle View">>\
<<if $WORLD.InventoryMode is 1>>
<<set $WORLD.InventoryMode to 0>>
<<else>>
<<set $WORLD.InventoryMode to 1>>
<<endif>>\
<<script>>
Dialog.setup("Inventory");
Dialog.wiki(Story.get("Inventory").processText());
Dialog.open();
<</script>>
<</button>>\
</span>\
<hr>\
<<if $WORLD.InventoryMode is 1>>\
<table><tr style="vertical-align: top;"><td>\
<span id="EquipmentGoesHere">\
<<ShowEquipment>>\
</span>\
\
<span id="inverr"><br></span>\
</td><td>\
<<set $InvenMode to "use">>\
<span id="InventoryGoesHere">\
<<ShowInventory>>\
</span>\
\
<<if $DebugMode is true>>\
<hr>
@@color:Gold;debug@@
<<button "[add stackable item]" "Inventory">>
<<set _foo to setup.GiveItem($CC, [109,0,1,301,0])>>
<</button>>
<<button "[add non-stackable item]" "Inventory">>
<<set _foo to setup.GiveItem($CC, [300,0,0,301,0])>>
<</button>>\
<<endif>>\
</td></tr></table>\
<<else>>\
<span id="EquipmentGoesHere">\
<<ShowEquipment>>\
</span>\
\
<hr>\
<span id="inverr"><br></span>\
<hr>\
\
<<set $InvenMode to "use">>\
<span id="InventoryGoesHere">\
<<ShowInventory>>\
</span>\
\
<<if $DebugMode is true>>\
<hr>
@@color:Gold;debug@@
<<button "[add stackable item]" "Inventory">>
<<set _foo to setup.GiveItem($CC, [109,0,1,301,0])>>
<</button>>
<<button "[add non-stackable item]" "Inventory">>
<<set _foo to setup.GiveItem($CC, [300,0,0,301,0])>>
<</button>>\
<<endif>>\
<<endif>>\<<set $DisableMenu to true>>\
<<set $GameState to "combat">>\
<<unset $NoInventoryHack>>\
<<set $WORLD.turnssincecombat to 0>>\
<<set $WORLD.dialogue to 0>>\
<<set $PC[$CC][$PCmisc].battles to $PC[$CC][$PCmisc].battles +1>>\
<<if $RCHelper is "inventory">>\
<!-- combat already started don't initialize -->\
<<else>>\
<<endif>>\
\
<<if $Mon.boss > 0>>\
<<PlayBGM "boss">>\
<<else>>\
<<PlayBGM "combat">>\
<<endif>>\
\
<<ShowActiveEffects>>\
\
<<if $DebugMode is true>>\
@@color:Red;Debug, forcemon: $ForceMon>>\
<<endif>>\
<<set _monimg to $ImgPath + $Mon.pic>>\
\
<<UpdateACandFlirts>>\
<<GetPlayerAbsorption>>\
\
<div class="columnmain">\
<span id="portal">\
<<if $Mon.ImageVer is 0>>\
<!-- old style -->\
<table>\
<tr><td><img id ="mon-avatar" @src="_monimg"></td></tr>\
<tr><td>@@color:Red;Level <<print $Mon.level>> <<print $Mon.name>>@@<br><br>$Mon.desc</td></tr>\
</table>\
<span id ="monhealth"><div id="monhpbarbkg" class="hzbarbkg"><div id="monhpnbar" class="hzbar"></div></div></span>\
<span id ="monflirt"><div id="monflirtbarbkg" class="hzbarbkg"><div id="monflirtnbar" class="hzbar"></div></div></span>\
<<else>>\
<!-- new style -->\
<table>\
<tr><td><div class="monavatar-group"><img id ="mon-avatar" @src="_monimg"></div></td>\
</tr>\
<tr>\
<td>@@color:Red;Level <<print $Mon.level>> <<print $Mon.name>>@@<br><br>$Mon.desc</td>
</tr>\
<tr><td>\
<span id ="monhealth"><div id="monhpbarbkg" class="hzbarbkg"><div id="monhpnbar" class="hzbar"></div></div></span>\
<span id ="monflirt"><div id="monflirtbarbkg" class="hzbarbkg"><div id="monflirtnbar" class="hzbar"></div></div></span>
</td></tr>\
</table>\
<<endif>>\
\
<<timed 200ms>>\
<<run Health2($Mon.hpcur, $Mon.hpmax, "monhpnbar", true)>>\
<<run Health2($Mon.teased, 100, "monflirtnbar", true)>>\
<</timed>>\
<<if $RCHelper is "inventory" or $RCHelper is "spellbook">>\
<<set $RCHelper to "">>\
<<set _foo to $PassData[0]>>\
<<set $ComLog[0] to $ComLog[1]>>\
<<set $ComLog[1] to $ComLog[2]>>\
<<set $ComLog[2] to $ComLog[3]>>\
<<set $ComLog[3] to $ComLog[4]>>\
<<set $ComLog[4] to $ComLog[5]>>\
<<set $ComLog[5] to _foo>>\
<<else>>\
<<for _i to 0; _i < 16; _i++>>\
<<set $ComLog[_i] to "">>\
<</for>>\
<<endif>>\
<hr>\
<<if $PC[$CC][$PChpcur] < 1>>\
@@color:Yellow;You have been defeated!@@
<span id="KeypSpace">\
<<link "(press space to continue)" "DefeatSex">>
<</link>>\
</span>
<<else>>\
<<GetAttackArray>>\
<span id ="combatcontrols">\
<<set _spanarray to ["KeypOne","KeypTwo","KeypThree","KeypFour","KeypFive","KeypSix","KeypSeven","KeypEight","KepyNine"]>>\
<table width=100%><tr style="vertical-align: top;"><td>\
@@color:Gold;Melee Actions@@<br>\
<<for _LoopUniqueNameadhsgjdhas to 0; _LoopUniqueNameadhsgjdhas < $AttackArray.length; _LoopUniqueNameadhsgjdhas++>>\
<<capture _LoopUniqueNameadhsgjdhas>>\
<<set _nzero to _LoopUniqueNameadhsgjdhas +1>>\
<<set _linktext to "" + _nzero + ") " + $AttackArray[_LoopUniqueNameadhsgjdhas][2]>>\
<span @id="_spanarray[_LoopUniqueNameadhsgjdhas]">\
<<link _linktext>>\
<<set _asdf to "Keypress sending: " + $AttackArray[_LoopUniqueNameadhsgjdhas] + "<br>">><<AddToLog _asdf>>
<<CombatAttack $AttackArray[_LoopUniqueNameadhsgjdhas]>>\
<<run Health2($Mon.hpcur, $Mon.hpmax, "monhpnbar", true)>>\
<<MonsterTurn false>>\
<</link>> <<CombatUIStatsHack $AttackArray[_LoopUniqueNameadhsgjdhas]>>
</span>\
<</capture>>\
<</for>>\
<<if $DebugMode is true>>\
<span id="KeypC">\
<<link "c) Debug insta-kill">>\
<<AddToLog "Keypress sending: 'debug kill' command<br>">>\
<<set _DKC to ["debug kill", -1, "nodesc"]>>\
<<CombatAttack _DKC>>\
<<run Health2($Mon.hpcur, $Mon.hpmax, "monhpnbar", true)>>\
<<MonsterTurn false>>\
<</link>>
</span>\
<<endif>>\
</td><td style="vertical-align: top;">\
<<if $PC[$CC][$PCspellbook].any is true>>@@color:Gold;Spells@@<br><<endif>>\
<span id = "SpellActions">\
<<if $PC[$CC][$PCspellbook].q is "">><<else>>\
<<set _qCommand to "q) " + $PC[$CC][$PCspellbook].q>>\
<span id="KeypQ">\
<<link _qCommand>>
<<set _cf to [$PC[$CC][$PCspellbook].q,-1,"nodesc"]>>
<<set _asdf to "Keypress sending: " + _cf + "<br>">><<AddToLog _asdf>>
<<CombatAttack _cf>>
<<if $WORLD.datapasser is "portaled out of combat">>\
<<set $WORLD.datapasser to "">>\
<<else>>\
<<run Health2($Mon.hpcur, $Mon.hpmax, "monhpnbar", true)>>\
<<if $DeathBySpellFeedback > 0>>\
<<DeathByFeedback>>\
<<else>>\
<<MonsterTurn false>>\
<<endif>>\
<<endif>>\
<</link>>
</span>\
<<endif>>\
<<if $PC[$CC][$PCspellbook].w is "">><<else>>\
<<set _wCommand to "w) " + $PC[$CC][$PCspellbook].w>>\
<span id="KeypNorth">\
<<link _wCommand>>
<<set _cf to [$PC[$CC][$PCspellbook].w,-1,"nodesc"]>>
<<CombatAttack _cf>>
<<if $WORLD.datapasser is "portaled out of combat">>\
<<set $WORLD.datapasser to "">>\
<<else>>\
<<run Health2($Mon.hpcur, $Mon.hpmax, "monhpnbar", true)>>\
<<if $DeathBySpellFeedback > 0>>\
<<DeathByFeedback>>\
<<else>>\
<<MonsterTurn false>>\
<<endif>>\
<<endif>>\
<</link>>
</span>\
<<endif>>\
<<if $PC[$CC][$PCspellbook].e is "">><<else>>\
<<set _eCommand to "e) " + $PC[$CC][$PCspellbook].e>>\
<span id="KeypE">\
<<link _eCommand>>
<<set _cf to [$PC[$CC][$PCspellbook].e,-1,"nodesc"]>>
<<CombatAttack _cf>>
<<if $WORLD.datapasser is "portaled out of combat">>\
<<set $WORLD.datapasser to "">>\
<<else>>\
<<run Health2($Mon.hpcur, $Mon.hpmax, "monhpnbar", true)>>\
<<if $DeathBySpellFeedback > 0>>\
<<DeathByFeedback>>\
<<else>>\
<<MonsterTurn false>>\
<<endif>>\
<<endif>>\
<</link>>
</span>\
<<endif>>\
</span>\
</td></tr></table>\
<hr>\
<span id="KeypF">\
<<link "f) Flirt">>
<<set _cf to ["flirt",-1,"nodesc"]>>
<<CombatAttack _cf>>
<<run Health2($Mon.teased, 100, "monflirtnbar", true)>>
<<MonsterTurn false>>\
<</link>> \
</span> <<set _throwaway to ["flirt","flirt","flirt"]>><<CombatUIStatsHack _throwaway>>
<<if Math.trunc($PC[$CC][$PChunger]) < 50>>\
r) too tired to run
<<else>>\
<span id ="RemoveRun"><span id="KeypR">\
<<link "r) Run">>
<<set $PC[$CC][$PChunger] to $PC[$CC][$PChunger] - 50>>\
<<if $PC[$CC][$PChunger] < 50>>\
<<replace "#RemoveRun">>r) too tired to run<</replace>>\
<<endif>>\
<<set _cr to ["run",-1,"nodesc"]>>
<<CombatAttack _cr>>
<</link>> \
</span>(-50 stamina)</span>
<<endif>>\
<span id="KeypV">\
<<link "v) Visualize defeat">>
<<set _cr to ["fantasize",-1,"nodesc"]>>
<<CombatAttack _cr>>
<<MonsterTurn false>>
<</link>> \
</span>\
</span>
<<endif>>\
</span>\
</div>\
\
\
\
<!-- ----------------------------------------------- -->\
<div class="columnevents">\
@@color:Gold;Combat log@@
<hr>
<span id ="combatlog15">$ComLog[15]</span>
<span id ="combatlog14">$ComLog[14]</span>
<span id ="combatlog13">$ComLog[13]</span>
<span id ="combatlog12">$ComLog[12]</span>
<span id ="combatlog11">$ComLog[11]</span>
<span id ="combatlog10">$ComLog[10]</span>
<span id ="combatlog9">$ComLog[9]</span>
<span id ="combatlog8">$ComLog[8]</span>
<span id ="combatlog7">$ComLog[7]</span>
<span id ="combatlog6">$ComLog[6]</span>
<span id ="combatlog5">$ComLog[5]</span>
<span id ="combatlog4">$ComLog[4]</span>
<span id ="combatlog3">$ComLog[3]</span>
<span id ="combatlog2">$ComLog[2]</span>
<span id ="combatlog1">$ComLog[1]</span>
<span id ="combatlog0">$ComLog[0]</span>
</div>\
<<widget "RiposteCheck">>\
<<if (setup.PtrToClass($PC[$CC][$PCclass]) is "warrior") and ($PC[$CC][$PClevel] > 6)>>\
<<set _TotalHack to $PC[$CC][$PClevel]>>\
<<set $Mon.hpcur to $Mon.hpcur - _TotalHack>>\
<<set _CombatMessage to "@@color:Aqua;(Riposte)@@ You tap " + _TheMon + " for " + _TotalHack + " damage">>\
<<run Health2($Mon.hpcur, $Mon.hpmax, "monhpnbar", true)>>\
<<CombatLog _CombatMessage>>\
<<endif>>\
<</widget>>\
<<widget "PCWeaponAttack">>\
\
<<set _Riposte to _args[0]>>\
<<set _CombatMessage to "">>\
<<if _Riposte is "Riposte">>\
<<set _CombatMessage to "@@color:Aqua;(Riposte)@@ ">>\
<<endif>>\
\
<<set _endcombat to "skip player">>\
<<set _bp to $PC[$CC][$PCbp][_slot]>>\
<<set _item to _bp.equip>>\
<<DescribeItem _item>>\
<<set _weapname to $ItemPoke.name>>\
\
<<set _ToHit to random(1, 100) - $Mon.armor + $Mon.held + $PC[$CC][$PCtohit] + $PC[$CC][$PCmorphBONI].th + (_BestWarrior * 5) + _EnchantBonuses.Accuracy>>\
<<if _Encumbered < 0>>\
<<set _ToHit to _ToHit - _Encumbered>>\
<<endif>>\
<<if setup.GetEffect("rage") > 0>>\
<<set _ToHit to _ToHit + 50>>\
<<endif>>\
<<if _CurrentClass is "warrior">>\
<<set _ToHit to _ToHit + ($PC[$CC][$PClevel] * 10)>>\
<<endif>>\
\
<<set _attacktype to $ItemPoke.attacktype>>\
<<set _AttackVerb to "swing">>\
<<if _attacktype is "blunt">>\
<<elseif _attacktype is "cut">>\
<<elseif _attacktype is "cleave">>\
<<set _ToHit to _ToHit + (_BestLumberjack * 5)>>\
<<elseif _attacktype is "pierce">>\
<<set _AttackVerb to either("stab","poke")>>\
<<endif>>\
\
<<if _attacktype is "shine">>\
<<set _CombatMessage to "You shine a light at " + _TheMon + ", but it has no effect">>\
<<elseif _ToHit < 1>>\
<<set _CombatMessage to _CombatMessage + "You " + _AttackVerb + " at " + _TheMon + " but miss">>\
<<else>>\
<<set _mindam to $ItemPoke.mindam>>\
<<set _maxdam to $ItemPoke.maxdam>>\
<<if (_attacktype is "cleave") and _CurrentClass is "lumberjack">>\
<<set _mindam to _mindam + $PC[$CC][$PClevel]>>\
<<set _maxdam to _maxdam + $PC[$CC][$PClevel]>>\
<<endif>>\
<<set _Damage to random(_mindam, _maxdam) + _strmod + _BestPaladin>>\
<<set _DamageReduce to 0>>\
<<for _MR to 0; _MR < $Mon.resists.length; _MR++>>\
<<if $Mon.resists[_MR][0] is _attacktype>>\
<<set _DamageReduce to Math.trunc((_DamageReduce + _Damage * $Mon.resists[_MR][1]) / 100)>>\
<<endif>>\
<</for>>\
<<if _Damage < 1>>\
<<set _absorbmessage to _hitmessage + " but " + _heshe + " absorbs the blow for no effect">>\
<<set _CombatMessage to _CombatMessage + _absorbmessage>>\
<<else>>\
<<if _DamageReduce > 0>>\
<<set _CombatMessage to _CombatMessage + "You " + _AttackVerb + " your " + _weapname + " at " + _TheMon + " for " + _Damage + "@@color:Yellow;(-" + _DamageReduce + ")@@ damage">>\
<<set _Damage to _Damage - _DamageReduce>>\
<<else>>\
<<set _CombatMessage to _CombatMessage + "You " + _AttackVerb + " your " + _weapname + " at " + _TheMon + " for " + _Damage + " damage">>\
<<endif>>\
<<set $Mon.hpcur to $Mon.hpcur - _Damage>>\
<<if _Damage > 19>>\
<<AwardAchievement "Warrior">>\
<<endif>>\
<<endif>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<</widget>>\
<<widget "CombatAttack">>\
<<set $Mon.CombatRound to $Mon.CombatRound +1>>\
<<set _AllowPartyActions to true>>\
<<set _ArrayReceived to $args[0]>>\
<<set _a to "CombatAttack received: " + _ArrayReceived + "<br>">><<AddToLog _a>>\
\
<<set _attacktype to _ArrayReceived[0]>>\
<<set _slot to _ArrayReceived[1]>>\
<<set _strmod to $PC[$CC][$PCstr] -10>>\
<<set _mindam to 1>>\
<<set _maxdam to 2>>\
<<set _Encumbered to setup.EncumberedPenalty()>>\
<<if setup.TypeOf(_Encumbered) is "number">>\
<<else>>\
<<script>>alert("Error: encumbered is not a number);<</script>>\
<<set _Encumbered to 0>>\
<<endif>>\
<<set _th to $PC[$CC][$PCtohit]>>\
<<set _missmessage to "default miss">>\
<<set _hitmessage to "default attack">>\
<<set _absorbmessage to "default absorb">>\
<<set _endcombat to "normal">>\
<<set _heshe to "he">>\
<<if $Mon.sex is "female">>\
<<set _heshe to "she">>\
<<elseif $Mon.sex is "herm">>\
<<set _heshe to "it">>\
<<endif>>\
\
<<set _EnchantBonuses to setup.GetEnchantBonuses($CC)>>\
\
<<set _TheMon to "the " + $Mon.name + " ">>\
<<if $Mon.unique is true>>\
<<set _TheMon to $Mon.name>>\
<<else>>\
<<set _TheMon to "the " + $Mon.name>>\
<<endif>>\
\
<<set _GlobalSpellBonus to setup.AchievementHandler("Best Archmage", "HAS?", -1)>>\
<<set _BestLumberjack to setup.AchievementHandler("Best Lumberjack", "HAS?", -1)>>\
<<set _BestWarrior to setup.AchievementHandler("Best Warrior", "HAS?", -1)>>\
<<set _BestBarbarian to setup.AchievementHandler("Best Barbarian", "HAS?", -1)>>\
<<set _BestPaladin to setup.AchievementHandler("Best Paladin", "HAS?", -1)>>\
<<set _BestPriest to setup.AchievementHandler("Best Priest", "HAS?", -1)>>\
<<set _BestNinja to setup.AchievementHandler("Best Ninja", "HAS?", -1)>>\
<<if _GlobalSpellBonus > 0>><<else>><<set _GlobalSpellBonus to 0>><<endif>>\
<<if _BestLumberjack > 0>><<else>><<set _BestLumberjack to 0>><<endif>>\
<<if _BestWarrior > 0>><<else>><<set _BestWarrior to 0>><<endif>>\
<<if _BestBarbarian > 0>><<else>><<set _BestBarbarian to 0>><<endif>>\
<<if _BestPaladin > 0>><<else>><<set _BestPaladin to 0>><<endif>>\
<<if _BestPriest > 0>><<else>><<set _BestPriest to 0>><<endif>>\
<<if _BestNinja > 0>><<else>><<set _BestNinja to 0>><<endif>>\
<<set _CurrentClass to setup.PtrToClass($PC[$CC][$PCclass])>>\
\
<<if _attacktype is "body">>\
<<set _endcombat to "skip player">>\
<<set _bp to $PC[$CC][$PCbp][_slot]>>\
<<set _ToHit to random(1, 100) - $Mon.armor + $PC[$CC][$PCtohit]>>\
<<set _ToHit to _ToHit + $Mon.held + _EnchantBonuses.Accuracy + $PC[$CC][$PCmorphBONI].bodyth + (_BestBarbarian * 5) - _Encumbered>>\
<<if setup.GetEffect("rage") > 0>>\
<<set _ToHit to _ToHit + 50>>\
<<endif>>\
<<set _AttackDesc to _bp.attackdesc>>\
<<if _ToHit > 0>>\
<<set _MinDam to _bp.mindam>>\
<<set _MaxDam to _bp.maxdam>>\
<<set _Damage to random(_MinDam, _MaxDam) + _strmod + $PC[$CC][$PCmorphBONI].bodydam>>\
<<if _CurrentClass is "barbarian">>\
<<set _Damage to _Damage + $PC[$CC][$PClevel]>>\
<<endif>>\
<<set _DamageReduce to 0>>\
<<set _AttackType to _bp.attacktype>>\
<<for _MR to 0; _MR < $Mon.resists.length; _MR++>>\
<<if $Mon.resists[_MR][0] is _AttackType>>\
<<set _DamageReduce to Math.trunc((_DamageReduce + _Damage * $Mon.resists[_MR][1]) / 100)>>\
<<endif>>\
<</for>>\
<<if _AttackType is "poison bite">>\
<<set _Damage to random(_MinDam, _MaxDam)>>\
<<set _CombatMessage to "You @@color:ForestGreen;" + _AttackDesc + " " + _TheMon + "@@">>\
<<set $Mon.poisoned to $Mon.poisoned + _Damage>>\
<<CombatLog _CombatMessage>>\
<<elseif _AttackType is "immobilize">>\
<<set _MaxHold to 3 * (_MaxDam + $PC[$CC][$PCstr])>>\
<<set _AppliedHold to random(_MinDam, _MaxDam) + $PC[$CC][$PCstr])>>\
<<if $Mon.held gte _MaxHold>>\
<<set _CombatMessage to "You're already holding onto " + _TheMon + " as tightly as you can">>\
<<elseif $Mon.held is 0>>\
<<set $Mon.held to $Mon.held + _Damage>>\
<<set _CombatMessage to "You @@color:ForestGreen;grab onto@@ " + _TheMon + " with your pincers, reducing defense by " + _AppliedHold>>\
<<else>>\
<<set $Mon.held to $Mon.held + _Damage>>\
<<if $Mon.held gte _MaxHold>>\
<<set _Mon.held to _MaxHold>>\
<<set _CombatMessage to "You now @@color:ForestGreen;have a solid on " + _TheMon + ", reducing defense by a total of " + _Mon.held>>\
<<else>>\
<<set _CombatMessage to "You @@color:ForestGreen;squeeze " + _TheMon + " tighter, reducing defense by an additional " + _AppliedHold>>\
<<endif>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<elseif _Damage < 1>>\
<<set _AbsorbMessage to "You " + _AttackDesc + " " + _TheMon + " but " + _heshe + " aborbs the blow to no effect">>\
<<set _CombatMessage to _absorbmessage>>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<if _DamageReduce > 0>>\
<<set _CombatMessage to "You " + _AttackDesc + " " + _TheMon + " for " + _Damage + "@@color:Yellow;(-" + _DamageReduce + ")@@ damage">>\
<<set _Damage to _Damage - _DamageReduce>>\
<<else>>\
<<set _CombatMessage to "You " + _AttackDesc + " " + _TheMon + " for " + _Damage + " damage">>\
<<endif>>\
<<set $Mon.hpcur to $Mon.hpcur - _Damage>>\
<<CombatLog _CombatMessage>>\
\
<<if (_CurrentClass is "barbarian") and ($PC[$CC][$PClevel] > 6)>>\
<<set _BleedMessage to "@@color:Red;the attack draws blood@@">>\
<<CombatLog _BleedMessage>>\
<<set $Mon.bleeding to $Mon.bleeding + 1>>\
<<endif>>\
<<endif>>\
<<else>>\
<<set _CombatMessage to "You try to " + _AttackDesc + " " + _TheMon + " but miss">>\
<<CombatLog _CombatMessage>>\
<<endif>>\
<<elseif _attacktype is "weapon">>\
<<PCWeaponAttack "No Riposte">>\
<<elseif _attacktype is "bash">>\
<<set _endcombat to "skip player">>\
<<if $Mon.stunned < 0>>\
<<set _CombatMessage to _TheMon.toUpperFirst() + " @@color:Yellow;anticipates the blow and dodges@@">>\
<<else>>\
<<set _StunChance to random(-2, 2) + $PC[$CC][$PCstr] - _Encumbered>>\
<<if $PC[$CC][$PClocation] is "tower">>\
<<set _StunChance to _StunChance - ($PC[$CC][$PCz] * 3)>>\
<<else>>\
<<set _StunChance to _StunChance - $PC[$CC][$PCfz]>>\
<<endif>>\
<<if _StunChance gte 0>>\
<<if $Mon.name.includes("slime")>>\
<<set _CombatMessage to "You swing your shield but @@color:Yellow;the slime absorbs the blow@@">>\
<<elseif $Mon.name.includes("tentacle")>>\
<<set _CombatMessage to "You swing your shield but @@color:Yellow;the creature casually deflects it with a tentacle@@">>\
<<elseif $Mon.name.includes("Zehtalia")>>\
<<if $Mon.Powerup is 1>>\
<<set _CombatMessage to "You smash Zehtalia with your shield and @@color:Aqua;she stops screaming@@">>\
<<else>>\
<<set _CombatMessage to "You @@color:Aqua;smash Zehtalia with your shield@@">>\
<<endif>>\
<<set $Mon.Powerup to 0>>\
<<set $Mon.stunned to 1>>\
<<else>>\
<<set $Mon.Powerup to 0>>\
<<set $Mon.stunned to 1>>\
<<set _CombatMessage to "You @@color:Aqua;bash " + _TheMon + " with your shield@@, knocking " + $Mon.himher + " off balance">>\
<<endif>>\
<<else>>\
<<set _CombatMessage to "You swing your shield but @@color:Yellow;don't connect with enough force@@">>\
<<endif>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<elseif _attacktype is "symbol">>\
<<set _endcombat to "skip player">>\
<<if $Mon.SymbolEffect is "none">>\
<<set _PickOne to either(" doesn't respond."," ignores this.", " doesn't seem affected at all.")>>\
<<set _CombatMessage to "You brandish your holy symbol and pray. " + _TheMon.toUpperFirst() + _PickOne>>\
<<set _PrayEffect to 1>>\
<<if _CurrentClass is "priest">>\
<<set _CombatMessage to "You pray to the goddess. " + _TheMon.toUpperFirst() + _PickOne>>\
<<set _PrayEffect to 2>>\
<<endif>>\
<<set _throwaway to setup.ApplyEffect("praying", _PrayEffect)>>\
<<elseif $Mon.SymbolEffect is "blink">>\
<<set _PickOne to either(" looks hopeful."," prays with you that she be destroyed.")>>\
<<set _CombatMessage to "You brandish your holy symbol and pray. " + _TheMon.toUpperFirst() + _PickOne>>\
<<set _PrayEffect to 1>>\
<<if _CurrentClass is "priest">>\
<<set _CombatMessage to "You pray to the goddess. " + _TheMon.toUpperFirst() + _PickOne>>\
<<set _PrayEffect to 2>>\
<<endif>>\
<<set _throwaway to setup.ApplyEffect("praying", _PrayEffect)>>\
<<elseif $Mon.SymbolEffect is "damage">>\
<<set _PickOne to either(" snarls in anger."," jumps back as if stung")>>\
<<set _CombatMessage to "You brandish your holy symbol and pray. " + _TheMon.toUpperFirst() + _PickOne>>\
<<set _PrayEffect to 1>>\
<<if _CurrentClass is "priest">>\
<<set _CombatMessage to "You pray to the goddess. " + _TheMon.toUpperFirst() + _PickOne>>\
<<set _PrayEffect to 2>>\
<<endif>>\
<<set _throwaway to setup.ApplyEffect("praying", _PrayEffect)>>\
<<set _TD to setup.GetEffect("praying")>>\
<<if _TD > 0>>\
<<set $Mon.hpcur to $Mon.hpcur - _TD>>\
<<endif>>\
<<else>>\
<<set _PickOne to either(" looks a little annoyed."," rolls " + $Mon.hisher + " eyes at you."," looks insulted.")>>\
<<set _CombatMessage to "You brandish your holy symbol and pray. " + _TheMon.toUpperFirst() + _PickOne>>\
<<set _PrayEffect to 1>>\
<<if _CurrentClass is "priest">>\
<<set _CombatMessage to "You pray to the goddess. " + _TheMon.toUpperFirst() + _PickOne>>\
<<set _PrayEffect to 2>>\
<<endif>>\
<<set _throwaway to setup.ApplyEffect("praying", _PrayEffect)>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<elseif _attacktype is "portal">>\
<<set _ManaCost to 5 + $Mon.level>>\
<<if $PC[$CC][$PCmanacur] < _ManaCost>>\
<<set _CombatMessage to "You try to portal out, but @@color:Yellow;you're out of mana@@">>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<set _endcombat to "skip player">>\
<<set $PC[$CC][$PCmanacur] to $PC[$CC][$PCmanacur] - _ManaCost>>\
<<set $PC[$CC][$PCz] to 0>>\
<<set $PC[$CC][$PClocation] to "town">>\
<<set $WORLD.datapasser to "portaled out of combat">>\
<<script>>Dialog.close();Engine.play("TownSquare");<</script>>
<<endif>>\
<<elseif _attacktype is "dart">>\
<<set _endcombat to "skip player">>\
<<if $PC[$CC][$PCmanacur] > 0>>\
<<set $PC[$CC][$PCmanacur] to $PC[$CC][$PCmanacur] -1>>\
<<set _DartHitChance to 5 * ($PC[$CC][$PCint] + $PC[$CC][$PClevel] - $Mon.level)>>\
<<if random(1,100) > _DartHitChance>>\
<<set _CombatMessage to "You hurl a magic dart at " + _TheMon + " @@color:Yellow;but miss@@">>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<set $Mon.HitBySpells to $Mon.HitBySpells +1>>\
<<set _Damage to random(1, $PC[$CC][$PCint]) + $PC[$CC][$PClevel]>>\
<<set _CombatMessage to "You hurl a magic dart at " + _TheMon + " for @@color:Yellow;" + _Damage + " damage@@">>\
<<set $Mon.hpcur to $Mon.hpcur - _Damage>>\
<<CombatLog _CombatMessage>>\
\
<<endif>>\
<<ShowMana>>\
<<else>>\
<<set _CombatMessage to "You try to cast a spell, but @@color:Yellow;you're out of mana@@">>\
<<CombatLog _CombatMessage>>\
<<endif>>\
<<elseif _attacktype is "firebolt">>\
<<set _endcombat to "skip player">>\
<<if setup.GetEffect("rage") > 0>>\
<<set _CombatMessage to "@@color:Red;YOU ARE ENRAGED@@">>\
<<CombatLog _CombatMessage>>\
<<elseif $PC[$CC][$PCmanacur] > 0>>\
<<set $Mon.HitBySpells to $Mon.HitBySpells +1>>\
<<set _BaseDam to random(1,10) + _GlobalSpellBonus>>\
<<set _Damage to 0>>\
<<for _FBD to 0; _FBD < $PC[$CC][$PClevel]; _FBD++>>\
<<set _Damage to _Damage + random(1,10)>>
<</for>>\
<<set _Damage to _Damage + $PC[$CC][$PCint]>>\
<<set _DamageToPlayer to 0>>\
<<set _DamageToTarget to 0>>\
\
<<set _TempMessage to "You fling a firebolt at " + $Mon.name>>\
<<if setup.PlayerHasPerk("Black Mage") is true>>\
<<set _BMB to 1 + (($PC[$CC][$PChpmax] - $PC[$CC][$PChpcur]) / $PC[$CC][$PChpmax])>>\
<<set _Damage to Math.trunc(_Damage * _BMB)>>\
<<if _BMB > 1>>\
<<set _TempMessage to "You fling a @@color:Red;Black Mage@@ firebolt at " + $Mon.name>>\
<<endif>>\
<<endif>>\
<<set _ManaCost to 1 + Math.trunc(_Damage / 40)>>\
<<if _ManaCost > $PC[$CC][$PCmanacur]>>\
<<set _FeedbackRatio to (_ManaCost - $PC[$CC][$PCmanacur]) / _ManaCost>>
<<set _DamageToPlayer to Math.trunc(_Damage * _FeedbackRatio)>>\
<<set _DamageToTarget to _Damage - _DamageToPlayer>>\
<<set _CombatMessage to _TempMessage + " and @@color:Yellow;experience spell feedback from overexertion@@">>\
<<CombatLog _CombatMessage>>\
<<set _DamageToPlayer to _DamageToPlayer * -1>>\
<<ChangeStat $PChpcur _DamageToPlayer>>\
<<ShowHealth>>\
<<if $PC[$CC][$PChpcur] <1>>\
<<set $DeathBySpellFeedback to 1>>\
<<endif>>\
<<else>>\
<<set _DamageToPlayer to 0>>\
<<set _DamageToTarget to _Damage>>\
<<endif>>\
\
<!-- effect on target -->\
<<if $Mon.fireheal is true>>\
<<set $Mon.hpcur to $Mon.hpcur + _DamageToTarget>>\
<<if $Mon.hpcur gte $Mon.hpmax>>\
<<set $Mon.hpcur to $Mon.hpmax>>\
<<set _CombatMessage to "Your firebolt @@color:Red;heals " + _TheMon + " to full health!@@">>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<set _CombatMessage to "Your firebolt @@color:Red;heals " + _TheMon + "@@ for " + _DamageToTarget + " damage!">>\
<<CombatLog _CombatMessage>>\
<<endif>>\
<<else>>\
<<set _DamageReduce to 0>>\
<<for _MR to 0; _MR < $Mon.resists.length; _MR++>>\
<<if $Mon.resists[_MR][0] is "fire">>\
<<set _DamageReduce to Math.trunc((_DamageReduce + _DamageToTarget * $Mon.resists[_MR][1]) / 100)>>\
<<endif>>\
<</for>>\
<<if _DamageToPlayer neq 0>>\
<!-- handled above -->\
<<elseif _DamageReduce > 0>>\
<<set _CombatMessage to "You " + _AttackDesc + " " + _TheMon + " for " + _DamageToTarget + "@@color:Yellow;(-" + _DamageReduce + ")@@ damage">>\
<<set _DamageToTarget to _DamageToTarget - _DamageReduce>>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<set _CombatMessage to _TempMessage + " for " + _DamageToTarget + " damage">>\
<<CombatLog _CombatMessage>>\
<<endif>>\
<<set $Mon.hpcur to $Mon.hpcur - _DamageToTarget>>\
<<endif>>\
<<set _ManaCost to _ManaCost * -1>>\
<<ChangeStat $PCmanacur _ManaCost>>\
<<ShowMana>>\
<<else>>\
<<set _CombatMessage to "You try to cast a spell, but @@color:Yellow;you're out of mana@@">>\
<<CombatLog _CombatMessage>>\
<<endif>>\
<<elseif _attacktype is "heal">>\
<<set _endcombat to "skip player">>\
<<if setup.GetEffect("rage") > 0>>\
<<set _CombatMessage to "@@color:Red;YOU ARE ENRAGED@@">>\
<<CombatLog _CombatMessage>>\
<<elseif $PC[$CC][$PCmanacur] > 1>>\
<<set _PriestCureSuffix to "">>\
<<set _HealEffect to $PC[$CC][$PClevel] + _BestPriest>>\
<<set _TotalHeal to 0>>\
<<if _GlobalSpellBonus > 0>>\
<<set _HealEffect to _HealEffect + _GlobalSpellBonus>>\
<<endif>>\
<<if setup.PlayerHasPerk("White Mage") is true>>\
<<set _HealEffect to _HealEffect + $PC[$CC][$PClevel]>>\
<<endif>>\
<<if (_CurrentClass is "priest")>>\
<<set _HealEffect to _HealEffect + $PC[$CC][$PClevel]>>\
<<if setup.GetEffect("poison") > 0>>\
<<set _PriestCureSuffix to " and @@color:Aqua;you have been cured of poison!@@">>\
<<PurgeOneEffect "oison">>\
<<ShowActiveEffects>>\
<<endif>>\
<<PurgeOneEffect "leed">>\
<<endif>>\
<<if ($PC[$CC][$PChpcur] + _HealEffect) gte $PC[$CC][$PChpmax]>>\
<<set _m to "You @@color:LightGreen;heal yourself to full@@" + _PriestCureSuffix>>\
<<set _TotalHeal to $PC[$CC][$PChpmax] - $PC[$CC][$PChpcur]>>\
<<else>>\
<<set _m to "You @@color:LightGreen;heal yourself@@ for " + _HealEffect + _PriestCureSuffix>>\
<<set _TotalHeal to _HealEffect>>\
<<endif>>\
<<ChangeStat $PChpcur _HealEffect>>\
<<ShowHealth>>\
<<ChangeStat $PCmanacur -2>>\
<<ShowMana>>\
<<CombatLog _m>>\
\
<<if (_CurrentClass is "priest") and ($PC[$CC][$PClevel] > 6)>>\
<<set _PartyQTY to $PC[$CC][$PCparty].length>>\
<<if _PartyQTY > 0>>\
<<for _PartyI to 0; _PartyI < _PartyQTY; _PartyI++>>\
<<set _LocalHealEffect to 0>>\
<<if $PC[$CC][$PCparty][_PartyI].hpcur < $PC[$CC][$PCparty][_PartyI].hpmax>>\
<<if ($PC[$CC][$PCparty][_PartyI].hpcur + _HealEffect) gte $PC[$CC][$PCparty][_PartyI].hpmax>>\
<<set $PC[$CC][$PCparty][_PartyI].hpcur to $PC[$CC][$PCparty][_PartyI].hpmax>>\
<<set _LocalHealEffect to $PC[$CC][$PCparty][_PartyI].hpmax 0 $PC[$CC][$PCparty][_PartyI].hpcur>>\
<<set _m to $PC[$CC][$PCparty][_PartyI].name is " is @@color:LightGreen;healed@@ for " + _LocalHealEffect>>\
<<CombatLog _m>>\
<<else>>\
<<set $PC[$CC][$PCparty][_PartyI].hpcur to $PC[$CC][$PCparty][_PartyI].hpcur + _HealFor>>\
<<set _LocalHealEffect to _HealFor>>\
<<set _m to $PC[$CC][$PCparty][_PartyI].name is " is @@color:LightGreen;healed@@ for " + _LocalHealEffect>>\
<<CombatLog _m>>\
<<endif>>\
<<endif>>\
<<set _TotalHeal to _TotalHeal + _LocalHealEffect>>\
<<if $PC[$CC][$PCparty][_PartyMemberToAttack].stance is "Down">>\
<<set $PC[$CC][$PCparty][_PartyMemberToAttack].stance to "Hide">>\
<<endif>>\
<</for>>\
<<ShowParty>>\
<<endif>>\
<<endif>>\
\
<<set $PC[$CC][$PCspellbook].totalheal to $PC[$CC][$PCspellbook].totalheal + _TotalHeal>>\
<<if $PC[$CC][$PCspellbook].totalheal > 99>>\
<<AwardAchievement "Priest">>\
<<set _ExtraMessage to "@@color:Gold;You have unlocked the priest class!@@">>\
<<CombatLog _ExtraMessage>>\
<<endif>>\
<<else>>\
<<CombatLog "You try to heal yourself, but @@color:Yellow;you're out of mana@@">>\
<<endif>>\
<<elseif _attacktype is "armor">>\
<<set _endcombat to "skip player">>\
<<if setup.GetEffect("rage") > 0>>\
<<set _CombatMessage to "@@color:Red;YOU ARE ENRAGED@@">>\
<<CombatLog _CombatMessage>>\
<<elseif $PC[$CC][$PCmanacur] > 1>>\
<<ChangeStat $PCmanacur -1>>\
<<ShowMana>>\
<<if setup.GetEffect("armor") > 0>>\
<<CombatLog "You cast armor, but that spell is already active">>\
<<else>>\
<<set _Armor to ($PC[$CC][$PClevel] * 10) + _GlobalSpellBonus + $PC[$CC][$PCspellbook].armor>>\
<<set _throwaway to setup.ApplyEffect("armor", _Armor)>>\
<!-- implement update active effects on caption -->\
<<set _m to "You gain @@color:Purple;" + _Armor + " armor@@ for the rest of this battle">>\
<<CombatLog _m>>\
<<endif>>\
<<else>>\
<<set _th to -99>>\
<<CombatLog "You try to cast a spell, but @@color:Yellow;you're out of mana@@">>\
<<endif>>\
<<elseif _attacktype is "poison">>\
<<set _endcombat to "skip player">>\
<<if setup.GetEffect("rage") > 0>>\
<<set _CombatMessage to "@@color:Red;YOU ARE ENRAGED@@">>\
<<CombatLog _CombatMessage>>\
<<elseif $PC[$CC][$PCmanacur] > 1>>\
<<set $Mon.HitBySpells to $Mon.HitBySpells +1>>\
<<set _th to 1000>>\
<<set _td to 1 + _GlobalSpellBonus>>\
<<set $Mon.poisoned to $Mon.poisoned + _td>>\
<<set _m to "You @@color:ForestGreen;poison the " + $Mon.name + "@@">>\
<<CombatLog _m>>\
<<ChangeStat $PCmanacur -1>>\
<<ShowMana>>\
<<else>>\
<<set _m to "You try to cast a spell, but @@color:Yellow;you're out of mana@@">>\
<<CombatLog _m>>\
<<endif>>\
<<elseif _attacktype is "soultrap">>\
<<set _endcombat to "skip player">>\
<<set _TargetMana to 18 + (2 * $Mon.level)>>\
<<if _TargetMana < 1>>\
<<set _TargetMana to 1>>\
<<endif>>\
<<if setup.GetEffect("rage") > 0>>\
<<set _CombatMessage to "@@color:Red;YOU ARE ENRAGED@@">>\
<<CombatLog _CombatMessage>>\
<<elseif $PC[$CC][$PCmanacur] < _TargetMana>>\
<<set _m to "You cast soul trap, but <<print _TheMon>> is too powerful for you. @@color:Yellow;You're drained of all mana!@@">>\
<<CombatLog _m>>\
<<set _TargetMana to _TargetMana * -1>>\
<<ChangeStat $PCmanacur _TargetMana>>\
<<ShowMana>>\
<<else>>\
<<set $Mon.HitBySpells to $Mon.HitBySpells +1>>\
<<set _throwaway to setup.ApplyEffect("soul trap", 1)>>\
<<set _TargetMana to _TargetMana * -1>>\
<<ChangeStat $PCmanacur _TargetMana>>\
<<ShowMana>>\
<<set _m to "You cast @@color:Purple;soul trap@@">>\
<<CombatLog _m>>\
<<endif>>\
<<elseif _attacktype is "run">>\
<<set _endcombat to "skip player">>\
<<set _AllowPartyActions to false>>\
<<set _Webbed to setup.GetEffect("webbed")>>\
<<if setup.GetEffect("rage") > 0>>\
<<set _CombatMessage to "@@color:Red;YOU CANNOT RUN WHILE ENRAGED!@@">>\
<<CombatLog _CombatMessage>>\
<<elseif _Webbed > 0>>\
<<CombatLog "The @@color:Yellow;webbing prevents you from running!@@">>\
<<MonsterTurn false>>
<<elseif ($PC[$CC][$PClocation] is "tower") and ($Dungeon[_pz][_px][_py][11] is 0)>>\
<<set _fleemess to "You try to " + either("run","flee","run away") + " but the " + $Mon.name + either(" is tenacious!"," is determined to continue the fight!"," blocks your escape!")>>\
<<CombatLog _fleemess>>\
<<MonsterTurn false>>
<<else>>\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
<<set _RunChance to 100>>\
<<if $PC[$CC][$PClocation] is "tower">>\
<<set _RunChance to 55 - (_pz * 5)>>\
<<elseif $PC[$CC][$PClocation] is "forest">>\
<<set _RunChance to 105 - ($PC[$CC][$PCfz] * 5)>>\
<<set _MonsterPursuit to 0>>\
<<elseif $PC[$CC][$PClocation] is "desert">>\
<<set _RunChance to 80 - ($PC[$CC][$PCdz] * 5)>>\
<<else>>\
<!-- where are we? -->\
<<endif>>\
\
<<set _RunChance to _RunChance + $PC[$CC][$PCdex]>>\
<<if setup.PlayerHasPerk("Runner") is true>>\
<<set _RunChance to _RunChance + $PC[$CC][$PCdex]>>\
<<endif>>\
\
<<set _RunChance to _RunChance - _Encumbered>>\
\
<<if _CurrentClass is "ninja">>\
<<set _RunChance to _RunChance + 25>>\
<<endif>>\
<<if _BestNinja > 0>>\
<<set _RunChance to _RunChance + (_BestNinja * 2)>>\
<<endif>>\
\
<<set _RunChance to _RunChance * ($PC[$CC][$PChpcur] / $PC[$CC][$PChpmax])>>\
\
<<set _MonsterPursuit to 100 + $Mon.chase + $Mon.teased>>\
<<set _MonsterPursuit to _MonsterPursuit * ($Mon.hpcur / $Mon.hpmax)>>\
<<if $Mon.poisonheal is true>>\
<<set _MonsterPursuit to _MonsterPursuit + ($Mon.poisoned * 10)>>\
<<else>>\
<<set _MonsterPursuit to _MonsterPursuit - ($Mon.poisoned * 10)>>\
<<endif>>\
<<set _MonsterEvenChases to true>>\
<<if random(0,100) > _MonsterPursuit>>\
<<set _MonsterEvenChases to false>>\
<<endif>>\
\
<<set _HornyOverride to 100 * $PC[$CC][$PChornycur] / $PC[$CC][$PChornymax]>>\
<<set _HornyOverride to _HornyOverride + $Mon.teased>>\
\
<<set _FleeRoll to random(0,100)>>\
\
<<if _MonsterEvenChases is false>>\
<<set _endcombat to "yes">>\
<<if _CurrentClass is "ninja">>\
<<set _fleemess to "You @@color:Green;fade into the shadows@@">>\
<<else>>\
<<set _fleemess to "You turn and " + either("run", "flee") + ". The " + $Mon.name + " doesn't give chase.">>\
<<endif>>\
<<CombatLog _fleemess>>\
<<elseif _FleeRoll < _RunChance>>\
<<if random(0, 100) < _HornyOverride>>\
<<if _CurrentClass is "ninja">>\
<<set _fleemess to "You @@color:Green;fade into the shadows@@, but " + _TheMon + " manages to sniff you out">>\
<<else>>\
<<set _fleemess to "You turn and " + either("run", "flee") + ", but " + _TheMon + " manages to sniff you out">>\
<<endif>>\
<<CombatLog _fleemess>>\
<<MonsterTurn false>>
<<else>>\
<<if _CurrentClass is "ninja">>\
<<set _fleemess to "You @@color:Green;fade into the shadows@@">>\
<<else>>\
<<set _fleemess to "You turn and " + either("run", "flee") + ". The " + $Mon.name + " doesn't give chase.">>\
<<endif>>\
<<CombatLog _fleemess>>\
<<set _endcombat to "yes">>\
<<endif>>\
<<else>>\
<<set _fleemess to either("You fail to escape","You can't seem to break away")>>\
<<CombatLog _fleemess>>\
<<endif>>\
<<endif>>\
<<elseif _attacktype is "flirt">>\
<<set _endcombat to "skip player">>\
\
<<if $PC[$CC][$PCsex] is "male">>\
<<set _frand to random(1,4)>>\
<<if _frand is 1>><<set _hitmessage to "You wink suggestively at " + _TheMon>>\
<<elseif _frand is 2>><<set _hitmessage to "You strike a pose and curl your biceps">>\
<<elseif _frand is 3>><<set _hitmessage to "You point between your legs and whistle at " + _TheMon>>\
<<else>><<set _hitmessage to "You flash a winning smile at " + _TheMon>>\
<<endif>>\
<<set _frand to random(1,3)>>\
<<if _frand is 1>>\
<<set _missmessage to _hitmessage + ", but " + $Mon.heshe + " just rolls " + $Mon.hisher + " eyes at you">>\
<<set _hitmessage to _hitmessage + ". " + $Mon.heshe.toUpperFirst() + " is visibly aroused.">>\
<<elseif _frand is 2>>\
<<set _missmessage to _hitmessage + ", but " + $Mon.heshe + " doesn't seem interested.">>\
<<set _hitmessage to _hitmessage + ". " + $Mon.heshe.toUpperFirst() + " is definitely interested.">>\
<<else>>\
<<set _missmessage to _hitmessage + ", but " + $Mon.heshe + " is unimpressed.">>\
<<set _hitmessage to _hitmessage + ". " + $Mon.hisher.toUpperFirst() + " cheeks flush red.">>\
<<endif>>\
<<set _absorbmessage to _missmessage>>\
<<elseif $PC[$CC][$PCsex] is "female">>\
<<set _frand to random(1,4)>>\
<<if _frand is 1>><<set _hitmessage to "You lick your lips at the " + $Mon.name>>\
<<elseif _frand is 2>><<set _hitmessage to "You look away and pretend to accidentally jiggle your boobs">>\
<<elseif _frand is 3>><<set _hitmessage to "You blow a kiss to the " + $Mon.name>>\
<<else>><<set _hitmessage to "You squeeze your legs together and sigh longingly at the " + $Mon.name>>\
<<endif>>\
<<set _frand to random(1,3)>>\
<<if _frand is 1>>\
<<set _missmessage to _hitmessage + ", but " + $Mon.heshe + " just rolls " + $Mon.hisher + " eyes at you">>\
<<set _hitmessage to _hitmessage + ". " + $Mon.heshe.toUpperFirst() + " is visibly aroused.">>\
<<elseif _frand is 2>>\
<<set _missmessage to _hitmessage + ", but " + $Mon.heshe + " doesn't seem interested.">>\
<<set _hitmessage to _hitmessage + ". " + $Mon.heshe.toUpperFirst() + " is definitely interested.">>\
<<else>>\
<<set _missmessage to _hitmessage + ", but " + $Mon.heshe + " is unimpressed.">>\
<<set _hitmessage to _hitmessage + ". " + $Mon.hisher.toUpperFirst() + " cheeks flush red.">>\
<<endif>>\
<<set _absorbmessage to _missmessage>>\
<<else>>\
<<set _frand to random(1,8)>>\
<<if _frand is 1>><<set _hitmessage to "You wink suggestively at " + _TheMon>>\
<<elseif _frand is 2>><<set _hitmessage to "You strike a pose and curl your biceps">>\
<<elseif _frand is 3>><<set _hitmessage to "You point between your legs and whistle at " + _TheMon>>\
<<elseif _frand is 4>><<set _hitmessage to "You give a winning smile to " + _TheMon>>\
<<elseif _frand is 5>><<set _hitmessage to "You lick your lips at " + _TheMon>>\
<<elseif _frand is 6>><<set _hitmessage to "You look away and pretend to accidentally jiggle your boobs">>\
<<elseif _frand is 7>><<set _hitmessage to "You blow a kiss to " + _TheMon>>\
<<else>><<set _hitmessage to "You squeeze your legs together and sigh longingly at " + _TheMon>>\
<<endif>>\
<<set _frand to random(1,3)>>\
<<if _frand is 1>>\
<<set _missmessage to _hitmessage + ", but " + $Mon.heshe + " just rolls " + $Mon.hisher + " eyes at you">>\
<<set _hitmessage to _hitmessage + ". " + $Mon.heshe.toUpperFirst() + " is visibly aroused.">>\
<<elseif _frand is 2>>\
<<set _missmessage to _hitmessage + ", but " + $Mon.heshe + " doesn't seem interested.">>\
<<set _hitmessage to _hitmessage + ". " + $Mon.heshe.toUpperFirst() + " is definitely interested.">>\
<<else>>\
<<set _missmessage to _hitmessage + ", but " + $Mon.heshe + " is unimpressed.">>\
<<set _hitmessage to _hitmessage + ". " + $Mon.hisher.toUpperFirst() + " cheeks flush red.">>\
<<endif>>\
<<endif>>\
\
\
<<set _FlirtCombatData to setup.GetFlirtDataAgainstMon()>>\
<<set _Physiology to _FlirtCombatData[0]>>\
<<set _ProstituteClassBonus to _FlirtCombatData[1]>>\
<<set _EquipBonus to _FlirtCombatData[2]>>\
<<set _MorphToHitBonus to _FlirtCombatData[3]>>\
<<set _MorphDamBonus to _FlirtCombatData[4]>>\
<<set _Praying to _FlirtCombatData[5]>>\
<<set _BestProstitute to _FlirtCombatData[6]>>\
\
<<set _TotalToHit to _Physiology + _EquipBonus + _MorphToHitBonus - _Praying>>\
\
<<if setup.GetEffect("rage") > 0>>\
<<set _CombatMessage to "@@color:Red;" + either("'WANNA DO IT?!?!'","'I'M GONNA HATE FUCK YOU!'","WANNA SMASH?!?") + "@@ you shriek through your anger. It's not very sexy.">>\
<<elseif _TotalToHit + random(1,10) > $Mon.Willpower>>
<<set _TD to random(1, Math.trunc(_Physiology)) + _ProstituteClassBonus + _MorphDamBonus>>\
<<if _TD > 0>>\
<<set $Mon.HitByFlirt to $Mon.HitByFlirt +1>>\
<<set _CombatMessage to _hitmessage>>\
<<set $Mon.teased to $Mon.teased + _TD>>\
<<else>>\
<<set _CombatMessage to _TheMon + " is annoyed by your mixed signals">>\
<<endif>>\
<<else>>\
<<if setup.GetEffect("praying") > 0>>\
<<set _CombatMessage to _TheMon + " is annoyed by your mixed signals">>\
<<else>>\
<<set _CombatMessage to _missmessage>>\
<<endif>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<elseif _attacktype is "fantasize">>\
<<set _endcombat to "skip player">>\
<<if setup.GetEffect("rage") > 0>>\
<<set _CombatMessage to "@@color:Red;You fantasize about " + either("HATE FUCKING ","SMASHING ") + _TheMon + "@@. It fails to turn you on.">>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<set _CombatMessage to "You fantasize about " + _TheMon + " having " + $Mon.hisher + " way with you. @@color:Pink;You are very aroused@@">>\
<<ChangeStat $PChornycur 20>>\
<<ShowHorny>>\
<<CombatLog _CombatMessage>>\
<<endif>>\
<<elseif _attacktype is "INVENTORY">>\
<<CombatLog _ArrayReceived[2]>>\
<<set _endcombat to "skip player">>\
<<elseif _attacktype is "debug kill">>\
<<set _endcombat to "skip player">>\
<<set _AllowPartyActions to false>>\
<<set $Mon.hpcur to 0>>\
<<set _CombatMessage to "You zap " + _TheMon>>\
<<CombatLog _CombatMessage>>\
<<else>>\
<!-- defaults -->\
<<set _MaybeError to "CombatLog defaulted: " + _args[0] + ", " + _args[1] + ", " + _args[2]>>\
<<CombatLog _MaybeError>>\
<<endif>>\
\
<<if _endcombat is "yes">>\
<<replace "#monhealth">><</replace>>\
<<replace "#monflirt">><</replace>>\
<<replace "#combatcontrols">>\
@@color:Gold;Options@@
<span id="KeypOne">\
<<link "1) Continue" $ReturnFromMenu>>
<<ClearTemporaryEffects>>\
<</link>>\
</span>
<</replace>>\
<<elseif _endcombat is "skip player">>\
<<elseif _endcombat is "normal">>\
<<if _th < 1>>\
<<set _m to _missmessage>>\
<<else>>\
<<if _td < 1>>\
<<set _m to _absorbmessage>>\
<<else>>\
<!-- account for resistences? -->\
<<set _m to _hitmessage + " for " + _td + " damage">>\
<<set $Mon.hpcur to $Mon.hpcur - _td>>\
<<endif>>\
<<endif>>\
<<CombatLog _m>>\
<<else>>
<<CombatLog "@@color:Red;Error in combat: do we resolve or no?@@">>\
<<endif>>\
<<if $WORLD.datapasser is "portaled out of combat">>\
<<else>>\
<<if $Mon.poisoned > 0>>\
<<if $Mon.poisonheal is true>>\
<<set $Mon.hpcur to $Mon.hpcur + $Mon.poisoned>>\
<<if $Mon.hpcur gte $Mon.hpmax>>\
<<set $Mon.hpcur to $Mon.hpmax>>\
<<set _m to _TheMon + " is @@color:Yellow;healed to full by the poison!@@">>\
<<CombatLog _m>>\
<<else>>\
<<set _m to _TheMon + " is @@color:Yellow;healed for " + $Mon.poisoned + " by the poison!@@">>\
<<CombatLog _m>>\
<<endif>>\
<<else>>\
<<set $Mon.hpcur to $Mon.hpcur - $Mon.poisoned>>\
<<set _m to _TheMon + " takes " + $Mon.poisoned + " @@color:LawnGreen;damage from poison@@">>\
<<CombatLog _m>>\
<<endif>>\
<<endif>>\
<<if $Mon.bleeding > 0>>\
<<set $Mon.hpcur to $Mon.hpcur - $Mon.bleeding>>\
<<set _m to _TheMon + " @@color:Red;bleeds for " + $Mon.bleeding + " damage@@">>\
<<CombatLog _m>>\
<<endif>>\
<<ShowActiveEffects>>\
<<if _AllowPartyActions is true>>\
<<if $PC[$CC][$PCparty].length > 0>>\
<<for _PartyI to 0; _PartyI < _PartyQTY; _PartyI++>>\
<<if $PC[$CC][$PCparty][_PartyI].stance is "Att">>\
<!-- implement Mon.resists against physical? -->\
<<set (_ToHit to 30 + $PC[$CC][$PCparty][_PartyI].level * 10) - ($Mon.level * 5)>>\
<<if random(0,100) < _ToHit>>\
<<set _ToDam to random(0, $PC[$CC][$PCparty][_PartyI].level)>>\
<<if _ToDam > 0>>\
<<set $Mon.hpcur to $Mon.hpcur - _ToDam>>\
<<set _CombatMess to $PC[$CC][$PCparty][_PartyI].name + " hits " + _TheMon + " for " + _ToDam + " damage">>\
<<else>>\
<<set _CombatMess to $PC[$CC][$PCparty][_PartyI].name + " bounces uselessly off of " + _TheMon>>\
<<endif>>\
<<else>>\
<<set _CombatMess to $PC[$CC][$PCparty][_PartyI].name + either(" glares menacingly at "," flails uselessly at "," cries at ", " blows a raspberry at ") + _TheMon>>\
<<endif>>\
<<CombatLog _CombatMess>>\
<<endif>>\
<</for>>\
<<endif>>\
<<endif>>\
<<run Health2($Mon.hpcur, $Mon.hpmax, "monhpnbar", true)>>\
<<endif>>\
<</widget>>\
\
<<widget "CombatLog">>\
<<set $ComLog[0] to $ComLog[1]>>\
<<set $ComLog[1] to $ComLog[2]>>\
<<set $ComLog[2] to $ComLog[3]>>\
<<set $ComLog[3] to $ComLog[4]>>\
<<set $ComLog[4] to $ComLog[5]>>\
<<set $ComLog[5] to $ComLog[6]>>\
<<set $ComLog[6] to $ComLog[7]>>\
<<set $ComLog[7] to $ComLog[8]>>\
<<set $ComLog[8] to $ComLog[9]>>\
<<set $ComLog[9] to $ComLog[10]>>\
<<set $ComLog[10] to $ComLog[11]>>\
<<set $ComLog[11] to $ComLog[12]>>\
<<set $ComLog[12] to $ComLog[13]>>\
<<set $ComLog[13] to $ComLog[14]>>\
<<set $ComLog[14] to $ComLog[15]>>\
<<set $ComLog[15] to $args[0]>>\
<!-- <<set _floof to setup.advanceLog()>> -->\
<<for _i to 0; _i < 16; _i++>>
<<set _foo to "#combatlog" + _i>>
<<replace _foo>>\
<<print $ComLog[_i]>>\
<</replace>>\
<</for>>\
<</widget>>\
<<widget "MonsterAttack">>\
<<CombatLog "monster attack goes here">>\
<</widget>>\
\
<<widget "MonsterTurn">>\
<<set _TheMon to "The " + $Mon.name + " ">>\
<<if $Mon.unique is true>>\
<<set _TheMon to $Mon.name + " ">>\
<<endif>>\
\
<<if ($Mon.hpcur < 1) or ($Mon.teased > 99)>>\
\
<<set _px to $PC[$CC][$PCx]>>\
<<set _py to $PC[$CC][$PCy]>>\
<<set _pz to $PC[$CC][$PCz]>>\
\
<<set _MonKillPTR to setup.MonNameToKillPTR($Mon.morph)>>\
<<set $PC[$CC][$PCkills][_MonKillPTR] to $PC[$CC][$PCkills][_MonKillPTR] +1>>\
\
<<set _SoulTrapActivated to false>>\
<<set _ST to setup.GetEffect("soul")>>\
<<ClearTemporaryEffects>>\
\
<<replace "#monhealth">><</replace>>\
<<replace "#monflirt">><</replace>>\
<<replace "#combatcontrols">>\
<!-- Soul Trap handler -->\
<<if _ST > 0>>\
<<if ($PC[$CC][$PClocation] is "tower")>>\
<<set _SoulTrapMessage to "@@color:LightGreen;You are victorious@@ but your @@color:Yellow;soul trap fails because you have no gem equipped@@">>\
<<set _GemPTR to -1>>\
<<set _bpqty to $PC[$CC][$PCbp].length>>\
<<for _EquipPTR to 0; _EquipPTR < _bpqty; _EquipPTR++>>\
<<set _bp to $PC[$CC][$PCbp][_EquipPTR]>>\
<<if _bp.equippable is true>>\
<<if (_bp.equip[0] > 549) and (_bp.equip[0] < 560)>>\
<!-- is a gem -->\
<<if (_bp.equip[3] > 0) and (_bp.equip[3] < 21)>>\
<<set _SoulTrapMessage to "@@color:LightGreen;You are victorious@@ but @@color:Yellow;your equipped gem already contains a soul@@">>\
<<else>>\
<<if $Mon.boss > 0>>\
<<set _SoulTrapMessage to "@@color:LightGreen;You are victorious@@ but @@color:Yellow;boss monsters cannot be soul trapped@@">>\
<<elseif $Mon.unique > 0>>\
<<set _SoulTrapMessage to "@@color:LightGreen;You are victorious@@ but @@color:Yellow;unique monsters cannot be soul trapped@@">>\
<<else>>\
<<set _SoulTrapMessage to "@@color:Gold;" + _TheMon + " screams as " + $Mon.hisher + " soul is absorbed into your gemstone!@@">>\
<<set _GemPTR to _EquipPTR>>\
<<set _bp.equip[2] to 0>><!-- no longer stackable -->\
<<set _bp.equip[3] to $Mon.level>>\
<<set _SoulTrapActivated to true>>\
<<set _EquipPTR to 9999>>\
<<endif>>\
<<endif>>\
<<endif>>\
<<endif>>\
<</for>>\
<<if _GemPTR > -1>>\
<<set _bp.equip[3] to $Mon.level>>\
<<endif>>\
<<else>>\
<<set _SoulTrapMessage to "@@color:LightGreen;You are victorious@@ but your @@color:Yellow;soul trap fails because monsters here aren't powerful enough@@">>\
<<endif>>\
<<endif>>\
\
\
<<if ($Mon.teased > 99)>>\
<<if _SoulTrapActivated is true>>\
@@color:Yellow;Soul trap failed!@@ <<print _TheMon>> collapses in sexual frustration!
<<else>>\
@@color:LightGreen;<<print _TheMon>> collapses in sexual frustration!@@
<<set $PC[$CC][$PCmisc].flirtvictory to $PC[$CC][$PCmisc].flirtvictory +1>>\
<<if ($PC[$CC][$PCmisc].flirtvictory > 4)>>\
<<AwardAchievement "Prostitute">>\
<<endif>>\
<<endif>>\
<<else>>\
<<if _SoulTrapActivated>>\
@@color:LightGreen;<<print _SoulTrapMessage>>@@
<<else>>\
<<if _ST > 0>>\
<<print _SoulTrapMessage>>
<<else>>\
@@color:LightGreen;You are victorious!@@
<<endif>>\
<<endif>>\
<<endif>>\
\
<!-- check for class unlocks -->\
<<if ($PC[$CC][$PClocation] is "tower") and ($Mon.HitBySpells is 0) and ($Mon.HitByFlirt is 0) and ($DebugMode neq true)>>\
<<set _GetMonk to true>>\
<<set _GetBarbarian to true>>\
<<set _bpqty to $PC[$CC][$PCbp].length>>\
<<for _i to 0; _i < _bpqty; _i++>>\
<<set _bp to $PC[$CC][$PCbp][_i]>>\
<<if _bp.equippable is true>>\
<<if _bp.type is $BPwield>>\
<<if $PC[$CC][$PCbp][_i].equip[0] > 0>>\
<<set _GetMonk to false>>\
<<endif>>\
<<else>>\
<<if $PC[$CC][$PCbp][_i].equip[0] > 0>>\
<<set _GetBarbarian to false>>\
<<endif>>\
<<endif>>\
<<endif>>\
<</for>>\
<<if _GetMonk is true>>\
<<AwardAchievement "Monk">>\
<<endif>>\
<<if _GetBarbarian is true>>\
<<AwardAchievement "Barbarian">>\
<<endif>>\
<<if $Mon.CombatRound is 1>>\
<<AwardAchievement "Ninja">>\
<<endif>>\
<<endif>>\
\
<<set $PC[$CC][$PCmisc].battleswon to $PC[$CC][$PCmisc].battleswon +1>>\
\
<<set $LogKills to $LogKills +1>>\
<<if $Mon.xp > 0>>\
<<set _BaseXPGained to $Mon.xp>>\
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "scholar">>\
<<set _PlayerXPGained to _BaseXPGained + $PC[$CC][$PClevel]>>\
<<AwardXP _PlayerXPGained "combat">>
<<for _PXP to 0; _PXP < $PC[$CC][$PCparty].length; _PXP++>>\
<<if $PC[$CC][$PCparty][_PXP].stance neq "Down">>\
<<AwardPartyXP _PXP _BaseXPGained>>\
<<endif>>\
<</for>>\
<<else>>\
<<set _LivePartyMembers to []>>\
<<set _PartyQTY to 0>>\
<<for _Loop to 0; _Loop < $PC[$CC][$PCparty].length; _Loop++>>\
<<if $PC[$CC][$PCparty][_Loop].stance neq "Down">>\
<<set _LivePartyMembers[_LivePartyMembers.length] to [_Loop, 0]>>\
<<set _PartyQTY to _PartyQTY +1>>\
<<endif>>\
<</for>>\
<<if _PartyQTY > 0>>\
<<set _PlayerShare to Math.trunc(_BaseXPGained / 2)>>\
<<set _PartyShare to _BaseXPGained / 2>>\
<<if _PlayerShare neq _PartyShare>>\
<<set _PlayerShare to _PlayerShare +1>>\
<<set _PartyShare to Math.trunc(_PartyShare)>>\
<<endif>>\
<<for _Loop to 0; _Loop < _PartyShare; _Loop++>>\
<<set _WhoGetsIt to random(0, _LivePartyMembers.length -1)>>\
<<set _LivePartyMembers[_WhoGetsIt][1] to _LivePartyMembers[_WhoGetsIt][1] +1>>\
<</for>>\
<<AwardXP _PlayerShare "combat">>
<<for _Loop to 0; _Loop < _LivePartyMembers.length; _Loop++>>\
<<if _LivePartyMembers[_Loop][1] > 0>>\
<<AwardPartyXP _LivePartyMembers[_Loop][0] _LivePartyMembers[_Loop][1]>>\
<<endif>>\
<</for>>\
<<else>>\
<<AwardXP _BaseXPGained "combat">>
<<endif>>\
<<endif>>\
<<endif>>\
<<if $Mon.gold > 0>>\
<<set _GreedyBonusNum to 0>>\
<<set _GreedyBonusText to "">>\
<<set _RogueBonusText to "">>\
<<set _TotalGold to $Mon.gold>>\
<<set _BestRogue to setup.AchievementHandler("Best Rogue", "HAS?", -1)>>\
<<if _BestRogue > 0>>\
<<set _TotalGold to _TotalGold + _BestRogue>>\
<<set _RogueBonusText to "@@color:MediumSlateBlue;(+" + _BestRogue + ")@@">>\
<<endif>>\
<<if setup.PlayerHasPerk("Greedy") is true>>\
<<set _GreedyBonusNum to Math.trunc(_TotalGold / 10)>>\
<<set _TotalGold to _TotalGold + _GreedyBonusNum>>\
<<set _GreedyBonusText to "@@color:Peru;(+" + _GreedyBonusNum + ")@@">>\
<<endif>>\
You find <<print $Mon.gold>><<print _RogueBonusText>><<print _GreedyBonusText>> coins on the $Mon.name
<<set $PC[$CC][$PCmisc].gold to $PC[$CC][$PCmisc].gold + _TotalGold>>\
<<GainGold _TotalGold>>\
<<endif>>\
\
<<if (setup.PtrToClass($PC[$CC][$PCclass]) is "mage") and ($PC[$CC][$PClevel] > 6)>>\
<<set $PC[$CC][$PCmanacur] to $PC[$CC][$PCmanacur] + $Mon.level>>\
<<if $PC[$CC][$PCmanacur] > $PC[$CC][$PCmanamax]>>\
<<set $PC[$CC][$PCmanacur] to $PC[$CC][$PCmanamax]>>\
@@color:Aqua;Your mana is restored to full@@
<<else>>\
You siphon @@color:Aqua;<<print $Mon.level>> mana@@ from your opponent
<<endif>>\
<<endif>>\
\
<<set _AllowRape to true>>\
<<set _AllowDrop to true>>\
<<set _AllowButcher to true>>\
<<set _AllowBottle to true>>\
<<set _AllowBlood to true>>\
<<set _AllowSoulTrapDust to false>>\
<<if $WORLD.CombatInterrupt is "smith quest omnibus">>\
<<set $WORLD.CombatInterrupt to "defeated smith omnibus">>\
<<set _AllowRape to false>>\
<<set _AllowDrop to false>>\
<<set _AllowButcher to false>>\
<<set _AllowBottle to false>>\
<<elseif $WORLD.CombatInterrupt is "Zehtalia">>\
<<set $WORLD.CombatInterrupt to "defeated Zehtalia">>\
<<set _AllowRape to false>>\
<<set _AllowButcher to false>>\
<<set _AllowBottle to false>>\
<<set _AllowBlood to false>>\
<<elseif $WORLD.CombatInterrupt is "Neris">>\
<<set $WORLD.CombatInterrupt to "defeated Neris">>\
<<set _AllowRape to false>>\
<<set _AllowButcher to false>>\
<<set _AllowBottle to false>>\
<<set _AllowBlood to false>>\
<<elseif $WORLD.CombatInterrupt is "cave">>\
<<set $WORLD.CombatInterrupt to "defeated cave">>\
<<else>>\
<<set $WORLD.CombatInterrupt to "">>\
<<endif>>\
<<if _SoulTrapActivated is true>>\
<<set _AllowRape to false>>\
<<set _AllowButcher to false>>\
<<set _AllowBottle to false>>\
<!-- leave allowblood as is -->\
<<set _AllowSoulTrapDust to true>>\
<<endif>>\
\
<<if _AllowDrop is true>>\
<<if _pz > 0>>\
<<set _LootChance to random(1,5)>>\
<<if $Dungeon[_pz][_px][_py][11] neq 0>>\
<<set _LootChance to 1>>\
<<endif>>\
<<set _Loot to $Mon.loot>>\
<<if (_Loot[0] is 0) and (_LootChance is 1)>>\
<<set _Loot to setup.GenLoot($Mon.name, $Mon.sex, _pz, $PC[$CC][$PClocation])>>\
<<endif>>\
<<if _Loot[0] is 0>>\
<<else>>\
<<DescribeItem _Loot>>\
<<set _name to $ItemPoke.fullname>>\
<<if _name is "none">>\
<<if $DebugMode is true>>\
@@color:Yellow;Debug: Fixed-placement tower $Mon.name generated no item: (_Loot)@@
<<endif>>\
<<else>>\
You find a <<print _name>> and take it with you.
<<set _throwaway to setup.GiveItem($CC, _Loot)>>\
<<endif>>\
<<endif>>\
<<endif>>\
<hr>\
<<endif>>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) Continue" $ReturnFromMenu>>
<</link>>
</span>\
<<if _AllowRape is true>>\
<<include "Victory">>\
<<endif>>\
<<if _AllowButcher is true>>\
<<if setup.HasButcherTool() > -1>>\
<hr>\
<<set _foo to "s) Slaughter/butcher the " + $Mon.name + " for meat">>\
<span id="KeypSouth">\
<<link _foo $ReturnFromMenu>>
<<set _foo to setup.GiveItem($CC, [102, 0, 1, $Mon.MeatSemenMilk[0], 0])>>
<</link>>
</span>\
<<else>>\
<br>\
<<endif>>\
<<endif>>\
<<if _AllowBottle is true>>\
<<set _BottleSlot to setup.HasBottle()>>\
<<if _BottleSlot > -1>>\
<<if (setup.getnextinvslot($CC) > -1) or ($PC[$CC][$PCinven][_BottleSlot][2] is 1)>>\
<!-- implement case for no room, but already have stackable type -->\
<<set _Fluids to []>>\
<<if $Mon.MeatSemenMilk[1] > -1>>\
<<set _Fluids[_Fluids.length] to $Mon.MeatSemenMilk[1]>>\
<<endif>>\
<<if $Mon.MeatSemenMilk[2] > -1>>\
<<set _Fluids[_Fluids.length] to $Mon.MeatSemenMilk[2]>>\
<<endif>>\
<<if _Fluids.length > 0>>\
<span id="KeypF">\
<<link "f) Collect fluids" $ReturnFromMenu>>
<<set _foo to setup.RemoveOneItemFromInv($CC, _BottleSlot)>>
<<set _PickOne to random(0, (_Fluids.length -1))>>
<<set _Fluid to _Fluids[_PickOne]>>
<<set _foo to setup.GiveItem($CC, [109, 0, 1, _Fluid, 0])>>
<</link>>
</span>\
<<else>>\
f) This monster has no harvestable fluids.
<<endif>>\
<<else>>\
No room in inventory for additional fluids
<<endif>>\
<<endif>>\
<<endif>>\
<</replace>>\
<!-- TOWER ONLY: remove monster and place blood or sexual fluids -->\
<<if _AllowBlood is true>>\
<<if _pz > 0>>\
<<if ($Dungeon[_pz][_px][_py][11] is 0) or $Dungeon[_pz][_px][_py][11] is "Monster">>\
<<if _AllowSoultrapDust is true>>\
<<elseif ($Mon.teased > 99)>>\
<<if $Dungeon[_pz][_px][_py][8] is 106>>\
<<elseif $Dungeon[_pz][_px][_py][8] is 100>>\
<<set $Dungeon[_pz][_px][_py][8] to 106>>\
<<else>>\
<<set $Dungeon[_pz][_px][_py][8] to 104>>\
<<endif>>\
<<else>>\
<<if $Dungeon[_pz][_px][_py][8] is 106>>\
<<elseif $Dungeon[_pz][_px][_py][8] is 104>>\
<<set $Dungeon[_pz][_px][_py][8] to 106>>\
<<else>>\
<<set $Dungeon[_pz][_px][_py][8] to 100>>\
<<endif>>\
<<endif>>\
<<set $Dungeon[_pz][_px][_py][11] to 0>>\
<<set $Dungeon[_pz][_px][_py][12] to 0>>\
<<endif>>\
<<endif>>\
<<endif>>\
<<else>>\
<!-- REMOVE SUBSEQUENT STUN IMMUNITY -->\
<<if $Mon.stunned is -1>>\
<<set $Mon.stunned to 0>>\
<<endif>>\
<!-- APPLY REGENERATION -->\
<<if ($Mon.regen > 0) and $Mon.hpcur < $Mon.hpmax>>\
<<set $Mon.hpcur to $Mon.hpcur + $Mon.regen>>\
<<if $Mon.hpcur gte $Mon.hpmax>>\
<<set $Mon.hpcur to $Mon.hpmax>>\
<<set _RegenMessage to _TheMon + " @@color:Yellow;regenerates to full@@">>\
<<CombatLog _RegenMessage>>\
<<else>>\
<<set _RegenMessage to _TheMon + " @@color:Yellow;regenerates@@">>\
<<CombatLog _RegenMessage>>\
<<endif>>\
<<endif>>\
<!-- PROCESS POISON -->>\
<<set _PlayerPoisoned to setup.GetEffect("poison")>>\
<<if _PlayerPoisoned > 0>>\
<<set _PoisonMessage to "You take @@color:Green;" + _PlayerPoisoned + " damage from poison!@@">>\
<<CombatLog _PoisonMessage>>\
<<set _PlayerPoisoned to (_PlayerPoisoned * -1)>>\
<<ChangeStat $PChpcur _PlayerPoisoned>>\
<<endif>>\
<!-- PROCESS PLAGUE CURSE -->>\
<<set _PlagueCurse to setup.GetEffect("plague curse")>>\
<<if _PlagueCurse > 0>>\
<<set _CurseMessage to "You take @@color:Purple;" + _PlagueCurse + " damage from the plague curse!@@">>\
<<CombatLog _CurseMessage>>\
<<set _PlagueCurse to (_PlagueCurse * -1)>>\
<<ChangeStat $PChpcur _PlagueCurse>>\
<<endif>>\
<!-- CHOOSE AN ATTACK TYPE -->\
<<if $Mon.att.length > 0>>\
<<else>>\
<<AddToLog "Error in MonsterTurn: no valid attacks in array">>\
<<endif>>\
<<set _WhichAttack to random(0, $Mon.att.length -1)>>\
<<if (_MonAttackType is "heal") and ($Mon.hpcur gte $Mon.hpmax)>>\
<<set _WhichAttack to 0>>\
<<endif>>\
<<if ($Mon.teased > random(1,100)) and (_MonAttackType is "flirt")>>\
<<set _WhichAttack to 0>>\
<<set _changeattack to _TheMon + " seems agitated">>\
<<CombatLog _changeattack>>\
<<endif>>\
<<set _MonAttackType to $Mon.att[_WhichAttack][0]>>\
<!-- ************************************************************* -->\
\
<!-- CALC PLAYER NET ARMOR FOR PHYSICAL ATTACKS ONLY -->\
<<set _PlayerTotalAC to 0>>\
<<for _AcCycle to 0; _AcCycle < $PC[$CC][$PCac].length; _AcCycle++>>\
<<set _PlayerTotalAC to _PlayerTotalAC + $PC[$CC][$PCac][_AcCycle]>>\
<</for>>\
<<set _Webbed to setup.GetEffect("webbed")>>\
<<if _Webbed > 0>>\
<<set _PlayerTotalAC to _PlayerTotalAC - _Webbed>>\
<<endif>>\
<<set _Encumbered to setup.EncumberedPenalty()>>\
<<if _Encumbered < 0>>\
<<set _PlayerTotalAC to _PlayerTotalAC + _Encumbered>>\
<<endif>>\
<!-- ************************************************************* -->\
\
<!-- CALC PLAYER ABSORPTION AFTER ARMOR PENETRATION -->
<<set _NetAbsorb to $PC[$CC][$PCabsorb] - $Mon.arpen>>\
<<if _NetAbsorb < 0>>\
<<set _NetAbsorb to 0>>\
<<endif>>\
<!-- ************************************************************* -->\
\
<!-- PREP PARTY -->
<<set _PartyMemberToAttack to 999>>\
<<set _PartyQTY to $PC[$CC][$PCparty].length>>\
<<if _PartyQTY > 0>>\
<<set _PartyTargetList to []>>\
<<for _PartyI to 0; _PartyI < _PartyQTY; _PartyI++>>\
<<set _Stance to $PC[$CC][$PCparty][_PartyI].stance>>\
<<if _Stance is "Att">>\
<<set _PartyTargetList[_PartyI] to 10>>\
<<elseif _Stance is "Prot">>\
<<set _PartyTargetList[_PartyI] to 50>>\
<<elseif _Stance is "Hide">>\
<<set _PartyTargetList[_PartyI] to 1>>\
<<else>>\
<<set _PartyTargetList[_PartyI] to 0>>\
<<endif>>\
<</for>>\
<!-- PC -->\
<<set _PartyTargetList[_PartyTargetList.length] to 50>>\
<<set _PickTarget to setup.WeightedRandom(_PartyTargetList)>>\
<<set _PartyMemberToAttack to _PickTarget>>\
<<endif>>\
<!-- ************************************************************* -->\
\
<!-- character class uniques -->\
<<set _CurrentClass to setup.PtrToClass($PC[$CC][$PCclass])>>\
<<set _PowerMoveEvasion to false>>\
<<if _CurrentClass is "rogue">>\
<<if $PC[$CC][$PClevel] * 8 > random(1,100)>>\
<<set _PowerMoveEvasion to true>>\
<<endif>>\
<<endif>>\
<<set _MonkDodge to false>>\
<<if (_CurrentClass is "monk") and ($PC[$CC][$PClevel] > 6)>>\
<<if $PC[$CC][$PClevel] gte random(1,100)>>\
<<set _MonkDodge to true>>\
<<endif>>\
<<endif>>\
\
<!-- AI -->\
<<if $Mon.AI is "Zehtalia">>\
<<if (_MonAttackType is "POISON") and ($PC[$CC][$PCcon] > 14)>>\
<<if random(1,2) is 1>>\
<<set _WhichAttack to 0>>\
<<set _MonAttackType to "physical">>\
<<endif>>\
<<elseif (_MonAttackType is "WEB") and ($PC[$CC][$PCdex] > 14)>>\
<<if random(1,2) is 1>>\
<<set _WhichAttack to 0>>\
<<set _MonAttackType to "physical">>\
<<endif>>\
<<endif>>\
<<if $Mon.Powerup > 0>>\
<<set _MonAttackType to "ZEHTALIA">>\
<<elseif setup.GetEffect("poisoned") is 0 and ($PC[$CC][$PClevel] + $PC[$CC][$PCcon] < 21)>>\
<<set _WhichAttack to 2>>\
<<set _MonAttackType to "POISON">>\
<<elseif random(1,3) is 1>>\
<<set _MonAttackType to "ZEHTALIA">>\
<<endif>>\
<<elseif $Mon.AI is "Neris">>\
<<set _MonAttackType to "NERIS">>\
<<elseif $Mon.AI is "horse">>\
<<if $Mon.Powerup > 0>>\
<<set _MonAttackType to "HORSE">>\
<<elseif random(1,3) is 1>>\
<<set _MonAttackType to "HORSE">>\
<<endif>>\
<<elseif $Mon.AI is "scorpion">>\
<<if $Mon.Powerup > 0>>\
<<set _MonAttackType to "SCORPION">>\
<<elseif random(1,3) is 1>>\
<<set _MonAttackType to "SCORPION">>\
<<endif>>\
<<endif>>\
\
<!-- PERFORM MONSTER ATTACK -->\
<<if $Mon.stunned > 0>>\
<<set $Mon.stunned to -1>>\
<<set _CombatMessage to "@@color:Aqua;" + _TheMon + either("is too dazed to attack","is reeling"," takes a moment to catch " + $Mon.hisher + " breath")>>\
<<CombatLog _CombatMessage>>\
<<elseif $Mon.teased > random(1,100) + $Mon.Willpower>>\
<<set _CombatMessage to "@@color:Aqua;" + _TheMon + " is too flustered to attack you@@">>\
<<CombatLog _CombatMessage>>\
<<elseif _MonAttackType is "physical">>\
<<set _ToHit to random(1, 100) + $Mon.att[_WhichAttack][3] - _PlayerTotalAC>>\
<<if _PartyMemberToAttack < _PartyQTY>>\
<!-- party takes attack -->\
<<set _Damage to random($Mon.att[_WhichAttack][1], $Mon.att[_WhichAttack][2])>>\
<<set $PC[$CC][$PCparty][_PartyMemberToAttack].hpcur to $PC[$CC][$PCparty][_PartyMemberToAttack].hpcur - _Damage>>\
<<if $PC[$CC][$PCparty][_PartyMemberToAttack].hpcur < 1>>\
<<set $PC[$CC][$PCparty][_PartyMemberToAttack].hpcur to 0>>\
<<set $PC[$CC][$PCparty][_PartyMemberToAttack].stance to "Down">>\
<<set _CombatMessage to _TheMon + "hits " + $PC[$CC][$PCparty][_PartyMemberToAttack].name + " for " + _Damage + " damage. @@color:Red;" + $PC[$CC][$PCparty][_PartyMemberToAttack].name + " collapses!@@">>\
<<else>>\
<<set _CombatMessage to _TheMon + " hits " + $PC[$CC][$PCparty][_PartyMemberToAttack].name + " for " + _Damage + " damage">>\
<<endif>>\
<<ShowParty>>\
<<elseif _ToHit > 0>>\
<<if _MonkDodge is true>>\
<<set _CombatMessage to _TheMon + " but you @@color:Aqua;monk-dodge the attack!@@">>\
<<else>>\
<<set _Damage to random($Mon.att[_WhichAttack][1], $Mon.att[_WhichAttack][2])>>\
<<if _Damage > 0>>\
<<if _NetAbsorb > 0>>\
<<if _NetAbsorb > _Damage>><<set _NetAbsorb to _Damage>><<endif>>\\
<<set _CombatMessage to _TheMon + $Mon.att[_WhichAttack][4] + " for @@color:Red;" + _Damage + "@@@@color:MediumSlateBlue;(-" + _NetAbsorb +")@@ @@color:Red;damage@@">>\
<<set _Damage to _Damage - _NetAbsorb>>\
<<else>>\
<<set _CombatMessage to _TheMon + $Mon.att[_WhichAttack][4] + " for @@color:Red;" + _Damage + " damage@@">>\
<<endif>>\
\
<<set _sMod to "">>\
<<if $PC[$CC][$PCmorphBONI].lessdamage > 0>>\
<<set _SlimeMod to $PC[$CC][$PCmorphBONI].lessdamage * 2>>\
<<set _SlimeMod to Math.trunc((_Damage * _SlimeMod) /100)>>
<<if _SlimeMod > 0>>\
<<set _sMod to "@@color:Aqua;(-" + _SlimeMod + ")@@">>\
<<set _CombatMessage to _TheMon + $Mon.att[_WhichAttack][4] + " for @@color:Red;" + _Damage + "@@" + _sMod + " damage">>\
<<set _Damage to _Damage - _SlimeMod>>\
<<endif>>\
<<endif>>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][6]>>\
<<endif>>\
<<endif>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][5]>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<RiposteCheck>>\
<<elseif _MonAttackType is "magic">>\
<<set _ToHit to random(1, 100) + $Mon.att[_WhichAttack][3] - $PC[$CC][$PCwil]>>\
<<if _ToHit > 0>>\
<<set _Damage to random($Mon.att[_WhichAttack][1], $Mon.att[_WhichAttack][2])>>\
<<set _ResMag to setup.GetEffect("resist magic")>>\
<<if _ResMag > 0>>\
<<if _Damage > _ResMag>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][4] + " for @@color:Red;" + _Damage + "@@ @@color:LightGreen;(- " + _ResMag + ")@@ damage">>\
<<set _Damage to _Damage - _ResMag>>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][4] + ", but you @@color:Aqua;fully resist@@ the spell!">>\
<<endif>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][4] + " for @@color:Red;" + _Damage + " damage@@">>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<endif>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][5]>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<elseif _MonAttackType is "fire breath">>\
<<set _Damage to random($Mon.att[_WhichAttack][1], $Mon.att[_WhichAttack][2])>>\
<<set _ResFire to setup.GetEffect("resist fire") + $PC[$CC][$PCmorphBONI].fireresist>>\
<<if _ResFire > 0>>\
<<if _Damage > _ResFire>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][4] + " for @@color:Red;" + _Damage + "@@ @@color:LightGreen;(- " + _ResFire + ")@@ damage">>\
<<set _Damage to _Damage - _ResFire>>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][4] + ", but you @@color:Aqua;fully resist@@ the effect!">>\
<<endif>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][4] + " for @@color:Red;" + _Damage + " damage@@">>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<elseif _MonAttackType is "flirt">>\
<!-- to hit here should be increased by player sexy clothing -->\
<<set _r to random(1,10)>>\
<<set _ToHit to _r + $Mon.att[_WhichAttack][3] + Math.trunc($Mon.teased /10) + $Mon.level - $PC[$CC][$PClevel] - $PC[$CC][$PCwil]>>\
<<set _Praying to setup.GetEffect("praying")>>\
<<if _Praying > 0>>\
<<set _ToHit to _ToHit - _Praying>>\
<<endif>>\
<<if setup.PtrToClass($PC[$CC][$PCclass]) is "prostitute">>\
<<set _ToHit to _ToHit + 5>>\
<<endif>>\
<<set _BestProstitute to setup.AchievementHandler("Best Prostitute", "HAS?", -1)>>\
<<if _BestProstitute > 0>>\
<<set _ToHit to _ToHit - _BestProstitute>>\
<<endif>>\
<<if ($PC[$CC][$PCsexACTS].femalevirgin[1] is true) and ($PC[$CC][$PCsexACTS].malevirgin[1] is true)>>\
<<set _ToHit to _ToHit - 2>>\
<<endif>>\
<<if $PC[$CC][$PCsexACTS].malevirgin[0] is $Mon.morph>>\
<<set _ToHit to _ToHit + 2>>\
<<endif>>\
<<if $PC[$CC][$PCsexACTS].femalevirgin[0] is $Mon.morph>>\
<<set _ToHit to _ToHit + 2>>\
<<endif>>\
<<if _ToHit > 0>>\
<<set _MinDam to $Mon.att[_WhichAttack][1] - $PC[$CC][$PCwil]>>\
<<set _MaxDam to $Mon.att[_WhichAttack][2] - $PC[$CC][$PCwil]>>\
<<if _MinDam < 1>>\
<<set _MinDam to 1>>\
<<endif>>\
<<if _MaxDam < 1>>\
<<set _MaxDam to 1>>\
<<endif>>\
<<set _Damage to random(_MinDam, _MaxDam)>>\
<<if _Praying > 0>>\
<<set _Damage to _Damage - _Praying>>\
<<endif>>\
<<if _Damage < 1>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][6]>>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][4] + ", @@color:Pink;+" + _Damage + " arousal@@">>\
<<ChangeStat $PChornycur _Damage>>\
<<CombatLog _CombatMessage>>\
<<endif>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][5]>>\
<<CombatLog _CombatMessage>>\
<<endif>>\
<<elseif _MonAttackType is "ZEHTALIA">>\
<<if $Dungeon[_pz][_px][_py][12] is "hard mode Zehtalia">>\
<<set _Zshout to "Zehtalia screams, @@color:Yellow;" + either("DIE, HERETIC!","YOUR LIES WILL BE SILENCED!") + "@@">>\
<<set _Zmulti to 3>>\
<<set _ZmissRNG to 1>>\
<<else>>\
<<set _Zshout to "Zehtalia screams, @@color:Yellow;" + either("ANNIHILATION COMES!","DOOM UPON YOU!","TASTE MY WRATH, PUNY MORTAL!","I AM THE GOD OF HELLFIRE!") + "@@">>\
<<set _Zmulti to 2>>\
<<set _ZmissRNG to 2>>\
<<endif>>\
<<if $Mon.Powerup is 0>>\
<<CombatLog _Zshout>>\
<<set $Mon.Powerup to 1>>\
<<else>>\
<<set $Mon.Powerup to 0>>\
<<if _PowerMoveEvasion is true>>\
<<set _CombatMessage to "Zehtalia @@color:Red;reaches for you@@ but you @@color:Aqua;rogue-dodge the move!@@">>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<set _Damage to +_Zmulti * random($Mon.att[0][1], $Mon.att[0][2])>>\
<<set _CombatMessage to "Zehtalia @@color:Red;slams you into the floor for " + _Damage + " damage!@@">>\
<<CombatLog _CombatMessage>>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<if random(1, _ZmissRNG) is 1>>\
<<set _Damage to 2 * random($Mon.att[0][1], $Mon.att[0][2])>>\
<<set _CombatMessage to "You are too stunned to avoid her @@color:Red;followup blow for " + _Damage + " more!@@">>\
<<CombatLog _CombatMessage>>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<if _Zmulti is 1>>\
<<set _throwaway to setup.ApplyEffect("poisoned", 1)>>\
<<set _throwaway to setup.ApplyEffect("webbed", 1)>>\
<<set _CombatMessage to _TheMon + " @@color:Yellow;poisons and webs you@@ while you're down!">>\
<<endif>>\
<<endif>>\
<<endif>>\
<<endif>>\
<<elseif _MonAttackType is "NERIS">>\
<<set _NerisPick to random(1,7)>>\
<<if _NerisPick is 1>>\
<<set _NerisSpeech to "Neris begs, 'please kill me.'">>\
<<elseif _NerisPick is 2>>\
<<set _NerisSpeech to "Neris merely watches.">>\
<<elseif _NerisPick is 3>>\
<<set _NerisSpeech to "Neris has resigned herself to her fate.">>\
<<elseif _NerisPick is 4>>\
<<set _NerisSpeech to "'There isn't much time,' Neris urges. 'Please hurry.'">>\
<<elseif _NerisPick is 5>>\
<<set _NerisSpeech to "Neris watches sadly as the black smoke emitting from your body grows.">>\
<<elseif _NerisPick is 6>>\
<<set _NerisSpeech to "'It's too late for me,' Neris reassures you. 'Do what you must.'">>\
<<else>>\
<<set _NerisSpeech to "Neris gazes at you with hope in her eyes.">>\
<<endif>>\
<<CombatLog _NerisSpeech>>\
<<set _throwaway to setup.ApplyEffect("plague curse", 1)>>\
<<elseif _MonAttackType is "HORSE">>\
<<if $Mon.Powerup is 0>>\
<<set _CombatMessage to "The horse @@color:Yellow;winds up for a powerful kick@@">>\
<<CombatLog _CombatMessage>>\
<<set $Mon.Powerup to 1>>\
<<else>>\
<<set $Mon.Powerup to 0>>\
<<if _PowerMoveEvasion is true>>\
<<set _CombatMessage to "The horse @@color:Red;kicks at you@@ but you @@color:Aqua;rogue-dodge the move!@@">>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<set _Damage to 2 * random($Mon.att[0][1], $Mon.att[0][2])>>\
<<set _CombatMessage to "The horse @@color:Red;smacks you with a powerful kick for _Damage damage!@@">>\
<<CombatLog _CombatMessage>>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<endif>>\
<<endif>>\
<<elseif _MonAttackType is "SCORPION">>\
<<if $Mon.Powerup is 0>>\
<<set _CombatMessage to "The scorpion @@color:Yellow;primes its tail for a powerful strike@@">>\
<<CombatLog _CombatMessage>>\
<<set $Mon.Powerup to 1>>\
<<else>>\
<<set $Mon.Powerup to 0>>\
<<if _PowerMoveEvasion is true>>\
<<set _CombatMessage to "The scorpion @@color:Red;launches its stinger at you@@ but you @@color:Aqua;rogue-dodge the move!@@">>\
<<CombatLog _CombatMessage>>\
<<else>>\
<<set _Damage to 2 * random($Mon.att[0][1], $Mon.att[0][2])>>\
<<set _CombatMessage to "The scorpion @@color:Red;impales you with its tail for _Damage damage@@ plus @@color:Green;poison!@@">>\
<<CombatLog _CombatMessage>>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<set _throwaway to setup.ApplyEffect("poisoned", 1)>>\
<<endif>>\
<<endif>>\
<<elseif _MonAttackType is "WEB">>\
<<set _ToHit to random(1, 20) + $Mon.level + $Mon.att[_WhichAttack][3] - $PC[$CC][$PClevel] - $PC[$CC][$PCdex]>>\
<<if _ToHit > 0>>\
<<set _Damage to random($Mon.att[_WhichAttack][1], $Mon.att[_WhichAttack][2])>>\
<!-- no absorption for web -->\
<<set _throwaway to setup.ApplyEffect("webbed", _Damage)>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][4]>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][5]>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<elseif _MonAttackType is "POISON">>\
<<set _ToHit to random(1, 20) + $Mon.level + $Mon.att[_WhichAttack][3] - $PC[$CC][$PClevel] - $PC[$CC][$PCcon]>>\
<<if _ToHit > 0>>\
<<set _Damage to random($Mon.att[_WhichAttack][1], $Mon.att[_WhichAttack][2])>>\
<!-- no absorption for poison -->\
<<set _throwaway to setup.ApplyEffect("poisoned", _Damage)>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][4]>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][5]>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<elseif _MonAttackType is "flurry">>\
<<for _flurry to 0; _flurry < $Mon.flurryQTY; _flurry++>>\
<<set _ToHit to random(1, 100) + $Mon.att[_WhichAttack][3] - _PlayerTotalAC>>\
<<if _ToHit > 0>>\
<<set _Damage to random($Mon.att[_WhichAttack][1], $Mon.att[_WhichAttack][2])>>\
<<if _Damage > 0>>\
<<if _NetAbsorb > _Damage>><<set _NetAbsorb to _Damage>><<endif>>\\
<<if _NetAbsorb > 0>>\
<<set _CombatMessage to _TheMon + $Mon.att[_WhichAttack][4] + " for @@color:Red;" + _Damage + "@@@@color:MediumSlateBlue;(-" + _NetAbsorb +")@@ @@color:Red;damage@@">>\
<<set _Damage to _Damage - _NetAbsorb>>\
<<else>>\
<<set _CombatMessage to _TheMon + $Mon.att[_WhichAttack][4] + " for @@color:Red;" + _Damage + " damage@@">>\
<<endif>>\
<<set _Damage to (_Damage * -1)>>\
<<ChangeStat $PChpcur _Damage>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][6]>>\
<<endif>>\
<<else>>\
<<set _CombatMessage to _TheMon + " " + $Mon.att[_WhichAttack][5]>>\
<<endif>>\
<<CombatLog _CombatMessage>>\
<<RiposteCheck>>\
<</for>>\
<<elseif _MonAttackType is "REMOVEARMOR">>\
<<CombatLog "@@color:Yellow;Debug: implement armor debuff@@">>\
<<elseif _MonAttackType is "debuffTH">>\
<<CombatLog "@@color:Yellow;Debug: to-hit debuff@@">>\
<<elseif _MonAttackType is "fertility">>\
<<CombatLog "@@color:Yellow;Debug: implement fertility attacks@@">>\
<<elseif _MonAttackType is "heal">>\
<<set _Heal to random($Mon.att[_WhichAttack][1], $Mon.att[_WhichAttack][2])>>\
<<set $Mon.hpcur to $Mon.hpcur + _Heal>>\
<<if $Mon.hpcur > $Mon.hpmax>>\
<<set $Mon.hpcur to $Mon.hpmax>>\
<<set _CombatMessage to _TheMon + " " + "@@color:Yellow;" + $Mon.att[_WhichAttack][4] + " to full health!@@">>\
<<else>>\
<<set _foo to _TheMon + " " + "@@color:Yellow;" + $Mon.att[_WhichAttack][4] + " for " + _Heal + " health@@">>\
<<endif>>\
<<else>>\
<<AddToLog "Error in combat widget: unrecognized attack type">>\
<<endif>>\
\
<<ShowHealth>>\
<<ShowHorny>>\
\
<<set _GoldLossMessage to "">>\
<<set _GoldLost to 0>>\
<<if $Mon.TakesGold is true>>\
<<if setup.PlayerHasPerk("Rich") is true>>\
<<set _GoldLost to Math.trunc($PC[$CC][$PCcoins] / 4)>>\
<<if _GoldLost is 1>>\
<<set _GoldLossMessage to _TheMon + " takes your last piece of gold.">>\
<<elseif _GoldLost is 0>>\
<<else>>\
<<set _GoldLossMessage to _TheMon + " takes " + _GoldLost + " of your gold.">>\
<<endif>>\
<<else>>\
<<set _GoldLost to Math.trunc($PC[$CC][$PCcoins] /2)>>\
<<if _GoldLost is 1>>\
<<set _GoldLossMessage to _TheMon + " takes your last piece of gold.">>\
<<elseif _GoldLost is 0>>\
<<else>>\
<<set _GoldLossMessage to _TheMon + " takes " + _GoldLost + " of your gold.">>\
<<endif>>\
<<endif>>\
<<endif>>\
\
<<if $PC[$CC][$PChornycur] gte $PC[$CC][$PChornymax]>>\
<<CombatLog "You have been defeated!">>\
<<replace "#combatcontrols">>\
@@color:Red;You submit to the <<print $Mon.name>> in a fit of lust!@@
<<if _GoldLost > 0>>\
<<set $PC[$CC][$PCcoins] to $PC[$CC][$PCcoins] - _GoldLost>>\
<<print _GoldLossMessage>>
<<endif>>\
<hr>\
<span id="KeypSpace">\
<<link "space) Continue" "DefeatSex">>
<<ClearTemporaryEffects>>\
<</link>>\
</span>\
<</replace>>\
<<elseif $PC[$CC][$PChpcur] < 1>>\
<<set $PC[$CC][$PCmisc].battleslost to $PC[$CC][$PCmisc].battleslost +1>>\
<<CombatLog "You have been defeated!">>\
<<replace "#combatcontrols">>\
@@color:Red;You have been defeated!@@
<<if _GoldLost > 0>>\
<<set $PC[$CC][$PCcoins] to $PC[$CC][$PCcoins] - _GoldLost>>\
<<print _GoldLossMessage>>
<<endif>>\
<hr>\
<span id="KeypSpace">\
<<link "space) Continue" "DefeatSex">>
<<ClearTemporaryEffects>>\
<</link>>\
</span>\
<</replace>>\
<<endif>>\
\
<<if $PC[$CC][$PCcoins] < 0>>\
<<CombatLog "Error: monster took more gold than the player had. Attempting to fix.">>\
<<set $PC[$CC][$PCcoins] to 0>>\
<<endif>>\
<<ShowActiveEffects>>\
<<endif>>\
<</widget>>\
<<widget CombatUIStatsHack>>\
<<set _CUI to $args[0]>>\
<<set _CUItype to _CUI[0]>>\
<<set _CUIptr to _CUI[1]>>\
<<set _CUIunused to _CUI[2]>>\
<<set _EnchantBonuses to setup.GetEnchantBonuses($CC)>>\
<<if _CUItype is "body">>\
<<set _bp to $PC[$CC][$PCbp][_CUIptr]>>\
<<set _CUIAttackType to $PC[$CC][$PCbp][_CUIptr].attacktype>>\
<<set _CUIMinDam to _bp.mindam + ($PC[$CC][$PCstr] -10) + $PC[$CC][$PCmorphBONI].bodydam>>\
<<set _CUIMaxDam to _bp.maxdam + ($PC[$CC][$PCstr] -10) + $PC[$CC][$PCmorphBONI].bodydam>>\
<<if _CurrentClass is "barbarian">>\
<<set _CUIMinDam to _CUIMinDam + $PC[$CC][$PClevel]>>\
<<set _CUIMaxDam to _CUIMaxDam + $PC[$CC][$PClevel]>>\
<<endif>>\
<<set _CUIToHit to 100 + _EnchantBonuses.Accuracy + $PC[$CC][$PCtohit] + $PC[$CC][$PCmorphBONI].bodyth + (setup.AchievementHandler("Best Barbarian", "HAS?", -1) * 5) - $Mon.armor + $Mon.held>>\
<<if setup.GetEffect("rage") > 0>>\
<<set _CUIToHit to _CUIToHit + 50>>\
<<endif>>\
<<if _CUIToHit < 1>>\
<<set _CUIToHit to 0>>\
<<elseif _CUIToHit > 99>>\
<<set _CUIToHit to 100>>\
<<endif>>\
<<if _CUIAttackType is "poison bite">>\
<<set _CUIoutput to "(" + _CUIToHit + "% hit chance, poison)">>\
<<elseif _CUIAttackType is "immobilize">>\
<<set _CUIMaxHold to 3 * (_CUIMaxDam + $PC[$CC][$PCstr])>>\
<<set _CUIa to _MinDam + $PC[$CC][$PCstr]>>\
<<set _CUIa to _MaxDam + $PC[$CC][$PCstr]>>\
<<set _CUIHold to "" + _CUIa + "-" + _CUIb + "defense/attack, " + _CUIMaxHold + " max)">>\
<<else>>\
<<set _CUIoutput to "(" + _CUIToHit + "% hit chance)">>\
<<endif>>\
<<print _CUIoutput>>\
<<elseif _CUItype is "weapon">>\
<<DescribeItem $PC[$CC][$PCbp][_CUIptr].equip>>\
<<set _CUIAttackType to $ItemPoke.attacktype>>\
<<set _CUIMinDam to $ItemPoke.mindam + ($PC[$CC][$PCstr] -10)>>\
<<set _CUIMaxDam to $ItemPoke.maxdam + ($PC[$CC][$PCstr] -10)>>\
<<set _CUIToHit to 100 + _EnchantBonuses.Accuracy + $PC[$CC][$PCtohit] + $PC[$CC][$PCmorphBONI].th + (setup.AchievementHandler("Best Warrior", "HAS?", -1) * 5) - $Mon.armor + $Mon.held>>\
<<set _CurrentClass to setup.PtrToClass($PC[$CC][$PCclass])>>\
<<if _CurrentClass is "warrior">>\
<<set _CUIToHit to _CUIToHit + ($PC[$CC][$PClevel] * 10)>>\
<<endif>>\
<<if _CUIAttackType is "cleave">>\
<<set _BestLumberjack to 5 * setup.AchievementHandler("Best Lumberjack", "HAS?", -1)>>\
<<if _BestLumberjack > 0>>\
<<set _CUIToHit to _CUIToHit + _BestLumberjack>>\
<<endif>>\
<<if _CurrentClass is "lumberjack">>\
<<set _CUIMinDam to _CUIMinDam + $PC[$CC][$PClevel]>>\
<<set _CUIMaxDam to _CUIMaxDam + $PC[$CC][$PClevel]>>\
<<endif>>\
<<endif>>\
<<if setup.GetEffect("rage") > 0>>\
<<set _CUIToHit to _CUIToHit + 50>>\
<<endif>>\
<<if _CUIToHit < 1>>\
<<set _CUIToHit to 0>>\
<<elseif _CUIToHit > 100>>\
<<set _CUIToHit to 100>>\
<<endif>>\
<<set _CUIoutput to "(" + _CUIToHit + "% hit chance, " + _CUIMinDam + "-" + _CUIMaxDam + " " + _CUIAttackType + " damage)">>\
<<if _CUIAttackType is "shine">>\
<<print "(no effect)">>\
<<else>>\
<<print _CUIoutput>>\
<<endif>>\
<<elseif _CUItype is "flirt">>\
<<set _FlirtCombatData to setup.GetFlirtDataAgainstMon()>>\
<<set _Physiology to _FlirtCombatData[0]>>\
<<set _ProstituteClassBonus to _FlirtCombatData[1]>>\
<<set _EquipBonus to _FlirtCombatData[2]>>\
<<set _MorphToHitBonus to _FlirtCombatData[3]>>\
<<set _MorphDamBonus to _FlirtCombatData[4]>>\
<<set _Praying to _FlirtCombatData[5]>>\
<<set _BestProstitute to _FlirtCombatData[6]>>\
\
<<set _FlirtMinDam to Math.trunc(1 + _ProstituteClassBonus + _MorphDamBonus)>>\
<<set _FlirtMaxDam to Math.trunc(_Physiology + _ProstituteClassBonus + _MorphDamBonus)>>\
<<set _FlirtToHit to 1 + Math.trunc(10 * (10 + _Physiology + _EquipBonus + _MorphToHitBonus - _Praying - $Mon.Willpower))>>\
<<if ($DebugMode is true)>>
<hr>
debug:
flirt combat data: _FlirtCombatData
To hit:
10 * (10 + _Physiology (phsy) + _EquipBonus (equip) + _MorphToHitBonus (morphtohit) - _Praying (praying) - $Mon.Willpower (monster willpower))
Computed tohit: _FlirtToHit
Combat damage: _FlirtMinDam to _FlirtMaxDam
<hr>
<<endif>>\
<<if _FlirtToHit > 100>>\
<<set _FlirtToHit to 100>>\
<<elseif _FlirtToHit < 1>>\
<<set _FlirtToHit to 0>>\
<<endif>>\
<<if _FlirtMaxDam < _FlirtMinDam>>\
<<set _FlirtMaxDam to _FlirtMinDam>>\
<<endif>>\
\
<<set _CUIoutput to "(" + _FlirtToHit + "% hit chance, " + _FlirtMinDam + "-" + _FlirtMaxDam + " lust damage)">>\
<<print _CUIoutput>>\
<<elseif _CUItype is "symbol">>\
(pray)\
<<elseif _CUItype is "bash">>\
<<if $PC[$CC][$PClocation] is "tower">>\
<<set _CUIStunBase to $PC[$CC][$PCstr] - ($PC[$CC][$PCz] * 3) +2>>\
<<else>>\
<<set _CUIStunBase to $PC[$CC][$PCstr] - $PC[$CC][$PCfz] +2>>\
<<endif>>\
<<set _CUIStunChance to _CUIStunBase * 20>>\
<<if _CUIStunChance > 99>>\
<<set _CUIStunChance to 100>>\
<<elseif _CUIStunChance < 1>>\
<<set _CUIStunChance to 0>>\
<<endif>>\
(<<print _CUIStunChance>>% to stun)\
<<else>>\
Error in CombatUIStatsHack: <<print _CUI>>\
<<endif>>\
<</widget>>\
<<widget "DeathByFeedback">>\
<<unset $DeathBySpellFeedback>>
<<set $PC[$CC][$PCmisc].battleslost to $PC[$CC][$PCmisc].battleslost +1>>\
<<CombatLog "You have knocked youself out!">>\
<<replace "#combatcontrols">>\
@@color:Red;You have been defeated!@@
The feedback from the spell instantly knocks you out. What happens after that, you never find out.
<<if $Mon.TakesGold is true>>\
<<if setup.PlayerHasPerk("Rich") is true>>\
<<set _GoldLost to Math.trunc($PC[$CC][$PCcoins] / 4)>>\
<<else>>\
<<set _GoldLost to Math.trunc($PC[$CC][$PCcoins] /2)>>\
<<endif>>\
<<set $PC[$CC][$PCcoins] to $PC[$CC][$PCcoins] - _GoldLost>>\
<<if $PC[$CC][$PCcoins] < 0>>\
Debug: monster took more gold than the player had. Attempting to fix.
<<set $PC[$CC][$PCcoins] to 0>>\
<<endif>>\
<<endif>>\
<hr>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) Continue" "Church">>
<<set $WORLD.datapasser to ["sex","wolf"]>>
<<AdvanceTime 480>>
<<ClearTemporaryEffects>>\
<</link>>\
</span>
<</replace>>\
<</widget>>\
<<widget "GetAttackArray">>\
<<AddToLog "@@color:LightGreen;GetAttackArray has been called!@@<br>">>\
<<set $AttackArray to []>>\
<<set _arcount to 0>>\
<<set _bpqty to $PC[$CC][$PCbp].length>>\
<<for _i to 0; _i < _bpqty; _i++>>\
<<if ($PC[$CC][$PCbp][_i].type is $BPwield) and ($PC[$CC][$PCbp][_i].equip[0] > 0)>>\
<<DescribeItem $PC[$CC][$PCbp][_i].equip>>\
<<if $ItemPoke.tooleffect is 18>>\
<!-- gemstone -->\
<<elseif $ItemPoke.tooleffect is 8>>\
<<set _fulldesc to "brandish " + $ItemPoke.name>>\
<<set $AttackArray[_arcount] to ["symbol", _i, _fulldesc]>>\
<<AddToLog $AttackArray[_arcount]>>\
<<set _arcount to _arcount +1>>\
<<elseif $ItemPoke.tooleffect is 17>>\
<<set _fulldesc to "bash with " + $ItemPoke.name>>\
<<set $AttackArray[_arcount] to ["bash", _i, _fulldesc]>>\
<<AddToLog $AttackArray[_arcount]>>\
<<set _arcount to _arcount +1>>\
<<else>>\
<<set _fulldesc to $ItemPoke.name + " attack">>\
<<set $AttackArray[_arcount] to ["weapon", _i, _fulldesc]>>\
<<AddToLog $AttackArray[_arcount]>>\
<<set _arcount to _arcount +1>>\
<<endif>>\
<<elseif $PC[$CC][$PCbp][_i].attackdesc neq "">>\
<<set _fulldesc to $PC[$CC][$PCbp][_i].attackdesc>>\
<<set $AttackArray[_arcount] to ["body", _i, _fulldesc]>>\
<<AddToLog $AttackArray[_arcount]>>\
<<set _arcount to _arcount +1>>\
<<endif>>\
<</for>>\
\
<<if $AttackArray.length < 1>>\
@@color:Red;No valid body parts or weapons to attack with@@ Did you fill all your slots with gemstones, or were you very unlucky with transformations?
<<endif>>\
\
<<unset $ItemPoke>>\
<</widget>>\
<<timed 200ms>>\
<<audio "menu_bgm" stop>>\
<</timed>>\
<<PlayBGM "town">>\
\
<<set _throwaway to setup.InitForestCaves()>>\
\
<<set $ReturnFromMenu to passage()>>\
<<set $GameState to "main">>\
\
<<set $PC[$CC][$PCz] to 0>>\
<<set $PC[$CC][$PClocation] to "town">>\
\
<<MapCrescentheartNorth>>\
<hr>\
\
<<if $WORLD.datapasser is "Gravestone">>
@@color:Gold;Gravestones@@
<hr>\
<<if $RETIREES[0].name is "none">>\
Several blank gravestones are planted in orderly rows here, prepped and ready to record the names and deeds of the realm's retired heroes.
<<else>>\
Several gravestones are placed in front of the church here in town. Glancing among them you recognized the names of famous heroes now long gone.
<hr>\
<<for _i to 0; _i < $RETIREES.length; _i++>>
<<if $RETIREES[_i].name neq "none">>\
_i) <<print $RETIREES[_i].name>>, retired at level $RETIREES[_i].level after having made it to tower level $RETIREES[_i].maxtower
<<endif>>\
<</for>>\
<<endif>>\
<hr>\
<<link "Retire this character">>
<<InitPC $CC>>
<<AutoSaveLoad "set">>
<<script>>Engine.restart()<</script>>
<</link>> - This is PERMANENT
<hr>\
<<elseif $WORLD.datapasser is "MagicCircle">>
@@color:Aqua;Magic circle@@
A runic circle is engraved directly into the stone here. The runes appear dull, however, and whatever magic powers the circle appears to be inactive.
<!--
@@color:Gold;Magic Circle@@
<hr>\
@@color:Gold;Scene Navigation@@
<span id="KeypOne">\
<<link "1) Town square" "TownSquare">>
<</link>>\
</span>
-->\
<<elseif $WORLD.datapasser is "Guild">>
guild not used?
<<elseif $WORLD.tsquare is 0>>\
<<set $WORLD.tsquare to 1>>\
After a long and grueling journey, at long last you've finally reached the town of Crescentheart.
Though now that you're here, it's clear that the tales you've heard of its magnificence were exaggerated, to put it mildly. While still a town of decent size, the worn cobbelstone roads and buildings in disrepair tell the tale of a town several years past its prime. But none of it detracts from the majestic Tower of Triumph jutting out from one end of town and reaching up as far as the clouds in the sky.
The street is dotted with adventurers, and they seem to outnumber residents. Looking closer, you see more than a few sporting tails, animal ears, and assorted other mismatched body parts. Clearly tower-climbers, and from their numbers you suspect that the city's merchants survive on their business alone.
If you want, you can begin your journey into the tower immediately. But it might be wise to at least look around town first.
@@color:Yellow;Tip: You have some starter gear to equip! Try clicking 'inventory' on the sidebar, or pressing i on your keyboard!@@
<<else>>\
While but a small village, Crescentheart's town square is well-built with a central fountain and cobblestone roads. All is dwarfed by the immense Tower reaching majestically up into the sky.
<<endif>>\
<hr>
\
<<set $WORLD.datapasser to 0>>\
\
<<if $PC[$CC][$PChpcur] < 1>>\
<<if $PC[$CC][$PChunger] < 1>>\
<<set $WORLD.diedby to "Starved to death">>\
@@color:Red;You have starved to death!@@
It's unfortunate, but you do need to eat. If food is too expensive, you could try carrying around a butcher knife to carve up some of those monsters you keep fighting. Of course, that probably has side effects.\
<<AwardAchievement "Starve to death">>\
<<else>>\
<<set $WORLD.diedby to "Ran out of health in town...somehow">>\
@@color:Red;You have died!@@
@@color:Yellow;Debug: how did this happen?@@
<<endif>>\
<hr>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) Continue" "Death">>
<</link>>\
</span>
<<else>>\
<<if $WORLD.MobileMode is 1>>
@@color:Gold;Mobile mode (EXPERIMENTAL)@@
<<button "[South, to Crescentheart South]" "TownSouth">>
<<AdvanceTime 10>>
<</button>>
<<button "[West, into the Enchanted Forest]" "Forest">>
<<set $PC[$CC][$PCfz] to 1>>
<<set $PC[$CC][$PCfx] to $WORLD.ForestDims[0]>>
<<set $PC[$CC][$PCfy] to Math.trunc($WORLD.ForestDims[1] / 2)>>
<<set $WORLD.datapasser to "reset forest">>
<<AdvanceTime 30>>
<</button>>
<<button "[West, into the Enchanted Forest]" "Forest">>
<<set $PC[$CC][$PCfz] to 1>>
<<set $PC[$CC][$PCfx] to $WORLD.ForestDims[0]>>
<<set $PC[$CC][$PCfy] to Math.trunc($WORLD.ForestDims[1] / 2)>>
<<set $WORLD.datapasser to "reset forest">>
<<AdvanceTime 30>>
<</button>>
<<if $WORLD.MainQuest[0].state is "inactive">>\
<<else>>\
<<button "East, into the Tower of Triumph" "Dungeon64">>
<<AdvanceTime 10>>
<<set $PC[$CC][$PCz] to 1>>
<<set $PC[$CC][$PCx] to $WORLD.TowerOrigin[0]>>
<<set $PC[$CC][$PCy] to $WORLD.TowerOrigin[1]>>
<</button>>\
<<endif>>\
<<else>>\
@@color:Gold;Zone Navigation@@ - click on the map to visit locations
<span id="KeypSouth"><span id="KeypDOWN">\
<<link "s) South, to Crescentheart South" "TownSouth">>
<<AdvanceTime 10>>
<</link>>\
</span></span>
<span id="KeypWest"><span id="KeypLEFT">\
<<link "a) West, into the Enchanted Forest" "Forest">>
<<set $PC[$CC][$PCfz] to 1>>
<<set $PC[$CC][$PCfx] to $WORLD.ForestDims[0]>>
<<set $PC[$CC][$PCfy] to Math.trunc($WORLD.ForestDims[1] / 2)>>
<<set $WORLD.datapasser to "reset forest">>
<<AdvanceTime 30>>
<</link>>\
</span></span>
<<if $WORLD.MainQuest[0].state is "inactive">>\
d) The Tower is locked
<<else>>\
<span id="KeypEast"><span id="KeypRIGHT">\
<<link "d) East, into the Tower of Triumph" "Dungeon64">>
<<AdvanceTime 10>>
<<set $PC[$CC][$PCz] to 1>>
<<set $PC[$CC][$PCx] to $WORLD.TowerOrigin[0]>>
<<set $PC[$CC][$PCy] to $WORLD.TowerOrigin[1]>>
<</link>>\
</span></span>
<<endif>>\
<hr>
@@color:Gold;Options@@
<<link "Save and exit to character menu" "Preamble">>
<<AutoSaveLoad "set">>
<</link>>\
<<endif>>\
<<endif>>\
<<if $DebugMode is true>>\
<hr>\
@@color:Gold;Debug options@@
[[TransformTest]]
<<link "Rebuild orphanage">>\
<<set $WORLD.orphanage to 2>>\
<</link>>
<<link "Locate artifacts">>
<<set _Ipsimus to setup.FindUnique(700)>>
<<set _Custodia to setup.FindUnique(701)>>
<<replace "#foo">>
<<print _Ipsimus>>
<<print _Custodia>>
<</replace>>
<</link>>
<<link "Gain Consumables">>
<<set _throwaway to setup.GiveItem($CC, [109, 0, 99, 312, 0])>>
<<set _throwaway to setup.GiveItem($CC, [109, 0, 99, 219, 0])>>
<<set _throwaway to setup.GiveItem($CC, [102, 0, 99, 125, 0])>>
<<set _throwaway to setup.GiveItem($CC, [102, 0, 99, 126, 0])>>
<<set _throwaway to setup.GiveItem($CC, [109, 0, 99, 224, 0])>>
<<set _throwaway to setup.GiveItem($CC, [109, 0, 99, 202, 0])>>
<<set _throwaway to setup.GiveItem($CC, [130, 0, 99, 0, 0])>>
<<set _throwaway to setup.GiveItem($CC, [131, 0, 99, 0, 0])>>
<<set _throwaway to setup.GiveItem($CC, [136, 0, 99, 0, 0])>>
<<set _throwaway to setup.GiveItem($CC, [125, 0, 99, 0, 0])>>
<<set _throwaway to setup.GiveItem($CC, [126, 0, 99, 0, 0])>>
<<set _throwaway to setup.GiveItem($CC, [127, 0, 99, 0, 0])>>
<<set _throwaway to setup.GiveItem($CC, [128, 0, 99, 0, 0])>>
<<set _throwaway to setup.GiveItem($CC, [139, 0, 99, 0, 0])>>
<<set _throwaway to setup.GiveItem($CC, [140, 0, 99, 0, 0])>>
<</link>>
<<link "Acquire materials for Vault test">>
<<set _throwaway to setup.GiveItem($CC, [550, 0, 0, 5, 0])>>
<<set _throwaway to setup.GiveItem($CC, [122, 0, 30, 0, 0])>>
<</link>>
<<link "Legacy Vault Fill test">>\
<<FillLegacyVault>>
<</link>>\
<span id="here"></span>\
<<endif>>
<<BirthCheck>>\<<set $NoDoubleKeypress to 1>>\
\
<<timed 500ms>>\
<<audio "menu_bgm" stop>>\
<</timed>>\
<<PlayBGM "explore">>\
\
<<ClearTemporaryEffects>>\
\
<<set $PC[$CC][$PClocation] to "forest">>\
\
<<set _px to $PC[$CC][$PCfx]>>\
<<set _py to $PC[$CC][$PCfy]>>\
<<set _pz to $PC[$CC][$PCfz]>>\
\
<<if _pz > $PC[$CC][$PChfze]>>\
<<set $PC[$CC][$PChfze] to _pz>>\
<<endif>>\
<<if _pz > $WORLD.HFZE>>\
<<set $WORLD.HFZE to _pz>>\
<<endif>>\
\
<<if ($WORLD.datapasser is "reset forest") or ($ForestMap.length is 0)>>\
<<AddToLog "Arriving in Forest">>\
<<set $ForestMap to []>>\
<<set $ForestMap to setup.ForestSnake()>>\
<<set $WORLD.ForestTheme to either(1,2,3)>>\
<!-- Don't stand on trees -->\
<<set $ForestMap[_px][_py] to 0>>\
<<set $ForestMap[_px][_py+1] to 0>>\
<<set $ForestMap[_px][_py-1] to 0>>\
<<set $GameLog to $GameLog + "New forest level<br>">>\
<<set $GameLog to $GameLog + $ForestMap + "<br><br>">>\
<<else>>\
<<endif>>\
<<set $WORLD.datapasser to 0>>\
\
<!-- Material level of our best axe? -->\
<<set $WORLD.TreeCutter to setup.AxeLevel()>>\
\
<<set $DisableMenu to false>>\
<<set $ReturnFromMenu to passage()>>\
<<set $GameState to "forest">>\
<<set $WORLD.dialogue to 0>>\
\
<<set _ForestLevel to $PC[$CC][$PCfz]>>\
<<if _ForestLevel is 0>>\
@@color:Red;Error:Forest should never be level zero@@\
<<elseif _ForestLevel is 1>>\
@@color:Gold;Enchanted Forest, level 1 (near town)@@\
<<else>>\
@@color:Gold;Enchanted Forest, level _ForestLevel@@\
<<endif>>\
<hr>\
<span id="right-img"></span>\
<canvas id="myCanvas" width="960" height="450" style="border:0px solid #f47373;">
Your browser does not support the HTML canvas tag.
</canvas>
<hr>\
<span id ="roomdesc"></span>\
<span id ="eventtext"></span>
<hr>\
<span id="navcontrols"><<ShowForestNavControls>></span>
<span id="debug"></span>\
\
<<set _tempname to "S64Forest-Grass1">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Grass2">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Grass3">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Flower1">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Flower2">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Flower3">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Flower4">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Flower5">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Flower6">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Flower7">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Flower8">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-TreeTrunk">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree1">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree2">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree3">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree4">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Forest-Tree5">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Cage">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Sign">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Grave">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Cave">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<set _tempname to "S64Rocks">>\
<<set _pic to $ImgPath + _tempname + ".png">>\
<img @id="_tempname" height="1" style="visibility: hidden;" img @src="_pic"/>\
\
<<timed 300ms>>\
<<ForestMoveRefresh>>\
<<set _throwaway to setup.DrawForestMap64(_px, _py, _pz, 64)>>\
<<set $NoDoubleKeypress to 0>>\
<</timed>>\
\
<<BirthCheck>>\
\
<<if $DebugMode is true>>\
<<link "Brightness circle test">>\
<<script>>
/* Create composite image canvas */
const canvas = document.createElement('canvas');
const ctx2 = canvas.getContext('2d');
ctx2.drawImage(composite_image,0,0);
/ Create new brightness filtered canvas */
const filter_canvas = document.createElement('canvas');
const filter_ctx = filter_canvas.getContext('2d');
filter_canvas.width = composite_image.width;
filter_canvas.height = composite_image.height;
filter_ctx.drawImage(composite_image, 0, 0);
/* Create circular path */
const center = {x: composite_image.width/2, y: composite_image.height/2};
const radius = 50; /* Change the radius of the circle to apply filter to different area */
const path = ctx.arc(center.x, center.y, radius, 0, 2 * Math.PI, false);
/* Clip image inside the circle */
ctx2.beginPath();
ctx2.clip();
ctx2.drawImage(filter_canvas, 0, 0);
ctx2.closePath();
/* Draw brightness filtered image on original canvas */
ctx2.drawImage(myCanvas, 0, 0);
<</script>>\
<</link>>\
<<endif>>\<<set _ChatAvailable to false>>\
<<for _i to 0; _i < $PC[$CC][$PCGerardChat].length; _i++>>\
<<if $PC[$CC][$PCGerardChat][_i] is 1>>\
<<set _ChatAvailable to true>>\
<<endif>>\
<</for>>\
<<if $PC[$CC][$PCGerardChat][0] is 0>>\
<<set _ChatAvailable to true>>\
<<endif>>\
\
<<if $GerardTalk is "yes">>\
<<SimplePic "gerard.jpg">>\
@@color:LightGreen;General Store@@
<hr>\
<<set _CurrentQuestion to $WORLD.datapasser>>\
\
<<if _CurrentQuestion is 0>>\
<<if $PC[$CC][$PCGerardChat][0] is 0>>\
<<set $PC[$CC][$PCGerardChat][0] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hello," you greet the proprieter. "I'm $PC[$CC][$PCname]."
@@color:Aqua;Shopkeeper@@: "Gerard," the man replies. "Are you here to climb the tower?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Was it really that obvious?"
@@color:Aqua;Gerard@@: "It's pretty much the only reason people come this far north. Well, let me be the first to welcome you to Crescentheart. I run the general store here, so please come to me for any of your provisioning needs."
<!-- Unlocks -->\
<<set $PC[$CC][$PCGerardChat][1] to 1>><!-- Ask why people don't come here -->\
<<set $PC[$CC][$PCGerardChat][2] to 1>><!-- Ask about his store -->\
<<else>>\
@@color:Aqua;Gerard@@: "Hello, <<print $PC[$CC][$PCname]>>. What can I do for you?"
<<endif>>\
<<elseif _CurrentQuestion is 1>>\
<<set $PC[$CC][$PCGerardChat][1] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Why don't people come here often?"
@@color:Aqua;Gerard@@: "Well, it's not that they don't," he explains, looking you over. "But the Goddess's Tower of Triumph is the primary draw, and it's not exactly a family-friendly tourist attraction. It's mostly adventurers. \
<<if $PC[$CC][$PCgen] > 2>>You look like you know what you're doing though, so you don't need a retired adventurer like me to tell you how it is."
<<else>>You look pretty new to to all this, so take it from a former adventurer: if you don't want to end up all messed up with tentacles for hands and <<if $PC[$CC][$PCsex] is "male">>a slime hole<<else>>a rabbit dick<<endif>> between your legs, go back to wherever you came from."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Is it really that bad? Most everyone I've met so far seems pretty normal to me."
@@color:Aqua;Gerard@@: "Looks can be deceiving. Let me just say there's a reason I'm covering up everything from the neck down, and leave it at that."
<<endif>>\
<!-- unlocks -->\
<<set $PC[$CC][$PCGerardChat][3] to 1>><!-- You're an adventurer? -->\
<<elseif _CurrentQuestion is 2>>\
<<set $PC[$CC][$PCGerardChat][2] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I notice the shelves are mostly bare," you comment, glancing around his store. "Is this really all you sell?"
@@color:Aqua;Gerard@@: "Everyone's running a little low on account of the war," he explains. "I'm trying to expand my inventory, but it's all I can do right now to stock what you see. I'm sure the other shopkeepers will have a similar story to tell. If it weren't for Tanya's ranch, I imagine we'd all be misshapen monstrosities from eating magic-tainted forest monster meat by now."
<!-- unlocks -->\
<<set $PC[$CC][$PCGerardChat][9] to 1>><!-- who's Tanya? -->\
<<if$PC[$CC][$PCGerardChat][7] is 0>><!-- war -->\
<<set $PC[$CC][$PCGerardChat][7] to 1>>\
<<endif>>\
<<elseif _CurrentQuestion is 3>>\
<<set $PC[$CC][$PCGerardChat][3] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So, you're an adventurer?"
@@color:Aqua;Gerard@@: "Used to be," he nods. "Most of Crescentheart's pemanent residents are retired adventurers. Rina, Skitters...everyone except the psycho bitch, I suppose. Personally I came ten years ago with some friends, all of us chasing a dream to climb the tower and ascend to godhood. Until Darkoth got taken by the demons, and Neris...well, I never found out for sure what happened to her. Anyway, I saw the writing on the wall after that and retired."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "And you started a store?"
@@color:Aqua;Gerard@@: "It's not a bad life," he shrugs. "Not as exciting as fighting monsters, maybe. And the pay isn't as good. But I don't have to worry about being eaten alive or raped in holes I don't even have, so there are positives."
<!-- unlocks -->\
<<set $PC[$CC][$PCGerardChat][4] to 1>><!-- How far did you get? -->\
<<set $PC[$CC][$PCGerardChat][5] to 1>><!-- Any tips? -->\
<<set $PC[$CC][$PCGerardChat][6] to 1>><!-- Psycho Bitch? -->\
<<elseif _CurrentQuestion is 4>>\
<<set $PC[$CC][$PCGerardChat][4] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How far did you get?" you ask. "In the tower?"
Gerard's eyes lose focus and he stares off into space.
@@color:Aqua;Gerard@@: "I'm not sure what level it was, but there's...a room. I mean, every floor has room of course, that's just how it's laid out. But this was something crazy. Huge room with a red checkerboard-patterned floor. And right in the middle of it there was this crazy spider monster. Upper half was human, and she had this viscious black flail that looked like it must have weighed a hundred pounds. Introduced herself and gave a big long, droning speech every time I saw her. Zetahlia. Said she was the Demon Queen of the Spiders."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Sounds like some kind of boss monster."
@@color:Aqua;Gerard@@: "Probably. Anyway, Got as far as that room a couple times, but never past it."
He nervously covers his stomach, then continues.
@@color:Aqua;Gerard@@: "Let me tell you, if you ever see that thing...either kill it fast or get out of there. Don't dawdle. Believe me, you don't want to know what it does if it catches you."
<!-- unlocks -->\
<<set $PC[$CC][$PCGerardChat][8] to 1>><!-- How is the tower laid out? -->\
<<elseif _CurrentQuestion is 5>>\
<<set $PC[$CC][$PCGerardChat][5] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Do you have any adventuring tips for me?"
@@color:Aqua;Gerard@@: "Sure, lots of things," he shrugs. "Heal often. I recommend you get a shield right away, but understand your equipment and when to use it. Shields are cheap for how well they protect you, but they're worthless against casters so sometimes it might not be a terrible idea to carry two weapons instead. Some monsters are more or less resistant to cutting or blunt weapons, so it can be nice to have the option. Just keep in mind that while you can drink potions and use certain small items during combat, you can't change weapons or equipment until a battle is over. Also, learn some magic when you get the chance. And above all, don't be greedy. If you're hurting, it's always ok to come back to town to rest. Transformations aren't all bad. Sometimes they'll make your stonger, but then other times you might lose the hand you're carrying a weapon in, and you don't want that to happen when you're two floors up and at half health. Also, I recommend you start out in the forest if you haven't already. Newbies usually like to go straight to the tower, and trust me, that's a mistake."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Why? What's so bad about the tower?"
@@color:Aqua;Gerard@@: "Tougher monsters that hit harder. Traps. And it's a maze, so if something goes wrong and you want to leave in a hurry, sometimes you can't. Plus, more stuff in there will actually kill you, whereas forest monsters mostly just like to molest you. Plus, the forest is easy to traverse. Get an axe and you can mostly chop your way straight through."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How strong should I be before I attempt the tower?"
@@color:Aqua;Gerard@@: "Up to you," he shrugs. "Some people like to step just inside and hang out near the stairs resetting the tower over and over, hoping for a lucky treasure chest. That can happen. But you're just as likely to get an unlucky crossbow bolt in your head. I recommend you talk to Rina at the guild if you haven't already. She runs a program for new adventurers to help them get started."
<!-- unlocks -->\
<<set $PC[$CC][$PCGerardChat][10] to 1>><!-- What monsters resist what attacks? -->\
<<set $PC[$CC][$PCGerardChat][11] to 1>><!-- ask about shields -->\
<<elseif _CurrentQuestion is 6>>\
<<set $PC[$CC][$PCGerardChat][6] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Who's this psycho bitch you mentioned?"
<<if $PC[$CC][$PCselene] > 0>>\
@@color:Aqua;Gerard@@: "Selinda the Witch. Steer clear of her. "
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You mean Selene?"
@@color:Aqua;Gerard@@: "Sure, if that's what she's calling herself these days," he shakes his head. "Can't blame her for trying to distance herself from her past.
<<else>>\
@@color:Aqua;Gerard@@: "Selinda the Witch," he nearly growls as he says the name. "Nasty temper, and has a penchant for turning people into lizards. She'll try to pull you in with a pretty picture of how her magic can help you, but my advice is to steer clear."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Help with magic sounds good though," you admit.
@@color:Aqua;Gerard@@: "I don't exactly think she's the type to take on an apprentice. But if you want to learn magic all you need to do is find a spellbook and give it a read. I used to sell them myself, but I ran out of stock months ago when the war shut down the caravans. It takes a special ink to capture a spell on paper, and verbana root is hard to get around these parts. I don't know any alchemist who can make spell ink without it, so they're in short supply."
<<endif>>\
<<if$PC[$CC][$PCGerardChat][7] is 0>><!-- war -->\
<<set $PC[$CC][$PCGerardChat][7] to 1>>\
<<endif>>\
<<elseif _CurrentQuestion is 7>>\
<<set $PC[$CC][$PCGerardChat][7] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What's this about a war?"
@@color:Aqua;Gerard@@: "Sythians from the mainland decided to seize control of the mountain pass down south. I doubt they really care about Crescentheart much, but whatever the reason they're there, that path is how most of the trade caravans get here and I'm sure a few wagons full of trade goods make easy plunder for an army."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "If they're not coming here, what do you think they're really after?"
@@color:Aqua;Gerard@@: "I couldn't say," he shrugs. "It's probably just a simple landgrab or something. Or maybe one of their local allies struck gold in the mountains and they just want to guard the claim. Who knows? I wouldn't worry about it too much though. Once you're through the mountain pass, it's still 50 miles of worthless desert and empty salt beaches to get here. I doubt they'll come this far.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Any dungeons or anything down there worth checking out??"
@@color:Aqua;Gerard@@: "Probably, if you can make it through the sweltering heat and scorpions. But I haven't passed that way since I first came to Crescentheart ten years ago, so anything I could tell you would be dated. Anyway, it's kind of hard to even get there with the current state of affairs, so I wouldn't worry about it until you're a lot stronger."
<<elseif _CurrentQuestion is 8>>\
<<set $PC[$CC][$PCGerardChat][8] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You mentioned dungeon rooms. What can you tell me about the tower layout?"
@@color:Aqua;Gerard@@: "Honestly you probably don't need to worry about this for a while," he shrugs. "There's a big jump in difficulty between the forest and the tower, so you should probably stick to the forest until you have at least a few fights under your belt."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Ok, that's fine. I'd still like to know."
@@color:Aqua;Gerard@@: "Well, the layout of the tower is flexible. It's not the same every time. The forest is just so big that it's hard to find any place you've been before, but the tower? It's the same as long as you want it to be, but regenerates itself whenenever you want. Supposedly it has something to do with the magic of the Goddess responding to the desires of her guests, but I couldn't tell you how it works. Anyway, every floor generates with a special room in it. Sometimes there's a treasure chest, or a trap, or a monster...could be anything."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Do the rooms reset when the tower changes?"
@@color:Aqua;Gerard@@: "Yep, sure do," he nods. "That's why they haven't all already been emptied by other adventurers. You'll run into other people from time to time in there, by the way. So keep your guard up. There's an unspoken rule not to fight in town, but once you're in the tower, anything goes."
<<elseif _CurrentQuestion is 9>>\
<<set $PC[$CC][$PCGerardChat][9] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Who's Tanya?"
@@color:Aqua;Gerard@@: "Bartender at the tavern near the forest-end of town. Cute catgirl, you can't miss her."
<<elseif _CurrentQuestion is 10>>\
<<set $PC[$CC][$PCGerardChat][10] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You mentioned that some monsters resist certain types of weapons. Anything more you can tell me? For example, why would something take less damage from swords?"
@@color:Aqua;Gerard@@: "It's hard to cut through armor. Most of the insects in the southern desert have exoskeletons for example. Also, minotaurs have pretty thick skin, so a surface cut might not reach anything important. But armor doesn't matter much if you simply bludgeon something hard enough. Meanwhile, stabbing weapons like spears and tridents are good at poking holes in the armor to reach vital organs, so they do pretty well too."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Ok, that makes sense. What about blunt weapons? Are they bad against anything?"
@@color:Aqua;Gerard@@: "Squishy monsters that are hard to crush. Hitting a slime or tentacle monster with a club is like trying to smack water. It just bounces them around. You have to break their skin to hurt them, but their skin isn't very tough, so cutting and stabbing weapons both work pretty well."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What about axes? They cut, but they're also big and heavy enough that it has to hurt to be hit by one even if it doesn't break the skin."
@@color:Aqua;Gerard@@: "Absolutely," he nods. "But because they're so big and heavy, that means that they tend to be slow and easier to dodge than a smaller, faster weapon. So anything that's very quick will tend to avoid the worst of the attack and at best you'll nick them in passing when they dodge."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So sounds like stabbing weapons are best?"
@@color:Aqua;Gerard@@: "No, stabbing weapons are good against armor and they're good against squishies. And they're fast, so fast opponents don't have any advantage against them. But they're bad at hitting small targets. You can kill a fly with a flyswatter, but have you ever tried stabbing one with a pencil? It doesn't have to be very fast if it only has to move a tiny bit to avoid an attack. Even half an inch off, and you simply miss."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I see your point. So, blunt weapons are bad against squishies, swords are bad against thick skin and armor, axes are bad against anything that moves quickly, and stabbing weapons are bad against things that are small?"
@@color:Aqua;Gerard@@: "Yep, you've got it. But don't stress over it too much. This will all be super important once you start adventuring in the tower or deeper into the forest. But nothing very dangerous lives close to town, so it's not anything you need to worry about right away."
<<elseif _CurrentQuestion is 11>>\
<<set $PC[$CC][$PCGerardChat][11] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Would you tell me a little bit more about shields?"
@@color:Aqua;Gerard@@: "Putting a huge chunk of wood or metal between you and an opponent makes for pretty good defense. Even just holding one will make you harder to hit, plus you can smack opponents with them to stun them briefly."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How does that work? Can I continually keep shield-bashing over and over to keep an opponent stun-locked forever?"
@@color:Aqua;Gerard@@: "No, it doesn't work that way," he explains. "//Shield bashing is an interrupt//. Only use it when your opponent is doing a powerup move. You'll see them scream, or wind up an attack...something that telegraphs that the //next// attack is going to hurt a lot. If you randomly shield-bash opponents who are only engaged in normal, fast melee attacks, it's not going to help you."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You said that shields are worthless against casters though."
@@color:Aqua;Gerard@@: "Amor doesn't protect you from spells. And most spells are fast. It doesn't take multiple rounds to cast firebolt, for example. So it can't be interrupted. You can only interrupt things that require prep time. Don't waste your time trying to shield-bash some random bunny-girl giving you flirty looks."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Ok. Anything else?"
@@color:Aqua;Gerard@@: "You should also know that it doesn't always work. You have to be strong enough to hit hard enough to stun in the first place. Also, you can't shield bash multipe times in a row. Every time you stun an opponent, they'll be on guard for it. So even at absolute best you can only stun every //other// turn. If you do it twice in a row, you're basically just giving your opponent a free attack on you. So don't do that."
<<elseif _CurrentQuestion is 11>>\
<<set $PC[$CC][$PCGerardChat][11] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Do you know anything about the void rift in that building on the south side of town?"
@@color:Aqua;Gerard@@: "Across from Daphne's Jewelry? Yes, that's what's left of the Legacy Vault. Some sort of duel broke out recently, and one of the combatants managed to tear through its enclosure. The Vault box itself is bigger on the inside than the outside, and the rift you saw is what you get when extradimensional translation boundaries don't line up properly.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You mean like if you put a portal inside a portal?
@@color:Aqua;Gerard@@: "More like if you burned a bag of holding, but the magic kept working without the bag to keep it anchored in reference space."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Is it dangerous?"
@@color:Aqua;Gerard@@: "Oh, absolutely. It would rip you to pieces too small to see if you touched it."
<<else>>\
Error: unrecognized question: _CurrentQuestion
<<endif>>\
<hr>\
<<set _AskTheseQuestions to []>>\
<<set _CurrentQuestionPTR to 0>>\
\
<<set _UnaskedCantAsk to 0>>\
<<set _UnaskedCANAsk to 1>>\
<<set _AlreadyAnswered to 2>>\
\
<!-- unlocked by external events -->\
<<if ($PC[$CC][$PCGerardChat][11] is 0) and ($PC[$CC][$PChtze] > 4)>>\
<<set $PC[$CC][$PCGerardChat][11] to 1>>\
<<endif>>\
<<if ($PC[$CC][$PCGerardChat][12] is 0) and ($PC[$CC][$PCkills][setup.MonNameToKillPTR("Zehtalia")] > 0)>>
<<set $PC[$CC][$PCGerardChat][12] to 1>>\
<<endif>>\
\
<<for _i to 0; _i < $PC[$CC][$PCGerardChat].length; _i++>>\
<<if $PC[$CC][$PCGerardChat][_i] is 1>>\
<<set _AskTheseQuestions[_CurrentQuestionPTR] to _i>>\
<<set _CurrentQuestionPTR to _CurrentQuestionPTR +1>>\
<<endif>>\
<</for>>\
\
<<set _QuestionPool to []>>\
<<set _QuestionPool[0] to "Introduce yourself">>\
<<set _QuestionPool[1] to "Ask why people don't come here">>\
<<set _QuestionPool[2] to "Ask about his store">>\
<<set _QuestionPool[3] to "Ask about him personally">>\
<<set _QuestionPool[4] to "How far did you get through the tower?">>\
<<set _QuestionPool[5] to "Do you have any adventuring tips?">>\
<<set _QuestionPool[6] to "Who's this psycho bitch you mentioned?">>\
<<set _QuestionPool[7] to "Ask about the war">>\
<<set _QuestionPool[8] to "Ask about dungeon rooms">>\
<<set _QuestionPool[9] to "Who's Tanya?">>\
<<set _QuestionPool[10] to "What kind of monsters resist what attacks?">>\
<<set _QuestionPool[11] to "Would you tell me more about shields?">>\
<<set _QuestionPool[12] to "Do you know anything about the void rift on the south side of town?">>\
\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) I'm done talking for now" "StoreGeneral">>
<<set $WORLD.gstore to 2>>\
<<AdvanceTime 5>>
<<unset $GerardTalk>>\
<</link>>\
</span>
\
<<set _SpanTexts to ["KeypOne","KeypTwo","KeypThree","KeypFour","KeypFive","KeypSix"]>>\
<<set _KeyChars to ["1","2","3","4","5","6"]>>\
\
<<set _NextQuestion to 0>>\
<<for _i to 0; _i < _AskTheseQuestions.length; _i++>>\
<span @id="_SpanTexts[_NextQuestion]">\
<<set _NextQuestion to _NextQuestion +1>>\
<<set _LinkText to _KeyChars[_i] + ") " + _QuestionPool[_AskTheseQuestions[_i]]>>\
<<capture _i>>\
<<link _LinkText "StoreGeneral">>
<<set $WORLD.datapasser to _AskTheseQuestions[_i]>>\
<</link>>
<</capture>>\
</span>\
<</for>>\
<<else>>\
<<SimplePic "gerard.jpg">>\
@@color:LightGreen;General Store@@
<span id="KeypSpace">\
<<link "space) Return to town" "TownSquare">>
<<AdvanceTime 5>>
<</link>>\
</span>
<<if _ChatAvailable is false>>\
c) No chats available
<<elseif $PC[$CC][$PCGerardChat][1] is 2>>\
<span id="KeypC">\
<<link "c) Chat with Gerard" "StoreGeneral">>
<<set $GerardTalk to "yes">>\
<<set $WORLD.datapasser to 0>>\
<</link>>\
</span>
<<else>>\
<span id="KeypC">\
<<link "c) Chat with the shopkeeper" "StoreGeneral">>
<<set $GerardTalk to "yes">>\
<<set $WORLD.datapasser to 0>>\
<</link>>\
</span>
<<endif>>\
<hr>\
<<Store $GStore>>
<<endif>>\
<<SimplePic "blacksmith.jpg">>\
\
<<set $DisableMenu to false>>\
<<set $ReturnFromMenu to passage()>>\
<<set $GameState to "main">>\
\
<<set _ShowStore to true>>\
<<if setup.TypeOf($SmithTemp) is "string">><<else>>\
<<set $SmithTemp to "armor">>\
<<endif>>\
\
<<set _PCaddress to "lass">>\
<<if $PC[$CC][$PCsex] is "male">><<set _PCaddress to "lad">><<endif>>\
\
@@color:Gold;Smithy@@
<span id="KeypSpace">\
<<link "space) Return to town" "TownSquare">>
<<AdvanceTime 5>>
<<unset $SmithTemp>>
<</link>>\
</span>
<hr>\
<<if $WORLD.smith is 0>>\
Looking around the shop, you're unimpressed with the quality of gear on offer.
<span id="KeypC">\
<<link "c) Chat with the blacksmith" "StoreSmith">>
<<set $WORLD.smith to 1>>\
<</link>>\
</span>
<<elseif $WORLD.smith is 1>>\
<<set _ShowStore to false>>\
<<set $WORLD.smith to 2>>\
@@color:Aqua;Finley@@: "Can I help ye?" the blacksmith inquires.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hi, yes...I can't help but notice that you have only copper and bronze goods on sale. Where's the iron? Where's the mithril?"
@@color:Aqua;Finley@@: "Wot's it to ye?" he frowns at your clothes. "Ye dun' look like ye can afford any better."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Well, maybe not yet," you dither. "But I'm here to climb the tower, so hopefully my fortune will improve soon. But somehow I don't think I'll get very far if this is the best gear on sale. Isn't this town famous for adventuring? Surely I'm not the only customer who's asked."
@@color:Aqua;Finley@@: "Aye, 'tis true," he sighs. "Sadly, a quarrelsome adventurin' type stole me mithril smithin' hammer. All I hae ta work with noo is this namby pamby apprentice hammer wot's barely 'nuff fer shapin' copper an' bronze.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Anything I can do to help?
@@color:Aqua;Finley@@: "Sure, bring me mah hammer an' I'll git richt back tae work. Course, ore merchants stooped comin' fur o' tha war doon sooth. So dun expect na mithril god slayin' swords the day ye come back. But iron? Aye, I kin do that with wot I got."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Any idea where I can find the adventurer who stole your hammer?"
<<if $WORLD.SmithQuests[0] is 0>>\
@@color:Aqua;Finley@@: "I cannae say fer sure, but he wos a swordsman bah the look o' him. Adventurin' type. Carryin' a bigol' axe, so prolly headin' deep inna' tha forest would be mah guiss."
<<else>>\
<<set $WORLD.smith to 3>>\
@@color:Aqua;Finley@@: "I cannae say fer sure, but she was a mighty braw keekin' mage lassie. And she warn't no fledglin' charmer neither. Carryin' a bigol' axe, so prolly headin' deep inna' tha forest would be mah guiss."
<<endif>>\
<hr>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) continue" "StoreSmith">>
<</link>>\
</span>\
<<elseif $WORLD.smith is 2>>\
Looking around the shop, the quality of gear on offer seems fairly low.
<span id="KeypC">\
<<link "c) Chat with the blacksmith" "StoreSmith">>
<<set $WORLD.smith to 3>>\
<</link>>\
</span>\
<<elseif $WORLD.smith is 3>>\
<<set _NPC to ["lad","lassie"]>>\
@@color:Aqua;Finley@@: "Any progress on findin' that adventurin' <<print _NPC[$WORLD.SmithQuests[0]]>> an' bringin' me mah hammer?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Not yet."
@@color:Aqua;Finley@@: "Oh, aye? Well, then, be sure tah check oot me wares. Wot ye see is wot ye got."
<<elseif $WORLD.smith is 4>>\
<<set $WORLD.smith to 5>>\
<<set $WORLD.smithLevel to 1>>\
<<Restock "smith">>\
\
<!-- does player have hammer? where? -->\
<<set _hammer to -1>>\
<<for _H to 0; _H < $PC[$CC][$PCinven].length; _H++>>\
<<set _CheckMe to $PC[$CC][$PCinven][_H]>>\
<<if (_CheckMe[0] is 101) and (_CheckMe[1] is 105)>>\
<<set _hammer to _H>>\
<<endif>>\
<</for>>\
<<if _hammer > -1>>\
<<set _throwaway to setup.RemoveOneItemFromInv($CC, _hammer)>>\
<<endif>>\
\
<<if $WORLD.SmithQuests[1] is "smith has it">>\
@@color:Aqua;Finley@@: "Oi, <<print _PCaddress>>. That boggin' thief cam back beggign 'n' crawling tae return mah nicked hammer. Ye did a guid proper bit o' wirk fur me. Thankee kindly."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Wow, really? Kind of wasn't expecting that, but that's good news."
@@color:Aqua;Finley@@: "Ayt, 'tis. Be gue fer mah wallet, tae."
<<elseif $WORLD.SmithQuests[1] is "player has it">>\
@@color:Aqua;Finley@@: "Oi, <<print _PCaddress>>. Ony luck takin' back mah hammer?"
<<if _hammer < 0>>\
You're about to say yes when you realize you don't have the hammer on you.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Sorry, not yet. I'll let you know."
@@color:Aqua;Finley@@: "A'richt. Tak' yer time. Bit ah cannae upgrade mah stock wi'oot it."
<<else>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Yes, here it is," you hand it over.
@@color:Aqua;Finley@@: "Aye, that's guid. Ah'l git tae wirk richt awa' makin' soem freish stock fur ye."
<<endif>>
<<elseif $WORLD.SmithQuests[1] is "player doesn't know smith has it">>\
@@color:Aqua;Finley@@: "Oi, <<print _PCaddress>>. Welcome to me stahr. Ye'r in luck. A've juist hud a stroke o' guid fortuin, 'n ahll be stocking eyeurn goods likelie fer noo awn."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Glad to hear it. Out of curiosity, what happened?"
@@color:Aqua;Finley@@: "Ah hud a bawherr bit o' misfortune wi' some missin' eequipment, buit tis bin returned noo sae ah kin git back tae wirk aw' proper lik'."
<<else>>\
Error: smithquesst1 is <<print $WORLD.SmithQuests[1]>>. Attempting to fix by bumping quest progression to next known state. Enjoy your eyeurn gear.
<<endif>>\
<<elseif $WORLD.smith is 5>>\
<!-- primed for the next forest quest: hunt ore? -->\
The shop is presently stocking iron quality items.
<span id="KeypC">\
<<link "c) Chat with the blacksmith" "StoreSmith">>
<<set $WORLD.smith to 6>>\
<</link>>\
</span>\
<<elseif $WORLD.smith is 6>>\
<<set $WORLD.smith to 5>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I'm liking the iron gear, but is this the best you can make?"
@@color:Aqua;Finley@@: "Na, iron is wee mair than bairn claes" he chuckles. "Hae ye ever heard o' steel?
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I have. What do you need to be able to make it?"
@@color:Aqua;Finley@@: "Ah hae a' th' iron a'm needin' tae mak' it," he scractes his beard. "Bit whit ah pure need is some sort o' flux fer purificatin' it."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Any idea Where can I find flux?"
<<if $WORLD.bridge > 0>>\
@@color:Aqua;Finley@@: "If it wur me a'd huv a go exploring th' southern desert. Shouldn't be tae solid tae fin' if ye dinnae mynd a bawherr o' solid labor wi' a pick."
<<else>>\
@@color:Aqua;Finley@@: "Hell if ah noo," he shrugs. "Ah used tae pay adventurers tae bring it back fae th' southern desert. Bit wi' th' bridge smashed, a dinnae."
<<endif>>\
<<elseif $WORLD.smith is 7>>\
<<set $WORLD.smithLevel to 2>>\
<<set $WORLD.smith to 8>>\
<<Restock "smith">>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hey, Finley. I found a whole bunch of this white powdery rock in a desert cave out south. Can you use it?"
@@color:Aqua;Finley@@: "Aye, <<print _PCaddress>>," he smiles, rubbing the powder between his fingers and sniffing it. "This glorious bit o' rock stoor 'ere is dolomite, an it's exactly whit a'm needin'. Ahl git tae upgrading mah goods tae steel richt awa'."
<<elseif $WORLD.smith is 8>>\
<!-- primed for the next forest quest: ??? -->\
The shop is presently stocking steel quality items.
c) No chats available
<<else>>\
@@color:Aqua;Finley@@: "Can I help ye?" the blacksmith inquires.
<<endif>>\
<<if _ShowStore is true>>\
<hr>\
<span id="SmithButtons"><<ShowSmithButtons>></span>
\
<span id="SmithStores">\
<<if $SmithTemp is "weapons">>\
<<Store $Smith>>\
<<elseif $SmithTemp is "armor">>\
<<Store $SmithArmor>>\
<<else>>\
Error in SmithTemp: $SmithTemp
<<endif>>\
</span>\
<span id="storereport">\
</span>\
<<endif>>\
<<SimplePic "witch.jpg">>\
@@color:LightGreen;Witch's Den@@
<<if ($WORLD.selene is 0) or ($WORLD.selene is 2)>>\
<span id="KeypSpace">\
<<link "space) Return to town" "TownSquare">>\
<<AdvanceTime 5>>
<<set $WORLD.selene to 0>>
<</link>>
</span>\
<<endif>>\
<hr>\
<<set _ExitLinks to "base">>\
<<set _Witch to "The Witch">>\
<<if $PC[$CC][$PCSeleneChat][1] is 2>>\
<<set _Witch to "Selene">>\
<<endif>>\
<<if $WORLD.LegacyVault is 1>>\
<<if $PC[$CC][$PCSeleneChat][12] is 0>>\
<<set $PC[$CC][$PCSeleneChat][12] to 1>>\
<<endif>>\
<<endif>>\
\
\
<<set _ChatAvailable to false>>\
<<for _i to 0; _i < $PC[$CC][$PCSeleneChat].length; _i++>>\
<<if $PC[$CC][$PCSeleneChat][_i] is 1>>\
<<set _ChatAvailable to true>>\
<<endif>>\
<</for>>\
<<if $PC[$CC][$PCSeleneChat][0] is 0>>\
<<set _ChatAvailable to true>>\
<<endif>>\
\
<<if $WORLD.selene is 0>>\
<<set _ExitLinks to "store">>\
<<if $PC[$CC][$PCSeleneChat][1] is 2>>\
<<if random(1,2) is 1>>\
Entering the hovel, you find Selene stirring her cauldron and chanting. Not wanting to interrupt, you wait patiently as she fetches a vial from a shelf and empties it into the cauldron. Instantly the brew bursts in flame, and she scoops up a metal bowl full and takes a sip.
<<if random(1,2) is 1>>\
"Hmm," she tosses it aside with disdain. "Needs more <<print either("salt","pepper","onion","garlic")>>."
<<else>>\
"Welcome <<print $PC[$CC][$PCname]>>," she turns to you at last. "What brings you to the Wayward Witch?"
<<endif>>\
<<else>>\
"Welcome <<print $PC[$CC][$PCname]>>," Selene greets you. "What brings you to the Wayward Witch?"
<<endif>>\
<<else>>\
Entering the hovel, you find a witch stirring a large iron cauldron and chanting . Not wanting to interrupt her casting, you wait patiently as she fetches a vial from a shelf and empties it into the cauldron. Instantly the brew bursts in flame, and she scoops up a metal bowl full and takes a sip.
<<if random(1,2) is 1>>\
"Hmm," she tosses it aside disdaindally. "Needs more <<print either("salt","pepper","onion","garlic")>>."
<<else>>\
"Welcome adventurer," she turns to you at last. "What brings you to the Wayward Witch?"
<<endif>>\
<<endif>>\
\
<<if _ChatAvailable is false>>\
c) No chats available
<<else>>\
<span id="KeypC">\
<<link "c) chat" "StoreSelene">>\
<<set $WORLD.selene to 1>>\
<<set $WORLD.datapasser to 0>>\
<</link>>
</span>\
<<endif>>\
\
<<set _ReagentCheck to false>>\
<<for _i to 0; _i < $WORLD.SeleneQuests.length; _i++>>\
<<if $WORLD.SeleneQuests[_i] is 2>>\
<<set _ReagentCheck to true>>\
<<endif>>\
<</for>>\
<<if _ReagentCheck is true>>\
<span id="KeypH">\
<<link "h) Turn in alchemical herbs" "StoreSelene">>
<<set $WORLD.selene to 3>>\
<<set $WORLD.datapasser to 0>>\
<</link>>
</span>\
<<endif>>\
<<elseif $WORLD.selene is 1>>\
<<set _ExitLinks to "questions">>\
<<set _CurrentQuestion to $WORLD.datapasser>>\
<<if _CurrentQuestion is 0>>\
<<if $PC[$CC][$PCSeleneChat][1] is 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hey, Selene."
@@color:Red;<<print _Witch>>@@: "<<print either("Ahh","Hello","Hey")>>, <<print $PC[$CC][$PCname]>>. <<print either("What can I do for you?","How's my favorite customer today?","Still with us, I see.")>>"
<<else>>\
<<set $PC[$CC][$PCSeleneChat][0] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hello. I'm here to explore the tower. My name is <<print $PC[$CC][$PCname]>>."
@@color:Red;<<print _Witch>>@@: "A pleasure to make your acquaintence," she nods. "Tower-climbers are most welcome here. Or at least their gold is. Though I'm sorry to say my shop is in a sorry state just now."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "This is a store? What do you sell besides empty bottles?"
@@color:Red;<<print _Witch>>@@: "Potions, mostly, but my stock is pretty low right now. The southern caravan is blocked by that pesky war down south, so I haven't been getting my usual shipments lately."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Can't you source herbs locally?"
@@color:Red;<<print _Witch>>@@: "Probably, but I'm not an adventurer," she shrugs. "I did try hiring one through the guild, but he never came back so I assume he either died horribly or lost too many battles. If he's still alive, he's probably a half <<print either("bunny","fox","goblin")>>, half <<print either("cat","goo-girl","tentacle-monster")>> hybrid with <<print either("twelve vaginas","watermelon-sized tits","an overbite")>> <<print either("locked in a cage","getting gang-banged by goblins","getting gang-banged by hellhounds","begging for the sweet release of death","giving blowjobs to monsters just to have something to eat")>> by now."
<<endif>>\
\
<!-- Unlocks -->\
<<if $PC[$CC][$PCSeleneChat][1] is 0>>\
<<set $PC[$CC][$PCSeleneChat][1] to 1>><!-- ask her about herself -->\
<<endif>>\
<<if $PC[$CC][$PCSeleneChat][2] is 0>>\
<<set $PC[$CC][$PCSeleneChat][2] to 1>><!-- ask about the tower -->\
<<endif>>\
<<if $PC[$CC][$PCSeleneChat][3] is 0>>\
<<set $PC[$CC][$PCSeleneChat][3] to 1>><!-- ask about (spelbooks?) and potions -->\
<<endif>>\
<<if $PC[$CC][$PCSeleneChat][10] is 0>>\
<<set $PC[$CC][$PCSeleneChat][10] to 1>><!-- ask about monsters -->\
<<endif>>\
<<elseif _CurrentQuestion is 1>>\
<<set $PC[$CC][$PCSeleneChat][1] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What's your name?"
@@color:Red;Selene@@: "I'm Selene," she curtsies. "Though I'm mostly known as the Wayward Witch by the town's residents. Or 'that nut in in a hut' by a few with an unusually long memory. You'd think that name would have died out after they burned my hut down. That's why I'm living in this shack in the wall right now."
<<if $PC[$CC][$PCsex] is "male">>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Selene? That's a nice name."
@@color:Red;Selene@@: "Thanks. A nice name plus 5 gold will buy five gold worth of squirrel nutsucks in these parts."
<<endif>>\
<!-- unlocks -->\
<<set $PC[$CC][$PCSeleneChat][4] to 1>><!-- Why did they burn down your hut? -->\
<<elseif _CurrentQuestion is 2>>\
<<set $PC[$CC][$PCSeleneChat][2] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What can you tell me about the tower?"
@@color:Red;Selene@@: "Ahh, the tower," she smirks. "Or, the //Tower of Triumph, Corporeal Vestment of the Goddess of Primal Darkness// if you want to be formal about it. But just between you and I, I prefer to think of it as 'the nasty deathtrap that brings customers and fools to my shop.'"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You've never ventured inside?"
@@color:Red;Selene@@: "Can't you tell?" she gestures up and down her body with a flourish. "Do you see any missing limbs? Lizard tails? Bat wings? You think I'm hiding a 12 inch cock under this dress? No, I'm one of the few residents of Crescentheart who are still 100% pure human with all the original parts, and no hidden extras. And I'd prefer to keep it that way, thank you."
<!-- Unlocks -->\
<<set $PC[$CC][$PCSeleneChat][11] to 1>><!-- how does transformation happen also unlocked by 11 -->\
<<elseif _CurrentQuestion is 3>>\
<<set $PC[$CC][$PCSeleneChat][3] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You mentioned potions. What can you tell me about those?"
@@color:Red;Selene@@: "Ahh, the wonders of alchemy. Best shortcut to magic there is. Sure, it's nice to to be able to toss out spells yourself, but potions don't run out of mana. On the other hand, you're probably better off casting an explosive fire spell than drinking a fire potion. Ideally of course, anyone planning to survive as an adventurer will keep both options available, but not everyone can be a mage, whereas anyone can carry a few potions around. I've never seen anyone transformed so badly they no longer had a mouth to drink with."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How smart do you have to be to learn magic?"
@@color:Red;Selene@@: "Well, technically any idiot can learn, but you'll need at least a certain amount of intellect to be any good at it."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How can I learn?"
@@color:Red;Selene@@: "Once in a while you might find an old spellbook in the tower, but the easiest way is to visit the College of Magic out in the desert down south. You'll have to pass some trials, but it's well worth the trip if you're strong enough to not die horribly along the way."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What about potions? Can you sell me those?"
@@color:Red;Selene@@: "I'd love to," she frowns. "But unfortunately I'm out of materials at the moment. I don't suppose you'd be willing to do a witch a favor and go hunting up some alchemical reagents?"
<!-- Unlocks -->\
<<set $PC[$CC][$PCSeleneChat][6] to 1>><!-- Offer to help with ingredients -->\
<<elseif _CurrentQuestion is 4>>\
<<set $PC[$CC][$PCSeleneChat][4] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Why did they burn down your hut?"
@@color:Red;Selene@@: "I never got a very good explanation for that," she shrugs. "Probably just superstitious yokels afraid of me for being a witch. Though it probably didn't help matters any that I turned that one excessively handsy-guy into a salamander. Or I suppose it might have something to do with that thousand gold I borrowed from the orphanage."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I don't recall seeing an orphanage in town."
@@color:Red;Selene@@: "Unfortunately it burned down later that night. Breaks my heart, all those poor orphans. May their souls rest in peace knowing that the money in their food and clothing fund was put to good use."
<!-- Unlocks -->\
<<set $PC[$CC][$PCSeleneChat][5] to 1>><!-- Did you seriously burn down an orphange? -->\
<<elseif _CurrentQuestion is 5>>\
<<set $PC[$CC][$PCSeleneChat][5] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Did you seriously burn down an orphanage?"
@@color:Red;Selene@@: "No, of course not," she seems annoyed by the question. "It was a complete coincidence, and nobody survived to identify me, so don't listen to anyone who says otherwise."
<<elseif _CurrentQuestion is 6>>\
<<set $PC[$CC][$PCSeleneChat][6] to 2>>\
<<for _SQ to 0; _SQ < $WORLD.SeleneQuests.length; _SQ++>>\
<<if $WORLD.SeleneQuests[_SQ] is 0>>\
<<set $WORLD.SeleneQuests[_SQ] to 1>>\
<<endif>>\
<</for>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Yes, I'd love to help you procure some reagents"
@@color:Red;Selene@@: "Really?" she seems surprised, but quickly recovers. "Great! I'd been getting herbs from the southern caravan, but with that gone our only option is to find local sources. Unfortunately I can't even tell you what's out there, let alone what I'd be able to make from it. I suggest you start by exploring the forest to the west of town, and bringing me any sort of flower or plant you can. I'll figure out the rest from there."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You're an alchemist but you don't even know what the local plants do?"
@@color:Red;Selene@@: "I'm a //witch//," she corrects you. "And a beautiful one at that. A beautiful witch who is not an adventurer and who wants very much to not get gang-raped by forest monsters and start growing dog ears and rabbit penises out of my face. That forest is dangerous, and if you even manage to come back at all, odds are good you'll come back a horrible mutant. But that's a risk I'm willing to take."
<<elseif _CurrentQuestion is 7>>\
<<set $PC[$CC][$PCSeleneChat][7] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What can you tell me about the magic of the tower?"
@@color:Red;Selene@@: "I only know the mythology behind it. When the Goddess of Primal Darkness made contact with the lower realms. From out her infinite depths, possibilities that had been unmanifest became realized, and our entire world was born. The tower is suppose to be the point of contact through which that change was inducted."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Is any of that true?"
@@color:Red;Selene@@: "Who knows? If it happened at all, it was thousands of years before I was born. The transformation magic is obviously real so there's probably something to it, but a thousand years is a long time for important details to get changed around through repeated tellings. Anyway, the top of the tower is supposed to house a shrine that's the closest you can get to the Goddess without dying, and right on the edge is where the greatest potential for transformation is supposed to be. Rather than just picking up body parts, supposedly you can ascend to a higher state of being entirely."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You mean, become a god?"
@@color:Red;Selene@@: "So they say," she nods, then shrugs. "But if anyone knows the truth, they haven't come back to tell their good friend Selene about it."
<<elseif _CurrentQuestion is 8>>\
<<set $PC[$CC][$PCSeleneChat][8] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: ""
@@color:Red;Selene@@: ""
<<elseif _CurrentQuestion is 9>>\
<<set $PC[$CC][$PCSeleneChat][9] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: ""
@@color:Red;Selene@@: ""
<<elseif _CurrentQuestion is 10>>\
<<set $PC[$CC][$PCSeleneChat][10] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What can you tell me about the monsters of the land?"
@@color:Red;Selene@@: "Which, the tower monsters or the forest monsters?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Both?"
@@color:Red;Selene@@: "Different breeds entirely," she shrugs. "Forest 'monsters' are mostly people who've been transformed into half-human/half-animal hybrids by local magic. Bunny-girls, centaurs, fox and wolf men and the like. Sometimes you'll find fairly normal animals that are the base forms from which these transformations happen. Ordinary horses and wolves for example. The magic emanating from the tower affects them as much as anybody. But they can't climb the tower to seek it out so they try to ascend in the next best way: though sexual exchange with higher forms, like humans. You get animal parts and they get...something, probably. At least that's my theory."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "And what about tower monsters?"
@@color:Red;Selene@@: "They're actual monsters. Far more dangerous."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Like what?"
@@color:Red;Selene@@: "Goblins, slimes, tentacle monsters, minotaurs, you name it. The higher levels house actual demons. Or so I've been told. You wouldn't catch me setting foot in there, so I can only repeat what my customers tell me. I suppose maybe it's actually a huge garden party in there with free beer and biscuits, and everyone's been lying to me this whole time. But I doubt it."
<!-- Unlocks -->\
<<set $PC[$CC][$PCSeleneChat][7] to 1>><!-- ascension magic of the tower -->\
<<set $PC[$CC][$PCSeleneChat][11] to 1>><!-- how does transformation happen also unlocked by 2 -->\
<<elseif _CurrentQuestion is 11>>\
<<set $PC[$CC][$PCSeleneChat][11] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "How does transformation work? What causes it?"
@@color:Red;Selene@@: "Why so interested?" she frowns at you. "You're not planning on doing it yourself, are you?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "...I just want to know more about how it all works. I'm planning on climbing the tower, so the more information I have the better my chances of survival."
@@color:Red;Selene@@: "Right," she seems unconvinced but continues anyway. "Mostly it's caused by sex and food. But not just any sex. You can sex up any monster you like without transforming, but if you're raped by one, they have a good chance of making you a little bit like they are."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So let's say I fight the exact same monster twice and win once and lose once. If it rapes me I'll be transformed, but if I rape it back I get off totally scot free?"
@@color:Red;Selene@@: "Yes," she nods. "Don't ask me why. Nobody knows. And it doesn't matter what sex is doing the raping, so it's not about simple fluid exchange. Maybe there's some royal court wizard out there who could explain the magic better, but I'm just a hedge witch."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "And food?"
@@color:Red;Selene@@: "If you eat or drink a part of a monster...meat, semen or breast milk typically, that will transform you instantly in some way, no sex required."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So blowjobs are dangerous?"
@@color:Red;Selene@@: "No, not like that," she shakes her head. "Fluids consumed during sex are safe provided you won the battle that led up to the encounter. But meat or fluids taken and consumed later will cause transformation. I sell bottles to collect fluids if you're interested. Or you can probably find a butcher knife from somebody else if that's more to your taste. Meat has the advantage that it also reduces hunger. I don't recommend transforming if you can avoid it, but it probably beats starving to death."
<<elseif _CurrentQuestion is 12>>\
<<set $PC[$CC][$PCSeleneChat][12] to 2>>\
<<set $PC[$CC][$PCSeleneChat][14] to 1>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hey, Selene. Do you know anything about the void rift on the south end of town?"
@@color:Red;Selene@@: "You mean The Legacy Vault? Sure, it's a standard extradimensional storage rift like you'd see in any major city. Pretty rare to have one out in the sticks like this, but the Tower attracts a lot of high-powered wizards, and a few of them got bored and cobbled it together a few years ago."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What does it do?"
@@color:Red;Selene@@: "It keys a pocket dimension to your ancestral line and lets anyone directly related to you access it. Mostly adventurers use it to transfer equipment to their descendants. A few of my customers swear by it, but I'm not a homeless adventurer getting raped to death by <<print either("trolls","hellhounds","tower monsters")>> every few days, so I haven't much use for it myself."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Any idea how to fix it?"
@@color:Red;Selene@@: "I hadn't realized it was broken," she raises an eyebrow. "But it probably just ruptured a leak on the inside that needs to be plugged. Shouldn't be difficult, but dimensional work takes a lot of energy because you're on the wrong side of the cube/tesseract law. Find somebody to handle the repair and I can be the battery for a small sum of 5000 gold. Or find an idiot with a huge mana pool and I'll do the repair, either way. But yeah, 5000 gold for my help."
<<if $WORLD.house.piggybank + $PC[$CC][$PCcoins] < 1000>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Really? 5000? That's a crazy bunch of money."
@@color:Red;Selene@@: "Maybe don't worry about it for now and try again later. It's possible you're simply too early game for this."
<<else>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Are you sure this is something you can help with? You didn't even know it was broken."
@@color:Red;Selene@@: "I'm a witch, not a gossip," she huffs. "Just because I'm out of the loop on current events doesn't make my magic any less powerful. I won't be able to do it all on my own, but I'm pretty sure you won't be able to do it without me unless you're friends with an archmage."
<<endif>>
<<elseif _CurrentQuestion is 13>>\
<<set $PC[$CC][$PCSeleneChat][13] to 2>>\
<<if $WORLD.orphanage is 0>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hey, Selene. Do you know anything about that burned-down building on the south end of town?"
@@color:Red;Selene@@: "No, not a thing," she smiles. But the smile doesn't reach her eyes. "Whatever would you be asking me for?"
<<if $PC[$CC][$PCSeleneChat][5] is 1>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Didn't you mention something about an orphanage burning down?"
@@color:Red;Selene@@: "Oh, right!" she laughs nervously. "That. Wooden building?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Yes."
@@color:Red;Selene@@: "Sign out front that says it's an orphanage?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Yes."
@@color:Red;Selene@@: "Sorry, doesn't ring a bell," she shrugs, then goes back to stirring her cauldron.
<<elseif $PC[$CC][$PCSeleneChat][5] is 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I was just wondering if maybe that was the orphanage that you didn't burn down."
@@color:Red;Selene@@: "Oh, that!" she laughs nervously. "I suppose it's possible. I don't frequent that part of town very often."
<<else>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I just thought you might know something about it."
@@color:Red;Selene@@: "Nope, not a thing," she takes a thoughtful sip from her cauldron, then goes back to stirring.
<<endif>>\
<<elseif ($WORLD.orphanage is 1) or ($WORLD.orphanage is 2)>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hey, Selene. I've rebuilt the orphanage on the south end of town."
@@color:Red;Selene@@: "What?" she frowns. "What would you go and do a thing like that for?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So the towns' orphans will have somewhere to go?"
@@color:Red;Selene@@: "Whatever," she rolls her eyes and goes back to sitting her cauldron. "But if it accidentally burns down one day, just remember that it wasn't my fault."
<<else>>\
Error: unrecognized orphanage state: ($WORLD.orphanage)
<<endif>>\
<<elseif _CurrentQuestion is 14>>\
<<if $WORLD.LegacyVault > 1>>\
(Minor) error: Selene dialogue option 14 should have been removed by Legacy Vault construction. Fixing.
<<set $PC[$CC][$PCSeleneChat][14] to 2>>\
<<else>>\
<<if $PC[$CC][$PCcoins] > 4999>>\
<<set $PC[$CC][$PCcoins] to $PC[$CC][$PCcoins] - 5000>>\
<<set $PC[$CC][$PCSeleneChat][14] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I'd like to take you up on your offer to help repair the Legacy Vault. Here's 5000 gold."
@@color:Red;Selene@@: "Oh, you're actually paying? <<print either("Ok, Great!","Woo! Score!")>> Head over when you're ready, and I'll be there."
<<else>>\
<<set _r to random(1,4)>>\
<<if _r is 1>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "5000 gold is a lot of money."
@@color:Red;Selene@@: "I know, right?" she smiles dreamily. "When are you handing it over?"
<<elseif _r is 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Is there any way I could talk you down from 5000 gold?"
@@color:Red;Selene@@: "Absolutely," she nods agreably. "Offer me a bribe."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "...uhh, ok. What if I offered you say, 1000 gold?"
@@color:Red;Selene@@: "I will happily take that bribe, and lower my price for helping you to 4000 gold."
<<elseif _r is 3>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Isn't 5000 gold a lot of money for this?"
@@color:Red;Selene@@: "I supose that depends on whether you have somebody else who'll do it for less."
<<else>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I'd really like your help with the vault. But I don't have 5000 gold."
@@color:Red;Selene@@: "I'd really like 5000 gold. But I don't care whether the vault gets repaired."
<<endif>>\
<<endif>>\
<<endif>>\
<<elseif _CurrentQuestion is 15>>\
Selene dialogue 15
<<endif>>\
<<elseif $WORLD.selene is 2>>\
<<set _ExitLinks to "store">>\
@@color:Red;Selene@@: "Anything else I can do for you?"
<<if _ChatAvailable is false>>\
c) No chats available
<<else>>\
<span id="KeypC">\
<<link "c) chat with Selene" "StoreSelene">>\
<<set $WORLD.selene to 1>>\
<<set $WORLD.datapasser to 0>>\
<</link>>
</span>\
<<endif>>\
<<elseif $WORLD.selene is 3>>\
<<set $WORLD.selene to 2>>\
<<set _ExitLinks to "continue">>\
<<set _WhichHerb to "error">>\
<<for _i to ($WORLD.SeleneQuests.length -1); _i > -1; _i-->>\
<<if $WORLD.SeleneQuests[_i] is 2>>\
<<set _WhichHerb to _i>>\
<<endif>>\
<</for>>\
\
<<set $WORLD.SeleneQuests[_WhichHerb] to 3>>\
<<Restock "selene">>\
\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hey Selene. I have some kind of forest plant for you."
<<if _WhichHerb is 0>>\
@@color:Red;Selene@@: "Daisies?" she looks over the white flowers. "These are pretty common in a lot of places. Nothing special, but I should be able to make various hair dyes out of them. It's an easy recipe, so I'll start stocking them right away."
<<elseif _WhichHerb is 1>>\
<<if $PC[$CC][$PCsex] is "male">>\
@@color:Red;Selene@@: "I think that's Skretch Grass" she frowns. "Not very much I can do with that besides, well...there is //one// thing I can make, but you probably wouldn't be interested."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What's that?"
@@color:Red;Selene@@: "A fertility-enhancing drink to help girls get pregnant. It won't do anything for a man though. Probably. I think. To be fair I've never known anyone to test it, but I don't recommend it."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Isn't there anything else you can do with it? Seems like a waste."
@@color:Red;Selene@@: "Could probably make something that would reverse the effect and turn it into a contraceptive."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I already can't become pregnant on account of not being a woman."
@@color:Red;Selene@@: "Right. Well, what about an aphrodisiac? Monsters can pick up on the scent of a girl in heat. I bet I could make an ointment that would reproduce that scent."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So they'll try to rape me?"
@@color:Red;Selene@@: "Well, get out there and bring me something else if you don't like it."
<<else>>\
@@color:Red;Selene@@: "I think that's Skretch Grass," she blinks. "I can make a couple things out of it, but it's most well-known as the base ingredient for fertility agents."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What would those do?"
@@color:Red;Selene@@: "Make it easy for you to become pregnant."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Oh."
@@color:Red;Selene@@: "I'll go ahead and start stocking Fertili-tea just in case you want to get knocked up by a boar or something."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I, uhh...really don't think i'd be interested in that."
@@color:Red;Selene@@: "You wouldn't?" she tilts her head. "Well, that's no problem. It also makes a pretty decent aphrodisiac. So if any lonely boars come by, I'll be able to sell them ointment that will dirve you so mad with lust that you'll be spreading your legs begging them to breed you full of little boar babies."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Wait, what? Who's side are you even on?"
@@color:Red;Selene@@: "Mine!" she smiles. "This will make me a lot of money. Thanks."
<<endif>>\
<<elseif _WhichHerb is 2>><!-- sunflowers -->\
@@color:Red;Selene@@: "Sunflowers?" she quirks up one eyebrow. "In this town, why am I not surprised?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What do you mean?"
@@color:Red;Selene@@: "I can use sunflowers to make a bunch of things, but most of them are body cosmetics. Penis growth, breast reduction, that sort of thing."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "That's nice and all, but how will that help me climb the tower?"
@@color:Red;Selene@@: "It probably won't," she admits. "Although you might find it useful if you're planning to tease rather than beat monsters into submission I suppose."
<<elseif _WhichHerb is 3>>\
@@color:Red;Selene@@: "Red roses?" she frowns. "That's going to be difficult."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What's the matter? Are they not useful?"
@@color:Red;Selene@@: "No, they're certainly useful. Rose petals area crucial ingredient in various types of resistence potions. They don't last very long, but they reduce the amount of damage you take from various effects. Fire and magic primarily."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "That sounds great. What's the catch?"
@@color:Red;Selene@@: "The other ingredients are expensive and a little hard to come by. I'll start brewing them, but I probably won't be able to make very many of them. You should probably plan to use them sparingly."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Shouldn't be a problem. Fire and magic attacks don't seem to be very common."
<<elseif _WhichHerb is 4>>\
@@color:Red;Selene@@: "Goose berries?" she smiles as you hand them over.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "You seem excited. What can you do with these?"
@@color:Red;Selene@@: "Absolutely!" she smiles then pops one into her mouth. "They make fantastic smoothies."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "I was thinking more in terms of potions."
@@color:Red;Selene@@: "Oh," she seems disappointed. "Well, they do make a pretty good antivenom I suppose."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "That sounds like a real winner."
@@color:Red;Selene@@: "Yes, but they taste a lot better raw than they do in potions," she sneaks a few more into her mouth before firing up her cauldron.
<<elseif _WhichHerb is 5>><!-- brown mushrooms -->\
@@color:Red;Selene@@: "Oh, are those hazorgoth brown mushrooms?" she seems very interested. "These are excellent. I can make a pretty adequate healing potion out of these."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Only adequate?"
@@color:Red;Selene@@: "Would you prefer inadequate? I could dilute them down if you'd like."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "No, no...adequate is ok I guess."
@@color:Red;Selene@@: "Great! I'll get started right away."
<<elseif _WhichHerb is 6>>\
@@color:Red;Selene@@: "Azalea?" she looks thoughtful. "Those are easy to work with, but they're sort of a mixed bag."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What do they make?"
@@color:Red;Selene@@: "Rage potions. They'll send you into a berserker fury that massively increases your ability to hit an opponent with physical attacks. But when you're that focused on mangling an opponent, it tends to be harder to defend yourself."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Extra attack for less dodge? That seems like a reasonable compromise."
@@color:Red;Selene@@: "Also, you'll be reduced to a raving, mindless beast. So it will be hard to do much besides hit your opponent until it wears off. "
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hmm. Ok."
<<elseif _WhichHerb is 7>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hey, Selene. I found a pretty blue flower."
@@color:Red;Selene@@: "Caerulus blossom?," she smiles. "How wonderful! Where ever did you find this?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Out in the forest, like all the others. What can you make with it?"
@@color:Red;Selene@@: "Nothing important," she pockets the flower, her eyes shifting around nervously. "Oh, also water walking potions."
<<elseif _WhichHerb is 8>>\
@@color:Red;Selene@@: "Unnamed flower 9 has not been implemented!"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Oh, that's a little sad. "
<<elseif _WhichHerb is 9>>\
@@color:Red;Selene@@: "Unnamed flower 10 has not been implemented!"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Oh, that's a little sad. "
<<else>>\
@@color:Red;Error: herb is _WhichHerb
<<endif>>\
<<AwardAchievement "Herbalist">>\
\
<<set _AchieveCheck to true>>\
<<for _i to 0; _i < 7; _i++>>\
<<if $WORLD.SeleneQuests[_i] < 3>>\
<<set _AchieveCheck to false>>\
<<endif>>\
<</for>>\
<<if _AchieveCheck is true>>\
<<AwardAchievement "Potionmaster">>\
<<endif>>\
<<endif>>\
<hr>\
\
\
\
<<if _ExitLinks is "base">>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) I'm just here to shop, thanks" "StoreSelene">>
<<set $WORLD.selene to 2>>\
<<AdvanceTime 5>>
<</link>>\
</span>
<<elseif _ExitLinks is "continue">>\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) Continue" "StoreSelene">>
<<set $WORLD.selene to 2>>\
<<AdvanceTime 5>>
<</link>>\
</span>
<<set _ReagentCheck to false>>\
<<for _i to 0; _i < $WORLD.SeleneQuests.length; _i++>>\
<<if $WORLD.SeleneQuests[_i] is 2>>\
<<set _ReagentCheck to true>>\
<<endif>>\
<</for>>\
<<if _ReagentCheck is true>>\
<span id="KeypH">\
<<link "h) Turn in alchemical herbs" "StoreSelene">>
<<set $WORLD.selene to 3>>\
<<set $WORLD.datapasser to 0>>\
<</link>>\
</span>
<<endif>>\
<<elseif _ExitLinks is "questions">>\
<<set _AskTheseQuestions to []>>\
<<set _CurrentQuestionPTR to 0>>\
\
<<set _UnaskedCantAsk to 0>>\
<<set _UnaskedCANAsk to 1>>\
<<set _AlreadyAnswered to 2>>\
\
<!-- reagent hack -->
<<if $PC[$CC][$PCSeleneChat][3] is 2>>\
<<set _SSPmax to 7>>\
<<set _KnownCount to 0>>\
<<for _i to 0; _i < _SSPmax; _i++>>\
<<if $WORLD.SeleneQuests[_i] is 3>>\
<<set _KnownCount to _KnownCount +1>>\
<<endif>>\
<</for>>\
<<if _SSPmax neq _KnownCount>>\
<<set $PC[$CC][$PCSeleneChat][6] to 1>>\
<<endif>>\
<<endif>>\
\
<<for _i to 0; _i < $PC[$CC][$PCSeleneChat].length; _i++>>\
<<if $PC[$CC][$PCSeleneChat][_i] is 1>>\
<<set _AskTheseQuestions[_CurrentQuestionPTR] to _i>>\
<<set _CurrentQuestionPTR to _CurrentQuestionPTR +1>>\
<<endif>>\
<</for>>\
\
<<set _QuestionPool to []>>\
<<set _QuestionPool[0] to "Introduce yourself">>\
<<set _QuestionPool[1] to "Ask her about herself">>\
<<set _QuestionPool[2] to "Ask about the tower">>\
<<set _QuestionPool[3] to "Ask about her wares">>\
<<set _QuestionPool[4] to "Ask about her hut being burned down">>\
<<set _QuestionPool[5] to "Ask if she burned down the orphanage">>\
<<set _QuestionPool[6] to "Accept her offer to help procure reagents">>\
<<set _QuestionPool[7] to "Ask about the ascension magic of the tower">>\
<<set _QuestionPool[8] to "question 8">>\
<<set _QuestionPool[9] to "question 9">>\
<<set _QuestionPool[10] to "Ask about monsters">>\
<<set _QuestionPool[11] to "Ask about transformation">>\
<<set _QuestionPool[12] to "Do you know anything about the void rift on the south end of town?">>\
<<set _QuestionPool[13] to "Ask about the orphanage">>\
<<set _QuestionPool[14] to "Try to negotiate a lower price for help with the Legacy Vault">>\
<<if $PC[$CC][$PCcoins] > 4999>>\
<<set _QuestionPool[14] to "Pay 5000 gold for Selene's help with the Legacy Vault">>\
<<endif>>\
\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) I'm done asking questions for now" "StoreSelene">>
<<set $WORLD.selene to 2>>
<</link>>\
</span>
\
<<set _SpanTexts to ["KeypOne","KeypTwo","KeypThree","KeypFour","KeypFive","KeypSix"]>>\
<<set _KeyChars to ["1","2","3","4","5","6"]>>\
\
<<set _NextQuestion to 0>>\
<<for _i to 0; _i < _AskTheseQuestions.length; _i++>>\
<span @id="_SpanTexts[_NextQuestion]">\
<<set _NextQuestion to _NextQuestion +1>>\
<<set _LinkText to _KeyChars[_i] + ") " + _QuestionPool[_AskTheseQuestions[_i]]>>\
<<capture _i>>\
<<link _LinkText "StoreSelene">>
<<set $WORLD.datapasser to _AskTheseQuestions[_i]>>\
<</link>>
<</capture>>\
</span>\
<</for>>\
<<elseif _ExitLinks is "store">>\
<<Store $Selene>>
<<if $DebugMode is true>>\
debug:
<<for _i to 0; _i < $STORE[_s].length; _i++>>\
_i) <<print $STORE[$Selene][_i]>>
<</for>>\
<<endif>>\
<<endif>>\
\
<<if $DebugMode is true>>\
<hr>\
debug
1: SeleneChat is: <<print $PC[$CC][$PCSeleneChat]>>
2: AsktheseQs is: <<print _AskTheseQuestions>>
3: SeleneQuests : <<print $WORLD.SeleneQuests>>
<hr>\
<<endif>>\
<<set _ChatAvailable to false>>\
<<for _i to 0; _i < $PC[$CC][$PCSkittersChat].length; _i++>>\
<<if $PC[$CC][$PCSkittersChat][_i] is 1>>\
<<set _ChatAvailable to true>>\
<<endif>>\
<</for>>\
<<if $PC[$CC][$PCSkittersChat][0] is 0>>\
<<set _ChatAvailable to true>>\
<<endif>>\
\
<<if $SkittersTalk is "yes">>\
<<SimplePic "skitters.png">>\
@@color:LightGreen;Ye Olde Pawnshoppe@@
<hr>\
<<set _CurrentQuestion to $WORLD.datapasser>>\
\
<<if _CurrentQuestion is 0>>\
<<if $PC[$CC][$PCSkittersChat][0] is 0>>\
<<set $PC[$CC][$PCSkittersChat][0] to 2>>\
The shopkeeper here is an overweight man with tentacles for hands and a strangely serpentine neck. Seeing you approach to talk, he glances around nervously.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hi," you greet the proprieter. "I'm $PC[$CC][$PCname]."
@@color:LightGreen;Shopkeeper@@: "Skitters," he replies with a clearly inhuman voice. "Can I get you anything?"
<!-- Unlocks -->\
<<if $PC[$CC][$PCSkittersChat][1] is 0>>\
<<set $PC[$CC][$PCSkittersChat][1] to 1>><!-- Ask about his shop-->\
<<endif>>\
<<if $PC[$CC][$PCSkittersChat][2] is 0>>\
<<set $PC[$CC][$PCSkittersChat][2] to 1>><!-- Ask about his hands -->\
<<endif>>\
<<else>>\
@@color:LightGreen;Skitters@@: "Hello, <<print $PC[$CC][$PCname]>>. What can I do for you?"
<<endif>>\
<<elseif _CurrentQuestion is 1>>\
<<set $PC[$CC][$PCSkittersChat][1] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Could you tell me about your shop? Looks like you don't have anything for sale."
@@color:LightGreen;Skitters@@: "Only customers I get are adventurers looking to sell tower loot," he explains. "But words gets around pretty fast when I get my hands...er, well...tentacles...on anything good, and stock doesn't usually last long. The junk I mostly give to Gerard to smelt down for raw materials."
<!-- unlocks -->\
<<if $PC[$CC][$PCSkittersChat][3] is 0>>\
<<set $PC[$CC][$PCSkittersChat][3] to 1>><!-- Ask about tower loot -->\
<<endif>>\
<<if $PC[$CC][$PCSkittersChat][4] is 0>>\
<<set $PC[$CC][$PCSkittersChat][4] to 1>><!-- Ask about Gerard -->\
<<endif>>\
<<elseif _CurrentQuestion is 2>>\
<<set $PC[$CC][$PCSkittersChat][2] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So uhh, what happened to your hands?"
He sighs and shrugs, staring at them with clear discomfort.
@@color:LightGreen;Skitters@@: "It's not that uncommon, really. Like lots of folks in town, I used to be an adventurer. Had a wish, so I tried to reach the Goddess' Shrine up top to get it granted. Instead I ended up with these. Trust me, it's not as bad as it could have been. It took some getting used to, but at least I still //have// hands. It could have been a fish or something that got me instead of tentacle monster."
<<if $PC[$CC][$PCSkittersChat][5] is 0>>\
<<set $PC[$CC][$PCSkittersChat][5] to 1>><!-- Ask about the shrine-->\
<<endif>>\
<<if $PC[$CC][$PCSkittersChat][6] is 0>>\
<<set $PC[$CC][$PCSkittersChat][6] to 1>><!-- Ask about monsters-->\
<<endif>>\
<<elseif _CurrentQuestion is 3>>\
<<set $PC[$CC][$PCSkittersChat][3] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What exactly qualifies as 'quality' loot?"
@@color:LightGreen;Skitters@@: "Better materials mostly. There's genuine magic gear in there, but nobody's made it high enough to bring any of that back in months. Best you'll probably see right now is ordinary steel and mithril, and even that's been rare lately. I suspect most everything people sell me is gear Gerard made himself at some point, then some poor fool died wearing it and a monster ended up with it."
<!-- unlocks -->\
<<if $PC[$CC][$PCSkittersChat][8] is 0>>\
<<set $PC[$CC][$PCSkittersChat][8] to 1>>
<<endif>>\
<<elseif _CurrentQuestion is 4>>\
<<set $PC[$CC][$PCSkittersChat][4] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Gerard?"
@@color:LightGreen;Skitters@@: "Yeah, he's the blacksmith here in town. We used to be adventuring buddies back in the day. Us and Neris. Those two knew each other since forever, and they brought me onboard after they lost some other guy in some big battle. Made a pretty good team, the three of us. For a while anyway. They lasted a lot longer than I did. I wonder what happened to Neris, sometimes. Gerard doesn't like to talk about it. Anyway, yeah...people sell me stuff and if it's too banged up I send it his way."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What does he do with it?"
@@color:LightGreen;Skitters@@: "Melts it down and forges new gear with it, mostly. There's been a supply shortage around here lately, and we've been having to make do. It's probably a big part of why most adventurers seem to be struggling on the lower floors right now. Deck yourself out in decent armor and a basic gobbo can't even scratch you. But copper and and brass are pretty soft, and that's the best most people can get their hands on right now."
<<elseif _CurrentQuestion is 5>>\
<<set $PC[$CC][$PCSkittersChat][5] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So the Shrine of the Goddess, it grants wishes?"
@@color:LightGreen;Skitters@@: "That's what the legend says," he shrugs. "At least some versions of it. The original story was written in Sythian, I think, and translations vary. It grants a wish, it turns you into your ideal version of your self, it turns you into a god...something like that. I wasn't too worried about the particulars. Sure, I had I wish a wanted granted, but if I'd ended up ascending to godhood instead, I doubt I'd have complained very much."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "But how do you know it's even something good up there at all? It's a shrine to a goddess of //darkness//, right? That doesn't sound very good to me."
@@color:LightGreen;Skitters@@: "Don't ask me," he shrugs. "I'm just a failed adventure turned failing shopkeeper. But I figure where there's smoke, there's fire, and an awful lot of people seem pretty convinced there's something amazing in there past all the monsters."
<<if $PC[$CC][$PCSkittersChat][7] is 0>>\
<<set $PC[$CC][$PCSkittersChat][7] to 1>>\
<<endif>>\
<<elseif _CurrentQuestion is 6>>\
<<set $PC[$CC][$PCSkittersChat][6] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So tentacle monsters? And fish? What else is in the tower?"
@@color:LightGreen;Skitters@@: "No, fishes aren't in the tower. No water in there. At least, not as far as I ever made it. But the tower's magic extends far enough to hit the salt beaches down south. Every now and then somebody gets the bright idea to go for a swim, and it tends not to end well."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "And the tower?
@@color:LightGreen;Skitters@@: "The lower levels are mostly goblins and slimes. Nothing too bad. If a goblin gets you, it might turn you green but at least you'll keep all your same parts more or less. And slime transformations, yeah they look pretty weird, but they're sort of a special case and it's not as bad as you might think. Slimes in their natural state are just blobs to begin with, but they can change their shape so they generally take on human form to have an easier time seducing aventurers."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Why?"
@@color:LightGreen;Skitters@@: "They eat our sexual fluids for food," he explains. "They'd actually be pretty harmless if it weren't for the tower. Down south you'll even find them working in brothels. Doesn't make sense for them to hurt anybody when we're their source of food. It'd be like killing a dairy cow. Anyway, the tower magic, crazy as it is, is smart. It picks up on whatever form a slime takes on and you end up with that instead of just becoming a blob, so you keep your arms and legs. Usually."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "And tentacle monsters?"
@@color:LightGreen;Skitters@@: "Most of the time you have to go fairly high up to find those," he glances at his hands. "But every now and then something nasty gets bored and visits the lower floors. Me, I was injured after a battle with a minotaur, you'll find those just a couple floors up, and on my way back down I stumbled on a room with a nice, clean bed. Decided to take a nap to heal up, and woke up to a tentacle monster in bed with me. Didn't have the strength to fight it off and it, well...let's just say that's how I got my hands."
<<elseif _CurrentQuestion is 7>>\
<<set $PC[$CC][$PCSkittersChat][7] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What was your wish?"
@@color:LightGreen;Skitters@@: "There was a girl down south," he explains sadly. "We were engaged. Her family liked me, but, well..."
He hides his hands in his pockets and sighs.
@@color:LightGreen;Skitters@@: "It doesn't matter anymore."
<<elseif _CurrentQuestion is 8>>\
<<set $PC[$CC][$PCSkittersChat][8] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Why don't people make it as high up anymore? Is the tower more dangerous than it used to be?"
@@color:LightGreen;Skitters@@: "I'm probably not the best person ask," he admits. "I'm a bit out of the loop, but a few of my customers have mentioned some sort of crazy boss monster from a higher floor that took residence closer to the ground real recently"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So everybody's bottlenecked? If somebody could beat it, then everybody would be able to climb higher again?"
@@color:LightGreen;Skitters@@: "Sure, that'll probably happen sooner or later. The tower changes itself up from time to time. Just the nature of its magic. This isn't the first time something's happened that's kept people stuck on the lower floors. Probably won't be the last time either."
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "What was it last time? Another boss monster?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "No, the last bottleneck was when some sort of crazy chimeric monstrosity from the higher floors went on a lower level rampage. Contaminated all the easy monsters everybody had a handle on with high-powered magic. So for a while even ordinary goblins were running around breathing fire and shooting webs out their ass and things. Took a long time to clean up after that incident."
<<elseif _CurrentQuestion is 9>>\
<<set $PC[$CC][$PCSkittersChat][9] to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Do you know anything about that unconateidn void rift on the south end of town?"
@@color:LightGreen;Skitters@@: "There's a void rift in town? Where?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "In the building across the way from Daphne's Jewelry. There's a tree with a clock in it out front."
@@color:LightGreen;Skitters@@: "Wait, you mean the Legacy Vault? Did it break?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Maybe? All it is right now is a giant ball of magic shooting out bolts of lightning. What's suppsed to be there?"
@@color:LightGreen;Skitters@@: "Oh yeah, that's definitely not right," he frowns. "The Legacy Vault is is an extradimensional storage chamber made for passing on heirlooms. I think the story was that some tower-climbing Archmage built it a few generations ag, but it had already been here for ages when I first came to town so who knwos if he's still alive. If it's broken, there are going to be a lot of very upset adventurers.
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Any idea how to fix it?"
@@color:LightGreen;Skitters@@: "Sorry, no. That's way above my paygrade. if you know any high-class wizards, I'd start with them.
<<else>>\
Error: unrecognized question: _CurrentQuestion
<<endif>>\
<hr>\
<<set _AskTheseQuestions to []>>\
<<set _CurrentQuestionPTR to 0>>\
\
<<set _UnaskedCantAsk to 0>>\
<<set _UnaskedCANAsk to 1>>\
<<set _AlreadyAnswered to 2>>\
\
<!-- unlocked by external events -->\
<<if ($PC[$CC][$PCSkittersChat][11] is 0) and ($PC[$CC][$PChtze] > 4)>>\
<<set $PC[$CC][$PCSkittersChat][11] to 1>>\
<<endif>>\
\
<<for _i to 0; _i < $PC[$CC][$PCSkittersChat].length; _i++>>\
<<if $PC[$CC][$PCSkittersChat][_i] is 1>>\
<<set _AskTheseQuestions[_CurrentQuestionPTR] to _i>>\
<<set _CurrentQuestionPTR to _CurrentQuestionPTR +1>>\
<<endif>>\
<</for>>\
\
<<set _QuestionPool to []>>\
<<set _QuestionPool[0] to "Introduce yourself">>\
<<set _QuestionPool[1] to "Ask about the shop">>\
<<set _QuestionPool[2] to "Ask about his hands">>\
<<set _QuestionPool[3] to "Ask about quality loot">>\
<<set _QuestionPool[4] to "Ask about Gerard">>\
<<set _QuestionPool[5] to "Ask about the shrine">>\
<<set _QuestionPool[6] to "Ask about monsters">>\
<<set _QuestionPool[7] to "What was your wish?">>\
<<set _QuestionPool[8] to "Why don't adventurers climb as high anymore?">>\
<<set _QuestionPool[9] to "Do you know anything about that unconateidn void rift on the south end of town?">>\
<<set _QuestionPool[10] to "">>\
\
@@color:Gold;Options@@
<span id="KeypSpace">\
<<link "space) I'm done talking for now" "StorePawn">>
<<set $WORLD.gstore to 2>>\
<<AdvanceTime 5>>
<<unset $SkittersTalk>>\
<</link>>\
</span>
\
<<set _SpanTexts to ["KeypOne","KeypTwo","KeypThree","KeypFour","KeypFive","KeypSix"]>>\
<<set _KeyChars to ["1","2","3","4","5","6"]>>\
\
<<set _NextQuestion to 0>>\
<<for _i to 0; _i < _AskTheseQuestions.length; _i++>>\
<span @id="_SpanTexts[_NextQuestion]">\
<<set _NextQuestion to _NextQuestion +1>>\
<<set _LinkText to _KeyChars[_i] + ") " + _QuestionPool[_AskTheseQuestions[_i]]>>\
<<capture _i>>\
<<link _LinkText "StorePawn">>
<<set $WORLD.datapasser to _AskTheseQuestions[_i]>>\
<</link>>
<</capture>>\
</span>\
<</for>>\
<<else>>\
<<SimplePic "skitters.png">>\
@@color:LightGreen;Ye Olde Pawnshoppe@@
<span id="KeypSpace">\
<<link "space) Return to town" "TownSquare">>
<<AdvanceTime 5>>
<</link>>\
</span>
<<if _ChatAvailable is false>>\
c) No chats available
<<elseif $PC[$CC][$PCSkittersChat][1] is 2>>\
<span id="KeypC">\
<<link "c) Chat with Skitters" "StorePawn">>
<<set $SkittersTalk to "yes">>\
<<set $WORLD.datapasser to 0>>\
<</link>>\
</span>
<<else>>\
<span id="KeypC">\
<<link "c) Chat with the shopkeeper" "StorePawn">>
<<set $SkittersTalk to "yes">>\
<<set $WORLD.datapasser to 0>>\
<</link>>\
</span>
<<endif>>\
<hr>\
<<Pawn>>
<<endif>>\
<<if $DebugMode is true>>\
<hr>\
Skitters: <<print $PC[$CC][$PCSkittersChat]>>
<<endif>>\@@color:Gold;Magic Circle@@
<hr>\
@@color:Gold;Navigation@@
<span id="KeypOne">\
<<link "1) Town square" "TownSquare">>
<<AdvanceTime 5>>
<</link>>\
</span>
@@color:Gold;Sexy times with a defeated <<print $Mon.name>>@@
<<set $WORLD.dialogue to 0>>\
<hr>
<<set _mon to $Mon.name>>\
<<set _wonby to "fight">>\
<<set _msex to $Mon.sex>>\
<<set _heshe to "she">>\
<<set _hisher to "her">>\
<<set _himher to "her">>\
<<set _mhasdick to false>>\
<<set _mhasboobs to false>>\
<<set _mhaspussy to false>>\
<<if _msex is "male">>
<<set _msex to "m">>\
<<set _heshe to "he">>\
<<set _hisher to "his">>\
<<set _himher to "him">>\
<<set _mhasdick to true>>\
<<elseif _msex is "herm">>\
<<set _msex to "h">>\
<<set _mhasdick to true>>\
<<set _mhasboobs to true>>\
<<set _mhaspussy to true>>\
<<elseif _msex is "female">>\
<<set _msex to "f">>\
<<set _mhasboobs to true>>\
<<set _mhaspussy to true>>\
<<endif>>\
<<set _psex to $PC[$CC][$PCsex]>>\
<<set _phasdick to true>>\
<<set _phasboobs to false>>\
<<set _phaspussy to false>>\
<!-- implement: this should grab from body parts -->\
<<if _psex is "male">>\
<<set _psex to "m">>\
<<elseif _psex is "female">>\
<<set _phasdick to false>>\
<<set _phasboobs to true>>\
<<set _phaspussy to true>>\
<<set _psex to "f">>\
<<elseif _psex is "hermaphrodite">>\
<<set _phasdick to true>>\
<<set _phasboobs to true>>\
<<set _phaspussy to true>>\
<<set _psex to "h">>\
<<endif>>\
\
<<if _mon is "bunny">>\
<<include "VictoryBunny">>\
<<elseif _mon is "cat">>\
<<include "VictoryCat">>\
<<elseif _mon is "wolf">>\
<<include "VictoryWolf">>\
<<elseif _mon is "centaur">>\
<<include "VictoryCentaur">>\
<<elseif _mon is "goblin">>\
<<include "VictoryGoblin">>\
<<elseif _mon is "slime">>\
<<include "VictorySlime">>\
<<elseif _mon is "naga">>\
<<include "VictoryNaga">>\
<<elseif _mon is "spider">>\
<<include "VictorySpider">>\
<<elseif _mon is "">>\
<<include "Victory">>\
<<elseif _mon is "">>\
<<include "Victory">>\
<<elseif _mon is "">>\
<<include "Victory">>\
<<elseif _mon is "">>\
<<include "Victory">>\
<<elseif _mon is "">>\
<<include "Victory">>\
<<else>>\
Implement victory sex for _msex _mon
<<endif>>\
\
<<if $DebugMode is true>>\
<hr>
@@color:Gold;Debug immortality@@
<span id="KeypZ">\
<<link "z) Ressurect here" $ReturnFromMenu>>
<<FullyHeal>>
<<set $DisableMenu to false>>
<</link>>\
</span>
<<endif>>\
<<set $WORLD.dialogue to 0>><<if $Mon.name.includes("Zehtalia")>>\
<<include "DefeatBoss">>\
<<elseif $Mon.name.includes("Neris")>>\
<<include "DefeatBoss">>\
<<else>>\
@@color:Gold;You have lost to a <<print $Mon.name>>!@@
<<set $WORLD.dialogue to 0>>\
<hr>
<<set _mon to $Mon.morph>>\
<<set _wonby to "fight">>\
<<set _msex to $Mon.sex>>\
<<set _heshe to "she">>\
<<set _hisher to "her">>\
<<set _himher to "her">>\
<<set _mhasdick to false>>\
<<set _mhasboobs to false>>\
<<set _mhaspussy to false>>\
<<if _msex is "male">>\
<<set _msex to "m">>\
<<set _heshe to "he">>\
<<set _hisher to "his">>\
<<set _himher to "him">>\
<<set _hasdick to true>>\
<<elseif _msex is "herm">>\
<<set _msex to "h">>\
<<set _mhasdick to true>>\
<<set _mhasboobs to true>>\
<<set _mhaspussy to true>>\
<<elseif _msex is "female">>\
<<set _msex to "f">>\
<<set _hasboobs to true>>\
<<set _haspussy to true>>\
<<endif>>\
<<set _psex to $PC[$CC][$PCsex]>>\
<<set _phasdick to true>>\
<<set _phasboobs to false>>\
<<set _phaspussy to false>>\
<!-- implement: this should grab from body parts -->\
<<if _psex is "male">>\
<<set _psex to "m">>\
<<elseif _psex is "female">>\
<<set _phasdick to false>>\
<<set _phasboobs to true>>\
<<set _phaspussy to true>>\
<<set _psex to "f">>\
<<elseif _psex is "hermaphrodite">>\
<<set _phasdick to true>>\
<<set _phasboobs to true>>\
<<set _phaspussy to true>>\
<<set _psex to "h">>\
<<endif>>\
\
<<if _mon is "bunny-morph">>\
<<include "DefeatBunny">>\
<<elseif _mon is "cat-morph">>\
<<include "DefeatCat">>\
<<elseif _mon is "wolf-morph">>\
<<include "DefeatWolf">>\
<<elseif _mon is "wolf">>\
<<include "DefeatWolfquad">>\
<<elseif _mon is "fox-morph">>\
<<include "DefeatFox">>\
<<elseif _mon is "horse">>\
<<include "DefeatHorse">>\
<<elseif _mon is "snake">>\
<<include "DefeatSnake">>\
<<elseif _mon is "centaur">>\
<<include "DefeatCentaur">>\
<<elseif _mon is "human">>\
<<include "DefeatHuman">>\
<<elseif _mon is "goblin">>\
<<include "DefeatGoblin">>\
<<elseif _mon is "slime">>\
<<include "DefeatSlime">>\
<<elseif _mon is "naga">>\
<<include "DefeatNaga">>\
<<elseif _mon is "spider">>\
<<include "DefeatSpider">>\
<<elseif _mon is "imp">>\
<<include "DefeatImp">>\
<<elseif _mon is "hellhound">>\
<<include "DefeatHellhound">>\
<<elseif _mon is "cow" or _mon is "minotaur">>\
<<include "DefeatMinotaur">>\
<<elseif _mon is "drider">>\
<<include "DefeatDrider">>\
<<elseif _mon is "tentacle">>\
<<include "DefeatTentacle">>\
<<elseif _mon is "demon">>\
<<include "DefeatDemon">>\
<<elseif _mon is "Charyss">>\
<<include "DefeatDemon">>\
<<elseif _mon is "ant">>\
<<include "DefeatAnt">>\
<<elseif _mon is "scorpion">>\
<<include "DefeatScorpion">>\
<<elseif _mon is "harpy">>\
<<include "DefeatHarpy">>\
<<elseif (_mon is "rat-morph") or (_mon is "ratkin")>>\
<<include "DefeatRatkin">>\
<<elseif _mon is "hydra">>\
<<include "DefeatHydra">>\
<<elseif _mon is "troll">>\
<<include "DefeatTroll">>\
<<else>>\
Implement defeat sex for _msex _mon
<<endif>>\
<<endif>>\
<<if $DebugMode is true>>\
<hr>
@@color:Gold;Debug options@@
<span id="KeypD">\
<<link "d) Stay here after combat" $ReturnFromMenu>>
<<set $DisableMenu to false>>
<</link>>\
</span>
<<endif>>\
<<widget "GainPerksFromAchievements">>\
<<for _i to 0; _i < _achieves.length; _i++>>\
<<if $Achievements[_i] is true>>\
<<if _achieves[_i].type is "perkpoints">>\
<<set _availperks to _availperks +1>>\
<<elseif _achieves[_i].type is "perm">>\
<<GainPerk _achieves.name>>\
<<endif>>\
<<endif>>\
<</for>>\
<</widget>>\
<<widget "GainPerk">>\
<<set $PC[$CC][$PCperks][$PC[$CC][$PCperks].length] to $args[0]>>\
<</widget>>\
<<widget "HasAchievement">>\
<<set _ha to $args[0]>>\
<<GrabData "achievements">>\
<<set $MiscPoke to false>>\
<<for _i to 0; _i < _achieves.length; _i++>>\
<<if _achieves[_i].name is _ha>>\
<<if $Achievements[_achieves.id] > 0>>\
<<set $MiscPoke to $Achievements[_achieves.id]>>\
<<endif>>\
<<endif>>\
<</for>>\
<</widget>>\
<<widget "TrapAchieveTester">>\
<<if $args[0] is "avoid">>\
<<set $PC[$CC][$PCmisc].trapavoid to $PC[$CC][$PCmisc].trapavoid +1>>\
<<if $PC[$CC][$PCmisc].trapavoid > 2>>\
<<AwardAchievement "Rogue">>\
<<endif>>\
<<elseif $args[0] is "trigger">>\
<<set $PC[$CC][$PCmisc].traptrigger to $PC[$CC][$PCmisc].traptrigger +1>>\
<<AwardAchievement "Trapmaster">>\
<<else>>\
@@color:Red;Error in TrapAchieveTester: <<print $args[0]>>\
<<endif>>\
<</widget>>\
<<widget "AwardAchievement">>\
<<set _awa to setup.AchievementHandler($args[0], "FETCH", -1)>>\
<<set _aID to _awa[0]>>\
<<if _aID > -1>>\
<<set _PChas to $Achievements[_aID]>>\
<<if _PChas is 0>>\
<<set $Achievements[_aID] to 1>>\
<br>@@color:Gold;Achievement earned!@@: $args[0]
<<if _awa[1].type is "perk">>(Perk) <<endif>><<print _awa[1].does>>
<<else>>\
<!-- player already has -->\
<<endif>>\
<<else>>\
@@color:Red;Error in AwardAchievement: $args[0] not found@@
<<endif>>\
<</widget>>\
<<widget "AwardIntegerAchievement">>\
<<set _awa to $args[0]>>\
<<set _NewMaxValue to $args[1]>>\
<<GrabData "achievements">>\
<<set _foo to -1>>\
<<for _i to 0; _i < _achieves.length; _i++>>\
<<if _achieves[_i].name is _awa>>\
<<set _foo to _achieves.id>>\
<<endif>>\
<</for>>\
<<if _foo < 0>>\
@@color:Red;Error in AwardAchievement: id:<<print _awa>> not found!!
<<else>>\
<<if $Achievements[_foo] is 0>>\
<<set $Achievements[_foo] to 1>>\
<br><br>@@color:Gold;Achievement earned!@@: _awa is level _NewMaxValue
<<print _achieves[_foo].desc>>\
<br><br>\
<<elseif _NewMaxValue > $Achievements[_foo]>>\
<<set $Achievements[_foo] to _NewMaxValue>>\
<br><br>@@color:Gold;Achievement upgraded!@@: _awa is now level _NewMaxValue
<<print _achieves[_foo].desc>>\
<br><br>\
<<endif>>\
<<endif>>\
<</widget>>\
<<widget "GrabData">>\
<<silently>>\
<!-- NOTE: setup . PtrToClass is hard-coded -->\
<<if $args[0] is "class">>
<<set _classes to []>>\
<<set _classes[0] to
{
name: "Lumberjack",
show: "Cut trees at one extra axe level",
hint: "Help the town to grow",
hide: "Progress through the town builder quests",
aptr: 0
}>>\
<<set _classes[1] to
{
name: "Prostitute",
show: "+5% to flirt actions, both giving and receiving",
hint: "Prove yourself as a seductress",
hide: "Win 10 victories by flirting",
aptr: 1
}>>\
<<set _classes[2] to
{
name: "Warrior",
show: "+1 to melee damage",
hint: "Try out different weapons",
hide: "Win a battle with each major weapon type",
aptr: 2
}>>\
<<set _classes[3] to
{
name: "Scholar",
show: "+1 to intellect",
hint: "Read a book",
hide: "Learn any spell",
aptr: 3
}>>\
<<set _classes[4] to
{
name: "Priest",
show: "Starts with a holy symbol. +1 to willpower.",
hint: "Cleanse the land of the impure",
hide: "Defeat and kill a demon",
aptr: 4
}>>\
<<set _classes[5] to
{
name: "Rogue",
show: "Reduce base difficulty of all traps by 3 dungeon levels",
hint: "Demonstrate a talent for avoiding traps",
hide: "Succesfully avoid 3 traps in one life.",
aptr: 5
}>>\
<<set _classes[6] to
{
name: "Mage",
show: "Start with a spell unlocked. +1 intellect.",
hint: "Learn all the magic",
hide: "Know every spell at once",
aptr: 6
}>>\
<<set _classes[7] to
{
name: "Barbarian",
show: "+1 damage absoprtion",
hint: "Fight while deep and naked. Win.",
hide: "Defeat a monster on level 3 while naked",
aptr: 7
}>>\
<<set _classes[8] to
{
name: "Monk",
show: "+1 to all base stats",
hint: "Compasionately master the art of the fist",
hide: "Defeat a monster on level 3, while unarmed, having never raped or killed any opponent.",
aptr: 8
}>>\
<<set _classes[9] to
{
name: "Ninja",
show: "Starts with a sword. +5% to critical strike chance.",
hint: "Only the deadliest of rogues will learn this",
hide: "As a rogue, one-shot a monster before it can attack.",
aptr: 9
}>>\
<<set _classes[10] to
{
name: "Paladin",
show: "Starts with holy symbol and sword. +1 willpower. Immune to transformation",
hint: "Only the purest of heart will achieve this. 777.",
hide: "Reach level 7 while still a virgin, having previously reached level 7 as both warrior and priest.",
aptr: 10
}>>\
<<set _classes[11] to
{
name: "Guardian",
show: "Very durable",
hint: "Become very tough",
hide: "Reach 200 maximum health",
aptr: 11
}>>\
<<elseif $args[0] is "achievements">>
<<set _achieves to []>>
<<set _acount to 0>>
<<set _achieves[_acount] to
{
name: "Genetic Lottery",
desc: "Descibe genetic lottery",
type: "perk",
gain: "Gain +2 stat points. Applied after character creation.",
hint: "Highly focused attributes might help",
clue: "Raise any one stat to 20 or more",
id: 0
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Rich",
desc: "Describe rich",
type: "perk",
gain: "Start with an extra 100 gold",
hint: "You don't need to carry it with you",
clue: "Have 1000 gold",
id: 1
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Greedy",
desc: "Describe greedy",
type: "perk",
gain: "Gain +10% to all gold drops",
hint: "Like rich, but more",
clue: "Deposit 10,000 gold into the bank. Oh, and unlock the bank.",
id: 2
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Starve to death",
desc: "Exactly what it says on the tin",
type: "perm",
gain: "Start every new game with some food",
hint: "Self explanatory",
clue: "Starve to death",
id: 3
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Guildmaster",
desc: "Describe guildmaster",
type: "perm",
gain: "+1 to max stat spread on character creation",
hint: "Rina might be able to help with this",
clue: "Complete all tutorial quests",
id: 4
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Gamemaster",
desc: "Describe gamemaster",
type: "perm",
gain: "+1 to max stat spread on character creation",
hint: "Rina might be able to help with this with this too",
clue: "Complete all guild quests",
id: 5
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Potionmaster",
desc: "Describe potionmaster",
type: "perm",
gain: "+1 to max stat spread on character creation",
hint: "Selene might be able to help with this",
clue: "Complete all of Selene's quests",
id: 6
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Metal master",
desc: "Describe metal master",
type: "perm",
gain: "+1 to max stat spread on character creation",
hint: "The blacksmith might be able to help with this",
clue: "Complete every blacksmithing quest",
id: 7
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Monster tourism",
desc: "Defeat every monster type at least once",
type: "perk",
gain: "Implement: What does this do?",
hint: "How many monsters are there?",
clue: "Defeat every monster type at least once",
id: 8
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Playing both sides",
desc: "Describe this acheivement",
type: "sex",
gain: "Unlocks the hermaphrodite starting sex",
hint: "Play both sides to learn the middle",
clue: "Have a sexual encounter as both sexes on the same character",
id: 9
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Archeologist",
desc: "Describe archeologist",
type: "perk",
gain: "Gain an extra guaranteed treasure event every level",
hint: "Find more treasure",
clue: "Succesfully complete 2 treasure events in a single lifetime",
id: 10
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Trapmaster",
desc: "Descibe trapmaster",
type: "perk",
gain: "Gain a second 10% chance to avoid any triggered trap",
hint: "Trigger a trap",
clue: "Trigger a trap",
id: 11
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Explorer",
desc: "Increased map view radius",
type: "perk",
gain: "Increased map view radius",
hint: "Leave no stone unturned",
clue: "Explore every zone of 3 dungeon levels",
id: 12
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Pacifist",
desc: "Describe",
type: "perk",
gain: "Gain +1 damage absorbtion, but -1 to melee damage",
hint: "How far can you get without hurting anything?",
clue: "Clear the level 5 dungeon event having never killed any opponent",
id: 13
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Durable",
desc: "Makes you harder to kill",
type: "perk",
gain: "Take -1 damage from all physical attacks",
hint: "Fatal attraction",
clue: "Die during a sexual encounter",
id: 14
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Fertile",
desc: "Describe fertile",
type: "perk",
gain: "Increased pregnancy chance",
hint: "I'm sure lots of monsters would love to help you earn this achievement",
clue: "Give birth",
id: 15
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Barren",
desc: "Describe barren",
type: "perk",
gain: "You will be incapable of becoming pregnant.",
hint: "Change your mind",
clue: "Terminate a pregnancy",
id: 16
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Breeder",
desc: "Describe breeder",
type: "perk",
gain: "Cuts all pregnancy times in half",
hint: "Where once may fail, many succeeds!",
clue: "Give birth 3 times in a single game",
id: 17
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Reserved 1",
desc: "Dungeon perk 1",
type: "perk",
gain: "Reserved",
hint: "25%",
clue: "Clear the level 5 dungeon event",
id: 18
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Reserved 2",
desc: "Dungeon perk 2",
type: "perk",
gain: "Reserved",
hint: "50%",
clue: "Clear the level 10 dungeon event",
id: 19
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Reserved 3",
desc: "Dungeon perk 3",
type: "perk",
gain: "Reserved",
hint: "75%",
clue: "Clear the level 15 dungeon event",
id: 20
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Reserved 4",
desc: "Dungeon perk 4",
type: "perk",
gain: "Reserved",
hint: "100%",
clue: "Clear the level 20 dungeon event",
id: 21
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Power Leveler",
desc: "Describe power leveler",
type: "perm",
gain: "+1 experience earned every battle",
hint: "Reach level 10 in any class",
clue: "Reach level 10 in any class",
id: 22
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Jack of All Stats",
desc: "Describe jack of all stats",
type: "perm",
gain: "+1 stat point to all new characters",
hint: "And pretty much a master of them too",
clue: "Reach 12 in every primary stat",
id: 23
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "I feel your loss",
desc: "Describe I feel your loess",
type: "perm",
gain: "Unlock the second character slot",
hint: "Lose something important",
clue: "Have a character of at least level 3, die",
id: 24
}>>\
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Three's Company",
desc: "Describe three's company",
type: "perm",
gain: "Unlock the third character slot",
hint: "What would be even worse that dying?",
clue: "Delete a character of at least level 7",
id: 25
}>>\
***********************************
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Lumberjack",
desc: "Starts with a hatchet. Gains extra wood when harvesting.",
type: "class",
gain: "Unlocks the lumberjack starting profession",
hint: "Help the town to grow",
clue: "Progress through the town builder quests",
id: 26
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Prostitute",
desc: "+5% to flirt actions, both giving and receiving",
type: "class",
gain: "Unlocks the prostitute starting profession",
hint: "Do unto others, and be done unto. Emphasis on doing.",
clue: "Both raped and be raped after combat in a single run",
id: 27
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Warrior",
desc: "+1 to melee damage",
type: "class",
gain: "Unlocks the warrior starting profession",
hint: "Try out different weapons",
clue: "Win a battle with each major weapon type",
id: 28
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Scholar",
desc: "+1 to intellect",
type: "class",
gain: "Unlocks the scholar starting profession",
hint: "Read a book",
clue: "Learn any spell",
id: 29
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Priest",
desc: "Starts with the heal spell unlocked. +1 to willpower.",
type: "class",
gain: "Unlocks the priest starting profession",
hint: "Cleanse the land of the impure",
clue: "Defeat and kill a demon",
id: 30
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Rogue",
desc: "Start with rope and lockpicks. +1 dexterity.",
type: "class",
gain: "Unlocks the rogue starting profession",
hint: "Don't fall for traps",
clue: "Succesfully avoid 3 traps in one life.",
id: 31
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Mage",
desc: "Start with the fireball spell unlocked. +1 intellect.",
type: "class",
gain: "Unlocks the mage starting profession",
hint: "Become a competant scholar",
clue: "Know every spell at once",
id: 32
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Barbarian",
desc: "Every empty equippable armot slot gives +5 armor",
type: "class",
gain: "Unlocks the barbarian starting profession",
hint: "Fight while deep and naked. Win.",
clue: "Defeat a monster on level 3 while naked",
id: 33
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Monk",
desc: "+1 to all base stats, but start out poor an",
type: "class",
gain: "Unlocks the monk starting profession",
hint: "Compasionately master the art of the fist",
clue: "Defeat a monster of at least level 3, unarmed, having neve raped or killed an opponent.",
id: 34
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Ninja",
desc: "Starts with a sword. +5% to critical strike chance.",
type: "class",
gain: "Unlocks the ninja starting profession",
hint: "Only the swiftest of rogues will learn this",
clue: "As a rogue, one-shot a tower monster before it can attack.",
id: 35
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Paladin",
desc: "Starts with holy symbol and sword. +1 willpower. Immune to transformation",
type: "class",
gain: "Unlocks the paladin starting profession",
hint: "Only the purest of heart will achieve this: 777",
clue: "Reach level 7 while still a virgin, having previously reached level 7 as both warrior and priest.",
id: 36
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Guardian",
desc: "Very durable",
type: "class",
gain: "Unlocks the guardian starting profession",
hint: "Become very tough",
clue: "Reach 200 maximum health",
id: 37
}>>
***********************************
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Peasant Proficiency",
desc: "Reach level 7 as a peasant",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a peasant",
clue: "Reach level 7 as a peasant",
id: 38
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Lumberjacked up!",
desc: "Reach level 7 as a lumberjack",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a lumberjack",
clue: "Reach level 7 as a lumberjack",
id: 39
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "World's Oldest Professon",
desc: "describe",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a prostitute",
clue: "Reach level 7 as a prostitute",
id: 40
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Swords and spears",
desc: "Reach level 7 as a warrior",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a warrior",
clue: "Reach level 7 as a warrior",
id: 41
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Scholarly pursuits",
desc: "Reach level 7 as a scholar",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a scholar",
clue: "Reach level 7 as a scholar",
id: 42
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Parson",
desc: "Reach level 7 as a priest",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a priest",
clue: "Reach level 7 as a priest",
id: 43
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Sneaky McSneakerson",
desc: "Reach level 7 as a rogue",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a rogue",
clue: "Reach level 7 as a rogue",
id: 44
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Magiferous Magery",
desc: "Reach level 7 as a mage",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a mage",
clue: "Reach level 7 as a mage",
id: 45
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Driven Before You",
desc: "Reach level 7 as a barbarian",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a barbarian",
clue: "Reach level 7 as a barbarian",
id: 46
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Peace in the calm of the horny",
desc: "Reach level 7 as a monk",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a monk",
clue: "Reach level 7 as a monk",
id: 47
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Stabby Stealther",
desc: "Reach level 7 as a ninja",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a ninja",
clue: "Reach level 7 as a ninja",
id: 48
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Pally Power!",
desc: "Reach level 7 as a paladin",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a paladin",
clue: "Reach level 7 as a paladin",
id: 49
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Tanky Tank",
desc: "Reach level 7 as an guardian",
type: "perkpoints",
gain: "+1 perk on character creation",
hint: "Reach level 7 as a guardian",
clue: "Reach level 7 as a guardian",
id: 50
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Peasant",
desc: "Gain +1hp per highest retired peasant level, for all characters, always",
type: "highest",
gain: "Gain +1hp per highest retired peasant level, for all characters, always",
hint: "Gain +1hp per highest retired peasant level, for all characters, always",
clue: "Always available",
id: 51
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Lumberjack",
desc: "Gain +1% to hit bonus with axes per highest retired lumberjack level, for all characters, always",
type: "highest",
gain: "Gain +1% to hit bonus with axes per highest retired lumberjack level, for all characters, always",
hint: "Gain +1% to hit bonus with axes per highest retired lumberjack level, for all characters, always",
clue: "Retire as a lumberjack",
id: 52
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Prostitute",
desc: "Gain +1 flirt resistance per highest retired prostitute level, for all characters, always",
type: "highest",
gain: "Gain +1 flirt resistance per highest retired prostitute level, for all characters, always",
hint: "Gain +1 flirt resistance per highest retired prostitute level, for all characters, always",
clue: "Retire as a prostitute",
id: 53
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Warrior",
desc: "Gain +1 melee damage with weapons per highest retired level, for all characters, always",
type: "highest",
gain: "Gain +1 melee damage with weapons per highest retired level, for all characters, always",
hint: "Gain +1 melee damage with weapons per highest retired level, for all characters, always",
clue: "Retire as a warrior",
id: 54
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Scholar",
desc: "-1 to xp requirement per level, per highest retired scholar level, for all characters, always",
type: "highest",
gain: "-1 to xp requirement per level, per highest retired scholar level, for all characters, always",
hint: "-1 to xp requirement per level, per highest retired scholar level, for all characters, always",
clue: "Retire as a scholar",
id: 55
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Priest",
desc: "Gain +1 healing spell effect per highest retired level, for all characters, always",
type: "highest",
gain: "Gain +1 healing spell effect per highest retired level, for all characters, always",
hint: "Gain +1 healing spell effect per highest retired level, for all characters, always",
clue: "Retire as a priest",
id: 56
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Rogue",
desc: "Gain +1 gold per combat victory per highest retired rogue level, for all characters, always",
type: "highest",
gain: "Gain +1 gold per combat victory per highest retired rogue level, for all characters, always",
hint: "Gain +1 gold per combat victory per highest retired rogue level, for all characters, always",
clue: "Retire as a rogue",
id: 57
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Mage",
desc: "Gain +1 fireball damage per highest retired mage level, for all characters, always",
type: "highest",
gain: "Gain +1 fireball damage per highest retired mage level, for all characters, always",
hint: "Gain +1 fireball damage per highest retired mage level, for all characters, always",
clue: "Retire as a mage",
id: 58
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Barbarian",
desc: "Gain +1 to hit with beast morph type attacks per highest retired barbarian level, for all characters, always",
type: "highest",
gain: "Gain +1 to hit with beast morph type attacks per highest retired barbarian level, for all characters, always",
hint: "Gain +1 to hit with beast morph type attacks per highest retired barbarian level, for all characters, always",
clue: "Retire as a barbarian",
id: 59
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Monk",
desc: "Gain +1 melee defense per highest retired monk level, for all characters, always",
type: "highest",
gain: "Gain +1 melee defense per highest retired monk level, for all characters, always",
hint: "Gain +1 melee defense per highest retired monk level, for all characters, always",
clue: "Retire as a monk",
id: 60
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Ninja",
desc: "Gain +1% chance to escape combat per highest retired ninja level, for all characters, always",
type: "highest",
gain: "Gain +1% chance to escape combat per highest retired ninja level, for all characters, always",
hint: "Gain +1% chance to escape combat per highest retired ninja level, for all characters, always",
clue: "Retire as a ninja",
id: 61
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Paladin",
desc: "Gain +1 melee damage against demons per highest retired paladin level, for all characters, always",
type: "highest",
gain: "Gain +1 melee damage against demons per highest retired paladin level, for all characters, always",
hint: "Gain +1 melee damage against demons per highest retired paladin level, for all characters, always",
clue: "Retire as a paladin",
id: 62
}>>
<<set _acount to _acount +1>>
<<set _achieves[_acount] to
{
name: "Best Guardian",
desc: "Gain +2 health and defense per highest retired guadian level, for all characters, always",
type: "highest",
gain: "Gain +2 health and defense per highest retired guadian level, for all characters, always",
hint: "Gain +2 health and defense per highest retired guadian level, for all characters, always",
clue: "Retire as a guardian",
id: 63
}>>
<<else>>\
@@color:Red;Error in DataWidgets: unrecognized data request
<<endif>>\
<</silently>>\
<</widget>>\<span id="KeypESC">\
<<link "esc) close window">>
<<script>>
Dialog.close();
document.activeElement.blur();
<</script>>
<</link>>
</span>\
<<if $DebugMode is true>>\
<span id="KeypT">\
<<link "t) Toggle view">>
<<if $WORLD.Bodyview is 0>>\
<<set $WORLD.Bodyview to 1>>\
<<else>>\
<<set $WORLD.Bodyview to 0>>
<<endif>>\
<<replace "#BodyPortal">><<ShowPageBody>><</replace>>\
<</link>>\
</span>
<<endif>>\
<span id="KeypR">\
<<link "r) Re-sort body parts">>
<<SortBodyParts>>\
<<replace "#BodyPortal">><<ShowPageBody>><</replace>>\
<</link>>\
</span>
<hr>\
<span id="BodyPortal"><<ShowPageBody>></span>\<<SimplePic "tavernkitty.jpg">>\
<<set _AllowStore to true>>\
<<set _Tanya to "Tanya">>\
<<if $WORLD.tavern is 0>>\
<<set _Tanya to "the tavern kitty">>\
<<endif>>\
\
@@color:LightGreen;<<print $WORLD.tavernname>>@@
<span id="KeypSpace">\
<<link "space) Return to town" "TownSquare">>
<<AdvanceTime 5>>
<</link>>\
</span>
\
<<set _Voucher to setup.HasItemA(114)>>\
<<if _Voucher > -1>>\
<span id="KeypOne">\
<<link "1) Rent a room for the night" "Tavern">>
<<set $WORLD.datapasser to "slept">>
<</link>> - (free voucher)
</span>\
<<elseif $PC[$CC][$PCcoins] > 4>>\
<span id="KeypOne">\
<<link "1) Rent a room for the night" "Tavern">>
<<set $WORLD.datapasser to "slept">>
<<set $PC[$CC][$PCcoins] to $PC[$CC][$PCcoins] - 5>>\
<</link>> - 5 coins
</span>\
<<else>>\
1) Cannot afford a room - 5 coins
<<endif>>\
<<if $WORLD.tavern < 2>>\
<span id="KeypC">\
<<link "c) Chat" "Tavern">>\
<<set $WORLD.datapasser to "chat">>
<</link>>\
</span>\
<<else>>\
c) no chats available
<<endif>>\
<hr>\
<<if $WORLD.datapasser is "slept">>\
<<set $WORLD.datapasser to "">>\
<<set $WORLD.minute to 0>>\
<<if $WORLD.hour < 6>>\
<<set _TimeToAdvance to 6 - $WORLD.hour>>\
<<elseif $WORLD.hour is 6>>\
<<set _TimeToAdvance to 24>>\
<<else>>\
<<set _TimeToAdvance to 30 - $WORLD.hour>>\
<<endif>>\
<<set _TimeToAdvance to _TimeToAdvance * 60>>\
<<AdvanceTime _TimeToAdvance>>\
<<FullyHeal>>\
<<if setup.GetEffect("plague curse") > 0>>\
@@color:Orange;Sleep has not cured you of the plague curse.@@
<<else>>\
<<set _Voucher to setup.HasItemA(114)>>\
<<if _Voucher > -1>>\
<<set _throwaway to setup.RemoveOneItemFromInv($CC, _Voucher)>>\
@@color:Orange;<<print _Tanya.toUpperFirst()>>@@: "I hadn't realized Rina was still passing out these vouchers. Hope you're ready to pay next time."
<<else>>\
@@color:Orange;<<print _Tanya.toUpperFirst()>>@@: "<<print either("Good morning","Looks like it's another day","Glad you could join us")>>. Here's some <<print either("oatmeal","dried mush","leftovers from last night","fruit","bread and cheese","jerky cutlets")>> on the house."
<<endif>>\
<<endif>>\
<<elseif $WORLD.datapasser is "chat">>\
<<set $WORLD.datapasser to "">>\
<<AdvanceTime 5>>\
<<if $WORLD.tavern is 0>>\
<<set $WORLD.tavern to 1>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Hello," you greet _Tanya. "I'm $PC[$CC][$PCname]. Are you a cat girl?"
@@color:Orange;Tavern kitty@@: "Yes," she rolls her eyes. "Souvinir from my tower-climbing days. The name's Tanya. And before you ask, no I didn't get very far in the tower, only barely to the second floor before I gave up. That place is a deathtrap. And before you ask, no I don't like belly rubs. At least not from strangers. Now, are you here to order something or just to gawk at my <<print either("ears","tail")>>?"
<<elseif $WORLD.tavern is 1>>\
<<set $WORLD.tavern to 2>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "Sorry, I didn't realize it was a sensitive topic."
@@color:Orange;Tanya@@: "No, it's fine," she sighs. "I guess I just miss people staring at my tits but the cat parts keep hardly anyone from even noticing them anymore. Are you here to climb the tower?"
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "<<print either("That's the plan.","Yes.","Was it that obvious?")>>"
@@color:Orange;Tanya@@: "Pretty much the only reason any comes here," she nods. "Well, be careful in there or else you could end up a lot worse than I did. Anyway, I'm going to get back to work. If you haven't already, I suggest checking in with Rina at the guild call near the middle of town. Good luck."
<<elseif $WORLD.tavern is 2>>\
<<set $WORLD.tavern to 3>>\
@@color:Green;<<print $PC[$CC][$PCname]>>@@: "So do you have any advice for me?"
<<if $PC[$CC][$PCsex] is "female">>\
@@color:Orange;Tanya@@: "Just the usual," she shrugs. "Try not to get raped, don't drink anything you don't know what it is, and especially don't do both of those at the same time."
<<else>>\
@@color:Orange;Tanya@@: "Don't get killed?" she shrugs. "Or do, if you want. I'm not your mother."
<<endif>>\
<<else>>\
(Dev note: end of generic Tanya dialogue. Implement more)
<<endif>>\
<<else>>\
<<if $WORLD.tavern is 0>>\
The busiest part of town, the <<print $WORLD.tavernname>> is the first harbor of welcome for new arrivals. It is the place to greet, and say farewell to those who would seek to climb The Tower.
"Stop letting the cold in!" a shrill, feminine voice scowls at you.
Stepping inside and allowing the door to close behind you, you behold the voice's owner: a short cat-girl with prominent ears, and a tail visibly peeking out from under her dress.
<<else>>\
<<if $WORLD.hour < 6>>\
The tavern is quiet, with only the lone _Tanya behind the bar,silently clearning with a tired look on her face. Does she ever sleep?
<<elseif $WORLD.hour < 10>>\
The tavern is quite busy, with _Tanya and a few other wenches serving breakfast to a room full of adventurers and travellers.
<<elseif $WORLD.hour < 14>>\
It's currently lunchtime at the tavern.
<<elseif $WORLD.hour < 18>>\
Early evening in the tavern seems to be a fairly quiet. Only a couple patrons sit at its many tables, and _Tanya appears to be napping behind the bar.
<<elseif $WORLD.hour < 22>>\
Nearly every seat is full, and the serving staff are clearly struggling to keep beer