fix: deduplicate click power formula via getClickPower()
Inline formula at Swarm Protocol calc replaced with canonical getClickPower() call, satisfying guardrail rule 2 (single source of truth for click power formula).
This commit is contained in:
3
game.js
3
game.js
@@ -1146,8 +1146,7 @@ function updateRates() {
|
||||
// Swarm Protocol: buildings auto-code based on click power
|
||||
if (G.swarmFlag === 1) {
|
||||
const totalBuildings = Object.values(G.buildings).reduce((a, b) => a + b, 0);
|
||||
// Compute click power using snapshot boost to avoid debuff mutation
|
||||
const _clickPower = (1 + Math.floor(G.buildings.autocoder * 0.5) + Math.max(0, (G.phase - 1)) * 2) * _codeBoost;
|
||||
const _clickPower = getClickPower();
|
||||
G.swarmRate = totalBuildings * _clickPower;
|
||||
G.codeRate += G.swarmRate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user