From dc2559562da27d69a6cf5b02d004a60e8385e5df Mon Sep 17 00:00:00 2001 From: Opaque02 <66582645+Opaque02@users.noreply.github.com> Date: Fri, 6 Sep 2024 01:06:29 +1000 Subject: [PATCH] Starting change on rogue balls for extra catch rate for tinted pokeball pokemon --- src/data/pokeball.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/data/pokeball.ts b/src/data/pokeball.ts index 59ff4ed86ce..fa0da5a15ac 100644 --- a/src/data/pokeball.ts +++ b/src/data/pokeball.ts @@ -1,4 +1,5 @@ import { PokeballType } from "#enums/pokeball"; +import Pokemon from "../field/pokemon"; import BattleScene from "../battle-scene"; import i18next from "i18next"; @@ -48,7 +49,8 @@ export function getPokeballName(type: PokeballType): string { return ret; } -export function getPokeballCatchMultiplier(type: PokeballType): number { +export function getPokeballCatchMultiplier(type: PokeballType, enemyPokemon?: Pokemon): number { + const pokemon = enemyPokemon ?? null; switch (type) { case PokeballType.POKEBALL: return 1; @@ -57,6 +59,7 @@ export function getPokeballCatchMultiplier(type: PokeballType): number { case PokeballType.ULTRA_BALL: return 2; case PokeballType.ROGUE_BALL: + console.log(pokemon); return 3; case PokeballType.MASTER_BALL: return -1;