From a52fa302df86a0e2aeaca41f5bea0d1fcbb4de63 Mon Sep 17 00:00:00 2001 From: urkerab Date: Thu, 12 Nov 2015 10:16:41 +0000 Subject: [PATCH] Teambuilder should ignore EV limits prior to Generation 3 --- js/client-teambuilder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/client-teambuilder.js b/js/client-teambuilder.js index 70a520fd8..68eaa7924 100644 --- a/js/client-teambuilder.js +++ b/js/client-teambuilder.js @@ -109,6 +109,7 @@ update: function () { teams = Storage.teams; if (this.curTeam) { + this.ignoreEVLimits = (this.curTeam.gen < 3); if (this.curSet) { return this.updateSetView(); } @@ -1415,7 +1416,7 @@ // cap if (val > 252) val = 252; - if (val < 0) val = 0; + if (val < 0 || isNaN(val)) val = 0; if (set.evs[stat] !== val || natureChange) { set.evs[stat] = val; @@ -2149,7 +2150,6 @@ } } - this.ignoreEVLimits = (this.curTeam.format === 'classichackmons'); if (this.curTeam && this.ignoreEVLimits) { evs = {hp:252, atk:252, def:252, spa:252, spd:252, spe:252}; if (hasMove['gyroball'] || hasMove['trickroom']) delete evs.spe;