The previous implementation of move choice validation allowed various
checks to be bypassed with crafted /move commands. For example, it was
possible to use arbitrary moves while in the invincibiltiy phase of
two-turn moves:
http://pokemonshowdown.com/replay/dev-customgamenoteampreview-205
This commit fixes the validation mecahnics.
Compared to the last attempt at this, this commit also properly
handles Hidden Power.
The previous implementation of move choice validation allowed various
checks to be bypassed with crafted /move commands. For example, it was
possible to use arbitrary moves while in the invincibiltiy phase of
two-turn moves:
http://pokemonshowdown.com/replay/dev-customgamenoteampreview-205
This commit fixes the validation mecahnics.
- Gen 5: User cannot Transform if it or the target is already
Transformed.
- Gens 2-4: User cannot Transform if the target is already Transformed.
- Gen 1: User can Transform in both situations.
1) For the purpose of action sorting, a Pokemon's effective speed is
`speed & 8191`.
2) Trick Room works by replacing a Pokemon's speed by `0x2710 - speed`.
">> " and ">>> " now accept multiple lines. In addition, ">> "
does not broadcast by default.
Their functionality are also available by !eval (which does
broadcast) and !evalbattle, although those are single-line.
While /eval doesn't broadcast, /evalbattle still does because
it's unnecessarily difficult to make simulator processes send
things privately.