SAVE SKY provenance + sky→hex (not sky→sea) transition — TDD
- drama.GameEvent.SKY_SAVED verb + to_prose branch: "X beholds the skyscape of {poss} birth, which yields {obj} a unique {Cap} capacity."; tied highest scores switch "a unique" → "equal", join w. "and" (2-way) or Oxford comma (3+), and pluralize "capacity" → "capacities"; pronouns resolved from actor.pronouns at render time, same machinery as SIG_READY/ROLE_SELECTED
- epic.utils.ELEMENT_CAPACITOR_NAMES + ELEMENT_ORDER + top_capacitors(elements) helper: maps Fire→Ardor Stone→Ossum Time→Tempo Space→Nexus Air→Pneuma Water→Humor; tolerates both flat-int and enriched-dict (`{count, contributors}`) chart_data shapes; returns capacitor names tied for highest count, ordered by canonical wheel ring
- epic.natus_save: on action=confirm, records GameEvent.SKY_SAVED w. top_capacitors=[…] before _notify_sky_confirmed; per-room billscroll AND billboard Most Recent Scroll pick up the new prose
- _natus_overlay.html _onSkyConfirmed: removed sea-partial fetch+inject; now calls closeNatus() + window.location.reload() so the gamer lands on the table hex w. the PICK SKY → PICK SEA btn swap (server-side, driven by sky_confirmed=True), then opts into the sea overlay manually. The auto-launch via 39e12d6 was buried by FTs that were pinning the wrong contract — gamer never had a chance to witness PICK SEA on the hex
- test_room_sea_select.py: three FTs renamed/rewired from auto-launch assertions (sea_overlay_appears_without_page_refresh, natus_overlay_not_visible_after_sky_confirm, sea_open_class_on_html_after_confirm) to (pick_sea_btn_visible_after_sky_confirm, natus_overlay_closed_after_sky_confirm, clicking_pick_sea_btn_opens_sea_overlay) — sea overlay now requires explicit PICK SEA click
Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -383,26 +383,16 @@
|
||||
});
|
||||
});
|
||||
|
||||
// ── Sky confirmed → inject sea partial ───────────────────────────────────
|
||||
|
||||
const SEA_PARTIAL_URL = overlay.dataset.seaPartialUrl;
|
||||
// ── Sky confirmed → close natus & reload to land on hex w. PICK SEA ──────
|
||||
//
|
||||
// The gamer should witness the table hex (now showing PICK SEA in place of
|
||||
// PICK SKY) before opting into the sea overlay. We reload the room page —
|
||||
// the server-side template will re-render with `sky_confirmed=True` so the
|
||||
// hex's btn flips automatically, and the user clicks PICK SEA to continue.
|
||||
|
||||
function _onSkyConfirmed() {
|
||||
fetch(SEA_PARTIAL_URL, { credentials: 'same-origin' })
|
||||
.then(r => r.text())
|
||||
.then(html => {
|
||||
// Remove natus overlay + backdrop; inject sea partial before body close
|
||||
var backdrop = document.querySelector('.natus-backdrop');
|
||||
if (backdrop) backdrop.remove();
|
||||
overlay.remove();
|
||||
document.documentElement.classList.remove('natus-open');
|
||||
document.body.insertAdjacentHTML('beforeend', html);
|
||||
document.documentElement.classList.add('sea-open');
|
||||
})
|
||||
.catch(() => {
|
||||
// Fallback: just close natus and let page refresh handle the transition
|
||||
closeNatus();
|
||||
});
|
||||
closeNatus();
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
// ── CSRF ──────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user