Commit Graph

5 Commits

Author SHA1 Message Date
Sirz Benjie 110fd2f0a1
[Refactor][Move] Refactor move effect phase (#5678)
* Add enum for hit check result

Co-authored-by: innerthunder <brandonerickson98@gmail.com>

* Refactor parameter list for pokemon#getBaseDamage and pokemon#getAttackDamage

* Rewrite move phase

Co-authored-by: innerthunder <brandonerickson98@gmail.com>

* Update tests to reflect move effect phase changes

Co-authored-by: innerthunder <brandonerickson98@gmail.com>

* Fix pluck / bug bite

Co-authored-by: innerthunder <brandonerickson98@gmail.com>

* Fix reviver seed ohko, remove leftover dead code

Co-authored-by: innerthunder <brandonerickson98@gmail.com>

* Cleanup jsdoc comments

* Remove hitsSubstitute check from postDefend abilities

* Fix improper i18nkey in moveEffectPhase#applyToTargets

* Cleanup comments

* Fix type issue with substitute test

* Move MYSTERY_ENCOUNTER_WAVES to constants.ts

* Update linkcode in damageparams to use proper tsdoc syntax

---------

Co-authored-by: innerthunder <brandonerickson98@gmail.com>
2025-04-23 00:10:27 +00:00
Sirz Benjie 5854b21da0
[Refactor] Remove circular imports part 1 (#5663)
* Extract Mode enum out of UI and into its own file

Reduces circular imports from 909 to 773

* Move around utility files

Reduces cyclical dependencies from 773 to 765

* Remove starterColors and bypassLogin from battle-scene

Reduces cyclical dependencies from 765 to 623

* Fix test runner error

* Update import for bypassLogin in test

* Update mocks for utils in tests

* Fix broken tests

* Update selectWithTera override

* Update path for utils in ab-attr.ts

* Update path for utils in ability-class.ts

* Fix utils import path in healer.test.ts
2025-04-19 11:57:03 +00:00
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
Sirz Benjie 408b66f913
[Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-03-09 14:13:25 -07:00
Sirz Benjie a51a504155
[Test] Move test folder out of src (#5398)
* move test folder

* Update vitest files

* rename test/utils to test/testUtils

* Remove stray utils/gameManager

Got put back from a rebase
2025-02-22 22:52:07 -06:00