From 6b9f9ef7faeda3fa45f26834be6ab403272524e2 Mon Sep 17 00:00:00 2001 From: Michael Ficocelli Date: Wed, 20 Mar 2024 17:12:35 -0400 Subject: [PATCH] IPVGO: Balance: Reduce base bonuses, increase SF 14.1 to compensate (#1176) * IPVGO: Balance: Reduce base bonuses, increase SF 14.1 to compensate * Fix ts doc format * Do not show "No AI" opponent in stat summary page --- src/BitNode/BitNode.tsx | 10 +++++----- src/Go/effects/effect.ts | 12 ++++++++---- src/Go/effects/netscriptGoImplementation.ts | 3 ++- src/Go/ui/GoStatusPage.tsx | 4 +++- src/ScriptEditor/NetscriptDefinitions.d.ts | 2 +- src/SourceFile/SourceFiles.tsx | 10 +++++----- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/BitNode/BitNode.tsx b/src/BitNode/BitNode.tsx index b809177a9..02ee94387 100644 --- a/src/BitNode/BitNode.tsx +++ b/src/BitNode/BitNode.tsx @@ -463,20 +463,20 @@ export function initBitNodes() { its level up to a maximum of 3. This Source-File grants the following benefits:

- Level 1: 25% increased stat multipliers from Node Power + Level 1: 100% increased stat multipliers from Node Power
Level 2: Permanently unlocks the go.cheat API
Level 3: 25% increased success rate for the go.cheat API

- This Source-File also increases the maximum favor you can gain for each faction from IPvGO by: + This Source-File also increases the maximum favor you can gain for each faction from IPvGO to:
- Level 1: +10 + Level 1: 80
- Level 2: +20 + Level 2: 100
- Level 3: +40 + Level 3: 120 ), ); diff --git a/src/Go/effects/effect.ts b/src/Go/effects/effect.ts index 07ff55df3..93845e8b4 100644 --- a/src/Go/effects/effect.ts +++ b/src/Go/effects/effect.ts @@ -15,17 +15,21 @@ import { getRecordEntries, getRecordValues } from "../../Types/Record"; */ export function CalculateEffect(nodes: number, faction: GoOpponent): number { const power = getEffectPowerForFaction(faction); - const sourceFileBonus = Player.sourceFileLvl(14) ? 1.25 : 1; + const sourceFileBonus = Player.sourceFileLvl(14) ? 2 : 1; return ( - 1 + Math.log(nodes + 1) * Math.pow(nodes + 1, 0.3) * 0.004 * power * currentNodeMults.GoPower * sourceFileBonus + 1 + Math.log(nodes + 1) * Math.pow(nodes + 1, 0.3) * 0.002 * power * currentNodeMults.GoPower * sourceFileBonus ); } +/** + * Get maximum favor that you can gain from IPvGO win streaks + * for factions you are a member of + */ export function getMaxFavor() { const sourceFileLevel = Player.sourceFileLvl(14); if (sourceFileLevel === 1) { - return 90; + return 80; } if (sourceFileLevel === 2) { return 100; @@ -34,7 +38,7 @@ export function getMaxFavor() { return 120; } - return 80; + return 40; } /** diff --git a/src/Go/effects/netscriptGoImplementation.ts b/src/Go/effects/netscriptGoImplementation.ts index 699bc7a83..c8dc1157c 100644 --- a/src/Go/effects/netscriptGoImplementation.ts +++ b/src/Go/effects/netscriptGoImplementation.ts @@ -412,7 +412,8 @@ export async function determineCheatSuccess( * Cheating success rate scales with player's crime success rate, and decreases with prior cheat attempts. */ export function cheatSuccessChance(cheatCount: number) { - return Math.min(0.6 * 0.65 ** cheatCount * Player.mults.crime_success, 1); + const sourceFileBonus = Player.sourceFileLvl(14) === 3 ? 1.25 : 1; + return Math.min(0.6 * 0.65 ** cheatCount * Player.mults.crime_success * sourceFileBonus, 1); } /** diff --git a/src/Go/ui/GoStatusPage.tsx b/src/Go/ui/GoStatusPage.tsx index 1d8b5f79b..2848c3f7c 100644 --- a/src/Go/ui/GoStatusPage.tsx +++ b/src/Go/ui/GoStatusPage.tsx @@ -9,12 +9,14 @@ import { useRerender } from "../../ui/React/hooks"; import { getBonusText } from "../effects/effect"; import { GoScoreSummaryTable } from "./GoScoreSummaryTable"; import { getRecordKeys } from "../../Types/Record"; +import { GoOpponent } from "@enums"; export const GoStatusPage = (): React.ReactElement => { useRerender(400); const classes = boardStyles(); const score = getScore(Go.currentGame); const opponent = Go.currentGame.ai; + const playedOpponentList = getRecordKeys(Go.stats).filter((o) => o !== GoOpponent.none); return (
@@ -49,7 +51,7 @@ export const GoStatusPage = (): React.ReactElement => { Effect: - {getRecordKeys(Go.stats).map((faction, index) => { + {playedOpponentList.map((faction, index) => { return ( diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index a554c9169..52de9b436 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -3969,7 +3969,7 @@ export interface Go { * Returns a promise that resolves with the success or failure state of your last move, and the AI's response, if applicable. * x:0 y:0 represents the bottom-left corner of the board in the UI. * - * @param logOpponentMove optional, if false prevents logging opponent move + * @param logOpponentMove - optional, if false prevents logging opponent move * * @remarks * RAM cost: 0 GB diff --git a/src/SourceFile/SourceFiles.tsx b/src/SourceFile/SourceFiles.tsx index 776ce7c9f..07a4b8418 100644 --- a/src/SourceFile/SourceFiles.tsx +++ b/src/SourceFile/SourceFiles.tsx @@ -239,20 +239,20 @@ export function initSourceFiles() { This Source-File grants the following benefits:

- Level 1: 25% increased stat multipliers from node Power + Level 1: 100% increased stat multipliers from node Power
Level 2: Permanently unlocks the go.cheat API in other BitNodes
Level 3: 25% increased success rate for the go.cheat API

- This Source-File also increases the maximum favor you can gain for each faction from IPvGO by: + This Source-File also increases the maximum favor you can gain for each faction from IPvGO to:
- Level 1: +10 + Level 1: 80
- Level 2: +20 + Level 2: 100
- Level 3: +40 + Level 3: 120 ), );