Ability only functions on player side

pull/619/head
Samuel-Hudson-uark 2024-05-07 17:13:17 -05:00
parent 3be2c478b8
commit b84ed40268
1 changed files with 1 additions and 1 deletions

View File

@ -2113,7 +2113,7 @@ export class FetchBallAbAttr extends PostTurnAbAttr {
} }
applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean { applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
let lastUsed = pokemon.scene.currentBattle.lastUsedPokeball; let lastUsed = pokemon.scene.currentBattle.lastUsedPokeball;
if(lastUsed != null) { if(lastUsed != null && pokemon.isPlayer) {
pokemon.scene.pokeballCounts[lastUsed]++; pokemon.scene.pokeballCounts[lastUsed]++;
pokemon.scene.currentBattle.lastUsedPokeball = null; pokemon.scene.currentBattle.lastUsedPokeball = null;
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` found a\n${getPokeballName(lastUsed)}!`)); pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` found a\n${getPokeballName(lastUsed)}!`));