Commit Graph

57 Commits

Author SHA1 Message Date
skymin3
da9a5c4d8d Update aliases (#11120)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-29 22:44:57 -07:00
Guangcong Luo
f616e48196 Validate mod capitalization 2025-05-26 16:30:06 -07:00
Guangcong Luo
e07080ce5c Support fuzzy searching /dt etc (#11124)
This add's the teambuilder's fuzzy matching to /dt and similar commands.
2025-05-23 00:26:23 -07:00
Guangcong Luo
803be601e6 Improve CompoundWordNames validation
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-05-19 11:16:50 -07:00
Guangcong Luo
a87a05fc7f Update CompoundWordNames for gen 7-9
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-05-18 17:50:46 -07:00
Guangcong Luo
f54a9ed5e1 Make sure data files never import
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-05-18 15:19:34 -07:00
Guangcong Luo
99c69509ad Port CompoundWordNames into data/aliases (#11121)
This is what lets you type "ww" or "wind" to find "whirlwind" in the
teambuilder (and PSdex) search.

These were previously in the client build scripts, where I think most
people didn't realize how to find or update them.
2025-05-18 13:39:06 -07:00
Guangcong Luo
7f51282b16 Fix build error
Ugh, this is incredibly annoying, I tested before pushing but committed
this into the wrong branch.
2025-05-18 13:18:42 -07:00
Guangcong Luo
ef9e1d23e2 Validate aliases in unit tests 2025-05-18 12:34:28 -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
920a0e0773 Fix Rockruff-Dusk's Pokédex entry (#10871) 2025-02-09 20:17:52 -06:00
urkerab
1f56611716 Test cosmetic formes (#10579)
* Add tests for cosmetic formes

* Fix aliases of Pokestar F to use its actual name

* Revert "BH: Fix weird validation edge case"

This reverts commit e71619135a.

* Remove invalid tiers of cosmetic formes of Pokestar Giant
2024-09-28 11:38:56 -06:00
urkerab
dbd0ccba19 Use base forme names in banlists where possible (#10515)
* Use base forme names in banlists where possible

This allows you use e.g. 'Arceus-Normal' instead of 'Arceus-Base'.

Also includes some aliases so that all known base forme names actually work.

* Update formats.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2024-09-01 14:43:07 -06:00
Mia
ada9f31ef3 Revert "Use base forme names in banlists where possible (#10496)"
This reverts commit 8438ec1890.
2024-08-26 23:15:59 -05:00
urkerab
8438ec1890 Use base forme names in banlists where possible (#10496)
* Use base forme names in banlists where possible

This allows you use e.g. 'Arceus-Normal' instead of 'Arceus-Base'.

Also includes some aliases so that all known base forme names actually work.

* Update formats.ts

* Update config/formats.ts

* Update config/formats.ts

* Update config/formats.ts

* Apply suggestions from code review

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2024-08-26 19:20:28 -06:00
Kris Johnson
10b041561d Fix build 2024-01-11 10:17:44 -07:00
Kris Johnson
a0f10ffa51 Add DLC2 data (#9963)
* DLC2 returning Pokemon

* Returning legendaries too

* Partially add Raging Bolt and Iron Crown (#10)

* Add remaining Pre-DLC2 event data

* Fix tests

* Last event before DLC + split learnset files

* Learnsets + secret returning pokemon

* Some DLC 2 stuff (#12)

* Add New Mons

* Add Electro Shot

* Give Dipplin Dex Evo

* Update data/moves.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* More tweaks

* formats

* Revealed moves (#11)

* Add Hard Press

* Add Psychic Noise

* Add Upper Hand

* Apply suggestions from code review

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* more things

* Fix typo

* a lot of other things

* MOVES! kinda

* b

* fickle beam confirmed chance

* Evo Item Undexit + Metal Alloy + Move Fixes (#19)

* Update move data

* Update Item Data

* Apply suggestions from code review

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* Add message for Fickle Beam BP double (#18)

* Add some tests and implement Tera Shell (#15)

* add some tests and draft of tera shell

* add text

* .

* add improvements from feedback, change behavior of terashell

* use AfterMove instead of AfterMoveSecondary

* add confirmation to multi-hit interaction

* improve based on feedback and general cleanup

* Apply suggestions from code review

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* Add Tera Shift and Teraform Zero (#16)

* Add Tera Shift and Teraform Zero

* Add short descriptions

* fixes

* More move changes

* Update unSketchable moves

List from Anubis

* more move things

* oops

* Implement new Neutralizing Gas/Paradox ability interaction (#17)

* Implement new Neutralizing Gas/Paradox ability interaction

* add test

* revert in dlc

* ok

* Update pastgens for Sketch (#20)

* Implement Stellar type (#13)

* Implement Stellar type

* stuff from research

* pain

* add tests for Dragon Cheer (#22)

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* Update move flags (#23)

* Fix flags for new moves

* update old moves

* remove sparkling aria changes

* update metronome description

* update other move descriptions

* more formatz stuff

* Add Poison Puppeteer (#24)

* Add Poison Puppeteer

* i'm bad

* still bad

* Fix build

* oops

* Update data/moves.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/moves.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/items.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/moves.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Fix Terapagos dex entries (#25)

* Update data/pokedex.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/pokedex.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/pokedex.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* FIX BUILD

* Fix Regulation E formats (#26)

* Fix Regulation E formats

* add move bans

* nevermind

* Add Regulation F formats (#27)

* Fix interaction between Adaptability and Tera Stellar (#28)

* reg f bo3 ladder

* Update config/formats.ts

Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>

---------

Co-authored-by: Smudge <smudgerox@users.noreply.github.com>
Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>
Co-authored-by: Karthik <32044378+Karthik99999@users.noreply.github.com>
Co-authored-by: tofa <79044321+im-tofa@users.noreply.github.com>
Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>
2023-12-15 21:35:01 -07:00
Kris Johnson
6bb3879e3a Add Teal Mask DLC data (#9762)
Co-authored-by: Karthik99999 <bandagondak0217@gmail.com>
Co-authored-by: smudgerox <smudgerox@users.noreply.github.com>
Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>
Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>
Co-authored-by: Karthik <32044378+Karthik99999@users.noreply.github.com>
2023-09-13 21:08:01 -04:00
Kris Johnson
c7a0444bb4 Fix build 2023-07-01 11:14:58 -06:00
Kris Johnson
f6e1cfe19e Refactor Ash-Greninja (#9606) 2023-06-18 22:51:02 -05:00
Kris Johnson
b04b3d7eb0 Add Pokemon HOME 3.0.0 changes (#9573)
* Add Pokemon HOME 3.0.0 changes

* oop

* a

* OWOWOWOWOWWO
2023-05-30 09:08:02 -06:00
Kris Johnson
d0fffd5005 Release Chesnaught line 2023-05-11 19:25:06 -06:00
Kris Johnson
f19b877059 Release Inteleon line 2023-04-27 20:07:13 -06:00
Kris Johnson
798f9ca828 Release Typhlosion line 2023-04-13 19:01:26 -06:00
Kris Johnson
3c7cba2440 Release Samurott line 2023-03-30 19:55:21 -06:00
Kris Johnson
fd957c775c Fix build 2023-03-16 21:11:41 -06:00
Kris Johnson
5a24d69867 Add new Pokemon (#9420) 2023-02-27 16:53:57 -05:00
Kris Johnson
6f0d563ee6 Fix build 2023-01-26 20:11:43 -07:00
Kris Johnson
2c792f7012 Fix build 2022-12-29 18:20:44 -07:00
Kris Johnson
4e11584566 Fix Gen 9 species count 2022-12-01 21:28:11 -07:00
Annika
931b83a2b9 Dex: Add tests to verify the number of Pokémon 2022-11-23 12:40:32 -08:00
Kris Johnson
d50c8c249b Add Gen 9 (#8997) 2022-11-17 20:46:29 -05:00
Kris Johnson
ff4b7bed31 Add BDSP data and formats (#8530) 2021-11-18 18:00:10 -06:00
Guangcong Luo
a68ae48979 Improve tests for event data entries 2021-09-07 11:33:34 -07:00
Annika
c134195915 Use ts-node instead of Sucrase (#8369) 2021-07-09 19:59:22 -07:00
Kris Johnson
598ac409e8 Rename Let's Go! mod to 'gen7letsgo' 2021-07-06 23:07:51 -06:00
Annika
1c3f6402f0 Tests: Use assert.equal and assert.notEqual more (#8276) 2021-05-07 23:51:18 -07:00
Guangcong Luo
55980d416c Support value rules (#8267)
`teamLength`, `maxLevel`, `cupLevelLimit`, and `minSourceGen` no longer
exist as properties of `Format`. Instead, they're value rules that
become properties of `RuleTable`, and can be specified as custom rules
and inherited through rulesets like anything else.

See the PR for a full reckoning of changes:

https://github.com/smogon/pokemon-showdown/pull/8267
2021-05-06 01:16:16 -07:00
Guangcong Luo
5cf59da9f0 Add unit test for having valid formats 2021-04-09 18:04:40 -07:00
Guangcong Luo
13189fdb02 Update Dex API (#8181)
This is the change that renames:

- `Dex.getMove` -> `Dex.moves.get`
- `Dex.getAbility` -> `Dex.abilities.get`
- `Dex.getItem` -> `Dex.items.get`
- `Dex.getSpecies` -> `Dex.species.get`
- `Dex.getEffect` -> `Dex.conditions.get`
- `Dex.getNature` -> `Dex.natures.get`
- `Dex.getType` -> `Dex.types.get`
- `Dex.getFormat` -> `Dex.formats.get`

In addition, some other APIs have been updated:

- `getByID` methods have also been added to every other table.
- `Dex.moves.all()` now gets an array of all moves
  - Plus equivalent methods for `abilities`, `items`, `species`, `formats`, `natures`, `types`
  - Note: there's no `Dex.conditions.all()`
- new API: `Dex.stats` for naming/iterating stats
- `Dex.getEffectByID` -> `Dex.conditions.getByID`
- `Dex.getType` -> `Dex.types.get`
- `Dex.data.Formats` -> `Dex.data.Rulesets`
- `Dex.formats` -> now an array `Dex.formats.all()`
- `Dex.getRuleTable` -> `Dex.formats.getRuleTable`
- `Dex.validateFormat` -> `Dex.formats.validate`

Team functions have been split off into a new `sim/teams` package:

- `Dex.packTeam` -> `Teams.pack`
- `Dex.fastUnpackTeam` -> `Teams.unpack`
- `Dex.generateTeam` -> `Teams.generate`
- `Dex.stringifyTeam` -> `Teams.export`

`Teams.export` has also been rewritten to better match how it works in client.

This implements #8178
2021-04-08 03:00:37 -07:00
Guangcong Luo
e90658c038 Validate Natures in tests
(There's no need to validate natures somewhere that has an actual
performance impact.)
2020-10-29 16:19:07 +00: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
Guangcong Luo
67a4e9f185 Add validator for Pokestar event moves
See #7412
2020-10-13 18:01:32 -07:00
Kris Johnson
510ab4ecb3 Fix typo 2020-10-13 16:55:31 -06:00
Guangcong Luo
7fc498ff88 Add validator for evoItem
See also #7412
2020-10-13 04:40:38 -07:00
The Immortal
ca3a106815 Learnsets: Sort V before S 2020-10-01 04:26:23 +04:00
Guangcong Luo
2f805c93a2 Remove "Battle" prefix from data exports (#7039)
`BattlePokedex` is now `Pokedex`, `BattleItems` is now `Items`, etc.

I also renamed `Movedex` to `Moves` and `Statuses` to `Conditions`.

`TypeChart` isn't `Types` yet, because unlike the others, it's not
indexed by ID. That should probably be fixed one day.
2020-07-24 12:42:26 -07:00
Kris Johnson
00b88b521d Handle Gigantamaxing properly (#7001) 2020-07-23 13:27:42 -07:00
Kris Johnson
e20178d69d Isle of Armor: Pokemon (#6839) 2020-06-17 23:37:14 +04:00
Kris Johnson
73a84a43ec Fix remaining learnsets inconsistencies (#6795) 2020-06-02 21:31:48 -07:00