pokerogue/src/system
Zach Day 13f38dce8d
[Move] Use BattlerTag for move-disabling effects (#2051)
* Use BattlerTag for move-disabling effects

* Fix RUN command causing freeze

* Improve documentation

* Clean up and document PokemonMove.isUsable

* Fix isMoveDisabled missing return

* Tags define the message shown when disabling interrupts a move

* Fix -1 duration on Disable effect

* Add tests for Disable

* En loc and fix message functions

* Fix Disable test

* Fix broken imports

* Fix test

* All disable tests passing

* Localize remaining strings

* Move cancellation logic out of lapse; use use TURN_END for lapse type

* Prevent disabling STRUGGLE

* Inline struggle check function

* Restore RechargingTag docs

* Move cancellation logic back to tag

Wanted to increase similarity to the existing code base to avoid that stupid hyper beam error but it's still happening here

* Fix hyper beam test

* Remove erroneous shit

* Fill movesets with SPLASH for disable test

* More robust condition for disable checking

* Remove DisabledTag lapse

* Simplify DisablingBattlerTag lapse

* Cancel disable-interrupted moves instead of failing them

* Avoid disabling virtual moves

* Consistent access modifiers across Disable tags

* Add abstract function for message when player tries to select the disabled move

* Fix syntax mistake

* Always disable last-used non-virtual move

* Overhaul tests + add tests

* Implement loadTag for DisabledTag

* Update translations

* Update translations

* Reimplement phase changes

* fix battlertag strings

* Fix disable test not running

* Update name of base class

* Rename "disabling" to "restriction"

* Fix sneaky string fuckup

* Fix test failure

* fix merge problems

* fix merge problems

* Update tests

* rerun RNG test

* Properly mock stats in test

* Document everything in battlertag

* More docs + typo fix

* Update tests

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-09-05 08:44:22 +00:00
..
settings [P1 Bug][UI/UX] Address shop cursor target feedbacks (#4009) 2024-09-04 01:07:56 +00:00
achv.ts [Refactor/Bug/Move] Overhaul Stats and Battle Items, Implement Several Stat Moves (#2699) 2024-09-02 22:12:34 -04:00
arena-data.ts [Refactor] use typescript strict-null (#3259) 2024-08-07 17:23:12 +01:00
challenge-data.ts Add Challenges (#1459) 2024-06-08 01:07:23 -04:00
egg-data.ts hotfix egg source type please be the last one 2024-06-21 23:11:17 -04:00
game-data.ts [Enhancement] Skip egg hatching and show summary (#3726) 2024-09-04 16:59:25 +00:00
game-speed.ts Fix Error with Typecasting (#1519) 2024-05-28 23:45:18 +01:00
game-stats.ts Beta Merge 27/07 (#3141) 2024-07-28 00:47:00 +01:00
modifier-data.ts [Refactor] use typescript strict-null (#3259) 2024-08-07 17:23:12 +01:00
pokemon-data.ts [Move] Use BattlerTag for move-disabling effects (#2051) 2024-09-05 08:44:22 +00:00
session-history.ts ESLint - The Essential Linter and Formatter for JavaScript and TypeScript (#1224) 2024-05-23 11:03:10 -04:00
trainer-data.ts [QoL] Reorganize Enum Locations (#2185) 2024-06-13 18:44:23 -04:00
unlockables.ts [Enhancement/Item] Add Achievement to Unlock Eviolite (#3390) 2024-08-08 01:07:28 +01:00
voucher.ts Deleted phases.ts (#3618) 2024-08-19 03:23:52 +01:00