You look closely at the clay surface, side A of the Disc.
In the center is a rosette <h1><span class="phaistos">𐇵</span></h1>
It is followed immediately by the symbol depicting a sick or elderly person <h1><span class="phaistos">𐇒</span></h1>
You begin to read the story ..
/*<<print setup.glyphs.PDglyph01.MomoName>> */
<img src="mapsprogress/reason.png">
Will you help the elder?
If you remember the ancient folk tale called Jack and the Beanstalk, then you can use that story for hints to solve the following puzzle rooms.
As you solve each puzzle room, you will see a new segment revealed in your map of the Disc. When you have uncovered the entire map and collected one or more of each of the magic items, you will have won, and you will have saved those you love.
To solve the puzzles, for each picture in the row, choose the most fitting identification from the options. Then use that information to choose the correct scene interpretation. When you choose the right options for each picture, and for the scene as a whole, you solve the room and collect the magic items and gold.
[[Who You Are |Motivation]]
<<nobr>>
/* Grab the current room data from our master database */
<<set _room to setup.roomDatabase[$currentRoomId]>>
<<set _total = _room.puzzles.length>>
<<set _next = _room.next>>
<<set _wish = _room.wish>>
<<set _techGlyphs to []>>
<<set _magicGlyphs to []>>
<<if $currentRoomId is "A28" and $playerRole is "power">>
<<goto "MomFateExplanation">>
<</if>>
/* Dropdown Map Container & Controls */
<div id="map-wrapper" style="display: block; text-align: left; background: #111;">
<<print '<img src="' + setup.maps[$currentRoomId] + '" class="map-progress-img" alt="Map Progress" style="max-width: 100%; height: auto;">'>>
</div>
/* Inline text link that moves dynamically with your page layout */
<div id="map-trigger-zone" style="text-align: left; margin: 10px 0;">
<<link "🗺️ Map">>
<<run jQuery("#map-wrapper").slideToggle(400)>>
<</link>>
</div>
<<done>>
/* Wait 1 second (1000ms), then smoothly slide the map out of view */
<<run setTimeout(function () {
jQuery("#map-wrapper").slideUp(500);
}, 1000)>>
<</done>>
/* show lives available */
lives available: $lives ||
<<if $lives <= 0>><<goto "UntimelyPassing">><</if>>
/* AUTO-CLICK SCRIPT: If the room is already solved, click the diagnostic link once the elements load */
<<if $solvedRooms[$currentRoomId] is true>>
<<done>>
<<run jQuery("#diagnostic-wrapper a").trigger("click")>>
<</done>>
<</if>>
/* start of each scene */
You are at Scene $currentRoomId || Playing $currentGame <br>
_room.instructions
/* show glyphs and their respective answer options */
<div class="puzzle-wrapper">
<<for _i to 0; _i < _room.puzzles.length; _i++>>
<<set _puzzle to _room.puzzles[_i]>>
/*<<set _glyphName to _puzzle.glyph>>*/
<<set _rightKey = ($currentGame is "game2" ? "right2" : "right")>>
/* shuffle the answers so the right one is not always at top */
<<if $solvedRooms[$currentRoomId] is true>>
<<set _choices to [_puzzle[_rightKey]]>>
<<else>>
<<set _choices to [_puzzle[_rightKey]].concat(_puzzle.wrongs)>>
<<endif>>
<<run _choices.shuffle()>>
/* fill hash with items that are magic or tech depending on whether this is game 1 or 2 */
<<if $currentGame is "game1">>
/* receive glyph magiCode if not empty or if magicItem is true */
<<if _magiCode neq "" or _magicItem is true>>
/* amend it to have the brackets and such {magicItem: "gold"} */
/* insert into the _magicGlyphs hash */
/* <<set _magicGlyphs[_glyphId] = { magicItem: _magiCode }>> */
<</if>>
<<else>>
/* receive glyph techCode if not empty or if techItem is true*/
<<if _techCode neq "" or _tech is true>>
/* amend it to have the brackets and such {techItem: "magnetron"} */
/* insert into the _techGlyphs hash */
<<set _techGlyphs[_glyphId] = { techItem: _techCode }>>
<</if>>
<</if>>
<div class="puzzle-cell" id="`'cell-' + _i`">
/* Dynamic HTML image injector */
<<print '<img src="' + _puzzle.img + '" alt="Signal Feed" class="puzzle-img">'>>
<div class="choices">
<<for _c range _choices>>
<label>
<<if $solvedRooms[$currentRoomId] is true>>
<<radiobutton `"$playerAnswers[" + _i + "]"` _c checked>> _c
<<else>>
<<radiobutton `"$playerAnswers[" + _i + "]"` _c >> _c
<<endif>>
</label>
<</for>>
</div>
</div>
<</for>>
</div>
<hr>
/* --- scene soliver interaction section --- */
<<if _room.scenesolver>>
<div id="scenesolver-section" style="background: #1c1c24; padding: 15px; border: 1px solid #333; margin: 15px 0; border-radius: 4px;">
<h3>🗲 Final Authorization: Scene Interpretation</h3>
<<if $solvedRooms[$currentRoomId] is true>>
<<set _sceneChoices to [_room.scenesolver[_rightKey]]>>
<<else>>
<<set _sceneChoices to [_room.scenesolver[_rightKey]].concat(_room.scenesolver.wrongs)>>
<</if>>
<<run _sceneChoices.shuffle()>>
<div class="choices" style="display: flex; flex-direction: column; gap: 8px;">
<<for _sc range _sceneChoices>>
<label style="cursor: pointer; padding: 5px; background: #2a2a35; display: block; border-radius: 4px;">
<<if $solvedRooms[$currentRoomId] is true>>
<<radiobutton "$playerSceneAnswer" _sc checked>> _sc
<<else>>
<<radiobutton "$playerSceneAnswer" _sc>> _sc
<<endif>>
</label>
<</for>>
</div>
</div>
<</if>>
<div id="puzzle-results">
<div id="diagnostic-wrapper">
<<link "⬡ Run Diagnostic">>
/* 1. Score the picture cells */
<<set _score = 0>>
<<set _rightKey = ($currentGame is "game2" ? "right2" : "right")>>
<<for _i = 0; _i < _total; _i++>>
<<set _key = _i>>
<<set _correct = ($playerAnswers[_key] is _room.puzzles[_i][_rightKey])>>
<<if _correct>><<set _score++>> <</if>>
<<run jQuery("#cell-" + _i)
.toggleClass("cell-correct", _correct)
.toggleClass("cell-wrong", !_correct && $playerAnswers[_key] isnot undefined)>>
<</for>>
/* 2. Score the overarching Scene Solver text answer */
<<set _sceneCorrect = true>>
<<if _room.scenesolver>>
/* Fallback logic to protect from crashing if field doesn't exist for a side */
<<set _targetAnswer = _room.scenesolver[_rightKey] || _room.scenesolver.right>>
<<if $playerSceneAnswer is _targetAnswer>>
<<set _sceneCorrect = true>>
<<run jQuery("#scenesolver-section").css("border-color", "#336633").css("background", "#122212")>>
<<else>>
<<set _sceneCorrect = false>>
<<run jQuery("#scenesolver-section").css("border-color", "#662222").css("background", "#221212")>>
<<endif>>
<</if>>
<<replace "#score-display">>Correct decodings: <<= _score>> / <<= _total>><</replace>>
/* 3. BOTH gates must be passed to win */
<<if _score is _total and _sceneCorrect is true>>
<<set $solvedRooms[$currentRoomId] = true>>
/* process magic Item rewards */
<<set _itemDiscoveryHtml to "">>
<<if _room.magicItems and _room.magicItems.length > 0>>
<<set _headerLabel = ($currentGame is "game2" ? "💾 Tech Relics Extracted:" : "🎁 Magic Items Extracted:")>>
<<set _itemDiscoveryHtml += "<p><b>" + _headerLabel + "</b></p><ul>">>
<<for _m range _room.magicItems>>
<<set _itemDiscoveryHtml += "<li>Found: <b>" + _m.magicItem + "</b></li>">>
<<if $currentGame is "game1">>
<<set $magicItemsGathered[_m.magicItem] to ($magicItemsGathered[_m.magicItem] || 0) + 1>>
<</if>>
<</for>>
<<set _itemDiscoveryHtml += "</ul>">>
<<else>>
<<set _itemDiscoveryHtml += "<p style='color: #aaa;'>No active energy signatures found in this sector.</p>">>
<</if>>
/* process tech Item rewards */
<<set _itemDiscoveryHtml to "">>
<<set _hasTech to false>>
<<if $currentGame is "game2">>
<<for _i = 0; _i < _room.puzzles.length; _i++>>
<<set _puzzle to _room.puzzles[_i]>>
/* Reverse search setup.glyphs to find which glyph matches this puzzle image */
<<set _glyphData to null>>
<<set _glyphKeys to Object.keys(setup.glyphs)>>
<<for _k = 0; _k < _glyphKeys.length; _k++>>
<<set _currentGlyph = setup.glyphs[_glyphKeys[_k]]>>
<<if _currentGlyph.img is _puzzle.img>>
<<set _glyphData to _currentGlyph>>
<<break>>
<</if>>
<</for>>
/* If we found the glyph data, check if it's a valid tech item reward */
<<if _glyphData and (_glyphData.tech is true or _glyphData.techcode neq "")>>
<<if _hasTech is false>>
<<set _itemDiscoveryHtml += "<p><b>💾 Tech Relics Extracted:</b></p><ul>">>
<<set _hasTech to true>>
<</if>>
<<set _itemDiscoveryHtml += "<li>Found: <b>" + _glyphData.techcode + "</b></li>">>
<<set $techItemsGathered[_glyphData.techcode] to ($techItemsGathered[_glyphData.techcode] || 0) + 1>>
<</if>>
<</for>>
<</if>>
<<if _hasTech is true>>
<<set _itemDiscoveryHtml += "</ul>">>
<<else>>
<<set _itemDiscoveryHtml += "<p style='color: #aaa;'>No active tech energy signatures found in this sector.</p>">>
<</if>>
/* Master Scavenger Victory Condition Check based on target game array */
<<set _hasWon to true>>
<<set _targetInventory = ($currentGame is "game2" ? $techItemsGathered : $magicItemsGathered)>>
<<set _itemKeys to Object.keys(_targetInventory)>>
<<for _k range _itemKeys>>
<<if _targetInventory[_k] is 0>>
<<set _hasWon to false>>
<</if>>
<</for>>
<<replace "#exit-link">>
<div class="unlocked-box" style="background: #1a331a; padding: 15px; border: 1px solid #336633; border-radius: 4px; margin-top: 15px;">
<span class="unlocked">■ System Unlocked</span><br>
<<print _itemDiscoveryHtml>>
/* Determine destination path based on win status */
<<if _hasWon is true>>
<div style="margin-top: 15px; font-size: 1.1em; border-top: 2px dashed #55ff55; padding-top: 10px;">
🎉 <b>COMPILATION COMPLETE!</b> You have gathered every unique asset across the database grid!
<br><br>
<<link "▶ CLAIM ULTIMATE VICTORY">>
<<goto "Victory">>
<</link>>
</div>
<<else>>
/* NAVIGATION BLOCK: Normal Exit Path */
<div style="display: flex; gap: 20px; margin-top: 15px;">
<div>
<<set _linkText = "→ Proceed to " + _next>>
<<if _wish is true>>
<<set _linkText = _linkText + " and that will cost you one life">>
<</if>>
<<link _linkText>>
<<set $currentRoomId = _next>>
<<if _wish is true and $solvedRooms[$currentRoomId] isnot true>>
<<set $lives = $lives - 1>>
<</if>>
<<set $playerAnswers to []>>
<<set $playerSceneAnswer to undefined>>
<<if _next is "Victory">>
<<goto "Victory">>
<<else>>
<<goto "PuzzleZone">>
<</if>>
<</link>>
</div>
/* Dynamic shortcut option appears if a jump target is present */
<<if _room.jump isnot "" and _room.jump isnot undefined>>
<div>
<<link "🚀 Jump ahead to safety">>
<<set $currentRoomId = _room.jump>>
<<set $playerAnswers to []>>
<<set $playerSceneAnswer to undefined>>
<<if _room.jump is "Victory">>
<<goto "Victory">>
<<else>>
<<goto "PuzzleZone">>
<</if>>
<</link>>
</div>
<</if>>
</div>
/* If there are specific jump notes context clues, show them under the paths */
<<if _room.jumpNotes isnot "" and _room.jumpNotes isnot undefined>>
<div style="margin-top: 10px; font-size: 0.9em; color: #8ab4f8; font-style: italic;">
ℹ️ <b>Anomalous Data Stream Note:</b> _room.jumpNotes
</div>
<</if>>
<</if>>
</div>
<</replace>>
<<else>>
<<replace "#exit-link">>
<span class="locked">
Terminal Locked:
<<if _score isnot _total>>
<<= _total - _score>> picture parameter(s) incorrect.
<<else>>
Scene Integration configuration rejected.
<<endif>>
</span>
<</replace>>
<<endif>>
<</link>>
</div>
<p id="score-display">Correct decodings: — / <<= _total>></p>
<p id="exit-link"></p>
</div>
[[InventoryStatus]] <br>
[[ArchiveLogs]]
<</nobr>><<set $solvedRooms = {}>>
<<set $currentGame = "game1">>
/* this matches the number of holes at A01 */
<<set $lives to 5>>
/* might be possible to build these hashes from the glyphs record */
<<set $magicItemsGathered to {
"goose": 0,
"hen": 0,
"gold": 0,
"hat": 0,
"glove": 0,
"belt": 0,
"cloak": 0,
"potion": 0,
"bow": 0,
"arrow": 0,
"turban": 0,
"table": 0,
"sandals": 0,
"horn": 0,
"ring": 0,
"harp": 0,
"mirror": 0,
"key": 0,
"sword": 0,
"sharpener": 0,
"jewels": 0
}>>
<<set $techItemsGathered to {
"klystron": 0,
"glove": 0,
"magnetron": 0,
"batterypile": 0,
"inductor": 0,
"capacitor": 0,
"rocket": 0,
"plane": 0,
"truckcar": 0,
"microphone": 0,
"speaker": 0,
"compass": 0,
"ka": 0,
"ychromosome": 0,
"bdotinfantis": 0,
"medicine": 0,
"thinkingcap": 0,
"helmcontrol": 0,
"chemoven": 0,
"grounding": 0,
"sharpening": 0,
"newtechnique": 0,
"magbatt": 0,
"solidstateswitches": 0,
"loudspeaker": 0,
"nuclearpower": 0,
"henfootmightbeTech?": 0,
"ringgemstoneThyratron": 0,
"compassGPS": 0,
"television": 0,
"encryptiontech": 0,
"stonegouger": 0,
"testicles": 0
}>>
/* 1. Track the current room ID */
<<set $currentRoomId to "A31">>
/* 2. Initialize the player's answers array */
<<set $playerAnswers to []>>
[[Encode Momotarō |Game3Momotaro]]
<b style="font-size:0.9em; color:#aaa;">ROOM JUMP:</b>
<<set _roomIds to Object.keys(setup.roomDatabase)>>\
<<for _id range _roomIds>>\
<<capture _id>>\
<<link _id>>
<<set $currentRoomId to _id>>
<<set $playerAnswers to []>>
<<run Engine.play("PuzzleZone")>>
<</link>> \
<</capture>>\
<</for>>
[[Victory]]
[[Cheater]]
You have decoded the world's most interesting unsolved archaeological problem, the Phaistos Disc, using Europe's oldest folk tale, Jack and the Beanstalk, as the cryptographic key. YOU are an incredible sleuth. Congratulations!
To read Alton's Field Notes, in which he explains the correspondence between the Disc and the Story, go here: https://smokestop.substack.com/p/altons-field-notes
You can also join Alton on his travels to find out more about his world: https://x.com/magnet_healing/status/2032611227549962338
Read more about the Phaistos Disc:
https://en.wikipedia.org/wiki/Phaistos_Disc
Read more about Jack and the Beanstalk:
https://en.wikipedia.org/wiki/Jack_and_the_Beanstalk
Thank you for playing my game. If you have comments, please send them to oliver@magnetichealing.org.
<<link "Try game 2!" "PuzzleZone">>
<<set $currentGame to "game2">>
<<set $solvedRooms = {}>>
<<set $currentRoomId to "B30">>
<</link>>
## 🎒 Collected Artifacts
Analyze your current inventory logs below. You must find at least one of every database category to complete the compilation matrix and unlock ultimate victory.
<<nobr>>
/* Automatically swap the master data source and theme labels based on the game mode */
<<if $currentGame is "game2">>
<<set _inventoryTarget to $techItemsGathered>>
<<set _itemKeys to Object.keys($techItemsGathered)>>
<<set _iconSecured to "💾 ">>
<<set _labelPlural to "Tech Components">>
<<set _winMessage to "🌟 ALL COMPONENT SIGNATURES MATCHED! High-frequency klystron arrays are configured for primary loop authorization.">>
<<else>>
<<set _inventoryTarget to $magicItemsGathered>>
<<set _itemKeys to Object.keys($magicItemsGathered)>>
<<set _iconSecured to "🎨 ">>
<<set _labelPlural to "Artifact Categories">>
<<set _winMessage to "🌟 ALL SIGNATURES MATCHED! The main core terminal is ready to accept full encryption upload.">>
<</if>>
<<set _discoveredCount to 0>>
<<set _totalCategories to _itemKeys.length>>
<table style="width: 100%; border-collapse: collapse; margin-top: 15px;">
<tr style="border-bottom: 2px solid #444; text-align: left;">
<th style="padding: 10px;">Registry Type</th>
<th style="padding: 10px; text-align: center;">Quantity Held</th>
<th style="padding: 10px; text-align: right;">Status</th>
</tr>
<<for _k range _itemKeys>>
/* Track how many unique types have been found in the active data object */
<<if _inventoryTarget[_k] > 0>>
<<set _discoveredCount++>>
<tr style="border-bottom: 1px solid #333; background: rgba(85, 255, 85, 0.03);">
<td style="padding: 10px; font-weight: bold; color: #55ff55;">
<<= _iconSecured>><<= _k.toUpperCase().replace("-", " ")>>
</td>
<td style="padding: 10px; text-align: center; font-weight: bold;">
<<= _inventoryTarget[_k]>>
</td>
<td style="padding: 10px; text-align: right; color: #55ff55; font-size: 0.9em;">
✔️ Secured
</td>
</tr>
<<else>>
<tr style="border-bottom: 1px solid #333; color: #666;">
<td style="padding: 10px; font-style: italic;">
🔒 <<= _k.replace("-", " ")>>
</td>
<td style="padding: 10px; text-align: center;">
0
</td>
<td style="padding: 10px; text-align: right; color: #ff5555; font-size: 0.9em; font-style: italic;">
❌ Missing
</td>
</tr>
<</if>>
<</for>>
</table>
<div style="margin-top: 20px; padding: 15px; background: #222; border: 1px solid #444; border-radius: 4px;">
📊 <b>Matrix Completion Status:</b> Discovered <<= _discoveredCount>> / <<= _totalCategories>> <<= _labelPlural>>.
<<if _discoveredCount is _totalCategories>>
<p style="color: #55ff55; font-weight: bold; margin-top: 10px;">
<<= _winMessage>>
</p>
<<else>>
/* Simple dynamic progress bar */
<<set _percent to Math.round((_discoveredCount / _totalCategories) * 100)>>
<div style="width: 100%; background: #444; border-radius: 3px; margin-top: 8px; height: 10px; overflow: hidden;">
<div style="`'background: #55ff55; height: 100%; width: ' + _percent + '%'`"></div>
</div>
<</if>>
</div>
<</nobr>>
<<link "← Return to Current Grid Node">>
<<goto "PuzzleZone">>
<</link>>## 🗄️ Decryption Archive
Below is the record of all security nodes you have successfully bypassed:
<<nobr>>
<<set _solvedList to Object.keys($solvedRooms)>>
<<if _solvedList.length is 0>>
<p style="color: #aaa; font-style: italic;">No terminal logs archived yet. Complete your first room diagnostic to populate this matrix.</p>
<<else>>
<p>**Total Nodes Cleared:** <<= _solvedList.length>></p>
<div style="background: #111; border: 1px solid #333; padding: 15px; border-radius: 4px; max-height: 200px; overflow-y: auto;">
<ul style="margin: 0; padding-left: 20px; color: #55ff55;">
<<for _room range _solvedList>>
<li>Node <<= _room>>: Overridden</li>
<</for>>
</ul>
</div>
<</if>>
<</nobr>>
[[Return to Security Terminal|PuzzleZone]]## 🛑 MATRIX CRITICAL FAILURE
The encryption counter-measures have completely drained your extra life/wish reserves. Your presence inside the database network has been detected and purged.
Wishes Remaining: **0** / 5
<hr>
/* Give them a button to restart the game clean */
<<link "▶ REBOOT DECRYPTION GRID">>
<<run Engine.restart()>>
<</link>>Jack Builds The Disc<<nobr>>
<h2>🛠️ Cyber-Archaeology Terminal: Diagnostic Cheater</h2>
<hr>
/* LIVES RESETTER */
<<link "❤️ Reset Current Lives to 5">>
<<set $lives to 5>>
<<goto `passage()`>>
<</link>>
/* --- 1. CURRENT GAME SELECTOR --- */
<p><b>Current Game Mode:</b> <span style="color: #8ab4f8; font-weight: bold;"><%= $currentGame.toUpperCase() %></span></p>
<div style="margin-bottom: 20px;">
<<link "🔄 Force-Switch to GAME 1 (Magic)">>
<<set $currentGame to "game1">>
<<goto `passage()`>>
<</link>>
|
<<link "🔄 Force-Switch to GAME 2 (Tech)">>
<<set $currentGame to "game2">>
<<goto `passage()`>>
<</link>>
</div>
<hr>
/* --- 2. INVENTORY AUTO-FILL OPERATIONS --- */
<h3>🎁 Game 1: Magic Inventory Status</h3>
<p>Total Unique Items Found: <<= Object.keys($magicItemsGathered || {}).length>></p>
<<link "🪄 Fill Magic Inventory (1 of Each Item)">>
/* Safely clear or establish the object root */
<<set $magicItemsGathered to {}>>
/* Dynamically loop through all glyphs to harvest unique magicodes */
<<set _keys to Object.keys(setup.glyphs)>>
<<for _i = 0; _i < _keys.length; _i++>>
<<set _glyph to setup.glyphs[_keys[_i]]>>
<<if _glyph.magicode and _glyph.magicode neq "">>
<<set $magicItemsGathered[_glyph.magicode] to 1>>
<</if>>
<</for>>
<<goto `passage()`>>
<</link>>
<br><br>
<h3>💾 Game 2: Tech Inventory Status</h3>
<p>Total Unique Items Found: <<= Object.keys($techItemsGathered || {}).length>></p>
<<link "💾 Fill Tech Inventory (1 of Each Item)">>
/* Safely clear or establish the object root */
<<set $techItemsGathered to {}>>
/* Dynamically loop through all glyphs to harvest unique techcodes */
<<set _keys to Object.keys(setup.glyphs)>>
<<for _i = 0; _i < _keys.length; _i++>>
<<set _glyph to setup.glyphs[_keys[_i]]>>
<<if _glyph.techcode and _glyph.techcode neq "">>
<<set $techItemsGathered[_glyph.techcode] to 1>>
<</if>>
<</for>>
<<goto `passage()`>>
<</link>>
<br><hr><br>
/* --- RETURN PORTAL --- */
<<link "◀ Return to Main Grid (PuzzleZone)">>
<<goto "PuzzleZone">>
<</link>>
<</nobr>><<nobr>>
<h2>🎭 Character Motivation & Origin</h2>
<p>Before entering the grid, select the core drive that dictates your journey through Game 1. Your choices carry immediate assets, structural alterations, and permanent narrative repercussions.</p>
<hr>
<div class="motivation-wrapper" style="display: flex; flex-direction: column; gap: 20px;">
/* --- ROLE 1: WELL-INTENTIONED SLACKER --- */
<div class="role-box" style="background: #1c241c; padding: 15px; border: 1px solid #336633; border-radius: 4px;">
<h3>🟢 The Devoted Underachiever</h3>
<p><b>Profiled:</b> You're notoriously bad, dumb, and lazy—but you fiercely love your mother, and your sole motivation is to gather what's needed to help her.</p>
<p style="color: #8af88a;"><b>Game 1 Advantage:</b> Magical forces pity your lack of skill. Several grid security checkpoints are pre-cracked and marked solved automatically.</p>
<p style="color: #f88a8a;"><b>The End-Game Tax:</b> Due to your sheer clumsiness and bad management heading into Game 2, you will lose half your amassed gold and enter the next sector clinging to a single remaining life.</p>
<<link "▶ EMBARK AS THE UNDERACHIEVER">>
<<set $playerRole to "slacker">>
<<set $lives to 5>>
/* Pre-solving specific rooms to give them a magical head-start */
<<set $solvedRooms["A29"] to true>>
<<set $solvedRooms["A26"] to true>>
<<set $solvedRooms["A23"] to true>>
<<set $solvedRooms["A19"] to true>>
<<set $solvedRooms["A16"] to true>>
<<set $solvedRooms["A13"] to true>>
<<set $solvedRooms["A10"] to true>>
<<set $solvedRooms["A06"] to true>>
<<set $solvedRooms["A03"] to true>>
<<set $solvedRooms["B28"] to true>>
<<set $solvedRooms["B25"] to true>>
<<set $solvedRooms["B21"] to true>>
<<set $solvedRooms["B18"] to true>>
<<set $solvedRooms["B15"] to true>>
<<set $solvedRooms["B11"] to true>>
<<set $solvedRooms["B08"] to true>>
<<set $solvedRooms["B05"] to true>>
<<set $solvedRooms["B01"] to true>>
<<goto "PuzzleZone">>
<</link>>
</div>
/* --- ROLE 2: THE VENGEFUL --- */
<div class="role-box" style="background: #241c1c; padding: 15px; border: 1px solid #663333; border-radius: 4px;">
<h3>🔴 The Vengeful Catalyst</h3>
<p><b>Profiled:</b> You are driven entirely by old grudges, blood-debts, and settling scores from your past.</p>
<p style="color: #8ab4f8;"><b>Game 1 Baseline:</b> Standard deployment. Additional two Lives granted, raising from 5 to 7.</p>
<p style="color: #f88a8a;"><b>The End-Game Tax:</b> Repercussions from your past vengeful acts catch up with you at the border of Game 2. Cosmic blowback will strip your inventory down, leaving you with all-but-one of each unique magic item you harvested.</p>
<<link "▶ EMBARK AS THE VENGEFUL">>
<<set $playerRole to "vengeful">>
<<set $lives to 7>>
<<goto "PuzzleZone">>
<</link>>
</div>
/* --- ROLE 3: THE POWER-HUNGRY --- */
<div class="role-box" style="background: #24241c; padding: 15px; border: 1px solid #666633; border-radius: 4px;">
<h3>🟡 The Power-Hungry Tyrant</h3>
<p><b>Profiled:</b> You seek absolute dominance, total assimilation of assets, and raw control. You are all you care about.</p>
<p style="color: #8af88a;"><b>Game 1 Advantage:</b> Empowered by your sheer ambition, you manifest a massive pool of <b>12 lives</b> instead of 5.</p>
<p style="color: #f8aa8a;"><b>The Dark Consequence:</b> Because you only care about yourself, you will completely abandon your mother. You will never be permitted to access sector <b>A29</b> to save her, and the terminal will explicitly mock your choices when the time comes.</p>
<<link "▶ EMBARK AS THE POWER-HUNGRY">>
<<set $playerRole to "power">>
<<set $lives to 12>>
<<goto "PuzzleZone">>
<</link>>
</div>
</div>
<</nobr>><h2>⚠️ ACCESS DENIED: SECTOR BYPASSED</h2>
<hr>
<p>You attempt to route heading calculations toward Sector A29 to assist your elder ... but the terminal interface locks up, flashing a crimson warning display.</p>
<blockquote>
"Error: Incompatible Motivation. You chose the path of absolute dominion. You got your potion in an alternate timeline encounter—you are completely secure, and quite frankly, your own survival is all you ever cared about anyway."
</blockquote>
<p>Your elder passes away unassisted in the dark sectors while you forge ahead alone.</p>
<hr>
<<link "→ Proceed to Next Grid Sector">>
<<set $currentRoomId to "A27">>
<<goto "PuzzleZone">>
<</link>>:: Game3Momotaro {"position":"1150,275","size":"100,100"}
<<nobr>>
/* 1. Initialize Game 3 State Frameworks */
<<if $currentMomoSceneId is undefined>>
<<set $currentMomoSceneId to "MomoS01">>
<<set $momoPlayerAnswers to {}>>
<<set $momoSolvedScenes to {}>>
<</if>>
<<set _scene to setup.sceneDatabase[$currentMomoSceneId]>>
<<set _requiredGlyphs to _scene.sceneglyphs>>
<</nobr>>\
## 🍑 Game 3 Matrix: The Momotaro Ideogram Calibration
Analyze the narrative fragments below. To bypass this sector's encryption barrier, you must map the correct visual ideogram signatures to the thematic events of the scene.
🎨 **Current Game Mode:** <span style="color: #ff9f43; font-weight: bold;">GAME 3 (MOMOTARO DROPDOWN MODE)</span>
❤️ **Lives Available:** $lives
---
### Scene Database Node: $currentMomoSceneId
<div style="background: #111; border: 1px solid #333; padding: 20px; border-radius: 4px; margin-bottom: 20px; font-size: 1.1em; line-height: 1.5em; border-left: 4px solid #ff9f43;">
''"''<<= _scene.text>>''"''
</div>
### 🧩 Core Ideogram Mapping Slots
<<nobr>>
/* Pre-build the visual font options list out of your master glyph registry database definitions */
<<set _optionsHtml to '<option value="" style="font-family: sans-serif;">Select Glyph...</option>'>>
<<for _gIdx = 0; _gIdx < 46; _gIdx++>>
<<set _padId to String(_gIdx + 1).padStart(2, '0')>>
<<set _glyphKey to "PDglyph" + _padId>>
<<set _mName to setup.glyphs[_glyphKey].MomoName>>
/* 66000 dec corresponds to hex 101D0 */
<<set _hexChar to "&#x" + (66000 + _gIdx).toString(16) + ";">>
/* The value maps to the name, but the user selects the physical glyph symbol */
<<set _optionsHtml += '<option value="' + _mName + '">' + _hexChar + ' (' + (_gIdx + 1) + ')</option>'>>
<</for>>
<table style="width: 100%; border-collapse: collapse; margin-top: 15px;">
<tr style="border-bottom: 2px solid #444; text-align: left; background: #222;">
<th style="padding: 10px;">Sequence Slot</th>
<th style="padding: 10px;">Assigned Glyphic Meaning Target</th>
</tr>
<<for _idx = 0; _idx < _requiredGlyphs.length; _idx++>>
<tr style="border-bottom: 1px solid #333;" id="`'momo-slot-' + _idx`">
<td style="padding: 10px; font-weight: bold; color: #8ab4f8;">
Ideogram #<<= _idx + 1>>
</td>
<td style="padding: 10px;">
<<if $momoSolvedScenes[$currentMomoSceneId] is true>>
<span style="color: #55ff55; font-weight: bold;">✔️ <<= _requiredGlyphs[_idx]>></span>
<<else>>
<<if $momoPlayerAnswers[$currentMomoSceneId] is undefined>>
<<set $momoPlayerAnswers[$currentMomoSceneId] to []>>
<</if>>
/* Render native HTML select element loaded explicitly with font option tags */
<<print '<select class="phaistos momo3-font-select" id="momo-sel-' + _idx + '" onchange="SugarCube.State.variables.momoPlayerAnswers[SugarCube.State.variables.currentMomoSceneId][' + _idx + '] = this.value;">' + _optionsHtml + '</select>'>>
<</if>>
</td>
</tr>
<</for>>
</table>
<</nobr>>
<hr>
<div id="momo-diagnostic-results">
<<nobr>>
<<link "⬡ Run Ideogram Alignment Diagnostic">>
<<set _errorsFound to 0>>
<<set _sceneAnswers to $momoPlayerAnswers[$currentMomoSceneId] || []>>
/* Evaluate each selection slot item against the master design requirements */
<<for _idx = 0; _idx < _requiredGlyphs.length; _idx++>>
<<set _playerChoice to _sceneAnswers[_idx]>>
<<set _targetChoice to _requiredGlyphs[_idx]>>
<<if _playerChoice is _targetChoice>>
<<run jQuery("#momo-slot-" + _idx).css("background", "rgba(85, 255, 85, 0.05)")>>
<<else>>
<<set _errorsFound++>>
<<run jQuery("#momo-slot-" + _idx).css("background", "rgba(255, 85, 85, 0.05)")>>
<</if>>
<</for>>
/* Process Validation Consequences */
<<if _errorsFound is 0>>
<<set $momoSolvedScenes[$currentMomoSceneId] to true>>
<<replace "#momo-action-portal">>
<div style="background: #1a331a; padding: 15px; border: 1px solid #336633; border-radius: 4px; margin-top: 15px;">
<span style="color: #55ff55; font-weight: bold;">■ Calibration Complete: Universal Meanings Verified.</span>
<p style="color: #aaa; font-style: italic;">The cross-cultural ideological thesis holds clean across civilizationally-long timespans!</p>
<div style="margin-top: 15px;">
<<set _sceneKeys to Object.keys(setup.sceneDatabase)>>
<<set _currIndex to _sceneKeys.indexOf($currentMomoSceneId)>>
<<if _currIndex lt _sceneKeys.length - 1>>
<<set _nextScene to _sceneKeys[_currIndex + 1]>>
<<link "→ Proceed to Next Narrative Scene Sector">>
<<set $currentMomoSceneId to _nextScene>>
<<goto "Game3Momotaro">>
<</link>>
<<else>>
<p style="color: #ff9f43; font-weight: bold;">🎉 ALL 12 STORY SECTORS SUCCESSFULLY ENCODED INTO THE PHAISTOS DISC RESUMPTION LAYER!</p>
<<link "◀ Return to Terminal Core">>
<<goto "PuzzleZone">>
<</link>>
<</if>>
</div>
</div>
<</replace>>
<<else>>
/* Deduct life parameter on validation rejection */
<<set $lives to $lives - 1>>
<<if $lives lte 0>>
<<goto "UntimelyPassing">>
<<else>>
<<replace "#momo-action-portal">>
<span style="color: #ff5555; font-weight: bold;">
❌ Alignment Failed: <<= _errorsFound>> database mapping parameters mismatched. Deficient static charge feedback encountered—1 Life lost!
</span>
<br>
<<link "🔄 Re-evaluate Calibration Array">>
<<goto "Game3Momotaro">>
<</link>>
<</replace>>
<</if>>
<</if>>
<</link>>
<</nobr>>
<p id="momo-action-portal"></p>
</div>
---
### 🗂️ Global Resumption Array Controls
<<nobr>>
<div style="display: flex; gap: 10px; font-size: 0.9em; flex-wrap: wrap;">
<<set _mKeys to Object.keys(setup.sceneDatabase)>>
<<for _k range _mKeys>>
<<capture _k>>
<<set _label = _k.replace("MomoS", "S")>>
<<if $currentMomoSceneId is _k>>
<span style="background: #ff9f43; color: #000; padding: 2px 6px; border-radius: 3px; font-weight: bold;"><%= _label %></span>
<<elseif $momoSolvedScenes[_k] is true>>
<<link `"<span style='color: #55ff55;'>✔️ " + _label + "</span>"`>>
<<set $currentMomoSceneId to _k>>
<<goto "Game3Momotaro">>
<</link>>
<<else>>
<<link _label>>
<<set $currentMomoSceneId to _k>>
<<goto "Game3Momotaro">>
<</link>>
<</if>>
|
<</capture>>
<</for>>
</div>
<</nobr>>
[[Return to Main Puzzle Terminal Core|PuzzleZone]]:: Momo4 {"position":"1275,275","size":"100,100"}
<<nobr>>
/* ── 1. BOOT: one-time initialization of all Game 3 state ── */
<<if $currentMomoSceneId is undefined>>
<<set $currentMomoSceneId to "MomoS01">>
<<set $lives to 5>>
<</if>>
<<if $momoFontAnswers is undefined>>
<<set $momoFontAnswers to {}>>
<</if>>
<<if $momoSolvedScenes is undefined>>
<<set $momoSolvedScenes to {}>>
<</if>>
<<if $selectedGlyphIndex is undefined>>
<<set $selectedGlyphIndex to null>>
<</if>>
/* ── 2. Pull active scene data ── */
<<set _scene to setup.sceneDatabase[$currentMomoSceneId]>>
<<set _slotCount to _scene.sceneglyphs.length>>
/* ── 3. Seed empty slot array for this scene if needed ── */
<<if $momoFontAnswers[$currentMomoSceneId] is undefined>>
<<set $momoFontAnswers[$currentMomoSceneId] to []>>
<<for _j = 0; _j < _slotCount; _j++>>
<<set $momoFontAnswers[$currentMomoSceneId][_j] to null>>
<</for>>
<</if>>
<</nobr>>\
## 🍑 Momotaro Glyph Calibration
❤️ **Lives:** $lives
---
### Scene: $currentMomoSceneId
<div style="background:#111;border:1px solid #333;padding:15px;border-radius:4px;font-size:1.1em;line-height:1.5em;border-left:4px solid #ff9f43;margin-bottom:20px;">
''"''<<= _scene.text>>''"''
</div>
<!-- ════════════════════════════════════════════
ZONE A — ANSWER SLOTS
Tap a glyph in Zone B first (it highlights gold).
Then tap the slot you want to fill.
════════════════════════════════════════════ -->
### 📥 Your Answer — tap a slot to place the selected glyph
<<nobr>>
<div class="momo4-slots-row">
<<for _slotIdx = 0; _slotIdx < _slotCount; _slotIdx++>>
<<capture _slotIdx>>
<<set _filled to $momoFontAnswers[$currentMomoSceneId][_slotIdx]>>
/* Decide border colour: gold=active target, green=filled, dashed=empty */
<<if $momoSolvedScenes[$currentMomoSceneId] is true>>
<<set _boxStyle to "border:2px solid #55ff55;">>
<<elseif $selectedGlyphIndex isnot null>>
<<set _boxStyle to "border:2px solid #ff9f43;cursor:pointer;">>
<<else>>
<<set _boxStyle to "border:2px dashed #555;">>
<</if>>
<div class="momo4-slot-box" id="`'slot-box-' + _slotIdx`" style="<<= _boxStyle>>">
/* Invisible full-area tap target */
<<if $momoSolvedScenes[$currentMomoSceneId] isnot true>>
<<link "">>
<<if $selectedGlyphIndex isnot null>>
<<set $momoFontAnswers[$currentMomoSceneId][_slotIdx] to $selectedGlyphIndex>>
<<set $selectedGlyphIndex to null>>
<<goto "Momo4">>
<</if>>
<</link>>
<</if>>
<div class="momo4-slot-label">Slot <<= _slotIdx + 1>></div>
/* Show the assigned glyph character via the font, or a blank placeholder */
<div class="momo4-slot-glyph phaistos">
<<if _filled isnot null and _filled isnot undefined>>
/* _filled is a 0-based index; glyph 1 is at codepoint 0x101D0, etc.
The font maps glyph N (1-based) to U+101CF + N
i.e. glyph 1 → U+101D0, glyph 2 → U+101D1 … glyph 46 → U+101FF */
<<= String.fromCodePoint(0x101CF + _filled + 1)>>
<<else>>
<span style="color:#444;font-family:sans-serif;font-size:0.6em;">empty</span>
<</if>>
</div>
</div>
<</capture>>
<</for>>
</div>
<</nobr>>
<!-- Clear-all shortcut while unsolved -->
<<if $momoSolvedScenes[$currentMomoSceneId] isnot true>>
<<nobr>>
<div style="margin-bottom:16px;">
<<link "✖ Clear all slots">>
<<set $momoFontAnswers[$currentMomoSceneId] to undefined>>
<<set $selectedGlyphIndex to null>>
<<goto "Momo4">>
<</link>>
</div>
<</nobr>>
<</if>>
<!-- ════════════════════════════════════════════
SUBMIT LINK
════════════════════════════════════════════ -->
<div id="momo4-validation-portal" style="margin:20px 0 10px 0;">
<<nobr>>
<<if $momoSolvedScenes[$currentMomoSceneId] isnot true>>
<<link "⬡ Judge my answer">>
<<set _errors to 0>>
<<set _expected to _scene.sceneglyphs>>
<<for _idx = 0; _idx < _slotCount; _idx++>>
<<set _playerIdx to $momoFontAnswers[$currentMomoSceneId][_idx]>>
<<if _playerIdx is null or _playerIdx is undefined>>
<<set _errors++>>
<<else>>
/* Convert 0-based grid index → 2-digit padded key e.g. 0→"PDglyph01" */
<<set _key to "PDglyph" + String(_playerIdx + 1).padStart(2, '0')>>
<<set _momoName to setup.glyphs[_key].MomoName>>
<<if _momoName isnot _expected[_idx]>>
<<set _errors++>>
<</if>>
<</if>>
<</for>>
<<if _errors is 0>>
<<set $momoSolvedScenes[$currentMomoSceneId] to true>>
<<replace "#momo4-action-box">>
<div style="background:#1a331a;padding:15px;border:1px solid #336633;border-radius:4px;margin-top:15px;">
<span style="color:#55ff55;font-weight:bold;">■ Sequence verified — sector unlocked.</span>
<div style="margin-top:15px;">
<<set _sceneKeys to Object.keys(setup.sceneDatabase)>>
<<set _currIndex to _sceneKeys.indexOf($currentMomoSceneId)>>
<<if _currIndex lt _sceneKeys.length - 1>>
<<set _nextScene to _sceneKeys[_currIndex + 1]>>
<<link "→ Next scene">>
<<set $currentMomoSceneId to _nextScene>>
<<set $selectedGlyphIndex to null>>
<<goto "Momo4">>
<</link>>
<<else>>
<p style="color:#ff9f43;font-weight:bold;">🎉 All 12 scenes complete!</p>
<<link "◀ Return to main terminal">>
<<goto "PuzzleZone">>
<</link>>
<</if>>
</div>
</div>
<</replace>>
<<else>>
<<set $lives to $lives - 1>>
<<if $lives lte 0>>
<<goto "UntimelyPassing">>
<<else>>
<<replace "#momo4-action-box">>
<div style="color:#ff5555;font-weight:bold;padding:10px;background:rgba(255,85,85,0.1);border:1px solid #ff5555;border-radius:4px;margin-top:10px;">
❌ <<= _errors>> slot(s) wrong — 1 life lost. Lives remaining: <<= $lives>>
</div>
<<link "🔄 Try again">>
<<set $momoFontAnswers[$currentMomoSceneId] to undefined>>
<<set $selectedGlyphIndex to null>>
<<goto "Momo4">>
<</link>>
<</replace>>
<</if>>
<</if>>
<</link>>
<</if>>
<</nobr>>
<div id="momo4-action-box"></div>
</div>
---
<!-- ════════════════════════════════════════════
ZONE B — GLYPH FONT GRID (4 columns, 46 glyphs + 2 padding cells)
Tap any glyph to "select" it (it glows gold).
Tap again to deselect.
Then tap a slot above to place it.
════════════════════════════════════════════ -->
### 🔠 Glyph grid — tap to select, then tap a slot above
<<nobr>>
<div class="momo4-grid-container">
<<for _gi = 0; _gi < 48; _gi++>>
<<capture _gi>>
<<if _gi < 46>>
/* Is this glyph currently selected? */
<<set _isActive to ($selectedGlyphIndex is _gi)>>
<<set _activeClass to (_isActive ? " active-glyph-key" : "")>>
<div class="`'momo4-grid-item' + _activeClass`">
/* Invisible tap target — selecting highlights; tapping again deselects */
<<link "">>
<<if $selectedGlyphIndex is _gi>>
/* Deselect: tap the same glyph twice */
<<set $selectedGlyphIndex to null>>
<<else>>
<<set $selectedGlyphIndex to _gi>>
<</if>>
<<goto "Momo4">>
<</link>>
/* Render the glyph character from the font */
<span class="phaistos"><<= String.fromCodePoint(0x101CF + _gi + 1)>></span>
/* Small index number bottom-right for reference */
<div class="momo4-key-number"><<= _gi + 1>></div>
</div>
<<else>>
/* Padding cells to keep the 4-column grid tidy */
<div class="momo4-grid-item" style="background:transparent;border:1px dashed #1a1a1a;cursor:default;">
<span class="momo4-empty-placeholder"> </span>
</div>
<</if>>
<</capture>>
<</for>>
</div>
<</nobr>>
---
<!-- Scene navigation strip -->
### 🗂️ Scene navigator
<<nobr>>
<div style="display:flex;gap:8px;font-size:0.85em;flex-wrap:wrap;">
<<set _navKeys to Object.keys(setup.sceneDatabase)>>
<<for _nav range _navKeys>>
<<capture _nav>>
<<set _lbl to _nav.replace("MomoS", "S")>>
<<if $currentMomoSceneId is _nav>>
<span style="background:#ff9f43;color:#000;padding:2px 6px;border-radius:3px;font-weight:bold;"><<= _lbl>></span>
<<elseif $momoSolvedScenes[_nav] is true>>
<<link `"<span style='color:#55ff55;'>✔ " + _lbl + "</span>"`>>
<<set $currentMomoSceneId to _nav>>
<<set $selectedGlyphIndex to null>>
<<goto "Momo4">>
<</link>>
<<else>>
<<link _lbl>>
<<set $currentMomoSceneId to _nav>>
<<set $selectedGlyphIndex to null>>
<<goto "Momo4">>
<</link>>
<</if>>
|
<</capture>>
<</for>>
</div>
<</nobr>>
[[◀ Main terminal|PuzzleZone]]