fix: check victory condition before game-over on day overflow
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m3s

This commit is contained in:
2026-06-10 22:57:34 +02:00
parent 51710e2e1b
commit 05232ae03b
3 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# Circular Dependencies # Circular Dependencies
Generated: 2026-06-10T19:51:19.886Z Generated: 2026-06-10T20:56:06.167Z
Found: 3 circular chain(s) — these MUST be fixed before modifying involved files. Found: 3 circular chain(s) — these MUST be fixed before modifying involved files.
1. 1) stores/golem-combat-actions.ts > stores/golem-combat-helpers.ts 1. 1) stores/golem-combat-actions.ts > stores/golem-combat-helpers.ts
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"_meta": { "_meta": {
"generated": "2026-06-10T19:51:17.712Z", "generated": "2026-06-10T20:56:04.043Z",
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.", "description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry." "usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
}, },
+9 -8
View File
@@ -136,21 +136,22 @@ export const useGameStore = create<GameCoordinatorStore>()(
prestigeUpgrades: ctx.prestige.prestigeUpgrades, prestigeUpgrades: ctx.prestige.prestigeUpgrades,
}; };
if (day > MAX_DAY) { if (ctx.combat.maxFloorReached >= 100 && ctx.prestige.signedPacts.includes(100)) {
const insightGained = calcInsight(insightParams, disciplineEffects); const insightGained = calcInsight(insightParams, disciplineEffects) * 3;
addLog('The loop ends. Gained ' + insightGained + ' Insight.'); addLog('VICTORY! The Awakened One falls! Gained ' + insightGained + ' Insight!');
writes.ui = { ...(writes.ui || {}), gameOver: true, victory: false }; writes.ui = { ...(writes.ui || {}), gameOver: true, victory: true };
writes.prestige = { ...(writes.prestige || {}), loopInsight: insightGained }; writes.prestige = { ...(writes.prestige || {}), loopInsight: insightGained };
writes.game = { day, hour }; writes.game = { day, hour };
applyTickWrites(writes, storeSetters); applyTickWrites(writes, storeSetters);
return; return;
} }
if (ctx.combat.maxFloorReached >= 100 && ctx.prestige.signedPacts.includes(100)) { if (day > MAX_DAY) {
const insightGained = calcInsight(insightParams, disciplineEffects) * 3; const insightGained = calcInsight(insightParams, disciplineEffects);
addLog('VICTORY! The Awakened One falls! Gained ' + insightGained + ' Insight!'); addLog('The loop ends. Gained ' + insightGained + ' Insight.');
writes.ui = { ...(writes.ui || {}), gameOver: true, victory: true }; writes.ui = { ...(writes.ui || {}), gameOver: true, victory: false };
writes.prestige = { ...(writes.prestige || {}), loopInsight: insightGained }; writes.prestige = { ...(writes.prestige || {}), loopInsight: insightGained };
writes.game = { day, hour };
applyTickWrites(writes, storeSetters); applyTickWrites(writes, storeSetters);
return; return;
} }