Fix Pickup causing crash outside of battle

This commit is contained in:
Flashfyre 2024-03-07 08:23:21 -05:00
parent 9ff7a95dc0
commit d18eba4df8
2 changed files with 2 additions and 2 deletions

View File

@ -1283,7 +1283,7 @@ function canApplyAttr(pokemon: Pokemon, attr: AbAttr): boolean {
}
function queueShowAbility(pokemon: Pokemon): void {
pokemon.scene.unshiftPhase(new ShowAbilityPhase(pokemon.scene, pokemon.getBattlerIndex()));
pokemon.scene.unshiftPhase(new ShowAbilityPhase(pokemon.scene, pokemon.id));
pokemon.scene.clearPhaseQueueSplice();
}

View File

@ -640,7 +640,7 @@ export class TruantTag extends AbilityBattlerTag {
if (lastMove && lastMove.move !== Moves.NONE) {
(pokemon.scene.getCurrentPhase() as MovePhase).cancel();
pokemon.scene.unshiftPhase(new ShowAbilityPhase(pokemon.scene, pokemon.getBattlerIndex()));
pokemon.scene.unshiftPhase(new ShowAbilityPhase(pokemon.scene, pokemon.id));
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ' is\nloafing around!'));
}