pokerogue/test
Sirz Benjie 54ce58411b
[Bug] Fix forced switch bugs in enemy partner trainer battles (#5644)
* Add isPartner method to trainer class

* Ensure force switches cannot pull pokemon from the wrong trainer

* Add override for battle type

* Fixup tests and broken assumptions

* Make move fail override semi-invuln check

Bandaid fix because move effect phase does not allow for the move to fail if all of its conditions fail

* Restore overrides

* Apply kev's suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Fix illusion test battle type invocation

* Update struggle and healer tests to use battleStyle

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-04-18 09:35:46 +00:00
..
abilities [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
achievements [Test] [Refactor] [GitHub] Enable no isolate for vitest (#5566) 2025-03-28 17:30:38 -04:00
arena [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
battle [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
battlerTags Revert "[Refactor] Move many interfaces and enums to their own file" (#5661) 2025-04-14 12:28:36 -04:00
data [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
eggs [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
field [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
inputs [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
items [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
moves [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
mystery-encounter Revert "[Refactor] Move many interfaces and enums to their own file" (#5661) 2025-04-14 12:28:36 -04:00
phases [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
plugins/api [Test] [Refactor] [GitHub] Enable no isolate for vitest (#5566) 2025-03-28 17:30:38 -04:00
settingMenu [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
sprites [Refactor] Refactor variant sprite code part 1 (#5592) 2025-04-09 10:43:05 -05:00
system [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
testUtils [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
ui [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
account.test.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
battle-scene.test.ts [Test] Move test folder out of src (#5398) 2025-02-22 22:52:07 -06:00
boss-pokemon.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
daily_mode.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
endless_boss.test.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
enemy_command.test.ts Revert "[Refactor] Move many interfaces and enums to their own file" (#5661) 2025-04-14 12:28:36 -04:00
escape-calculations.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
evolution.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
final_boss.test.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
fontFace.setup.ts [Test] Move test folder out of src (#5398) 2025-02-22 22:52:07 -06:00
game-mode.test.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
imports.test.ts Revert "[Refactor] Move many interfaces and enums to their own file" (#5661) 2025-04-14 12:28:36 -04:00
internals.test.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
misc.test.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
reload.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
vitest.setup.ts [Biome] Add "no unused imports" rule (#5580) 2025-03-29 10:24:23 +00:00