pokemon-showdown/data/mods
Guangcong Luo f9fdc73133
Support per-pokemon Residual handlers in Side/Field conditions (#8222)
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
2021-04-25 10:55:54 -07:00
..
fusionevolutionuu Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen1 Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen1jpn Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen1stadium Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen2 Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen2stadium2 Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen3 Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen4 Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen5 Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen6 Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen7 Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
gen7mixandmega Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
gen8dlc1 Zarude-Dada should be legal 2020-12-27 13:45:47 +04:00
gennext Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
letsgo Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
maxberries Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
mixandmega Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
pokebilities Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
sharedpower Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
ssb Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
vgc17 Update Dex API (#8181) 2021-04-08 03:00:37 -07:00