[Bug] Fix field moves always playing their animations (#5830)

This commit is contained in:
Sirz Benjie 2025-05-17 16:04:16 -05:00 committed by GitHub
parent 998619e7e5
commit 4376a22a7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -354,8 +354,8 @@ export class MoveEffectPhase extends PokemonPhase {
move.id as Moves,
user,
firstTarget?.getBattlerIndex() ?? BattlerIndex.ATTACKER,
// Field moves and some moves used in mystery encounters should be played even on an empty field
fieldMove || (globalScene.currentBattle?.mysteryEncounter?.hasBattleAnimationsWithoutTargets ?? false),
// Some moves used in mystery encounters should be played even on an empty field
globalScene.currentBattle?.mysteryEncounter?.hasBattleAnimationsWithoutTargets ?? false,
).play(move.hitsSubstitute(user, firstTarget), () => this.postAnimCallback(user, targets));
return;