fix: check victory condition before game-over on day overflow
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m3s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m3s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# 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.
|
||||
|
||||
1. 1) stores/golem-combat-actions.ts > stores/golem-combat-helpers.ts
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"_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.",
|
||||
"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."
|
||||
},
|
||||
|
||||
@@ -136,21 +136,22 @@ export const useGameStore = create<GameCoordinatorStore>()(
|
||||
prestigeUpgrades: ctx.prestige.prestigeUpgrades,
|
||||
};
|
||||
|
||||
if (day > MAX_DAY) {
|
||||
const insightGained = calcInsight(insightParams, disciplineEffects);
|
||||
addLog('The loop ends. Gained ' + insightGained + ' Insight.');
|
||||
writes.ui = { ...(writes.ui || {}), gameOver: true, victory: false };
|
||||
if (ctx.combat.maxFloorReached >= 100 && ctx.prestige.signedPacts.includes(100)) {
|
||||
const insightGained = calcInsight(insightParams, disciplineEffects) * 3;
|
||||
addLog('VICTORY! The Awakened One falls! Gained ' + insightGained + ' Insight!');
|
||||
writes.ui = { ...(writes.ui || {}), gameOver: true, victory: true };
|
||||
writes.prestige = { ...(writes.prestige || {}), loopInsight: insightGained };
|
||||
writes.game = { day, hour };
|
||||
applyTickWrites(writes, storeSetters);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx.combat.maxFloorReached >= 100 && ctx.prestige.signedPacts.includes(100)) {
|
||||
const insightGained = calcInsight(insightParams, disciplineEffects) * 3;
|
||||
addLog('VICTORY! The Awakened One falls! Gained ' + insightGained + ' Insight!');
|
||||
writes.ui = { ...(writes.ui || {}), gameOver: true, victory: true };
|
||||
if (day > MAX_DAY) {
|
||||
const insightGained = calcInsight(insightParams, disciplineEffects);
|
||||
addLog('The loop ends. Gained ' + insightGained + ' Insight.');
|
||||
writes.ui = { ...(writes.ui || {}), gameOver: true, victory: false };
|
||||
writes.prestige = { ...(writes.prestige || {}), loopInsight: insightGained };
|
||||
writes.game = { day, hour };
|
||||
applyTickWrites(writes, storeSetters);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user