mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-06-02 22:09:20 -05:00
Teambuilder: Fix old-gen stats appearing in gen 6
This commit is contained in:
parent
09fa73f719
commit
6c1a5918fb
10
js/search.js
10
js/search.js
|
|
@ -946,6 +946,16 @@
|
|||
var stats = pokemon.baseStats;
|
||||
if (gen < 6) {
|
||||
var overrideStats = BattleTeambuilderTable['gen' + gen].overrideStats[id];
|
||||
if (overrideStats || gen === 1) {
|
||||
stats = {
|
||||
hp: pokemon.baseStats.hp,
|
||||
atk: pokemon.baseStats.atk,
|
||||
def: pokemon.baseStats.def,
|
||||
spa: pokemon.baseStats.spa,
|
||||
spd: pokemon.baseStats.spd,
|
||||
spe: pokemon.baseStats.spe
|
||||
};
|
||||
}
|
||||
if (overrideStats) {
|
||||
if ('hp' in overrideStats) stats.hp = overrideStats.hp;
|
||||
if ('atk' in overrideStats) stats.atk = overrideStats.atk;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user