From e33ec413dfd5f9c463d9f75c52f2bbd38646428b Mon Sep 17 00:00:00 2001 From: Ivo Julca Date: Fri, 3 Jul 2015 05:36:49 -0500 Subject: [PATCH] Mix and Mega: update weight restriction Minimum weight is no longer required on set validation, and it's instead automatically set on mega evolution. --- config/formats.js | 4 ---- mods/mixandmega/scripts.js | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/config/formats.js b/config/formats.js index 8efd70790e..80018b8a21 100644 --- a/config/formats.js +++ b/config/formats.js @@ -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; } diff --git a/mods/mixandmega/scripts.js b/mods/mixandmega/scripts.js index 4b18e887f3..6903e9c5dc 100644 --- a/mods/mixandmega/scripts.js +++ b/mods/mixandmega/scripts.js @@ -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;