Compare commits

...

1 Commits

Author SHA1 Message Date
Alexander Whitestone
b819fc068a fix: Bilbo randomness — roll once per tick (#88)
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
2026-04-13 02:11:50 -04:00

View File

@@ -77,14 +77,16 @@ function updateRates() {
G.userRate += 5 * timmyCount * (timmyMult - 1); G.userRate += 5 * timmyCount * (timmyMult - 1);
} }
// Bilbo randomness: 10% chance of massive creative burst // Bilbo randomness: flags are set per-tick in tick(), not here
if (G.buildings.bilbo > 0 && Math.random() < CONFIG.BILBO_BURST_CHANCE) { // updateRates() is called from many non-tick contexts (buy, resolve, sprint)
if (G.buildings.bilbo > 0) {
if (G.bilboBurstActive) {
G.creativityRate += 50 * G.buildings.bilbo; G.creativityRate += 50 * G.buildings.bilbo;
} }
// Bilbo vanishing: 5% chance of zero creativity this tick if (G.bilboVanishActive) {
if (G.buildings.bilbo > 0 && Math.random() < CONFIG.BILBO_VANISH_CHANCE) {
G.creativityRate = 0; G.creativityRate = 0;
} }
}
// Allegro requires trust // Allegro requires trust
if (G.buildings.allegro > 0 && G.trust < 5) { if (G.buildings.allegro > 0 && G.trust < 5) {