mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
fix gang earnings
This commit is contained in:
parent
e49dda0b35
commit
150b8600e4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -116,10 +116,9 @@ export class Gang {
|
||||
wantedLevelGains += wantedLevelGain;
|
||||
if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted.
|
||||
}
|
||||
const territoryPenalty = (0.2 * this.getTerritory() + 0.8) * BitNodeMultipliers.GangSoftcap;
|
||||
this.respectGainRate = Math.pow(respectGains, territoryPenalty);
|
||||
this.wantedGainRate = Math.pow(wantedLevelGains, territoryPenalty);
|
||||
this.moneyGainRate = Math.pow(moneyGains, territoryPenalty);
|
||||
this.respectGainRate = respectGains;
|
||||
this.wantedGainRate = wantedLevelGains;
|
||||
this.moneyGainRate = moneyGains;
|
||||
const gain = respectGains * numCycles;
|
||||
this.respect += gain;
|
||||
// Faction reputation gains is respect gain divided by some constant
|
||||
|
@ -7,6 +7,7 @@ import { IPlayer } from "../PersonObjects/IPlayer";
|
||||
import { AllGangs } from "./AllGangs";
|
||||
import { IGang } from "./IGang";
|
||||
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
|
||||
interface IMults {
|
||||
hack: number;
|
||||
@ -121,9 +122,10 @@ export class GangMember {
|
||||
0.005,
|
||||
Math.pow(AllGangs[gang.facName].territory * 100, task.territory.respect) / 100,
|
||||
);
|
||||
const territoryPenalty = (0.2 * gang.getTerritory() + 0.8) * BitNodeMultipliers.GangSoftcap;
|
||||
if (isNaN(territoryMult) || territoryMult <= 0) return 0;
|
||||
const respectMult = gang.getWantedPenalty();
|
||||
return 11 * task.baseRespect * statWeight * territoryMult * respectMult;
|
||||
return Math.pow(11 * task.baseRespect * statWeight * territoryMult * respectMult, territoryPenalty);
|
||||
}
|
||||
|
||||
calculateWantedLevelGain(gang: IGang): number {
|
||||
@ -169,7 +171,8 @@ export class GangMember {
|
||||
const territoryMult = Math.max(0.005, Math.pow(AllGangs[gang.facName].territory * 100, task.territory.money) / 100);
|
||||
if (isNaN(territoryMult) || territoryMult <= 0) return 0;
|
||||
const respectMult = gang.getWantedPenalty();
|
||||
return 5 * task.baseMoney * statWeight * territoryMult * respectMult;
|
||||
const territoryPenalty = (0.2 * gang.getTerritory() + 0.8) * BitNodeMultipliers.GangSoftcap;
|
||||
return Math.pow(5 * task.baseMoney * statWeight * territoryMult * respectMult, territoryPenalty);
|
||||
}
|
||||
|
||||
expMult(): IMults {
|
||||
|
Loading…
Reference in New Issue
Block a user