From 02ae7952ad26f3df133c99f6b7f02024af4d4d6c Mon Sep 17 00:00:00 2001 From: Dean <69436131+emdeann@users.noreply.github.com> Date: Sun, 16 Mar 2025 04:44:48 -0700 Subject: [PATCH] [Bug] Fix Commander crash after 5267 (#5524) Fix reversed commander checks --- src/data/ability.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 0b5b3624c73..ab78d1dd06c 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2783,8 +2783,8 @@ export class CommanderAbAttr extends AbAttr { // another Pokemon, this effect cannot apply. // TODO: Should this work with X + Dondozo fusions? - return !(pokemon.getAlly().isFainted() || pokemon.getAlly().getTag(BattlerTagType.COMMANDED)) - && globalScene.currentBattle?.double && pokemon.getAlly()?.species.speciesId === Species.DONDOZO; + return globalScene.currentBattle?.double && pokemon.getAlly()?.species.speciesId === Species.DONDOZO + && !(pokemon.getAlly().isFainted() || pokemon.getAlly().getTag(BattlerTagType.COMMANDED)); } override apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: null, args: any[]): void {