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
pull/48/head
Stophles 2024-04-06 14:32:54 -05:00 committed by GitHub
parent 1f860d6d1d
commit a17a9160b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

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