mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-21 05:35:45 +01:00
Merge pull request #4215 from borisflagell/crime-sleeve
SLEEVE: Fixes 2 issues in Sleeve's implementation of crime work
This commit is contained in:
commit
c930487c21
@ -25,16 +25,16 @@ export class SleeveCrimeWork extends Work {
|
|||||||
return crime;
|
return crime;
|
||||||
}
|
}
|
||||||
|
|
||||||
getExp(): WorkStats {
|
getExp(sleeve: Sleeve): WorkStats {
|
||||||
const crime = this.getCrime();
|
const crime = this.getCrime();
|
||||||
return newWorkStats({
|
return newWorkStats({
|
||||||
money: crime.money * BitNodeMultipliers.CrimeMoney,
|
money: crime.money * BitNodeMultipliers.CrimeMoney * sleeve.mults.crime_money,
|
||||||
hackExp: crime.hacking_exp * BitNodeMultipliers.CrimeExpGain,
|
hackExp: crime.hacking_exp * BitNodeMultipliers.CrimeExpGain * sleeve.mults.hacking_exp,
|
||||||
strExp: crime.strength_exp * BitNodeMultipliers.CrimeExpGain,
|
strExp: crime.strength_exp * BitNodeMultipliers.CrimeExpGain * sleeve.mults.strength_exp,
|
||||||
defExp: crime.defense_exp * BitNodeMultipliers.CrimeExpGain,
|
defExp: crime.defense_exp * BitNodeMultipliers.CrimeExpGain * sleeve.mults.defense_exp,
|
||||||
dexExp: crime.dexterity_exp * BitNodeMultipliers.CrimeExpGain,
|
dexExp: crime.dexterity_exp * BitNodeMultipliers.CrimeExpGain * sleeve.mults.dexterity_exp,
|
||||||
agiExp: crime.agility_exp * BitNodeMultipliers.CrimeExpGain,
|
agiExp: crime.agility_exp * BitNodeMultipliers.CrimeExpGain * sleeve.mults.agility_exp,
|
||||||
chaExp: crime.charisma_exp * BitNodeMultipliers.CrimeExpGain,
|
chaExp: crime.charisma_exp * BitNodeMultipliers.CrimeExpGain * sleeve.mults.charisma_exp,
|
||||||
intExp: crime.intelligence_exp * BitNodeMultipliers.CrimeExpGain,
|
intExp: crime.intelligence_exp * BitNodeMultipliers.CrimeExpGain,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ export class SleeveCrimeWork extends Work {
|
|||||||
this.cyclesWorked += cycles;
|
this.cyclesWorked += cycles;
|
||||||
|
|
||||||
const crime = this.getCrime();
|
const crime = this.getCrime();
|
||||||
let gains = this.getExp();
|
let gains = this.getExp(sleeve);
|
||||||
if (this.cyclesWorked >= this.cyclesNeeded()) {
|
if (this.cyclesWorked >= this.cyclesNeeded()) {
|
||||||
if (Math.random() < crime.successRate(sleeve)) {
|
if (Math.random() < crime.successRate(sleeve)) {
|
||||||
Player.karma -= crime.karma * sleeve.syncBonus();
|
Player.karma -= crime.karma * sleeve.syncBonus();
|
||||||
|
@ -97,15 +97,15 @@ export function EarningsElement(props: IProps): React.ReactElement {
|
|||||||
|
|
||||||
let data: (string | JSX.Element)[][] = [];
|
let data: (string | JSX.Element)[][] = [];
|
||||||
if (isSleeveCrimeWork(props.sleeve.currentWork)) {
|
if (isSleeveCrimeWork(props.sleeve.currentWork)) {
|
||||||
const gains = props.sleeve.currentWork.getExp();
|
const gains = props.sleeve.currentWork.getExp(props.sleeve);
|
||||||
data = [
|
data = [
|
||||||
[`Money:`, <Money money={5 * gains.money} />],
|
[`Money:`, <Money money={5 * gains.money} />],
|
||||||
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * gains.hackExp * BitNodeMultipliers.CrimeExpGain)}`],
|
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * gains.hackExp)}`],
|
||||||
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * gains.strExp * BitNodeMultipliers.CrimeExpGain)}`],
|
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * gains.strExp)}`],
|
||||||
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * gains.defExp * BitNodeMultipliers.CrimeExpGain)}`],
|
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * gains.defExp)}`],
|
||||||
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * gains.dexExp * BitNodeMultipliers.CrimeExpGain)}`],
|
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * gains.dexExp)}`],
|
||||||
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * gains.agiExp * BitNodeMultipliers.CrimeExpGain)}`],
|
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * gains.agiExp)}`],
|
||||||
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * gains.chaExp * BitNodeMultipliers.CrimeExpGain)}`],
|
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * gains.chaExp)}`],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (isSleeveClassWork(props.sleeve.currentWork)) {
|
if (isSleeveClassWork(props.sleeve.currentWork)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user