mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 12:27:07 +02:00
INFIL: Add stat requirements; Add market consequences for spamming infiltration (#2210)
The primary parts are changing the way stats affect infiltration difficulty, to make rewards more intuitive and balanced, and adding a "market demand" mechanism, which kicks in when doing lots of infils quickly. With current parameters, market demand shouldn't affect manual play at all, and won't affect most auto-infil terribly (it depends how they're implemented). This was a complex change, see PR #2210 for the full context
This commit is contained in:
committed by
GitHub
parent
fdafa191ac
commit
dd128842af
@@ -30,6 +30,8 @@ import { isObject, assertObject } from "./utils/TypeAssertion";
|
||||
import { evaluateVersionCompatibility } from "./utils/SaveDataMigrationUtils";
|
||||
import { Reviver } from "./utils/GenericReviver";
|
||||
import { giveExportBonus } from "./ExportBonus";
|
||||
import { loadInfiltrations } from "./Infiltration/SaveLoadInfiltration";
|
||||
import { InfiltrationState } from "./Infiltration/formulas/game";
|
||||
|
||||
/* SaveObject.js
|
||||
* Defines the object used to save/load games
|
||||
@@ -83,6 +85,7 @@ export type BitburnerSaveObjectType = {
|
||||
LastExportBonus?: string;
|
||||
StaneksGiftSave: string;
|
||||
GoSave: unknown; // "loadGo" function can process unknown data
|
||||
InfiltrationsSave: unknown;
|
||||
};
|
||||
|
||||
type ParsedSaveData = {
|
||||
@@ -171,6 +174,7 @@ class BitburnerSaveObject implements BitburnerSaveObjectType {
|
||||
LastExportBonus = "0";
|
||||
StaneksGiftSave = "";
|
||||
GoSave = "";
|
||||
InfiltrationsSave = "";
|
||||
|
||||
async getSaveData(forceExcludeRunningScripts = false): Promise<SaveData> {
|
||||
this.PlayerSave = JSON.stringify(Player);
|
||||
@@ -191,6 +195,7 @@ class BitburnerSaveObject implements BitburnerSaveObjectType {
|
||||
this.LastExportBonus = JSON.stringify(ExportBonus.LastExportBonus);
|
||||
this.StaneksGiftSave = JSON.stringify(staneksGift);
|
||||
this.GoSave = JSON.stringify(getGoSave());
|
||||
this.InfiltrationsSave = JSON.stringify(InfiltrationState);
|
||||
|
||||
if (Player.gang) this.AllGangsSave = JSON.stringify(AllGangs);
|
||||
|
||||
@@ -429,6 +434,7 @@ async function loadGame(saveData: SaveData): Promise<boolean> {
|
||||
loadCompanies(saveObj.CompaniesSave);
|
||||
loadFactions(saveObj.FactionsSave, Player);
|
||||
loadGo(saveObj.GoSave);
|
||||
loadInfiltrations(saveObj.InfiltrationsSave);
|
||||
try {
|
||||
loadAliases(saveObj.AliasesSave);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user