Mix and Mega: update weight restriction

Minimum weight is no longer required on set validation, and it's instead automatically set on mega evolution.
This commit is contained in:
Ivo Julca
2015-07-03 05:36:49 -05:00
parent 563d691e05
commit e33ec413df
2 changed files with 1 additions and 5 deletions

View File

@@ -402,11 +402,7 @@ exports.Formats = [
case 'diancite':
if (template.baseStats.def <= 40 || template.baseStats.spd <= 40) return ["" + template.species + " does not have enough Def. or Sp. Def. to hold " + item.name + "."];
break;
case 'lopunnite':
if (template.weightkg <= 5) return ["" + template.species + "'s weight is too low to hold " + item.name + "."];
break;
case 'mewtwonitey':
if (template.weightkg <= 89) return ["" + template.species + "'s weight is too low to hold " + item.name + "."];
if (template.baseStats.def <= 20) return ["" + template.species + " does not have enough Defense to hold " + item.name + "."];
break;
}

View File

@@ -74,7 +74,7 @@ exports.BattleScripts = {
var baseStats = template.baseStats;
template.baseStats = {};
for (var statName in baseStats) template.baseStats[statName] = baseStats[statName] + deltas.baseStats[statName];
template.weightkg += deltas.weightkg;
template.weightkg = Math.max(0.1, template.weightkg + deltas.weightkg);
template.originalMega = deltas.originalMega;
template.requiredItem = deltas.requiredItem;
if (deltas.isMega) template.isMega = true;