You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code at-or-around https://github.com/screeps/backend-local/blob/master/lib/cronjobs.js#L433 is responsible for spawning invaders when a certain quantity is harvested from a room. I happened to find something that looks like a bug in that line that leads the goal to become 0 as Math.floor turns the chance of halving into a straight 0 and the code resets it to the value of the INVADERS_ENERGY_GOAL constant.
invaderGoal=Math.floor(invaderGoal*mult);
should fix the range back into 35,000 - 260,000 instead of a slanted 70,000 - 260,000.
The code at-or-around https://github.com/screeps/backend-local/blob/master/lib/cronjobs.js#L433 is responsible for spawning invaders when a certain quantity is harvested from a room. I happened to find something that looks like a bug in that line that leads the goal to become 0 as
Math.floor
turns the chance of halving into a straight 0 and the code resets it to the value of theINVADERS_ENERGY_GOAL
constant.should fix the range back into 35,000 - 260,000 instead of a slanted 70,000 - 260,000.
TS Playground
The text was updated successfully, but these errors were encountered: