pokerogue/test/abilities
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
..
ability_duplication.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
ability_timing.test.ts [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
analytic.test.ts [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
arena_trap.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
aroma_veil.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
aura_break.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
battery.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
battle_bond.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
beast_boost.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
commander.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
competitive.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
contrary.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
corrosion.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
costar.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
cud_chew.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
dancer.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
defiant.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
desolate-land.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
disguise.test.ts [Bug][Misc] Moved SelectBiomePhase in front of NewBattlePhase (#5694) 2025-04-23 10:54:43 -07:00
dry_skin.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
early_bird.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
flash_fire.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
flower_gift.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
flower_veil.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
forecast.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
friend_guard.test.ts [Refactor][Move] Refactor move effect phase (#5678) 2025-04-23 00:10:27 +00:00
good_as_gold.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
gorilla_tactics.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
gulp_missile.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
harvest.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
healer.test.ts [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
heatproof.test.ts [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
honey_gather.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
hustle.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
hyper_cutter.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
ice_face.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
illuminate.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
illusion.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
immunity.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
imposter.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
infiltrator.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
insomnia.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
intimidate.test.ts [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
intrepid_sword.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
libero.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
lightningrod.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
limber.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
magic_bounce.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
magic_guard.test.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
magma_armor.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
mimicry.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
mirror_armor.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
mold_breaker.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
moody.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
moxie.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
mummy.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
mycelium_might.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
neutralizing_gas.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
no_guard.test.ts [Refactor][Move] Refactor move effect phase (#5678) 2025-04-23 00:10:27 +00:00
normal-move-type-change.test.ts [Bug][Ability] Fix change move type abilities (#5665) 2025-05-01 22:41:57 -04:00
normalize.test.ts [Bug][Ability] Fix change move type abilities (#5665) 2025-05-01 22:41:57 -04:00
oblivious.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
own_tempo.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
parental_bond.test.ts [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
pastel_veil.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
perish_body.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
power_construct.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
power_spot.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
protean.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
protosynthesis.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
quick_draw.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
sand_spit.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
sand_veil.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
sap_sipper.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
schooling.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
screen_cleaner.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
seed_sower.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
serene_grace.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
sheer_force.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
shield_dust.test.ts [Refactor][Move] Refactor move effect phase (#5678) 2025-04-23 00:10:27 +00:00
shields_down.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
simple.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
speed_boost.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
stakeout.test.ts [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
stall.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
steely_spirit.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
storm_drain.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
sturdy.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
super_luck.test.ts [Refactor][Move] Refactor move effect phase (#5678) 2025-04-23 00:10:27 +00:00
supreme_overlord.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
sweet_veil.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
synchronize.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
tera_shell.test.ts [Refactor][Move] Refactor move effect phase (#5678) 2025-04-23 00:10:27 +00:00
thermal_exchange.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
trace.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
unburden.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
unseen_fist.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
victory_star.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
vital_spirit.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
volt_absorb.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
wandering_spirit.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
water_bubble.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
water_veil.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
wimp_out.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
wind_power.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
wind_rider.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
wonder_skin.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
zen_mode.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00
zero_to_hero.test.ts [Bug] Fix forced switch bugs in enemy partner trainer battles (#5644) 2025-04-18 09:35:46 +00:00