SLEEVE: Fixed inconsistencies in how sleeve work rewards are handled. (#211)

This commit is contained in:
Snarling
2022-11-10 21:56:46 -05:00
committed by GitHub
parent 426ad5f296
commit c669e473d1
14 changed files with 58 additions and 73 deletions
+4 -12
View File
@@ -77,18 +77,10 @@ export const applyWorkStats = (target: Person, workStats: WorkStats, cycles: num
return gains;
};
export const applyWorkStatsExp = (target: Person, workStats: WorkStats, cycles: number): WorkStats => {
const gains = {
money: 0,
reputation: 0,
hackExp: workStats.hackExp * cycles,
strExp: workStats.strExp * cycles,
defExp: workStats.defExp * cycles,
dexExp: workStats.dexExp * cycles,
agiExp: workStats.agiExp * cycles,
chaExp: workStats.chaExp * cycles,
intExp: workStats.intExp * cycles,
};
export const applyWorkStatsExp = (target: Person, workStats: WorkStats, mult = 1): WorkStats => {
const gains = scaleWorkStats(workStats, mult, false);
gains.money = 0;
gains.reputation = 0;
target.gainHackingExp(gains.hackExp);
target.gainStrengthExp(gains.strExp);
target.gainDefenseExp(gains.defExp);