pokemon-showdown/data/mods/gen2
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
..
conditions.ts Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
formats-data.ts Random Battles: Bugfixes for Doubles and old generations (#8058) 2021-02-19 16:08:27 -08:00
items.ts Descriptions: Remove duplicates 2021-01-24 13:26:04 -05:00
learnsets.ts Gen 2: Ban JP Phanpy Event in Int Formats (#8013) 2021-02-10 00:35:32 +04:00
moves.ts Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
random-teams.ts Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
README.md Fix typo (#7491) 2020-10-07 23:36:16 -07:00
rulesets.ts Add Stadium 2, Nintendo Cup 1997, and Nintendo Cup 2000 (#8195) 2021-04-22 00:54:14 -07:00
scripts.ts Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
typechart.ts Refactor Dex types 2021-04-08 07:08:56 -07:00

Gen 2

Introduction

Generation 2 includes the games Pokémon Silver, Gold, and Crystal. Stadium 2 may also be counted, but for simulating purposes the mechanics of choice are those of Crystal. In this metagame we find 251 Pokémon, three of which are banned to Ubers, that have no abilities, basically can only use Leftovers as an item, have poor attacking moves, no coverage, and Rest and Sleep Talk which can use Rest. Therefore we find a very stally meta, for the defense overcomes the offense easily.

EVs and IVs

Since Generation 2 was still a Game Boy game and it's retrocompatible with Generation 1, the Special EV and IV was still used for both Special Attack and Special Defense. IVs were still called DVs and they ranged from 0 to 15, each giving 2 points to the stat. The DVs decided the gender, male to female ratio, shinyness, Hidden Power base power and type, and Unown's letter. The EVs could all still be maxed as happened with Stat Experience in Generation 1.

Hidden Power

Hidden Power is an excellent coverage move and it's decided by a Pokémon's DVs. The type was decided with the following operation: 4 * (atkDV % 4) + (defDV % 4) Which gives as a number from 0 to 16, giving us the index in the type table to use. The Hidden Power base power was decided with the following formula: Math.floor((5 * ((spcDV >> 3) + (2 * (speDV >> 3)) + (4 * (defDV >> 3)) + (8 * (atkDV >> 3))) + (spcDV > 2 ? 3 : spcDV)) / 2 + 31); The DVs are shifted 3 positions, taking thus the most important byte, thus having no value under 8 DVs and a value on 8 and higher. The most important DV was attack and special.

Critical Hits

Critical hits ignore defensive boosts but not defensive drops.

Status

Sleep lasts 1-5 turns and the counter is not reset upon switch.