From a17a9160b30ee60e5364e19a0a54818bcc3ddf2f Mon Sep 17 00:00:00 2001 From: Stophles <71789013+Stophles@users.noreply.github.com> Date: Sat, 6 Apr 2024 14:32:54 -0500 Subject: [PATCH] Checking Flinch before Confusion/Infatuation (#47) * Recharge checked earlier, Move Tags not checked if move cancelled Recharge is now checked at the start of doMove to determine if other Tags need to be checked or if the pokemon is recharging. If the move is already cancelled, Move lapse tags are no longer checked (To account for Sleep/Paralyze happening before hand, so confusion would never trigger) * PRE_MOVE Lapse added for Recharge, Recharge now cancels Added a PRE_MOVE Identifier for Recharge specifically, which now cancels the move and shifts the move queue (since this will no longer occur in doMove. This prevents Confusion/Infatuation from also being triggered after a Pokemon is recharging. * Changed spacing * Added Flinch to PRE_MOVE Lapse Added Flinch to PRE_MOVE Lapse tag like recharge so that confusion and infatuation aren't checked if the mon is already flinched --- src/data/battler-tags.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 3ef72331c..81ea80938 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -134,7 +134,7 @@ export class TrappedTag extends BattlerTag { export class FlinchedTag extends BattlerTag { constructor(sourceMove: Moves) { - super(BattlerTagType.FLINCHED, BattlerTagLapseType.MOVE, 0, sourceMove); + super(BattlerTagType.FLINCHED, BattlerTagLapseType.PRE_MOVE, 0, sourceMove); } onAdd(pokemon: Pokemon): void {