Compare commits

...

1 Commits

Author SHA1 Message Date
Alexander Whitestone
282950ffe8 burn: fix offline progress to award rescues, ops, and trust (closes #32)
Offline progress calculation now includes rescues, ops, and trust
at 50% efficiency alongside code, compute, knowledge, users, and
impact. The welcome-back message dynamically shows rescues, ops,
and trust gains when applicable.
2026-04-10 02:18:19 -04:00

11
game.js
View File

@@ -1520,13 +1520,22 @@ function loadGame() {
const kc = G.knowledgeRate * offSec * f;
const uc = G.userRate * offSec * f;
const ic = G.impactRate * offSec * f;
const rc = G.rescuesRate * offSec * f;
const oc = G.opsRate * offSec * f;
const tc = G.trustRate * offSec * f;
G.code += gc; G.compute += cc; G.knowledge += kc;
G.users += uc; G.impact += ic;
G.rescues += rc; G.ops += oc; G.trust += tc;
G.totalCode += gc; G.totalCompute += cc; G.totalKnowledge += kc;
G.totalUsers += uc; G.totalImpact += ic;
G.totalRescues += rc;
log(`Welcome back! While away (${Math.floor(offSec / 60)}m): ${fmt(gc)} code, ${fmt(kc)} knowledge, ${fmt(uc)} users`);
const parts = [`${fmt(gc)} code`, `${fmt(kc)} knowledge`, `${fmt(uc)} users`];
if (rc > 0) parts.push(`${fmt(rc)} rescues`);
if (oc > 0) parts.push(`${fmt(oc)} ops`);
if (tc > 0) parts.push(`${fmt(tc)} trust`);
log(`Welcome back! While away (${Math.floor(offSec / 60)}m): ${parts.join(', ')}`);
}
}