Reverts #8250, but will keep gluttony test file and add more tests to it. This is being done because indirect sources of damages are not causing gluttony to trigger (such as belly drum).
For side conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onSideStart`/`onSideRestart`/`onSideResidual`/`onSideEnd`,
with the `onResidualOrder` properties renamed `onSideResidualOrder`.
For field conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onFieldStart`/`onFieldRestart`/`onFieldResidual`/`onFieldEnd`,
with the `onResidualOrder` properties renamed `onFieldResidualOrder`.
(The `onField` and `onSide` part helps make it clear to the type system
that the first argument is a Field or Side, not a Pokemon.)
Side and field conditions can now use `onResidual` to tick separately
on each pokemon in Speed order. `onResidualOrder` (the per-pokemon
tick) can be timed separate from `onSideResidualOrder` (the
per-condition tick), allowing conditions to end at a different priority
than they tick per-pokemon.
Relatedly, `onTeamPreview` and `onStart` in formats now need to be
`onFieldTeamPreview` and `onFieldStart`.
Unrelatedly, `effectData` has been renamed `effectState`, and the
corresponding state containers (`pokemon.statusData`,
`pokemon.speciesData`, `pokemon.itemData`, `pokemon.abilityData`,
`field.weatherData`, `field.terrainData`) have been similarly renamed. I
renamed the types a while ago, but I was holding off renaming the fields
because it would be a breaking change. But this is a breaking change
anyway, so we might as well do it now.
Note: `onResidual` will tick even on `onSideEnd` turns, although
`onSideResidual` won't. When refactoring weather, remember to
check `this.state.duration` so you don't deal weather damage on the
ending turn.
Intended as a better fix for #8216
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
* Improve Volcalith tests readability
* Add G-Max Volcalith recoil damage order test
* Add 1 HP priority tests
* Add charge move targeting test
* Correct assertions of Ripen / Sturdy
* Skip failing tests
* Add Volcalith Black Sludge test
* Add Pressure Max / Z-move tests
* Add Pressure submove test
* Add NGas speed test
* Skip NGas speed test
* Add White Herb double Intimidate test
* Remove debug log
* Remove duplicate Pressure test
* Improve White Herb Intimidate test title
* Add Rollout Storage tests
* Add spread move Rollout storage test
* Add Magician Weakness Policy test
* Add Sleep tests
* Add Shell Bell spread move test
* Add Synchronize Lum Berry test
* oh yeah it doesn't work
* Remove duplicate test
* Add Sunsteel Strike tests
* Add Leech Seed ally switch test
* Add Primal weather Natural Gift test
* Add Emergency Exit hazards test
* Add generic hazards tests
* Add and standardize Arceus tests
* Add Transform ability test
* Add and standardize Parting Shot tests
* Add Memento tests
* Add Me First test
* Add Cursed Body Z-move test
* Add Assurance targeting test
* Clarify Assurance test description
* Add double faint switch test
* Add Receiver KO boost ability
* Add double Unnerve test
* Add Dynamax Eject Pack test
* Improve Dynamax forced switchout test
* Add Protective Pads Perish Body test
* Add Sticky Web Pressure test
* Add Speed modifier lower bound test
* Add Cloud Nine Hydration test
* Correct Cursed Body test
* Add Grassy Terrain Leftovers test
* Remove leftover debug
* Add additional Receiver and Soul-Heart tests
* Add Spite tests
* mish
* Add Shell Bell multihit test
* Add WP Dragon Tail test
Co-authored-by: The Immortal <the_immortal123@live.com>