Move AuraTag lapse to a better place

This commit is contained in:
Jakub Hanko 2024-05-17 18:50:05 +02:00
parent 736ff72e32
commit 7afe764c28
No known key found for this signature in database
GPG Key ID: 775D427937A306CC

View File

@ -2284,6 +2284,11 @@ export class MovePhase extends BattlePhase {
return false;
});
targets.forEach(
p => p.findTags(t => t instanceof AuraTag)
.forEach(t => p.lapseTag(t.tagType))
);
const doMove = () => {
this.pokemon.turnData.acted = true; // Record that the move was attempted, even if it fails
@ -2510,7 +2515,6 @@ export class MoveEffectPhase extends PokemonPhase {
}
const isProtected = !this.move.getMove().hasFlag(MoveFlags.IGNORE_PROTECT) && target.findTags(t => t instanceof ProtectedTag).find(t => target.lapseTag(t.tagType));
target.findTags(t => t instanceof AuraTag).forEach(t => target.lapseTag(t.tagType));
const firstHit = moveHistoryEntry.result !== MoveResult.SUCCESS;