Commit Graph

53 Commits

Author SHA1 Message Date
ShivaD173
13578bce64 Add test for an Eject Pack interaction (#10704) 2025-05-28 17:22:01 -07:00
André Bastos Dias
0f663cd46f Refactor White Herb activation (#11133) 2025-05-25 12:57:58 -07:00
André Bastos Dias
3db46c58eb Implement White Herb and Eject Pack like Mirror Herb (#10890)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-05-15 11:39:46 -07:00
Guangcong Luo
78439b4a02 Update to ESLint 9 (#10926)
ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.

- First, we no longer have separate eslint-no-types configs. Lint
  performance shouldn't be enough of a problem to justify the
  relevant maintenance complexity.

- Second, our base config should work out-of-the-box now. `npx eslint`
  will work as expected, without any CLI flags. You should still use
  `npm run lint` which adds the `--cached` flag for performance.

- Third, whatever updates I did fixed style linting, which apparently
  has been bugged for quite some time, considering all the obvious
  mixed-tabs-and-spaces issues I found in the upgrade.

Also here are some changes to our style rules. In particular:

- Curly brackets (for objects etc) now have spaces inside them. Sorry
  for the huge change. ESLint doesn't support our old style, and most
  projects use Prettier style, so we might as well match them in this way.
  See https://github.com/eslint-stylistic/eslint-stylistic/issues/415

- String + number concatenation is no longer allowed. We now
  consistently use template strings for this.
2025-02-25 20:03:46 -08:00
André Bastos Dias
9fc5e0ff45 Explicitly make Terastallization tests Gen 9 (#10907)
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2025-02-18 20:57:43 -06:00
André Bastos Dias
310865a6f7 Unskip tests (#10888) 2025-02-12 13:41:42 -07:00
pyuk-bot
bafd84ff10 Don't let leftover handlers from consumed items call eatItem/useItem (#10853)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2025-01-31 14:46:42 -06:00
pyuk-bot
7bb2fd1869 Overhaul 'SwitchIn' event for more accurate effect resolution order (#10766) 2025-01-28 16:51:17 -06:00
bilalafzalshafi
011ff74462 Fix Metronome (item) with calling moves (#10361) 2024-06-21 22:09:47 -05:00
pyuk-bot
a8c4f4dcf6 Fix when Ogerpon's ability should change on Tera (#9863) 2023-11-15 19:57:18 -06:00
pyuk-bot
5624137e43 Make Booster Energy wait for hazards (#9844) 2023-10-17 21:36:45 -05:00
Alexander B
1cb555fba9 Fix Ability Shield interaction with Transform (#9733) 2023-08-27 22:40:26 -05:00
pyuk-bot
139deab2e5 Fix Ability Shield Levitate vs. Mold Breaker (#9353) 2023-01-24 23:23:09 -06:00
Leonard Craft III
5259fdd40f Tests: Reduce dependence on RNG (#9297) 2023-01-14 19:08:44 -06:00
Karthik
d1a10c589d Fix Room Service boost source (#9250) 2022-12-29 21:39:08 -06:00
tofa
f57d0fbcd9 Unskip passing Ability Shield tests (#9089) 2022-11-29 20:54:08 -06:00
tofa
34b9298614 Ability Shield: Add tests based on SV research thread (#9075) 2022-11-29 13:27:02 -05:00
tofa
76b2a0017a Punching Glove: Add basic unit tests (#9039) 2022-11-24 13:35:36 -06:00
Alexander B
667c3fa072 Unit Tests: Transition to Gen 9 (#9009)
* Fix Tera STAB test

* Remove old comments
2022-11-18 21:34:40 -08:00
Annika
3eda79ccb2 Remove unnecessary RNG roll for targeting
This should make singles battles faster and more accurate
2022-11-04 17:03:16 -07:00
Leonard Craft III
ff4e51f728 Correct Room Service event timing (#8959) 2022-10-30 17:42:03 -05:00
Leonard Craft III
1de7cddb44 Add various mechanics tests (#8915) 2022-10-05 21:59:34 -05:00
Alexander B
0fc554466a Fix Choice lock after Dynamax ends (#8741) 2022-04-28 14:16:35 -05:00
pyuk-bot
0f3d37ab87 Don't activate Jaboca/Rowap Berries vs Magic Guard (#8670) 2022-02-17 17:49:19 -06:00
pyuk-bot
32892af464 Fix National Dex Eviolite checks (#8650) 2022-02-01 13:51:04 -05:00
Leonard Craft III
ba07a7c75d Add various mechanics tests (#8494) 2021-11-05 13:28:45 -05:00
Jacob McLemore
65ca586d81 Fix Metronome (Item) and two-turn moves interaction (#8430) 2021-08-10 10:59:17 -04:00
Marty-D
b830ceb818 Gen II, III: Implement Quick Claw properly 2021-06-07 12:26:50 -04:00
Leonard Craft III
899bdaae02 Tests: Unskip passing Shell Bell test 2021-05-21 20:32:55 -05:00
Leonard Craft III
606576f453 Add various mechanics tests (#8313)
* Standardize Photon Geyser tests
* Add Gulp Missile tests
* Add Berserk Dragon Darts test
* Add Ring Target tests
* Add and improve Metronome tests
* Add Sparkling Aria tests
* Add additional Fling tests
* Standardize Mummy tests
* Add Rollout submove targeting test
* Improve Flower Veil tests
* Add Acupressure tests
* Improve Sky Drop tests
* Add Future Sight tests
* Improve Wandering Spirit tests
* Improve Rapid Spin tests
* Add Rocky Helmet victory test
* Improve Focus Punch tests
* Add a skipped Stomping Tantrum test
2021-05-20 08:43:08 -04:00
Daniel Wan
b58cfbae5d Fix interaction of Destiny Bond and Red Card (#8219) 2021-05-01 14:02:34 -04:00
pacmanboss256
9de563f839 Fix Adrenaline Orb's interaction with max stat stages (#8154) 2021-05-01 14:01:32 -04:00
pyuk-bot
3639079d1f Protective Pads should not apply to Gulp Missile (#8207)
Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>
2021-04-19 12:39:33 -04:00
urkerab
cdcdf2da1b Shell Bell should heal from all damage 2021-01-05 17:29:35 +00:00
Leonard Craft III
bed1f4ac99 Add various mechanics tests (#7857)
* Improve Volcalith tests readability

* Add G-Max Volcalith recoil damage order test

* Add 1 HP priority tests

* Add charge move targeting test

* Correct assertions of Ripen / Sturdy

* Skip failing tests

* Add Volcalith Black Sludge test

* Add Pressure Max / Z-move tests

* Add Pressure submove test

* Add NGas speed test

* Skip NGas speed test

* Add White Herb double Intimidate test

* Remove debug log

* Remove duplicate Pressure test

* Improve White Herb Intimidate test title

* Add Rollout Storage tests

* Add spread move Rollout storage test

* Add Magician Weakness Policy test

* Add Sleep tests

* Add Shell Bell spread move test

* Add Synchronize Lum Berry test

* oh yeah it doesn't work

* Remove duplicate test

* Add Sunsteel Strike tests

* Add Leech Seed ally switch test

* Add Primal weather Natural Gift test

* Add Emergency Exit hazards test

* Add generic hazards tests

* Add and standardize Arceus tests

* Add Transform ability test

* Add and standardize Parting Shot tests

* Add Memento tests

* Add Me First test

* Add Cursed Body Z-move test

* Add Assurance targeting test

* Clarify Assurance test description

* Add double faint switch test

* Add Receiver KO boost ability

* Add double Unnerve test

* Add Dynamax Eject Pack test

* Improve Dynamax forced switchout test

* Add Protective Pads Perish Body test

* Add Sticky Web Pressure test

* Add Speed modifier lower bound test

* Add Cloud Nine Hydration test

* Correct Cursed Body test

* Add Grassy Terrain Leftovers test

* Remove leftover debug

* Add additional Receiver and Soul-Heart tests

* Add Spite tests

* mish

* Add Shell Bell multihit test

* Add WP Dragon Tail test

Co-authored-by: The Immortal <the_immortal123@live.com>
2021-01-04 23:47:10 -08:00
The Immortal
d8a90a94f9 Protective Pads should negate Perish Body
Thanks @DaWoblefet!
2021-01-03 16:35:55 +04:00
Leonard Craft III
b9363ef707 Tests: unskip oldgen Fury Cutter, improve readability 2020-12-22 23:21:31 -06:00
MacChaeger
58ee2f2130 Activate Jaboca and Rowap Berry on KO (#7779) 2020-12-08 15:15:41 -05:00
The Immortal
6b1b318977 Fix Metronome interaction with two-turn moves 2020-11-20 13:14:00 +04:00
Marty-D
d28ddeca4e Descriptions: Replace "major" with "non-volatile" 2020-11-17 14:49:19 -05:00
Leonard Craft III
1081a4423f Add various mechanics tests (#7506) 2020-10-16 21:07:05 -07:00
Guangcong Luo
a65faf263f Stop using assert.strict.strictEqual (#7515)
It turns out that when I switched us from `assert` to `assert.strict`,
I didn't actually update any existing tests or tell anyone:

0df0d234f2

So apparently everyone else just kept on using `strictEqual`.

This will be a PR and also throw an error if people continue trying to
use it, which should make it much clearer what PS policy is on this.

A lot of the problem may be that TypeScript marks assert.strict.equal
as deprecated when it's not. This was fixed 4 days ago:

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48452

But this probably hasn't made it to a thing yet. Until then, you'll
have to deal with TS marking your tests as deprecated, but it shouldn't
be too long.

Accidentally using `assert` instead of `assert.strict` should now show
an error. This protects against the probably much worse mistake of
accidentally using `assert.equal` rather than `assert.strict.equal`.

`assert.ok` is also deprecated now.
2020-10-14 01:19:03 -07:00
Leonard Craft III
c249a8f0be Add various mechanics tests (#6714) 2020-05-18 12:19:18 -07:00
Guangcong Luo
f6f4467265 Turn on prefer-const for .js files
Not having prefer-const on the JS side makes JS -> TS refactors really
unreadable. This commit just auto-fixes it so we're using
`prefer-const` everywhere.
2020-04-23 11:37:47 -07:00
Leonard Craft III
5e320c337c Add additional Eject Pack tests (#6453) 2020-03-17 20:38:19 -07:00
The Immortal
563323f4c1 Fix Lum Berry activation 2020-02-22 05:39:37 +04:00
Alexander B
88fa845350 Add Gen 8 unit tests
Closes #5952

(Bugs in PR fixed by Zarel)
2020-02-21 00:46:28 -08:00
The Immortal
bf2665ca1d Add tests for Lum Berry 2020-02-21 05:27:35 +04:00
Guangcong Luo
229f5f809d Use assert in strict mode
This makes it so we can use `assert.equal` instead of
`assert.strictEqual`, which I think is more readable.
2020-02-20 00:39:31 -08:00
The Immortal
1b20253547 Add Rocky Helmet test 2020-02-15 15:37:19 +04:00