(The name FormatsData is inconsistent with how we name other things;
especially since it's supposed to be data for a single format. It was
probably originally a typo. -Zarel)
This adds some new `data/text/` files, which are the new home for
item/move/ability descriptions, as well as in-game messages, in one
place for ease of translation.
`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.
It's a judgment call that doesn't belong among the other factual
information in `moves.ts`.
The information is still around; in the client's `battle-dex-search.ts`
in `BattleMoveSearch#moveIsNotUseless`. But now it's all in one place.
fb18721e82
This mostly serves to provide cleaner and more consistent field
naming. maxMove currently doesn't have boosts or effects to group
together but who knows what will be thrown at us via DLC, and being
symmetrical with zMoves is a nice.
- `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.
The whole `checkBattleForme` system, introduced in 4410843e5a
and currently used in Gen 6 and 7, seems to have always been bugged.
As TI mentions in #5970, we already use `getPokemonPool` for alternate
forme handling.
I've replaced it with a roll for cosmetic formes.
As confirmed by SadisticMystic, base power cannot be above 255, so
this move data is clearly incorrect and results in downstream users
of the data files such as the Smogon or PS dex or the tooltips
displaying misleading information.
The server now uses the same approach as the client of treating
cosmetic formes as real formes, as documented in `FORMES.md`.
This eliminates the need for the `.forme` and `.speciesid` properties
of `Pokemon`.
`pokemon.id` has also been removed: useful, since it turns out half
of its uses were bugs that should have used `pokemon.species.id`.
BasicEffect always had a `status` property to support the pattern of
testing it to see if it's a move that sets status directly.
This is just a situation that TypeScript is bad at.
Another possibility would be to set `status: undefined` on PureEffect,
Ability, Item, and Species, but I think that's also ugly. Casting to
Move is probably the best approach, so that's what we do now.
For historical reasons, move property definitions have been very blurry
across `EffectData`. Fortunately, recent refactors have made it
possible to put them all where they're supposed to be.
The data/.ts refactor left a few .js files in, which weren't deleted
between 13 and 3 days ago:
c85f5bccb0
Because of this, the corresponding `.ts` files were considered new,
rather than renamed, and changes to the `.js` files got deleted rather
than merged.
Fortunately, this only affected `moves.js`, which has now been manually
re-merged with the changes.
Bar Fight is supposed to act like Fake Out and only work on turn 1. This line added in this PR was missing from the runMove function, so Bar Fight and Fake Out were usable past turn 1.
Renames:
- .status -> .effect
- .statusData -> .state
- .thing -> .effectHolder
`thing` was always a really weird "I don't know what to call this"
variable name, but it's been renamed `effectHolder`, which should be
much clearer. `status` -> `effect` is I think the last remnant of old
PS code which called all effects "statuses". `statusData` -> `state`,
on the other hand, is the very first step in an initiative to calling
less things "data".
Pokemon that are not available in-game are now consolidated into `isNonstandard`. 'Past' indicates that the Pokemon no longer works in the current generation. 'Unobtainable' indicates that the Pokemon works but can only be obtained through hacking.
Moves that are not available in-game are now consolidated into `isNonstandard`. 'Past' indicates that the item no longer works in the current generation. 'Unobtainable' indicates that the item works but can only be obtained through hacking.
Items that are not available in-game are now consolidated into `isNonstandard`. 'Past' indicates that the item no longer works in the current generation. 'Unobtainable' indicates that the item works but can only be obtained through hacking.
Credit to @lusamine for testing many of these items in Sw/Sh.