- One `!supportsEVs` check was for Let's Go, which we now just check
for directly.
- `supportsEVs` and `supportsAVs` have been removed for general
confusion. `editor.isChampions` and `editor.isLetsGo` is clearer.
- Use points for Champions
- Fix some redundant code
Fixes#2685
#2654 added per-EV-spread breakpoints to the opponent speed tooltip,
but the math in the catch-all branch of getSpeedRange is the Gen 3+
formula (2*base + IV + EV/4) applied unconditionally to every gen
outside Let's Go and Champions. Gens 1/2 use DVs (0-15) and stat
experience (0-65535), so the ev84/ev0 values shown for Gen 1/2 random
battles are off by the difference between the two formulas.
Concretely: a level 88 Kabuto in Gen 1 random battle has speed 183
(actual), but the tooltip was showing "101 or 147" because ev84 was
computed as floor((2*55 + 31 + 21) * 88/100) + 5 = 147 using the
Gen 3+ EV-bonus offset. In Gen 1/2 random battles every Pokemon has
max DV and max stat experience, so the only possible value is the
existing 'max' calc (~~floor((2*base + 30 + 63) * level/100) + 5~~).
This adds a gen < 3 branch in getSpeedRange that computes min and max
from the Gen 1/2 formula and collapses min/ev0/ev84/ev252/max to a
single value for random battles. The renderStats display switch picks
up a matching gen < 3 case that shows one value for random and "min
to max" for non-random.
* Address review: compute Gen 1/2 ev0/ev252 properly, refine modifier label
- getSpeedRange: ev0 and ev252 now reflect "max DV, no stat exp" and
"max DV, max stat exp" respectively rather than being collapsed to min/max.
ev84 stays as 0 since the 84-EV breakpoint has no Gen 1/2 analog.
min is now always the absolute floor (DV=0, no stat exp) regardless of
whether the tier is random.
- renderStats: Gen 1/2 tooltip footer now says "before stat stage changes"
instead of "before external modifiers", since Gen 1/2 has no items or
abilities that affect Speed.
In oldclient, <button type="send"> would send a message globally.
Preact client has now been updated with this behavior.
We probably still want the server to be able to handle commands sent
to offline users at some later point, though.
* Fix Champions stat bars proportions
* Apply changes to VGC and LC
* Lint
* Fix National Dex LC Draft
* Implementation for the new client
* New client: change Champions and Let's Go level
* Use Math and Min
* Use const