Fix rep transfer on new job

This commit is contained in:
Olivier Gagnon 2021-10-26 22:03:34 -04:00
parent 504ee46950
commit 7733ee0375
6 changed files with 51 additions and 49 deletions

24
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -567,7 +567,7 @@ export function initBitNodeMultipliers(p: IPlayer): void {
BitNodeMultipliers.FactionWorkRepGain = 0.5; BitNodeMultipliers.FactionWorkRepGain = 0.5;
BitNodeMultipliers.FactionPassiveRepGain = 0; BitNodeMultipliers.FactionPassiveRepGain = 0;
BitNodeMultipliers.GangKarmaRequirement = 0; BitNodeMultipliers.GangKarmaRequirement = 0;
BitNodeMultipliers.PurchasedServerSoftcap = 1.4; BitNodeMultipliers.PurchasedServerSoftcap = 1.3;
break; break;
case 3: // Corporatocracy case 3: // Corporatocracy
BitNodeMultipliers.HackingLevelMultiplier = 0.8; BitNodeMultipliers.HackingLevelMultiplier = 0.8;
@ -584,7 +584,7 @@ export function initBitNodeMultipliers(p: IPlayer): void {
BitNodeMultipliers.HomeComputerRamCost = 1.5; BitNodeMultipliers.HomeComputerRamCost = 1.5;
BitNodeMultipliers.PurchasedServerCost = 2; BitNodeMultipliers.PurchasedServerCost = 2;
BitNodeMultipliers.GangKarmaRequirement = 3; BitNodeMultipliers.GangKarmaRequirement = 3;
BitNodeMultipliers.PurchasedServerSoftcap = 1.4; BitNodeMultipliers.PurchasedServerSoftcap = 1.3;
break; break;
case 4: // The Singularity case 4: // The Singularity
BitNodeMultipliers.ServerMaxMoney = 0.15; BitNodeMultipliers.ServerMaxMoney = 0.15;
@ -599,7 +599,7 @@ export function initBitNodeMultipliers(p: IPlayer): void {
BitNodeMultipliers.HackExpGain = 0.4; BitNodeMultipliers.HackExpGain = 0.4;
BitNodeMultipliers.CrimeExpGain = 0.5; BitNodeMultipliers.CrimeExpGain = 0.5;
BitNodeMultipliers.FactionWorkRepGain = 0.75; BitNodeMultipliers.FactionWorkRepGain = 0.75;
BitNodeMultipliers.PurchasedServerSoftcap = 1.3; BitNodeMultipliers.PurchasedServerSoftcap = 1.2;
break; break;
case 5: // Artificial intelligence case 5: // Artificial intelligence
BitNodeMultipliers.ServerMaxMoney = 2; BitNodeMultipliers.ServerMaxMoney = 2;
@ -613,7 +613,7 @@ export function initBitNodeMultipliers(p: IPlayer): void {
BitNodeMultipliers.AugmentationMoneyCost = 2; BitNodeMultipliers.AugmentationMoneyCost = 2;
BitNodeMultipliers.HackExpGain = 0.5; BitNodeMultipliers.HackExpGain = 0.5;
BitNodeMultipliers.CorporationValuation = 0.5; BitNodeMultipliers.CorporationValuation = 0.5;
BitNodeMultipliers.PurchasedServerSoftcap = 1.3; BitNodeMultipliers.PurchasedServerSoftcap = 1.2;
break; break;
case 6: // Bladeburner case 6: // Bladeburner
BitNodeMultipliers.HackingLevelMultiplier = 0.35; BitNodeMultipliers.HackingLevelMultiplier = 0.35;
@ -666,7 +666,7 @@ export function initBitNodeMultipliers(p: IPlayer): void {
BitNodeMultipliers.CorporationValuation = 0; BitNodeMultipliers.CorporationValuation = 0;
BitNodeMultipliers.CodingContractMoney = 0; BitNodeMultipliers.CodingContractMoney = 0;
BitNodeMultipliers.GangKarmaRequirement = 10; BitNodeMultipliers.GangKarmaRequirement = 10;
BitNodeMultipliers.PurchasedServerSoftcap = 5; BitNodeMultipliers.PurchasedServerSoftcap = 4;
break; break;
case 9: // Hacktocracy case 9: // Hacktocracy
BitNodeMultipliers.HackingLevelMultiplier = 0.4; BitNodeMultipliers.HackingLevelMultiplier = 0.4;
@ -713,7 +713,7 @@ export function initBitNodeMultipliers(p: IPlayer): void {
BitNodeMultipliers.PurchasedServerMaxRam = 0.5; BitNodeMultipliers.PurchasedServerMaxRam = 0.5;
BitNodeMultipliers.BladeburnerRank = 0.8; BitNodeMultipliers.BladeburnerRank = 0.8;
BitNodeMultipliers.GangKarmaRequirement = 3; BitNodeMultipliers.GangKarmaRequirement = 3;
BitNodeMultipliers.PurchasedServerSoftcap = 1.2; BitNodeMultipliers.PurchasedServerSoftcap = 1.1;
break; break;
case 11: //The Big Crash case 11: //The Big Crash
BitNodeMultipliers.HackingLevelMultiplier = 0.5; BitNodeMultipliers.HackingLevelMultiplier = 0.5;
@ -732,7 +732,7 @@ export function initBitNodeMultipliers(p: IPlayer): void {
BitNodeMultipliers.CodingContractMoney = 0.25; BitNodeMultipliers.CodingContractMoney = 0.25;
BitNodeMultipliers.FourSigmaMarketDataCost = 4; BitNodeMultipliers.FourSigmaMarketDataCost = 4;
BitNodeMultipliers.FourSigmaMarketDataApiCost = 4; BitNodeMultipliers.FourSigmaMarketDataApiCost = 4;
BitNodeMultipliers.PurchasedServerSoftcap = 2.2; BitNodeMultipliers.PurchasedServerSoftcap = 2;
break; break;
case 12: { case 12: {
//The Recursion //The Recursion

@ -630,6 +630,7 @@ export function work(this: IPlayer, numCycles: number): boolean {
this.timeWorked += CONSTANTS._idleSpeed * numCycles; this.timeWorked += CONSTANTS._idleSpeed * numCycles;
this.workRepGainRate = this.getWorkRepGain(); this.workRepGainRate = this.getWorkRepGain();
this.workMoneyGainRate = this.getWorkMoneyGain();
this.processWorkEarnings(numCycles); this.processWorkEarnings(numCycles);
const comp = Companies[this.companyName]; const comp = Companies[this.companyName];
@ -1531,20 +1532,20 @@ export function finishCrime(this: IPlayer, cancelled: boolean): string {
if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) { if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {
ws.scriptRef.log( ws.scriptRef.log(
"Crime successful! Gained " + "Crime successful! Gained " +
numeralWrapper.formatMoney(this.workMoneyGained) + numeralWrapper.formatMoney(this.workMoneyGained) +
", " + ", " +
numeralWrapper.formatExp(this.workHackExpGained) + numeralWrapper.formatExp(this.workHackExpGained) +
" hack exp, " + " hack exp, " +
numeralWrapper.formatExp(this.workStrExpGained) + numeralWrapper.formatExp(this.workStrExpGained) +
" str exp, " + " str exp, " +
numeralWrapper.formatExp(this.workDefExpGained) + numeralWrapper.formatExp(this.workDefExpGained) +
" def exp, " + " def exp, " +
numeralWrapper.formatExp(this.workDexExpGained) + numeralWrapper.formatExp(this.workDexExpGained) +
" dex exp, " + " dex exp, " +
numeralWrapper.formatExp(this.workAgiExpGained) + numeralWrapper.formatExp(this.workAgiExpGained) +
" agi exp, " + " agi exp, " +
numeralWrapper.formatExp(this.workChaExpGained) + numeralWrapper.formatExp(this.workChaExpGained) +
" cha exp.", " cha exp.",
); );
} }
} else { } else {
@ -1583,18 +1584,18 @@ export function finishCrime(this: IPlayer, cancelled: boolean): string {
if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) { if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {
ws.scriptRef.log( ws.scriptRef.log(
"Crime failed! Gained " + "Crime failed! Gained " +
numeralWrapper.formatExp(this.workHackExpGained) + numeralWrapper.formatExp(this.workHackExpGained) +
" hack exp, " + " hack exp, " +
numeralWrapper.formatExp(this.workStrExpGained) + numeralWrapper.formatExp(this.workStrExpGained) +
" str exp, " + " str exp, " +
numeralWrapper.formatExp(this.workDefExpGained) + numeralWrapper.formatExp(this.workDefExpGained) +
" def exp, " + " def exp, " +
numeralWrapper.formatExp(this.workDexExpGained) + numeralWrapper.formatExp(this.workDexExpGained) +
" dex exp, " + " dex exp, " +
numeralWrapper.formatExp(this.workAgiExpGained) + numeralWrapper.formatExp(this.workAgiExpGained) +
" agi exp, " + " agi exp, " +
numeralWrapper.formatExp(this.workChaExpGained) + numeralWrapper.formatExp(this.workChaExpGained) +
" cha exp.", " cha exp.",
); );
} }
} else { } else {
@ -1780,6 +1781,7 @@ export function applyForJob(this: IPlayer, entryPosType: CompanyPosition, sing =
} }
this.jobs[company.name] = pos.name; this.jobs[company.name] = pos.name;
if (!this.focus && this.isWorking && this.companyName !== this.location) this.resetWorkStatus();
this.companyName = this.location; this.companyName = this.location;
if (!sing) { if (!sing) {

@ -28,7 +28,7 @@ export function getPurchaseServerCost(ram: number): number {
return Infinity; return Infinity;
} }
const upg = Math.max(0, Math.log(sanitizedRam) / Math.log(2) - 9); const upg = Math.max(0, Math.log(sanitizedRam) / Math.log(2) - 6);
return ( return (
sanitizedRam * sanitizedRam *