mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +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;
|
wantedLevelGains += wantedLevelGain;
|
||||||
if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted.
|
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 = respectGains;
|
||||||
this.respectGainRate = Math.pow(respectGains, territoryPenalty);
|
this.wantedGainRate = wantedLevelGains;
|
||||||
this.wantedGainRate = Math.pow(wantedLevelGains, territoryPenalty);
|
this.moneyGainRate = moneyGains;
|
||||||
this.moneyGainRate = Math.pow(moneyGains, territoryPenalty);
|
|
||||||
const gain = respectGains * numCycles;
|
const gain = respectGains * numCycles;
|
||||||
this.respect += gain;
|
this.respect += gain;
|
||||||
// Faction reputation gains is respect gain divided by some constant
|
// Faction reputation gains is respect gain divided by some constant
|
||||||
|
@ -7,6 +7,7 @@ import { IPlayer } from "../PersonObjects/IPlayer";
|
|||||||
import { AllGangs } from "./AllGangs";
|
import { AllGangs } from "./AllGangs";
|
||||||
import { IGang } from "./IGang";
|
import { IGang } from "./IGang";
|
||||||
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
|
||||||
|
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||||
|
|
||||||
interface IMults {
|
interface IMults {
|
||||||
hack: number;
|
hack: number;
|
||||||
@ -121,9 +122,10 @@ export class GangMember {
|
|||||||
0.005,
|
0.005,
|
||||||
Math.pow(AllGangs[gang.facName].territory * 100, task.territory.respect) / 100,
|
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;
|
if (isNaN(territoryMult) || territoryMult <= 0) return 0;
|
||||||
const respectMult = gang.getWantedPenalty();
|
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 {
|
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);
|
const territoryMult = Math.max(0.005, Math.pow(AllGangs[gang.facName].territory * 100, task.territory.money) / 100);
|
||||||
if (isNaN(territoryMult) || territoryMult <= 0) return 0;
|
if (isNaN(territoryMult) || territoryMult <= 0) return 0;
|
||||||
const respectMult = gang.getWantedPenalty();
|
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 {
|
expMult(): IMults {
|
||||||
|
Loading…
Reference in New Issue
Block a user