[Bug] Fix Commander crash after 5267 (#5524)

Fix reversed commander checks
This commit is contained in:
Dean 2025-03-16 04:44:48 -07:00 committed by GitHub
parent 1d7f916240
commit 02ae7952ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {