Commit Graph

216 Commits

Author SHA1 Message Date
snoozbuster b681bc386a add better phase logging and a fast timeout for stalled prompts 2024-08-13 21:10:10 -07:00
snoozbuster c31809ed35 add helper for forcing AI move targetting 2024-08-13 21:10:10 -07:00
snoozbuster 1bb79b87f6 slightly better overrides 2024-08-13 21:10:09 -07:00
snoozbuster c628759756 fix some types 2024-08-13 21:10:09 -07:00
snoozbuster 8a4a297cd6 remove whenAboutToRun 2024-08-13 21:10:08 -07:00
snoozbuster 9d721f6610 basic pursuit functionality tested 2024-08-13 19:59:57 -07:00
snoozbuster c080ba0b46 add methods to overridesHelper for new overrides 2024-08-13 19:59:57 -07:00
snoozbuster eb1d195866 add shorthand for setting a moveset to all one move 2024-08-13 19:59:57 -07:00
snoozbuster c6e93985ca bonus uturn test 2024-08-13 19:59:56 -07:00
Alex Van Liew 5e21005fe9 fail more obviously 2024-08-13 19:59:55 -07:00
NightKev 2b0b9fcb70
[Bug] Palafin should not swap to Hero form when switching due to faint (#3532)
* Palafin should not swap to Hero form when switching due to faint

Also add more tests for Zero to Hero

* Use `.isFainted()` instead of checking HP
2024-08-13 22:14:49 +01:00
NightKev 39e7591d3b
[Ability] Heatproof now reduces burn damage by half (#3524)
* Heatproof now reduces burn damage by half

* Add tests

* Add comment to test
2024-08-13 22:00:19 +01:00
NightKev 0d3fcd82bb
[Bug] Fix daily run generated movesets (#3519)
* Fix daily run generated movesets

* add unit-tests for `fix-daily-run` (#3)

* add `daily` and `classic` helper. split `runToSummon`

there is now a `classicMode.runToSummon` which represents the old one used.
There is now a `dailyMode.runToSummon` too

* add daily_mode.test.ts

covers the occured issue

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-08-13 21:48:56 +01:00
innerthunder a760022c77
[Move] Refactor Conditional Protection and Protect interactions (#2731)
* Refactor protection moves

* Revert Protected move result change

* Fix typo in documentation

* Fix merge conflicts in integration tests

* Improve readability of apply function

* Fix effects applying through Protect

* Fix typos in `src/data/egg.ts` comments

* [Localization(it)] Added Honey Gather translation (#2301)

* Update ability.ts [Localization(it)]

* Update ability.ts [Localization(it)]

Fixed capitalization

* Hitting into protect now records a move as failed

* Add check for move success before applying additional effects (Stone Axe)

* `Overrides` should be capitalized

* Add fail conditions for `RechargeAttr` and Jaw Lock

* Update protect test

* Add check for protect in Glaive Rush

* Update tests to use new overrides helpers

* Account for Mat Block and add protect test for Glaive Rush

---------

Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>

* Crafty Shield now blocks ALL protect-ignoring moves

* Crafty Shield test + Fix blocking ally-target moves

* ESLint

* Mat Block and Wide Guard integration tests

* Fix strict-null errors in integration tests

* Fix strict-null issue in arena-tag

* Fix strict-null in unrelated test :pikamad:

* Fix conflicting AbAttr

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
2024-08-13 21:47:32 +01:00
innerthunder 161043ecd6
[Move] Implement Shell Trap (#3500)
* Implement Shell Trap

* Fix error in EN message

* Add ZH/KO translations

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Fix error in placeholder messages

* FR translation / KO translation fix

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>

* More translations (DE, ES, IT, PT-BR)

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Asdar <asdargmng@gmail.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Update src/locales/ja/move-trigger.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Fix Shell Trap activating from ally attacks (+ test fixes)

* Remove todo + add test with shell trap as first move

---------

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Asdar <asdargmng@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
2024-08-13 21:47:05 +01:00
Mumble 513adf779f
[Ability] Stall + Mycelium Might (#3484)
* Implemented Stall

* Fixed implementation

* AbAttr Name Change

* Wrote test for Stall

* Update src/test/abilities/stall.test.ts

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

* Update src/data/ability.ts

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

* Updated ability variables and test

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* eslint fixes

* Update src/test/abilities/stall.test.ts

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

* added documentation and implemented mycelium might

* added note on quick claw

* Documentation + Quick Claw implementation

* This is where I would test quick claw-stall/m.m. if i could override modifierstacks

* Forgot to add edits oops

---------

Co-authored-by: Frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
2024-08-13 21:25:58 +01:00
NightKev 6c2c14cb1e
[Test] Fix Flash Fire tests to remove enemy ability RNG (#3523)
* Fix Flash Fire tests to remove enemy ability RNG

* Replace manual status application with override use
2024-08-12 21:21:51 -05:00
NightKev 223295e827
[Fix] Refactor Disguise to work like Ice Face (#2684)
* Fix typos in `src/data/egg.ts` comments

* Refactor Disguise using Ice Face as a base

i18n {
  Co-authored-by: Arxxer <javiptn7@gmail.com>
  Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>
  Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
  Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
  Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
}

Update tests

* Update jsdoc

* Make recoil damage a parameter

* Fix Ice Face i18n parameter name

* Add i18n placeholder strings for translation

* Update disguise test with override helper functions

* Move a form change from `battle-scene.ts` to `ability.ts`

* Remove a bit of obsolete code from the Disguise test

* Add some translations

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>

* Add translation placeholder strings for Japanese and Catalan

* Update for strict-null

* Remove unused parameter from the `BattlerTag` class

* Remove species checks, fusion doesn't seem to be an issue (any more?)

* Move Ice Face weather-based code to a subclass

* Condense conditionals

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>

---------

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
2024-08-12 11:52:39 +01:00
allen925 c078e5d612
[Bug][Test] Fix minor bug of ability Flash Fire, added test file (#3458)
* fix: let flash fire hit after frozen, and baton pass not passing it. added: flash fire test file

* added more tests and made small adjustments

* Update src/test/abilities/flash_fire.test.ts

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

---------

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
2024-08-12 01:26:37 -04:00
DustinLin ec26e751f8
[TEST] - adding parting shot move test (#3412)
* adding parting shot test

* improve tests

* updating test

* fixing existing tests

* more tests

* adding more tests
2024-08-12 01:13:56 -04:00
Adrian T. 4b16b64eed
[Test] move util func to gameManager.ts (#3494) 2024-08-12 00:56:31 -04:00
NightKev 0e0ed10ce0
[Test] Fix test names that weren't changed from copy/pasting (#3502) 2024-08-12 00:54:42 -04:00
ImperialSympathizer 988ec664e9
Disable endless boss passives (#3451)
* fix strict null broken

* disable endless boss passives

* jsdocs on mock objects and move helper function to gameManager.ts

* Apply suggestions from flx's review

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* fix broken test

* fix lint

---------

Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-08-11 19:40:47 +01:00
Tim Perdok 566cd80522
[Feature] Move touch controls configuration (Reopened) (#3256)
* [Hotfix] Fix interactions of some moves not changing types (#3183)

* [Hotfix] Fix wild spawns not having their HA (#3190)

* [Hotfix] Allow to hatch pokemon with Hidden Ability again (#3222)

* chore: Update TNC links layout and position in index.html

* chore: Update TNC links font size in index.css (#3230)

* Move Touch Controls

* ConfigToolbar alignment

* Insert config toolbar on open, camel-case classes, hidden setting

* Better toolbar styling, fixed double configToolbar bug

* Fixed typedocs

---------

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
2024-08-10 14:17:04 +01:00
flx-sta 762feea332
[Bug][Localhost] fix Json parse issue when trying to load battle-anim (#3455)
* add content-type check for loading battle-anims

* add missing `headers` to response mocks
2024-08-09 11:17:34 -04:00
Adrian T. bfdcd4fc1e
[Dev] Move function from testUtils.ts to gameManager.ts (2/3) (#3432)
* move mockTurnOrder to gameManager

* change name

* fix test failing

* fix purify test

* fix typo
2024-08-09 11:07:55 -04:00
Adrian T. 2b12326280
[Dev] Move function from testUtils.ts to gameManager.ts (1/3) (#3430)
* move mockHitCheck to gameManager

* add abstract base class and move helper class

* add param for single target miss
2024-08-09 10:37:10 -04:00
schmidtc1 57a4e1cc47
[Bug] Fixes bug with freezy frost not eliminating all Pokemon's stat changes (#3362)
* Cherrypick due to beta roll back

* Adds corrected stat eliminated message to move trigger, removes from battle.ts

* Adds check for Clear Smog vs Haze/Freezy Frost for targetting purposes

* Adds translations for fr, de, and pt_br

* Update src/locales/ko/move-trigger.ts with translation

Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>

* Update korean move-trigger.ts with proper translation

* Update src/locales/zh_CN/move-trigger.ts with translation

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/zh_TW/move-trigger.ts with translation

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Adds locales to ja and ca-ES

* Creates unit test for Haze

* Removes repeats option on Haze test left from testing

* Updates title of haze tests, creates freezy frost tests

* Update src/locales/es/move-trigger.ts with translation

Co-authored-by: Asdar <asdargmng@gmail.com>

* Fixes freezy_frost.test.ts copy errors from Haze test

---------

Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
Co-authored-by: Asdar <asdargmng@gmail.com>
2024-08-09 10:16:38 -04:00
NightKev fe429d0c8c
[Test] Fix hyper beam and purify test rng (#3449) 2024-08-09 09:40:00 -04:00
ImperialSympathizer b794662776
[Test] Fix final boss test (#3444)
Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
2024-08-08 17:06:57 -04:00
ImperialSympathizer ba9378d1d8
disables final boss passive (#3393)
Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
2024-08-08 20:59:23 +01:00
innerthunder 7f5e873457
[Move] Fully Implement Gulp Missile (#3438)
* Fix Dive + Gulp Missile interaction

* Fix animation + remove tests for inaccurate behavior

* Fix strict-null issue in new test
2024-08-08 14:23:11 -04:00
innerthunder b4a891cc71
[Move] Reimplement Beak Blast (#3427)
* Re-Implement Beak Blast

* Fix charge animation loading issues
2024-08-08 14:03:28 -04:00
NightKev f0d4dfa09e
[Test] Mock turn order in Miracle Eye test (#3437) 2024-08-08 14:02:02 -04:00
Opaque02 49bb681554
[Bug] Starter UI challenge form fix (#3373)
* First issue with soft attribute on challenges as well as incorrect sprites appearing on the starter select ui

* Updated logic to fix starter party icons, forms and shinies in starter selection area

* Fixed issue where some pokemon were being shown in challenges originally if the default form didn't meet the criteria

* Updated docs and tests to account for new behaviour

* Removed some debugging comments

* Fixed rotom form not counting as valid party

* Fixed a bug where the cursor's last known position would be used when pokemon forms were being changed when other forms were available when updated from your party directly

* Fixed issue with starter party icons' forms updating incorrectly when removing pokemon from party

* Fixed docs

* Updated code to allow for starter icons to remember their previous state after a reload
2024-08-08 09:16:27 -04:00
flx-sta 7b4e91eb02
[Bug] Fix no wild evolutions (#3426)
* fix wild pokemon not evolving anymore

* add test to cover defaults for wildDelay
2024-08-08 00:46:53 -04:00
Adrian T. d0629830a8
[Dev] Add mockHitCheck util (#3421)
* add mockHitCheck helper

* update docs
2024-08-07 23:18:37 -04:00
Adrian T. 9ff8685752
[Dev] Update changeTurnOrder name to mockTurnOrder (naming convention) (#3422)
* change changeTurnOrder to mockTurnOrder

* update docs
2024-08-07 23:15:45 -04:00
DustinLin 8faf27efc9
[BUG] - dragon tail switchout ability in wild battles proc crashes game (#3346)
* fixing switchout ability doubles bug, refactor move redirect code

* added unit test for dragon tail

* updating test

* addressing errors from pages deployment

* pages deployment still failing

* typedoc

* please let this be the one

* formatting and test fixing

* await starting battle should go after overrides
2024-08-07 20:44:34 -04:00
Frederico Santos 8783fd81c7
Revert egg additive/multiplicative change and change endless biome rotation for every 5 waves. (#3415)
Co-authored-by: snoozbuster <snoozbuster@outlook.com>
2024-08-07 21:29:41 +01:00
innerthunder 2b99f005dc
[Enhancement] Add Move Header phase and attributes (#2716)
* Create Move Header phase and attributes

* Fix move header persisting after run/ball

* Add mid-turn sleep test

* Fix status effect text in move header phase

* Remove preemptive non-volatile status check

* Process move headers in main loop of TurnStartPhase instead

* Fix merge issues in Focus Punch test

* Fix Focus Punch test + ESLint

* Add i18n key for Focus Punch header message

* Fix missing arg in i18n message

* Add Focus Punch message translations (DE, FR, KO, PT-BR, ZH)

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>

* Update src/locales/it/move-trigger.ts

Co-authored-by: Enoch <enoch.jwsong@gmail.com>

* Use new test helper functions + snooz's cleanup suggestions

* Add check for MoveHeaderPhase in switch test

* Add key to JA locale

* Add CA-ES locale key

* Fix strict-null checks in focus punch test

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>
2024-08-07 14:32:56 -04:00
flx-sta a07d2c57a4
[Refactor] use typescript `strict-null` (#3259)
* TS: enable strict-null

* fix battle-scene.ts

* fix voucher.ts

* adapt more files to strict-null

* adapt more files to strict-null ( 2)

* adapt ability.ts to strict-null

* adapt `arena.ts` to strict-null

* adapt TagAddedEvent constructor to strict-null

* adapt phases.ts.to strict-null

* adapt status-effect.ts to strict-null

* adapt `account.ts` to strict-null

* adapt `configHandler.ts` to strict-null

* adapt `ability.ts` to strict-null

* adapt `biomes.ts` to strict-null

* adapt `challenge.ts` to strict-null

* adapt `daily-run.ts` to strict-null

* adapt `nature.ts` to strict-null

* adapt `pokemon-forms.ts` to strict-null

* adapt `tainer-names.ts` to strict-null

* adapt `types.ts` to strict-null

* adapt `weather.ts` to strict-null

* adapt `egg-hatch-phase.ts` to strict-null

* adapt `evolution-phase.ts` to strict-null

* adapt `pokemon-sprite-sparkle-handler.ts` to strict-null

* adapt `evolution-phase.ts` to strict-null

* adapt `game-mode.ts` to strict-null

* adapt `utils.ts` to strict-null

* adapt `voucher-ui-handler.ts` to strict-null

* adapt `src/ui/unavailable-modal-ui-handler.ts` to strict-null

* adapt `src/ui/ui.ts` to strict-null

* adapt `src/ui/ui-theme.ts` to strict-null

* adapt `src/ui/title-ui-handler.ts` to strict-null

* adapt `src/ui/time-of-day-widget.ts` to strict-null

* adapt `src/ui/text.ts` to strict-null

* adapt `src/ui/target-select-ui-handler.ts` to strict-null

* adapt `src/ui/settings/settings-keyboard-ui-handler.ts` to strict-null

* adapt more files to strict-null (3)

* adapt more files to strict-null (4)

* adapt more files (mostly tests) to strict-null (5)

* adapt more files to strict-null (6)

* adapt more files to strict-null (7)

* Update `src/data/pokemon-evolutions.ts` for strict-null

Partial update `src/data/pokemon-species.ts` for strict-null

* adapt more files to strict-null (8)

* adapt more files to strict-null (9)

* Strict some more nulls (still a few errors remaining)

* adapt rest of the files to strict-null (9)

* fix tests (check for null instead of undefined)

* repalce a lot of `??` with bangs

And added TODO notice as usual

* fix more tests

* all tests pass now

* fix broken game-loop after trainer battle

add some console.warn for missing cases and falling back to default

* remove guessed fallback from utils.rgbHexToRgba

* add TODO for this.currentBattle = null

* adjust   getPokemonById() return to include `null`

* fix compilation errors

* add test for pokemon.trySetStatus

* `chanceMultiplier` shouldn't be optional

* allow `null` for currentPhase

* adjust hasExpSprite logic for no keymatch found

* reduce bang usage in account.updateUserInfo()

* fix new strict-null issues after merge

* fix `strict-null` issues in dropdown.ts

and sand_spit.test.ts

* fix egg-gacha

* adapt gul_missile.test.ts to strict-null

* fix move.ts strict-null

* fix i18n.ts strict-null

* fix strict-null issues

* fix baton_pass test

after accidentially breaking it

* chore: fix compiler errors

* revert accidential changes in baton_pass.test.ts

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2024-08-07 17:23:12 +01:00
NightKev 548bd8978f
[Move] Add type immunity removal moves (Foresight, Odor Sleuth, Miracle Eye) (#3379)
* Update Foresight PR to current beta

Implements Foresight, Miracle Eye, and Odor Sleuth

* Add placeholder i18n strings

* Minor tsdoc updates

* Fix placement of evasion level modifier, add tests

* Add first batch of translations

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Second batch of translations

Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Add Catalan and Japanese translation placeholder strings

* Fix issue caused by merge

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
2024-08-07 10:59:28 -04:00
NightKev 0ef329e8eb
[Test] Add helper function to modify the turn order for tests (#3374)
* Add helper function to modify the turn order for tests

* Replace manual speed modification with new helper function

* Replace `vi.spyOn()` instances with helper function
2024-08-07 13:52:20 +01:00
innerthunder a4c913d963
[Move] Implement (or re-implement?) Lucky Chant (#3352)
* Implement Lucky Chant

* Add i18n keys for NoCritTag messages

* Add Lucky Chant message translations (DE, FR, KO, PT-BR)

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Add ZH translations

Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>

* Add keys for JA locale

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>
2024-08-07 02:31:54 -04:00
Alex Van Liew f555dd6dc8
[Bug] Fix a couple small issues with uturn and friends (#3321)
* prevent double-application of status contact abilities and switch out abilities

* use SwitchPhase for ForceSwitchOutAbAttr instead of switchOut()

* add tests for baton pass/uturn

* PR comments

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

* add test for forced switch after mutual KO + revive

* tweak condition to fix uturn/baton pass

* improve docs

* style/typo nits from CR

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

* CR feedback

* use doSelectPartyPokemon + rename

* int -> number

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

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
2024-08-07 02:29:51 -04:00
Adrian T. 9875fcc59d
[Ability] Partially implement Gulp Missile (#3327)
* implement gulp missile

* add tests

* change fly to dive

* show ability when reverting to normal form

* update ai score, tests

* update score condition

* adjust conditions, damage

* add underwater test

* update damage in test

* partial commit
2024-08-06 16:18:47 -04:00
NightKev 877d0c6db8
[Test] Stylistic consistency pass on tests (#3378)
* Modify tests to use overrides helper functions

* Apply stylistic consistency to overrides in tests

Also remove some non-test-related expects()
2024-08-06 10:06:25 -04:00
NightKev 0a77dcdb4f
[Bug] Sand Spit should only activate when hit with a damaging move (#3337)
* Sand Spit should only activate when hit with a damaging move

* Add tests for Sand Spit
2024-08-05 11:51:36 -04:00
NightKev 68d3d27d47
[Test] Fix Power Spot test so Stonjourner always moves second (#3357) 2024-08-05 09:47:54 -04:00