pokerogue/test
Jimmybald1 3b36ab17e4
[Bug] Protect now tracks success chance properly (#5869)
* Protect rng now resets on new waves and fixed to look at all turns in the same wave.

* Added per-wave move history object to fix issues

@Jimmybald1 I added a commented out `console.log` in the protect code (L5797) for you to use for testing

* Added many tests

* Wave move history has to be looped in reverse

* Update src/data/moves/move.ts

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

* Update src/data/moves/move.ts

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

* comments

* Fixed forceEnemyMove references after merge

* Removed console log

Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>

* Fixed test message

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>

* Apply Biome

* Fix merge issues

* Fix Crafty Shield test

* Remove protect chance reset on wave change

* Fix merge issue

---------

Co-authored-by: Jimmybald1 <147992650+IBBCalc@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-08-05 07:35:14 +02:00
..
@types [Test] Port over + augment remaining test matchers from pkty (#6159) 2025-08-02 15:35:06 -07:00
abilities [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
achievements [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
arena [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
battle [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
battler-tags [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
data [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
eggs [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
field [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
inputs [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
items [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
moves [Bug] Protect now tracks success chance properly (#5869) 2025-08-05 07:35:14 +02:00
mystery-encounter [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
phases [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
plugins/api [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
setting-menu [Misc] Moved + cleaned up string manipulation functions (#6112) 2025-07-27 13:59:03 -07:00
sprites [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
system [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
test-utils [Dev] Move various functions out of pokemon-species.ts (#6155) 2025-08-02 19:35:06 -07:00
types [Test] Port over + augment remaining test matchers from pkty (#6159) 2025-08-02 15:35:06 -07:00
ui [UI/UX] Implement Discard Button (#5985) 2025-07-31 16:14:51 -04:00
utils [Misc] Moved + cleaned up string manipulation functions (#6112) 2025-07-27 13:59:03 -07:00
account.test.ts [Dev] Enable Biome import sorting (#6052) 2025-07-13 00:21:25 -07:00
battle-scene.test.ts [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
boss-pokemon.test.ts [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
daily-mode.test.ts [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
endless-boss.test.ts [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
enemy-command.test.ts [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
escape-calculations.test.ts [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
evolution.test.ts [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
final-boss.test.ts [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
font-face.setup.ts [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
game-mode.test.ts [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
imports.test.ts [Dev] Enable Biome import sorting (#6052) 2025-07-13 00:21:25 -07:00
internals.test.ts [Test] Replace game.scene.getXPokemon()! with game.field.getXPokemon() 2025-08-04 21:19:57 -07:00
matchers.setup.ts [Test] Port over + augment remaining test matchers from pkty (#6159) 2025-08-02 15:35:06 -07:00
misc.test.ts [Misc] Move asset initialization from preload to launchBattle 2025-08-02 14:29:35 -07:00
reload.test.ts [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
utils.test.ts [Dev] Enable Biome import sorting (#6052) 2025-07-13 00:21:25 -07:00
vitest.setup.ts [Dev] Remove sanitizeOverrides, consolidate initialization code into 1 file 2025-07-25 01:23:13 +00:00