-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLADEBURNER: fix NaN in success Chance #761
Conversation
fix 0/0 NaN in Bladeburner success Chance calculation
Do you have a way to test? And do you think real population === 0 is the cause of this problem? I'm trying to get population to 0 , if you have a way to do that with dev tools, LMK. I'm concerned maybe it's not the right fix. city.pop and city.popEst should always be numbers (they have errors for NaN), so I also assume And lastly, most BB tasks still can succeed with 0 population, right? Only Raid says "there must be an existing Synthoid community in your current city in order for this Operation to be successful." That case is handled differently in the same file : |
I did a quick test with the savegame Bob provided in Bug-Reports and the UI was fixed through this population is the cause but thats a player made mistake this is also all just a player facing/visual/ui NaN it doesnt affect the real success chance
wich returns Math.pow(0/1e9,0.7) = 0 so for the let/const it works like this but if Snarling doesnt like the style, there are other ways iam happy to change it to how ever he wants to handle/check those edit.: |
fix 0/0 NaN in Bladeburner success chance calculation
let me know if you want to check/handle those differently :3