Commit Graph

70 Commits

Author SHA1 Message Date
Kirk Scheibelhut
36b5b48d79 Add Gen 8 support for RandomPlayerAI and sim tools
- add support to the RandomPlayerAI for Dynamaxing
 - add support to ExhaustiveRunner for Gigantamax Pokemon
 - simplify range logic in RandomPlayerAPI
 - handle crash from toID (needed by data/scripts.js) and Config
	(needed if a Battle takes long enough to potentially allow for
	requesting ties) globals not being defined
 - mark Gen 8 formats as runnable by the runners
2020-03-08 20:56:59 -07:00
Guangcong Luo
647ba61a46 Turn on prefer-regex-exec in eslint 2020-03-07 13:39:02 -08:00
Guangcong Luo
125fe31d06 Improve eslintrc
Fixed some more code style, allowing these rules to be enabled:

- `comma-dangle`
- `function-paren-newline`
- `member-delimiter-style`
- `no-eval`
- `no-fallthrough`
- `no-misused-promises`
- `no-unused-vars`
- `operator-linebreak`
2020-03-06 22:35:55 -08:00
Guangcong Luo
2f0e83c14b Categorize eslintrc rules
eslintrc rules are now sorted into categories, in theory making them
easier to maintain.
2020-03-06 22:35:45 -08:00
Guangcong Luo
b21c9047e2
Migrate to typescript-eslint (#6342) 2020-03-05 08:33:06 -08:00
Kirk Scheibelhut
f3b666cc8c Use latestDate to simplify tools/set-import
The STATISTICS map was out of date anyway, this moves maintaining it
to the smogon package (which now has logic for updating it in an
automated way).
2020-03-02 17:47:39 -08:00
Kirk Scheibelhut
738fdc9c46 Update deps to get newest smogon for set-import 2020-03-02 16:31:59 -08:00
Kirk Scheibelhut
fdf5679a24 Update set-import stats to use latest stats logic
smogon@0.2.0 now supports the qualified naming transition period
at the end of Gen 6.
2020-02-27 17:00:40 -08:00
Kirk Scheibelhut
df8a7df29e Fix tools/set-import/stats and update for Gen 8 2020-02-26 10:16:42 -08:00
Kirk Scheibelhut
7bf4c01440 Zero sub-versions in set-import on version bump 2020-02-25 14:59:58 -08:00
Kirk Scheibelhut
37a331a4cb Get tools/set-import to work again
- a scripts.js init() method now calls toID
- Smogon updated the format of moveslots
2020-02-25 14:49:38 -08:00
Spandan Punwatkar
b6b66de896 Update Repo Links (#6102) 2019-11-28 12:47:38 +04:00
Kirk Scheibelhut
71bc4d5c05 Update tools/set-import for Gen 8 2019-11-25 15:32:12 -08:00
Kirk Scheibelhut
bfc0b0d75d Fix typos in set-import docs 2019-09-20 12:55:17 -07:00
Kirk Scheibelhut
c8b7f515fd Add an explicit LICENSE file to sets package 2019-09-20 12:37:42 -07:00
Kirk Scheibelhut
19d768e00e Fix mistakes from #5749
- and error 'ls' found its way into the source
- the sets/{README.md,index.d.ts} were excluded which also meant
  the sets/ directory didn't exist, causing errors
- the command is `npm publish --access public` not `publish`
2019-09-10 21:16:49 -07:00
Kirk Scheibelhut
b9e5fcb387
Introduce set importer logic (#5749)
`node tools/set-import [version]` can be run to create a
`@pokemon-showdown/sets` package containing sets from Smogon, usage
stats and third party sources. Some notes:

- The build is set up so that `tools/set-import/importer.ts` is
  compiled to `tools/set-import/importer.js` - creating a
  `.tools-dist/set-import` directory for the sole artifact was
  deemed to be overkill
- The sets package is generated such that it can be used easily on
  Node or in a browser (where the large set JSON can be loaded
  asynchronously)
- Supported tiers/formats are mostly arbitrary - those popular
  enough to have a signficant playerbase or analyses on Smogon have
  been included, but additional formats can be added based on demand
- Some set information is redundant for ease of use by downstream
  users: certain formes are split out and information that could
  theoretically be inferred like level/ability/HP IVs are included
  to simplify parsing logic and make the sets more immediately
  available. This results in what should mostly be negligible
  size overhead.
- In a similar vein, display versions of effect names instead of IDs
  are used (name -> ID is trivial, ID -> name requires data lookup)
- All sets pass validation, provided certain simple transformations
  are applied (eg. reverting `battleOnly` formes like Megas)

This tool has primarily been tested to run on Linux - running on
other platforms is not guaranteed to result in error-free output.
2019-09-10 21:15:05 -04:00
Guangcong Luo
7436c1f0f2 Remove import = and export =
`import =` and `export =` are really only intended for backwards
compatibility with CommonJS. While I really don't like the new module
system TC39 has designed for us, it's what we should be using, and
consistency is important.
2019-05-16 01:27:07 +04:00
Kirk Scheibelhut
df3d9b91ef Battle toJSON/fromJSON (#5427) 2019-04-30 14:48:27 +12:00
Kirk Scheibelhut
4975f1902b Move simulator harness to sim/tools (#5451) 2019-04-18 04:17:07 +09:30