pokerogue/test/abilities
Sirz Benjie 8afedc33d7
[Refactor] [Ability] Ab attr apply type safety (#6002)
* [WIP] Refactor ability attribute apply args

* [WIP] update ability signatures

* Update callsites in pokemon.ts

* Update callsites in moves.ts

* Update abattr callsites in move-phase

* Update abattr callsites in battler-tags

Also removed stat drop ability application from cancelling ME stat boost effects

* format with biome and remove cancelled from weather lapse

* Update abattr callsites in MEP

* Update callsites in turn-start-phase

* Update abAttr callsites in misc phases

* Remove latent test functionality

* update ability attribute callsite in shield dust test

* update abattr callsite in winstrate challenge encounter

* Fix some tests to mock proper methods

* Remove improper condition in mimicry's ability application

* Fix improper simulated check in moody's apply method

* Pass source to postApplyDamage in pokemon.ts

* [wip] fix cud chew tests

* Make cud chew consumption not subclass postTurnAbAttr

* Fix regression in flower veil

* Update trySetStatus test in pokemon to respect new return value for undefined

* Remove empty, unused file

* Fix blockCrit method broken in merge

* Fix unnecessary attr type cast in move phase

* Address typing issue in safeguard test

* Improve documentation and get rid of ts-expect-error directive

* Minor comment/TSDoc updates and fixes

* Apply suggestions from code review

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

* Apply suggestions from code review

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-06-22 18:23:08 -07:00
..
ability_activation_order.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
ability_duplication.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
ability_timing.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
analytic.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
arena_trap.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
aroma_veil.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
aura_break.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
battery.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
battle_bond.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
beast_boost.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
commander.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
competitive.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
contrary.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
corrosion.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
costar.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
cud_chew.test.ts [Refactor] [Ability] Ab attr apply type safety (#6002) 2025-06-22 18:23:08 -07:00
dancer.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
defiant.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
desolate-land.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
disguise.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
dry_skin.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
early_bird.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
flash_fire.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
flower_gift.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
flower_veil.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
forecast.test.ts [Bug] Fix weather form changes not changing with weather abilities 2025-06-16 06:02:09 -07:00
friend_guard.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
good_as_gold.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
gorilla_tactics.test.ts [Bug] Reworked BattlerTag/ArenaTag code to prevent breakage on 0 PIDs 2025-06-22 17:29:37 -07:00
gulp_missile.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
harvest.test.ts [Refactor] [Ability] Ab attr apply type safety (#6002) 2025-06-22 18:23:08 -07:00
healer.test.ts [Refactor] [Ability] Ab attr apply type safety (#6002) 2025-06-22 18:23:08 -07:00
heatproof.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
honey_gather.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
hustle.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
hyper_cutter.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
ice_face.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
illuminate.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
illusion.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
immunity.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
imposter.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
infiltrator.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
insomnia.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
intimidate.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
intrepid_sword.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
libero.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
lightningrod.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
limber.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
magic_bounce.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
magic_guard.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
magma_armor.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
mimicry.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
mirror_armor.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
mold_breaker.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
moody.test.ts [Refactor] [Ability] Ab attr apply type safety (#6002) 2025-06-22 18:23:08 -07:00
moxie.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
mummy.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
mycelium_might.test.ts [Dev] Update Biome to 2.0.0 (#6004) 2025-06-20 23:24:11 -07:00
neutralizing_gas.test.ts [Refactor] [Ability] Ab attr apply type safety (#6002) 2025-06-22 18:23:08 -07:00
no_guard.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
normal-move-type-change.test.ts [Refactor] Remove circular dependencies (part 4) (#5964) 2025-06-11 19:42:04 -07:00
normalize.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
oblivious.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
own_tempo.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
parental_bond.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
pastel_veil.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
perish_body.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
power_construct.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
power_spot.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
protean.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
protosynthesis.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
quick_draw.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
sand_spit.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
sand_veil.test.ts [Refactor] [Ability] Ab attr apply type safety (#6002) 2025-06-22 18:23:08 -07:00
sap_sipper.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
schooling.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
screen_cleaner.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
seed_sower.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
serene_grace.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
sheer_force.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
shell-armor.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
shield_dust.test.ts [Refactor] [Ability] Ab attr apply type safety (#6002) 2025-06-22 18:23:08 -07:00
shields_down.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
simple.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
speed_boost.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
stakeout.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
stall.test.ts [Dev] Update Biome to 2.0.0 (#6004) 2025-06-20 23:24:11 -07:00
steely_spirit.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
storm_drain.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
sturdy.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
super_luck.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
supreme_overlord.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
sweet_veil.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
synchronize.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
tera_shell.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
thermal_exchange.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
trace.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
unburden.test.ts [Refactor] [Ability] Ab attr apply type safety (#6002) 2025-06-22 18:23:08 -07:00
unseen_fist.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
victory_star.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
vital_spirit.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
volt_absorb.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
wandering_spirit.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
water_bubble.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
water_veil.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
wimp_out.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
wind_power.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
wind_rider.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
wonder_skin.test.ts [Dev] Update Biome to 2.0.0 (#6004) 2025-06-20 23:24:11 -07:00
zen_mode.test.ts [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
zero_to_hero.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00