Commit Graph

95 Commits

Author SHA1 Message Date
sparksblade
c528075dc7
Fix abilitysearch for special char separators (#8872) 2022-08-24 20:49:09 -07:00
Kris Johnson
4a5f362542 Fix oversights from National Dex refactor 2022-08-24 18:10:16 -06:00
Kris Johnson
6a616b3eff
Properly tier National Dex (#8873) 2022-08-24 19:41:06 -04:00
Kalest3
ee19da0954
Fix excluded params in /ms (#7935) 2022-07-20 21:23:16 -07:00
glacialcascade
5cfc4edd7a
Dexsearch: Fix !pivot, !recovery, !zrecovery, and !priority (#8805)
* Add/modify error messages in dexsearch, movesearch

* further tweaks

* fix lint errors relating to long lines

* fix /nds !pivot, etc, showing "No Pokemon found"
2022-07-20 19:05:51 -07:00
glacialcascade
dd56aebd96
Datasearch: Improve error messages (#8803) 2022-06-06 16:26:16 -07:00
Alexander B
1bd151d2b7
/movesearch: Allow >= and <= (#8716) 2022-04-30 18:42:11 -07:00
Kris Johnson
f5983d20a5 Datasearch: Fix searching for fully evolved Pokemon 2022-02-01 18:28:18 -07:00
pyuk-bot
32892af464
Fix National Dex Eviolite checks (#8650) 2022-02-01 13:51:04 -05:00
Kris Johnson
070d1a6ddb
BW PU/ZU: Add proper tiering (#8621) 2022-01-11 10:43:02 -05:00
Kris Johnson
4fb21c9289 Fix bugs with BDSP CAP 2021-12-02 00:06:36 -07:00
pyuk-bot
5f60e3d247
Use the room's default dex for /ds and /ms (#8543) 2021-11-25 23:20:32 -08:00
Kris Johnson
ff4b7bed31
Add BDSP data and formats (#8530) 2021-11-18 18:00:10 -06:00
PartMan
94ab2a8ef6
Datasearch: Refactor maxgen (#8462) 2021-10-23 23:29:18 -07:00
pacmanboss256
23b35498f6
Rename the "mystery" and "authentic" move flags (#8445)
* mystery -> allyanim
* authentic -> bypasssub
2021-08-30 23:07:50 -07:00
Mia
953da16164 Dexsearch: Remove dependence on the Chat global 2021-08-14 20:06:48 -05:00
Karthik
8b911cbf12
Remove LC Uber as a valid tier in /ds help text (#8399) 2021-07-15 08:15:03 -07:00
PartMan
dfb246d40f
Datasearch: Minor refactor (#8390)
This fixes/changes a couple things:

a) Long dexsearch queries now reject with an error instead of blindly trimming and giving stuff like ``retur could not be found in any of the search categories``.
b) Maxgen now works properly (before this, the maxgen parameter only worked if it was either the first term or if there were no spaces after the preceding comma).
c) Mod now allows spaces around the equals sign (`mod = SSB`) instead of matching properly and failing on the split.
d) Gen0 no longer works in abilitysearch / itemsearch (not that relevant, but since current behaviour is to block Gen 1/2, seems a bit weird to allow 0).
e) Gen X and Maxgen X now work in abilitysearch / itemsearch (before this, they'd give a blank 'no results found').
f) Gen X and Maxgen X now support multi-digit generations (well in advance before Gen 10 releases, but doesn't hurt to be ready).
2021-07-10 04:19:03 -07:00
Kris Johnson
598ac409e8 Rename Let's Go! mod to 'gen7letsgo' 2021-07-06 23:07:51 -06:00
PartMan
46a858f2be
Movesearch: Add defrost and reflectable aliases (#8359)
Added Magic Coat/Magic Bounce since those are intuitive terms to use while searching
2021-06-08 11:45:16 -04:00
fart
839075a166
Allow alternative parameters for dexsearches (#7847) 2021-05-30 16:13:39 -07:00
Distrib
0596c9ba6e
Datasearch: Increase in the number of pokemon generated in /randpoke (#8317) 2021-05-26 12:38:20 -07:00
Guangcong Luo
58c85ee125 Fix crash with min source gen in /learn 2021-05-17 04:30:00 -07:00
Guangcong Luo
9abbe47531
Support setting a default format/mod for commands in rooms (#8237) 2021-04-27 15:38:51 -07:00
Guangcong Luo
810aff74cd Namespace more server global types 2021-04-25 14:16:27 -07:00
Guangcong Luo
486f292904
Refactor everything to use Utils.sortBy (#8220)
A few uses of `array.sort()` have been left alone:

- sorting in `data/` because they aren't supposed to import anything

- `set-importer` because I still have no clue what that's for and what
  dependencies it is/isn't allowed to have

- `sort()` with no arguments used as a lexical sort (at which point
  `sortBy` offers no benefits)

All other cases have been replaced with `Utils.sortBy`, which should
be a massive increase in readability.

Sort orders should be much more readable now, without needing to puzzle
through sign issues. The order is always low-to-high, A-to-Z,
true-to-false.
2021-04-23 22:41:00 -07:00
Kris Johnson
e9e58c9f99 Dexsearch: Fix bug with mod parameters 2021-04-15 16:44:44 -06:00
Guangcong Luo
5233559183 Refactor Dex types 2021-04-08 07:08:56 -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
Distrib
0bd9f47324
Datasearch: Improve dexsearchhelp & movesearchhelp (#8066) 2021-03-21 18:42:04 -07:00
Kris Johnson
987c8d95d4 Datasearch: Fix crash 2021-03-03 12:44:30 -07:00
pyuk-bot
e3d13f821d
Dexsearch: use optional chaining in getMod() (#8091) 2021-03-01 12:09:57 -07:00
Mia
5d5b831275 Datasearch: Fix crash in PM 2021-03-01 12:46:13 -06:00
Kris Johnson
50fef2bc68 Fix crash in /ds 2021-03-01 10:32:08 -07:00
Kris Johnson
aeecf8d24c
Dexsearch: Add support for searching by mods (#8064) 2021-02-28 14:37:00 -08:00
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -08:00
Guangcong Luo
f4abf52f61 Fix QueryProcessManager type signatures 2021-01-30 11:35:35 -08:00
Adam Tran
14744879c8
Fix excluding variables in /ms (#7859) 2021-01-18 11:42:58 -06:00
The Immortal
3ae56399bd Label Pokemon banned from LC as NFE 2021-01-11 00:29:18 +04:00
Guangcong Luo
6b3a3070c9 Refactor team validator for readability
`checkLearnset` has been renamed `checkCanLearn`.

`reconcileLearnset` has been replaced with `validateMoves`, which
bundles the actual `checkCanLearn` calls with the old
`reconcileLearnset`, making for a better name.
2021-01-03 23:26:20 -08:00
PartMan
6597ef0f15
Add multi-hit as a parameter to /ms (#7855)
* Add multi-hit as a parameter to /ms

* Revert /help ds, add multihit to /help ms, fix TS

Code linted, let's go
'Tis coding at midnight
Save what had been tossed...
Bring back the older line...
The older line.

* ;-;

  1465 passing (25s)
  53 pending


> pokemon-showdown@0.11.4 posttest /home/partman/Documents/Code/pokemon-showdown
> npm run tsc


> pokemon-showdown@0.11.4 tsc /home/partman/Documents/Code/pokemon-showdown
> tsc


No idea why this wasn't caught.

* Fingers crossed
2021-01-03 11:42:27 -08:00
Guangcong Luo
ad656f67e4 Keep track of why moves can't be learned
The validator will now always know and be able to report exactly why
a move can't be learned, instead of sometimes not being able to figure
it out.
2021-01-03 09:53:04 -08:00
Instruct
e56d470671
Dexsearch: Add Strength Sap & Jungle Healing to list of recovery moves (#7851) 2020-12-30 02:29:59 +04:00
Adam Tran
6702decd95
Add Pivot moves as a /ms category (#7822)
* draft test

* Move search for pivot moves
2020-12-26 21:57:03 -08:00
MacChaeger
c86c5966d9
/dexsearch: Fix immunity check for Thousand Arrows (#7727)
Unlike /effectiveness and /coverage, /dexsearch doesn't need to support
arbitrary mods, so Thousand Arrows can be hard-coded as the only move to
ignore any immunities.
2020-11-24 10:12:53 -08:00
MacChaeger
2b4de5d9d5
Fix type immunity check in /ds weak and resists and disallow status moves (#7717) 2020-11-22 00:48:40 -08:00
MacChaeger
5d71b3a28f
Dexsearch: Support resists move and weak move (#7713) 2020-11-20 00:50:09 -08:00
Mia
db7cd135bd
Datasearch: Disallow 'all' search broadcasting in battles (#7686) 2020-11-11 14:37:53 -08:00
Guangcong Luo
9b5217ab70
Split up dex-data into more files (#7634)
* Split up dex-data over individual files

This commit introduces:
- `dex-abilities.ts`
- `dex-conditions.ts`
- `dex-formats.ts`
- `dex-items.ts`
- `dex-moves.ts`
- `dex-species.ts`

These files centralize definitions from `dex-data` and `global-types`.

* Inherit ItemData from Item etc

Previously, Condition inherited from ConditionData. Now, ConditionData
inherits from Condition. The advantage of the new approach is that now,
Condition and DataCondition no longer need to be separate types, and
there should be much less duplication of type definitions in general.

This has also been done for

- ItemData/Item/DataItem
- AbilityData/Ability/DataAbility
- FormatData/Format/DataFormat

Species and DataSpecies was already merged, but this also reverses
their inheritance (saving a lot of duplicated definitions in the
process!)

The only one left is MoveData, which is just super complicated and
will need its own commit.
2020-11-05 05:00:13 -08:00
PartMan
a4a3e385e8
Fix G-Max moves not showing up in movesearch (#7555)
Happened because G-Max moves had move.isNonstandard as 'Gigantamax'.
2020-10-28 13:02:37 -07:00