Commit Graph

6 Commits

Author SHA1 Message Date
Guangcong Luo
55cbc52bba Fix bugs with secondary/ability order
Fixes #6346

The `AfterDamage` event has been replaced with `DamagingHit`, which
which happens for damaging moves after secondaries.

The `AfterHit` event has also been moved after `DamagingHit`, to make
sure Knock Off still procs after Rocky Helmet.

`AfterHit` is no longer a valid event on `secondary` and `self` blocks,
because it's meaningless in those blocks, anyway. All `self.onAfterHit`
and `secondary.onAfterHit` handlers have been moved to `onHit`, which
should have the same timing in practice.
2020-02-08 08:07:39 -08:00
Guangcong Luo
f3dbfbe685 Refactor Decision -> Action
"Decision" and "Choice" were always kind of unclear, so Decision is now
Action. It should now be a lot clearer.

Actions are also now strongly typed.
2017-12-02 11:34:55 -06:00
Guangcong Luo
a8e8272bac Refactor types and remove ModifyPokemon
The unwieldy system that is typesData is now removed, and is replaced by
the array `types` and the string `addedType`, which track the same amount
of information in a much more efficient way. (Roost is now hardcoded, but
let's not talk about that.)

Incidentally, this now roughly matches client, which tracks typechange
and typeadd as volatiles.

This allows us to remove ModifyPokemon, which overall provides a 10%
performance increase. I was hoping it'd be more substantial, but oh well.
2016-02-16 23:42:37 -06:00
Bryan AA
58e03043f3 Remove [InterruptMove] 2015-06-11 19:12:45 -06:00
Bryan AA
299e800725 Add "Pokémon" in simulator-doc.txt 2015-06-11 16:11:00 -06:00
Guangcong Luo
27be062395 Tons of documentation 2013-05-24 14:59:29 -07:00