Bertie690
6d90649b92
[Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew ( #5655 )
...
* Grabbed reverted changes from stuff
* Added version migrator for rage fist data + deepMergeSpriteData tests
* fixed formattign
* Fied a few
* Fixed constructor (maybe), moved deepCopy and deepMergeSpriteData to own file
`common.ts` is hella bloated so seems legit
* Moved empty moveset verification mapping thing to upgrade script bc i wanted to
* Fixed tests
* test added
* Fixed summondata being cleared inside summonPhase, removed `summonDataPrimer`
like seriously how come no-one checked this
* Fixed test
I forgot that we outsped and oneshot
* Fixed test
* huhjjjjjb
* Hopefully fixed bug
my sanity and homework are paying the price for this lol
* added commented out console.log statement
uncomment to see new berry data
* Fixed migrate script, re-added deprecated attributes out of necessity
* Fixed failing test by not trying to mock rng
* Fixed test
* Fixed tests
* Update ability.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update ability.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update overrides.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update berry-phase.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update encounter-phase.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update game-data.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update move-phase.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Added utility function `randSeedFloat`
basically just `Phaser.math.RND.realInRange(0, 1)`
* Applied review comments, cleaned up code a bit
* Removed unnecessary null checks for turnData and co.
I explicitly made them initialized by default for this very reason
* Added tests for Last Resort regarding moveHistory
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update battle-scene.ts
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
* Update the-winstrate-challenge-encounter.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update ability.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update move.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update move.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update move.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update battle-anims.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update pokemon.ts comments
* Fixed a few outstanding issues with documentation
* Updated switch summon phase comment
* Re-added BattleSummonData as TempSummonData
* Hppefully fixed -1 sprite scale glitch
* Fixed comment
* Reveted `pokemon-forms.ts`
* Fuxed constructor
* fixed -1 bug
* Revert "Added utility function `randSeedFloat`"
This reverts commit 4c3447c851
.
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-05-02 00:06:07 -05:00
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
ff44cbfa97
[Refactor] Refactor ability file part 1 ( #5589 )
...
* Move ability.ts to subfolder
* Extract types out of ability.ts
* Update imports in ability.ts and friends
* Cleanup imports in ability.ts
* Re-add imports lost during sort
* Update imports forgotten during rebase
* Re-import proper type from enums
* Update biome.jsonc
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Add commit to force tests to rerun
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-04-15 14:08:35 +00:00
damocleas
b41eee3c7f
Revert "[Refactor] Move many interfaces and enums to their own file" ( #5661 )
...
Revert "[Refactor] Move many interfaces and enums to their own file (#5646 )"
This reverts commit c82e01eed3
.
2025-04-14 12:28:36 -04:00
Sirz Benjie
c82e01eed3
[Refactor] Move many interfaces and enums to their own file ( #5646 )
...
* Move LearnMoveSituation to its own file
* Remove unused selfStatLowerMoves array
* Move all-moves to its own file
* Move TurnMove interface to its own file
* move AiType to its own file
* Move PokemonMove to its own file
* Move DamageCalculationResult interface to its own file
* Move fieldPosition to its own file
* Move hit-result to its own file
* Move DamageResult to its own file
* Move SpeciesWildEvolutionDelay to its own file
* move EvolutionItem to its own file
2025-04-14 08:31:26 -07:00
Dean
b33d95d27d
[Bug][Refactor] Fix Unsuppressable Abilities being Unreplaceable ( #5547 )
...
* Switch unsuppressable to unswappable
* Update test
* Change suppress/replace/copy flags
* Make flower gift unreplaceable
* Make forecast unreplaceable
* No holding hands
* [Sprite] Reduce Mystical Rock sprite's size (#5570 )
* Updating the size to be smaller
* Update item atlas
* Fix Malicious Armor missing outline
Noticed when exporting atlas that the item sprite broke
---------
Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
Co-authored-by: damocleas <damocleas25@gmail.com>
* Switch unsuppressable to unswappable
* Update test
* Change suppress/replace/copy flags
* Make flower gift unreplaceable
* Make forecast unreplaceable
* No holding hands
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Remove trivial type annotations
---------
Co-authored-by: Unicorn_Power <189861924+Unicornpowerstar@users.noreply.github.com>
Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
Co-authored-by: damocleas <damocleas25@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-03-30 05:37:35 +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
60a4db7059
[Refactor] Refactor moves.ts part 1 ( #5420 )
2025-03-07 19:10:29 -06: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