From 6e7762b45d20c796e469fb908bfcb92bdbf6bc64 Mon Sep 17 00:00:00 2001 From: Alvin Zou Date: Mon, 6 May 2024 16:25:51 -0700 Subject: [PATCH] Show number of Pokeballs in inventory when selecting a pokeball in the reward phase --- src/modifier/modifier-type.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 2e18cd91759..85b9c916cdb 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -145,8 +145,14 @@ class AddPokeballModifierType extends ModifierType implements Localizable { localize(): void { this.name = `${this.count}x ${getPokeballName(this.pokeballType)}`; - this.description = `Receive ${getPokeballName(this.pokeballType)} x${this.count}\nCatch Rate: ${getPokeballCatchMultiplier(this.pokeballType) > -1 ? `${getPokeballCatchMultiplier(this.pokeballType)}x` : 'Certain'}`; + this.description = `Receive ${getPokeballName(this.pokeballType)} x${this.count} (Inventory: {AMOUNT}) \nCatch Rate: ${getPokeballCatchMultiplier(this.pokeballType) > -1 ? `${getPokeballCatchMultiplier(this.pokeballType)}x` : 'Certain'}`; } + + getDescription(scene: BattleScene): string { + this.localize(); + return this.description.replace('{AMOUNT}', scene.pokeballCounts[this.pokeballType].toLocaleString('en-US')); + } + } class AddVoucherModifierType extends ModifierType {