mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 13:43:49 +01:00
fix miscalc in favor
This commit is contained in:
parent
cfdf23cd11
commit
a475e6297e
2
dist/engine.bundle.js
vendored
2
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -89,10 +89,11 @@ export class Faction {
|
||||
if (this.rolloverRep == null) {
|
||||
this.rolloverRep = 0;
|
||||
}
|
||||
const storedRep = favorToRep(this.favor - 1);
|
||||
const storedRep = Math.max(0, favorToRep(this.favor - 1));
|
||||
const totalRep = storedRep + this.rolloverRep + this.playerReputation;
|
||||
const newFavor = Math.floor(repToFavor(totalRep));
|
||||
const newRep = favorToRep(newFavor);
|
||||
console.log(`${storedRep} ${this.rolloverRep} ${this.playerReputation}`);
|
||||
return [newFavor - this.favor + 1, totalRep - newRep];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user