From 391515efede1de756e2fbd40ef55a6f38b88a89a Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Fri, 20 Sep 2024 15:38:46 +1000 Subject: [PATCH 1/4] Make money scaling linear --- src/battle-scene.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 753efdaf62c..3696f3e28bc 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2418,7 +2418,7 @@ export default class BattleScene extends SceneBase { getWaveMoneyAmount(moneyMultiplier: number): integer { const waveIndex = this.currentBattle.waveIndex; const waveSetIndex = Math.ceil(waveIndex / 10) - 1; - const moneyValue = Math.pow((waveSetIndex + 1 + (0.75 + (((waveIndex - 1) % 10) + 1) / 10)) * 100, 1 + 0.005 * waveSetIndex) * moneyMultiplier; + const moneyValue = (waveSetIndex + 1 + (0.75 + (((waveIndex - 1) % 10) + 1) / 10)) * 170 * moneyMultiplier; return Math.floor(moneyValue / 10) * 10; } From 6263e27f1cd4f32270270194cbacb633203662ec Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Fri, 21 Feb 2025 18:31:13 +1100 Subject: [PATCH 2/4] Simplify formula Exactly the same for all integer values --- src/battle-scene.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index c5d93c68b3f..ac80d2cd4a7 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2576,9 +2576,7 @@ export default class BattleScene extends SceneBase { } getWaveMoneyAmount(moneyMultiplier: number): number { - const waveIndex = this.currentBattle.waveIndex; - const waveSetIndex = Math.ceil(waveIndex / 10) - 1; - const moneyValue = (waveSetIndex + 1 + (0.75 + (((waveIndex - 1) % 10) + 1) / 10)) * 170 * moneyMultiplier; + const moneyValue = (this.currentBattle.waveIndex / 10 + 1.75) * 170 * moneyMultiplier; return Math.floor(moneyValue / 10) * 10; } From 071ca60f1e1b7a526858f7570e45a7843ac2609b Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Fri, 21 Feb 2025 18:35:21 +1100 Subject: [PATCH 3/4] Simplify even more. Formula unchanged, just rearranged to be clearer. --- src/battle-scene.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index ac80d2cd4a7..6c8ea21c936 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2576,7 +2576,7 @@ export default class BattleScene extends SceneBase { } getWaveMoneyAmount(moneyMultiplier: number): number { - const moneyValue = (this.currentBattle.waveIndex / 10 + 1.75) * 170 * moneyMultiplier; + const moneyValue = (this.currentBattle.waveIndex + 17.5) * 17 * moneyMultiplier; return Math.floor(moneyValue / 10) * 10; } From ce51718ffe6a585ffdf5b65dc16696a1328bc9b4 Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Fri, 21 Feb 2025 18:54:13 +1100 Subject: [PATCH 4/4] Make shop costs round to the nearest multiple of 10 --- src/modifier/modifier-type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 112a3c9aa35..4578d568955 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -2536,7 +2536,7 @@ export class ModifierTypeOption { constructor(type: ModifierType, upgradeCount: number, cost: number = 0) { this.type = type; this.upgradeCount = upgradeCount; - this.cost = Math.min(Math.round(cost), Number.MAX_SAFE_INTEGER); + this.cost = Math.min(Math.round(cost / 10) * 10, Number.MAX_SAFE_INTEGER); } }