- This fixes potential issues in Doubles created by the new turn order mechanics.
- Note that this implementation doesn't impact OMs such as Mix and Mega -at least in Singles.
Battle is now an ES6 class... mostly... it's complicated.
Battle's inheritance system has always been a mess. I tried to redo it
in a sensible way but it caused nondeterministic test failures. Not
even kidding; different things would fail each time I ran tests, even
without code changes. I'll investigate closer later, but this refactor
makes it use ES6 classes with only a small amount of hacking, which is
good enough. It is, at the very least, simpler than the previous mess.
BattleEngine.Battle.construct has been renamed BattleEngine.construct.
Chat is now being included in battle processes, because Chat.escapeHTML
is convenient to have and because the recent Chat refactor makes it
relatively lightweight to include (it doesn't load chat commands
unless you call Chat.parse)
Replacing direct references to the arguments object of functions with rest
parametres prevents the function from being deoptimized while still allowing
use of arbitrary arguments. This may also fix some minor memory leaks related
to mishandling the arguments object.
- Boosts now show the correct boosting message (i.e. using Swords Dance
at +5 Attack will show the +1 message instead of +2).
- Boosts now show the appropriate maxed out message when a stat cannot
be raised/lowered further, instead of simply failing or failing
silently, unless the boost is an additional effect.
- Multitype and Stance Change can be overwritten by Transforming
- The above two and Illusion can be obtained by Transforming
- Fix Stance Change and Zen Mode while Transformed
- Implements `skip` choice, which acts as a placeholder in the player
choices. This is relevant to double-KOs, since in-game you are allowed
to specify switch-ins in any order.
- Basically, support is added only for `move` requests here, and
behind a flag (`battle.supportsPartialDecision`).
- Switching is mostly supported, except for the multiple-KOs case.
- Team Preview needs a rework in order to enable this feature.