Commit Graph

17 Commits

Author SHA1 Message Date
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
Guangcong Luo
4f790cf04f Validate learnset order 2020-06-02 01:02:01 -07:00
Guangcong Luo
36941fe898 Add Learnsets validator
I didn't have time to fix all the errors the validator found, but I
fixed half of them.
2020-06-02 00:38:56 -07:00
Kirk Scheibelhut
fa65ed4979
Add alt form index data to dex (#6669)
AltForm index info obtained from kwsch/PKHeX's FormConverter.cs (thanks Kurt).
Thanks to @Lusamine (Anubis) for help with the peculiarities.
2020-05-10 12:20:40 -07:00
Guangcong Luo
6d5ea45adf Fix misc bugs preventing build 2020-05-01 12:48:54 -07:00
Guangcong Luo
c4dd88ac96 Update Effect type signatures
- `affectsFainted` is a `PureEffect` property

- `infiltrates` shouldn't exist on moves outside of OMs
2020-05-01 11:56:54 -07:00
Guangcong Luo
7aa42b1212 Remove Dex.getOutOfBattleSpecies
Literally every current use is a bug.
2020-04-30 23:29:20 -07:00
Guangcong Luo
e0f6453b60 Refactor data definitions
- `Modded[Effect]Data` are now correctly defined: they must either have
  `inherit: true` and be partial, or not have `inherit: true` and be a
	complete `[Effect]Data` entry

- `id` is no longer allowed; instead, it's calculated directly from
  `toID(name)`. The one exception, Hidden Power, gets a `realMove`
	property to track this (it's still used to set `.id`, though;
	TODO: really fix it properly).

- `num` is still required in `data/pokedex.ts` (dex number),
  `data/moves.ts` (move index number, for Metronome), and
	`data/items.ts` (minisprite sprite-sheet location). It's still not
	required for mod-only items and moves.

- `num` is no longer allowed for PureEffects (in `statuses.ts`) where
  it's always been meaningless.

- `color` and `heightm`, being completely flavor, are still not
  required for `pokedex.ts` in mods. They're still required in the base
	pokedex.
2020-04-30 21:39:29 -07:00