pokerogue/src/data/moves
Bertie690 f317ec9a26
[Bug] Avoid pre-emptively leaving the field when forcibly switching out
https://github.com/pagefaultgames/pokerogue/pull/6874

* [Bug] Avoid pre-emptively leaving the field when forcibly switching out

* Fix `SwitchPhase` off-by-one error

* Add check for pokemon fainting in test

* add test for destiny bond crash

* Fix `queueDeferred` not respecting pending `FaintPhase`s

TL;DR we would defer the faint phases to run after the switch sequences, which is wrong - leaving the field has to be the LAST thing that happens in a given turn (or else shit breaks big-time).

* Update test/moves/u-turn.test.ts

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Fabi <192151969+fabske0@users.noreply.github.com>
2025-12-20 15:55:23 -08:00
..
apply-attrs.ts [Dev] Enable Biome import sorting (#6052) 2025-07-13 00:21:25 -07:00
invalid-moves.ts [Balance] Update Invalid Sketch Moves 2025-12-13 13:35:28 -05:00
move-condition.ts [Misc] Remove now-obsolete noUnusedImports suppression comments 2025-11-29 20:52:45 -08:00
move-utils.ts [Bug] [Refactor] [Move] Add selection prevention and move failures (#6276) 2025-09-29 12:08:42 -05:00
move.ts [Bug] Avoid pre-emptively leaving the field when forcibly switching out 2025-12-20 15:55:23 -08:00
pokemon-move.ts [i18n] Fix message for unimplemented moves (#6780) 2025-11-15 12:14:48 -06:00