mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 12:45:45 +01:00
fix NaN in Bladeburner success Chance (#761)
This commit is contained in:
parent
1ea555f572
commit
8c86e1e07a
@ -223,7 +223,8 @@ export class Action {
|
||||
let low = real - diff;
|
||||
let high = real + diff;
|
||||
const city = inst.getCurrentCity();
|
||||
const r = city.pop / city.popEst;
|
||||
let r = city.pop / city.popEst;
|
||||
if (Number.isNaN(r)) r = 0;
|
||||
if (r < 1) low *= r;
|
||||
else high *= r;
|
||||
return [clamp(low), clamp(high)];
|
||||
|
Loading…
Reference in New Issue
Block a user