From 64f568e39af4f48c1dd0e01495ecf6fa04482cd0 Mon Sep 17 00:00:00 2001 From: ImperialSympathizer Date: Fri, 27 Sep 2024 21:30:27 -0400 Subject: [PATCH] lapse endure tag as well --- src/phases/mystery-encounter-phases.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/phases/mystery-encounter-phases.ts b/src/phases/mystery-encounter-phases.ts index 1bca18e6efe..0efaf1bf4ca 100644 --- a/src/phases/mystery-encounter-phases.ts +++ b/src/phases/mystery-encounter-phases.ts @@ -219,11 +219,14 @@ export class MysteryEncounterBattleStartCleanupPhase extends Phase { start() { super.start(); - // Lapse any residual flinches but ignore all other turn-end battle tags + // Lapse any residual flinches/endures but ignore all other turn-end battle tags + const includedLapseTags = [BattlerTagType.FLINCHED, BattlerTagType.ENDURING]; const field = this.scene.getField(true).filter(p => p.summonData); field.forEach(pokemon => { const tags = pokemon.summonData.tags; - tags.filter(t => t.tagType === BattlerTagType.FLINCHED && !(t.lapse(pokemon, BattlerTagLapseType.TURN_END))).forEach(t => { + tags.filter(t => includedLapseTags.includes(t.tagType) + && t.lapseTypes.includes(BattlerTagLapseType.TURN_END) + && !(t.lapse(pokemon, BattlerTagLapseType.TURN_END))).forEach(t => { t.onRemove(pokemon); tags.splice(tags.indexOf(t), 1); });