pokerogue/src/test
innerthunder 70295280da
[Move] Implement Substitute (#2559)
* Implement Substitute

Squashed commit from working branch

* Fix integration test imports

* Use Override Helper utils + Fix Baton Pass test

* Update src/test/moves/substitute.test.ts

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>

* Fix test imports + nits

* Document RemoveAllSubstitutesAttr

* Fix some strict-null issues

* more strict-null fixes

* Fix baton pass test

* Reorganized Substitute translation keys

* Added checks for substitute in contact logic

* Clean up Unseen Fist contact logic

* Remove misleading comment in Download attr

* RIP phases.ts

* Fix imports post-phase migration

* Rewrite `move.canIgnoreSubstitute` to `move.hitsSubstitute`

* Also fixed interactions with Shell Trap and Beak Blast

* Removed some leftover `canIgnoreSubstitute`s

* fix issues after beta merge

* Status move effectiveness now accounts for substitute

* More edge case tests (Counter test failing)

* Fix Counter + Trap edge cases + add Fail messagesd

* Fix leftover nit

* Resolve leftover test issues

* Fix Sub offset carrying over to Trainer fights

* Hide substitute sprite during catch attempts

* Make substitutes baton-passable again

* Remove placeholder locale keys and SPLASH_ONLY

* Fix imports and other nits

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

* ESLint

* Fix imports

* Fix incorrect `resetSprite` timing

* Fix substitute disappearing on hit (maybe?)

* More animation fixes (mostly for Roar)

---------

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-09-13 12:46:22 -04:00
..
abilities [Move] Implement Substitute (#2559) 2024-09-13 12:46:22 -04:00
achievements [Refactor/Bug/Move] Overhaul Stats and Battle Items, Implement Several Stat Moves (#2699) 2024-09-02 22:12:34 -04:00
arena [Bug] Primal weather no longer persists if last mon dies to indirect damage (#3492) 2024-09-09 12:59:58 -04:00
battle [Dev] Make OPP_MOVESET_OVERRIDE fully override the enemy's moveset (#4062) 2024-09-09 12:55:11 -04:00
battlerTags [Move] Implement Substitute (#2559) 2024-09-13 12:46:22 -04:00
eggs [Bug] Fix rare egg move and species rates for Manaphy eggs (#4125) 2024-09-10 10:15:07 -04:00
field [Bug] Fix #762: All Pokemon become invisible when capturing then switching with your only pokemon that was not fainted (#4025) 2024-09-09 01:10:47 -04:00
inputs [Test] Replace doAttack() with move.select() in tests (#3567) 2024-08-22 06:49:33 -07:00
items [Balance] Disable Eviolite for G-Max Pokémon (#4184) 2024-09-11 20:56:58 -04:00
localization [Refactor/Bug/Move] Overhaul Stats and Battle Items, Implement Several Stat Moves (#2699) 2024-09-02 22:12:34 -04:00
moves [Move] Implement Substitute (#2559) 2024-09-13 12:46:22 -04:00
phases [Refactor] Cleaning up Learn move phase (#3672) 2024-09-09 09:11:46 -07:00
settingMenu [Test] Replace doAttack() with move.select() in tests (#3567) 2024-08-22 06:49:33 -07:00
sprites [Test] Replace doAttack() with move.select() in tests (#3567) 2024-08-22 06:49:33 -07:00
ui [Dev] Make OPP_MOVESET_OVERRIDE fully override the enemy's moveset (#4062) 2024-09-09 12:55:11 -04:00
utils [Test] Speed up tests and make enemy item override remove existing items (#4203) 2024-09-13 01:09:12 -04:00
account.test.ts [Misc] eslint rule to prevent .js imports (#4160) 2024-09-10 22:34:50 +02:00
battle-scene.test.ts [Bug] Fix eggs having exploitable RNG (#3913) 2024-09-02 22:18:18 -04:00
boss-pokemon.test.ts [Dev] Make OPP_MOVESET_OVERRIDE fully override the enemy's moveset (#4062) 2024-09-09 12:55:11 -04:00
daily_mode.test.ts [Bug] Fix daily run generated movesets (#3519) 2024-08-13 21:48:56 +01:00
endless_boss.test.ts [Test] Add test for final boss fight phase switch (#3847) 2024-09-01 22:47:22 -04:00
escape-calculations.test.ts [Balance] Changed escape calculation (#3973) 2024-09-05 05:29:39 +00:00
evolution.test.ts [Dev] Make OPP_MOVESET_OVERRIDE fully override the enemy's moveset (#4062) 2024-09-09 12:55:11 -04:00
final_boss.test.ts [Dev] Make OPP_MOVESET_OVERRIDE fully override the enemy's moveset (#4062) 2024-09-09 12:55:11 -04:00
fontFace.setup.ts tests: add mock for FontFace and it to vitest setup (#1591) 2024-05-30 04:44:36 +01:00
game-mode.test.ts [Test] Replace doAttack() with move.select() in tests (#3567) 2024-08-22 06:49:33 -07:00
imports.test.ts [Test] Replace doAttack() with move.select() in tests (#3567) 2024-08-22 06:49:33 -07:00
internals.test.ts [Test] Replace doAttack() with move.select() in tests (#3567) 2024-08-22 06:49:33 -07:00
misc.test.ts [Test] Tests now default to using "Set" battle style (#3728) 2024-09-01 23:32:31 -04:00
pre.test.ts Beta Merge 27/07 (#3141) 2024-07-28 00:47:00 +01:00
reload.test.ts [Dev] Make OPP_MOVESET_OVERRIDE fully override the enemy's moveset (#4062) 2024-09-09 12:55:11 -04:00
vitest.setup.ts [Misc] eslint rule to prevent .js imports (#4160) 2024-09-10 22:34:50 +02:00