Skip to content

Commit a3a4a38

Browse files
committed
remove higher stat check
1 parent 2323419 commit a3a4a38

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

play.pokemonshowdown.com/src/battle-tooltips.ts

+3-23
Original file line numberDiff line numberDiff line change
@@ -2992,29 +2992,9 @@ function BattleStatOptimizer(set: PokemonSet, formatid: ID) {
29922992
}
29932993

29942994
const leftoverEVs = 508 - totalEVs;
2995-
if (totalEVs <= 508 && allValidEVs) {
2996-
if (leftoverEVs > curLeftoverEVs) {
2997-
curSpread = spread;
2998-
curLeftoverEVs = leftoverEVs;
2999-
} else {
3000-
// Check if we hit a jump point
3001-
let allGreaterThanOrEqual = true;
3002-
let atLeastOneGreaterThan = false;
3003-
for (const stat of Dex.statNames) {
3004-
const statVal = getStat(stat, spread.evs[stat], nature);
3005-
const curStatVal = getStat(stat, curSpread.evs?.[stat] || 0, curSpread);
3006-
if (statVal < curStatVal) {
3007-
allGreaterThanOrEqual = false;
3008-
break;
3009-
} else if (statVal > curStatVal) {
3010-
atLeastOneGreaterThan = true;
3011-
}
3012-
}
3013-
if (allGreaterThanOrEqual && atLeastOneGreaterThan) {
3014-
curSpread = spread;
3015-
curLeftoverEVs = leftoverEVs;
3016-
}
3017-
}
2995+
if (totalEVs <= 508 && allValidEVs && leftoverEVs > curLeftoverEVs) {
2996+
curSpread = spread;
2997+
curLeftoverEVs = leftoverEVs;
30182998
}
30192999
}
30203000

0 commit comments

Comments
 (0)