From 738152d614a923e7a66a108b4c5d7c148d904851 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Tue, 26 Oct 2021 23:02:46 -0400 Subject: [PATCH] New sf -1 and changes to gang to rely more on territory --- src/Augmentation/ui/SourceFileMinus1.tsx | 2 +- src/BitNode/BitNode.tsx | 14 +++++----- src/BitNode/BitNodeMultipliers.ts | 7 +++-- src/Exploits/Exploit.ts | 2 ++ src/Faction/ui/AugmentationsPage.tsx | 1 + src/Gang/Gang.ts | 8 ++++-- src/Gang/GangMember.ts | 2 +- src/Gang/data/Constants.ts | 2 +- src/Gang/data/tasks.ts | 28 +++++++++---------- src/NetscriptFunctions/Extra.ts | 9 ++++++ .../Player/PlayerObjectGangMethods.ts | 3 +- 11 files changed, 46 insertions(+), 32 deletions(-) diff --git a/src/Augmentation/ui/SourceFileMinus1.tsx b/src/Augmentation/ui/SourceFileMinus1.tsx index 897ab4421..b10a03050 100644 --- a/src/Augmentation/ui/SourceFileMinus1.tsx +++ b/src/Augmentation/ui/SourceFileMinus1.tsx @@ -32,7 +32,7 @@ export function SourceFileMinus1(): React.ReactElement { Source-File -1: Exploits in the BitNodes
- Level {exploits.length} / ? + Level {exploits.length} / {Object.keys(Exploit).length}
} /> diff --git a/src/BitNode/BitNode.tsx b/src/BitNode/BitNode.tsx index 70e6e7a56..d36bbc871 100644 --- a/src/BitNode/BitNode.tsx +++ b/src/BitNode/BitNode.tsx @@ -566,7 +566,6 @@ export function initBitNodeMultipliers(p: IPlayer): void { BitNodeMultipliers.InfiltrationMoney = 3; BitNodeMultipliers.FactionWorkRepGain = 0.5; BitNodeMultipliers.FactionPassiveRepGain = 0; - BitNodeMultipliers.GangKarmaRequirement = 0; BitNodeMultipliers.PurchasedServerSoftcap = 1.3; break; case 3: // Corporatocracy @@ -583,8 +582,8 @@ export function initBitNodeMultipliers(p: IPlayer): void { BitNodeMultipliers.HacknetNodeMoney = 0.25; BitNodeMultipliers.HomeComputerRamCost = 1.5; BitNodeMultipliers.PurchasedServerCost = 2; - BitNodeMultipliers.GangKarmaRequirement = 3; BitNodeMultipliers.PurchasedServerSoftcap = 1.3; + BitNodeMultipliers.GangSoftcap = 0.9; break; case 4: // The Singularity BitNodeMultipliers.ServerMaxMoney = 0.15; @@ -629,8 +628,8 @@ export function initBitNodeMultipliers(p: IPlayer): void { BitNodeMultipliers.FactionPassiveRepGain = 0; BitNodeMultipliers.HackExpGain = 0.25; BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed - BitNodeMultipliers.GangKarmaRequirement = 5; BitNodeMultipliers.PurchasedServerSoftcap = 2; + BitNodeMultipliers.GangSoftcap = 0.7; break; case 7: // Bladeburner 2079 BitNodeMultipliers.BladeburnerRank = 0.6; @@ -651,8 +650,8 @@ export function initBitNodeMultipliers(p: IPlayer): void { BitNodeMultipliers.FourSigmaMarketDataCost = 2; BitNodeMultipliers.FourSigmaMarketDataApiCost = 2; BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed - BitNodeMultipliers.GangKarmaRequirement = 5; BitNodeMultipliers.PurchasedServerSoftcap = 2; + BitNodeMultipliers.GangSoftcap = 0.7; break; case 8: // Ghost of Wall Street BitNodeMultipliers.ScriptHackMoney = 0.3; @@ -665,8 +664,8 @@ export function initBitNodeMultipliers(p: IPlayer): void { BitNodeMultipliers.RepToDonateToFaction = 0; BitNodeMultipliers.CorporationValuation = 0; BitNodeMultipliers.CodingContractMoney = 0; - BitNodeMultipliers.GangKarmaRequirement = 10; BitNodeMultipliers.PurchasedServerSoftcap = 4; + BitNodeMultipliers.GangSoftcap = 0; break; case 9: // Hacktocracy BitNodeMultipliers.HackingLevelMultiplier = 0.4; @@ -688,7 +687,7 @@ export function initBitNodeMultipliers(p: IPlayer): void { BitNodeMultipliers.FourSigmaMarketDataApiCost = 4; BitNodeMultipliers.BladeburnerRank = 0.9; BitNodeMultipliers.BladeburnerSkillCost = 1.2; - BitNodeMultipliers.GangKarmaRequirement = 3; + BitNodeMultipliers.GangSoftcap = 0.8; break; case 10: // Digital Carbon BitNodeMultipliers.HackingLevelMultiplier = 0.2; @@ -712,8 +711,8 @@ export function initBitNodeMultipliers(p: IPlayer): void { BitNodeMultipliers.PurchasedServerLimit = 0.6; BitNodeMultipliers.PurchasedServerMaxRam = 0.5; BitNodeMultipliers.BladeburnerRank = 0.8; - BitNodeMultipliers.GangKarmaRequirement = 3; BitNodeMultipliers.PurchasedServerSoftcap = 1.1; + BitNodeMultipliers.GangSoftcap = 0.9; break; case 11: //The Big Crash BitNodeMultipliers.HackingLevelMultiplier = 0.5; @@ -801,6 +800,7 @@ export function initBitNodeMultipliers(p: IPlayer): void { BitNodeMultipliers.BladeburnerRank = dec; BitNodeMultipliers.BladeburnerSkillCost = inc; + BitNodeMultipliers.GangSoftcap = dec; break; } default: diff --git a/src/BitNode/BitNodeMultipliers.ts b/src/BitNode/BitNodeMultipliers.ts index 262dade36..4ac74095b 100644 --- a/src/BitNode/BitNodeMultipliers.ts +++ b/src/BitNode/BitNodeMultipliers.ts @@ -110,9 +110,9 @@ interface IBitNodeMultipliers { FourSigmaMarketDataCost: number; /** - * Influences how much negative karma is required to create a gang in this bitnode. + * Reduces gangs earning. */ - GangKarmaRequirement: number; + GangSoftcap: number; /** * Influences the experienced gained when hacking a server. @@ -278,6 +278,7 @@ export const BitNodeMultipliers: IBitNodeMultipliers = { BladeburnerRank: 1, BladeburnerSkillCost: 1, + GangSoftcap: 1, + DaedalusAugsRequirement: 1, - GangKarmaRequirement: 1, }; diff --git a/src/Exploits/Exploit.ts b/src/Exploits/Exploit.ts index fba43c101..35ec7737a 100644 --- a/src/Exploits/Exploit.ts +++ b/src/Exploits/Exploit.ts @@ -16,6 +16,7 @@ export enum Exploit { Unclickable = "Unclickable", UndocumentedFunctionCall = "UndocumentedFunctionCall", TimeCompression = "TimeCompression", + RealityAlteration = "RealityAlteration", // To the players reading this. Yes you're supposed to add EditSaveFile by // editing your save file, yes you could add them all, no we don't care // that's not the point. @@ -31,6 +32,7 @@ const names: { TimeCompression: "by compressing time", Unclickable: "by clicking the unclickable.", UndocumentedFunctionCall: "by looking beyond the documentation.", + RealityAlteration: "by altering reality to suit your whims.", }; export function ExploitName(exploit: string): string { diff --git a/src/Faction/ui/AugmentationsPage.tsx b/src/Faction/ui/AugmentationsPage.tsx index 250543160..bdf63f6fa 100644 --- a/src/Faction/ui/AugmentationsPage.tsx +++ b/src/Faction/ui/AugmentationsPage.tsx @@ -42,6 +42,7 @@ export function AugmentationsPage(props: IProps): React.ReactElement { const augs: string[] = []; for (const augName in Augmentations) { if (augName === AugmentationNames.NeuroFluxGovernor) continue; + if (augName === AugmentationNames.TheRedPill && player.bitNodeN !== 2) continue; const aug = Augmentations[augName]; if (!aug.isSpecial) { augs.push(augName); diff --git a/src/Gang/Gang.ts b/src/Gang/Gang.ts index 0d06a68bb..939bc8d41 100644 --- a/src/Gang/Gang.ts +++ b/src/Gang/Gang.ts @@ -24,6 +24,7 @@ import { GangMember } from "./GangMember"; import { WorkerScript } from "../Netscript/WorkerScript"; import { IPlayer } from "../PersonObjects/IPlayer"; +import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; export class Gang { facName: string; @@ -115,9 +116,10 @@ export class Gang { wantedLevelGains += wantedLevelGain; if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted. } - this.respectGainRate = respectGains; - this.wantedGainRate = wantedLevelGains; - this.moneyGainRate = moneyGains; + const territoryPenalty = (0.2 * this.getTerritory() + 0.8) * BitNodeMultipliers.GangSoftcap; + this.respectGainRate = Math.pow(respectGains, territoryPenalty); + this.wantedGainRate = Math.pow(wantedLevelGains, territoryPenalty); + this.moneyGainRate = Math.pow(moneyGains, territoryPenalty); const gain = respectGains * numCycles; this.respect += gain; // Faction reputation gains is respect gain divided by some constant diff --git a/src/Gang/GangMember.ts b/src/Gang/GangMember.ts index 6449e440e..e0543af7d 100644 --- a/src/Gang/GangMember.ts +++ b/src/Gang/GangMember.ts @@ -63,7 +63,7 @@ export class GangMember { } calculateAscensionMult(points: number): number { - return Math.max(Math.pow(points / 4000, 0.7), 1); + return Math.max(Math.pow(points / 2000, 0.7), 1); } updateSkillLevels(): void { diff --git a/src/Gang/data/Constants.ts b/src/Gang/data/Constants.ts index 8572785aa..0675a43cf 100644 --- a/src/Gang/data/Constants.ts +++ b/src/Gang/data/Constants.ts @@ -6,7 +6,7 @@ export const GangConstants: { Names: string[]; } = { // Respect is divided by this to get rep gain - GangRespectToReputationRatio: 25, + GangRespectToReputationRatio: 75, MaximumGangMembers: 12, CyclesPerTerritoryAndPowerUpdate: 100, // Portion of upgrade multiplier that is kept after ascending diff --git a/src/Gang/data/tasks.ts b/src/Gang/data/tasks.ts index 84a56c886..58322e913 100644 --- a/src/Gang/data/tasks.ts +++ b/src/Gang/data/tasks.ts @@ -53,7 +53,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.00005, baseWanted: 0.0001, - baseMoney: 1, + baseMoney: 3, hackWeight: 100, difficulty: 1, }, @@ -66,7 +66,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.00008, baseWanted: 0.003, - baseMoney: 2.5, + baseMoney: 7.5, hackWeight: 85, chaWeight: 15, difficulty: 3.5, @@ -80,7 +80,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.0001, baseWanted: 0.075, - baseMoney: 6, + baseMoney: 18, hackWeight: 80, chaWeight: 20, difficulty: 5, @@ -118,7 +118,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.0004, baseWanted: 0.3, - baseMoney: 15, + baseMoney: 45, hackWeight: 80, chaWeight: 20, difficulty: 20, @@ -132,7 +132,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.001, baseWanted: 1.25, - baseMoney: 120, + baseMoney: 360, hackWeight: 75, chaWeight: 25, difficulty: 25, @@ -158,7 +158,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ name: "Ethical Hacking", params: { baseWanted: -0.001, - baseMoney: 1, + baseMoney: 3, hackWeight: 90, chaWeight: 10, difficulty: 1, @@ -172,7 +172,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.00005, baseWanted: 0.00005, - baseMoney: 1.2, + baseMoney: 3.6, strWeight: 25, defWeight: 25, dexWeight: 25, @@ -189,7 +189,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.00006, baseWanted: 0.002, - baseMoney: 5, + baseMoney: 15, agiWeight: 20, dexWeight: 20, chaWeight: 60, @@ -209,7 +209,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.00004, baseWanted: 0.02, - baseMoney: 2.5, + baseMoney: 7.5, hackWeight: 10, strWeight: 25, defWeight: 25, @@ -232,7 +232,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.00012, baseWanted: 0.05, - baseMoney: 15, + baseMoney: 45, strWeight: 5, defWeight: 5, agiWeight: 25, @@ -249,7 +249,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.00014, baseWanted: 0.1, - baseMoney: 38, + baseMoney: 114, hackWeight: 20, strWeight: 15, defWeight: 15, @@ -267,7 +267,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.0002, baseWanted: 0.24, - baseMoney: 58, + baseMoney: 174, hackWeight: 15, strWeight: 20, defWeight: 20, @@ -289,7 +289,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.0002, baseWanted: 0.125, - baseMoney: 24, + baseMoney: 72, hackWeight: 25, strWeight: 25, dexWeight: 25, @@ -305,7 +305,7 @@ export const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [ params: { baseRespect: 0.004, baseWanted: 1.25, - baseMoney: 120, + baseMoney: 360, hackWeight: 30, strWeight: 5, defWeight: 5, diff --git a/src/NetscriptFunctions/Extra.ts b/src/NetscriptFunctions/Extra.ts index 42118f007..92eb9a1ac 100644 --- a/src/NetscriptFunctions/Extra.ts +++ b/src/NetscriptFunctions/Extra.ts @@ -8,6 +8,7 @@ export interface INetscriptExtra { }; exploit(): void; bypass(doc: Document): void; + alterReality(): void; } export function NetscriptExtra(player: IPlayer, workerScript: WorkerScript): INetscriptExtra { @@ -34,5 +35,13 @@ export function NetscriptExtra(player: IPlayer, workerScript: WorkerScript): INe doc.completely_unused_field = undefined; real_document.completely_unused_field = undefined; }, + alterReality: function (): void { + const x = false; + console.warn("I am sure that this variable is false"); + if (x !== false) { + console.warn("Reality has been altered!"); + player.giveExploit(Exploit.RealityAlteration); + } + }, }; } diff --git a/src/PersonObjects/Player/PlayerObjectGangMethods.ts b/src/PersonObjects/Player/PlayerObjectGangMethods.ts index c24783512..6d64ed105 100644 --- a/src/PersonObjects/Player/PlayerObjectGangMethods.ts +++ b/src/PersonObjects/Player/PlayerObjectGangMethods.ts @@ -2,7 +2,6 @@ import { Factions } from "../../Faction/Factions"; import { Faction } from "../../Faction/Faction"; import { Gang } from "../../Gang/Gang"; import { SourceFileFlags } from "../../SourceFile/SourceFileFlags"; -import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers"; import { IPlayer } from "../IPlayer"; // Amount of negative karma needed to manage a gang in BitNodes other than 2 @@ -16,7 +15,7 @@ export function canAccessGang(this: IPlayer): boolean { return false; } - return this.karma <= BitNodeMultipliers.GangKarmaRequirement * GangKarmaRequirement; + return this.karma <= GangKarmaRequirement; } export function getGangFaction(this: IPlayer): Faction {