diff --git a/js/engine.js b/js/engine.js index 4eb1d2c..30f33f5 100644 --- a/js/engine.js +++ b/js/engine.js @@ -334,13 +334,23 @@ function checkMilestones() { } } +/** + * Returns true if the game is in the ReCKoning endgame state. + */ +function isEndgame() { + return G.totalRescues >= 100000 && G.pactFlag === 1 && G.harmony > 50; +} + function checkProjects() { + const endgame = isEndgame(); // Check for new project triggers for (const pDef of PDEFS) { const alreadyPurchased = G.completedProjects && G.completedProjects.includes(pDef.id); if (!alreadyPurchased && !G.activeProjects) G.activeProjects = []; if (!alreadyPurchased && !G.activeProjects.includes(pDef.id)) { + // During endgame, only activate ReCKoning projects + if (endgame && !pDef.id.startsWith('p_reckoning_')) continue; if (pDef.trigger()) { G.activeProjects.push(pDef.id); log(`Available: ${pDef.name}`); @@ -1173,10 +1183,14 @@ function renderProjects() { // Show available projects if (G.activeProjects) { + const endgame = isEndgame(); for (const id of G.activeProjects) { const pDef = PDEFS.find(p => p.id === id); if (!pDef) continue; + // During endgame, only show ReCKoning projects in the UI + if (endgame && !pDef.id.startsWith('p_reckoning_')) continue; + const afford = canAffordProject(pDef); const costStr = Object.entries(pDef.cost).map(([r, a]) => `${fmt(a)} ${r}`).join(', ');