mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 06:19:29 +02:00
Add failsafe to Commander remove anim
This commit is contained in:
parent
f778bd5877
commit
502b1a20c5
@ -312,6 +312,10 @@ export class PokemonAnimPhase extends BattlePhase {
|
||||
// Note: unlike the other Commander animation, this is played through the
|
||||
// Dondozo instead of the Tatsugiri.
|
||||
const tatsugiri = this.pokemon.getAlly();
|
||||
if (isNullOrUndefined(tatsugiri)) {
|
||||
console.warn("Aborting COMMANDER_REMOVE anim: Tatsugiri is undefined");
|
||||
return this.end();
|
||||
}
|
||||
|
||||
const tatsuSprite = this.scene.addPokemonSprite(
|
||||
tatsugiri,
|
||||
|
Loading…
Reference in New Issue
Block a user