Compare commits
3 Commits
beacon/pol
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| fdd95af287 | |||
| 673c09f0a7 | |||
| 9375a4c07e |
21
js/engine.js
21
js/engine.js
@@ -111,6 +111,15 @@ function updateRates() {
|
||||
}
|
||||
|
||||
// === CORE FUNCTIONS ===
|
||||
|
||||
/**
|
||||
* Check if player has reached the ReCKoning endgame.
|
||||
* Conditions: totalRescues >= 100000, pactFlag === 1, harmony > 50
|
||||
*/
|
||||
function isEndgame() {
|
||||
return G.totalRescues >= 100000 && G.pactFlag === 1 && G.harmony > 50;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main game loop tick, called every 100ms.
|
||||
*/
|
||||
@@ -337,6 +346,11 @@ function checkMilestones() {
|
||||
function checkProjects() {
|
||||
// Check for new project triggers
|
||||
for (const pDef of PDEFS) {
|
||||
// Skip non-ReCKoning projects during endgame
|
||||
if (isEndgame() && !pDef.id.startsWith('p_reckoning_')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const alreadyPurchased = G.completedProjects && G.completedProjects.includes(pDef.id);
|
||||
if (!alreadyPurchased && !G.activeProjects) G.activeProjects = [];
|
||||
|
||||
@@ -1173,7 +1187,12 @@ function renderProjects() {
|
||||
|
||||
// Show available projects
|
||||
if (G.activeProjects) {
|
||||
for (const id of G.activeProjects) {
|
||||
// Filter out non-ReCKoning projects during endgame
|
||||
const projectsToShow = isEndgame()
|
||||
? G.activeProjects.filter(id => id.startsWith('p_reckoning_'))
|
||||
: G.activeProjects;
|
||||
|
||||
for (const id of projectsToShow) {
|
||||
const pDef = PDEFS.find(p => p.id === id);
|
||||
if (!pDef) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user