From a9343c38394cd0431c47ed04ebf6aae4ab4e08b4 Mon Sep 17 00:00:00 2001 From: Juanma Serrano Date: Tue, 31 Mar 2015 11:38:14 +0200 Subject: [PATCH] Implement challenge option for Gen 1 Challenge Cup Following the RoA project to have all formats for past gens and the desire of gen 1 players to have available a truly random format. --- config/formats.js | 9 +++++++++ mods/gen1/scripts.js | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/config/formats.js b/config/formats.js index 209c4fe21494..a30329bdc730 100644 --- a/config/formats.js +++ b/config/formats.js @@ -3766,6 +3766,15 @@ exports.Formats = [ team: 'random', ruleset: ['Pokemon', 'Sleep Clause Mod', 'Freeze Clause Mod', 'HP Percentage Mod', 'Cancel Mod'] }, + { + name: "[Gen 1] Challenge Cup", + section: "Past Generations", + + mod: 'gen1', + searchShow: false, + team: 'randomCC', + ruleset: ['Pokemon', 'Sleep Clause Mod', 'Freeze Clause Mod', 'HP Percentage Mod', 'Cancel Mod'] + }, { name: "[Gen 1] Stadium", section: "Past Generations", diff --git a/mods/gen1/scripts.js b/mods/gen1/scripts.js index cd0a4bbcfa31..66bba5d2337d 100644 --- a/mods/gen1/scripts.js +++ b/mods/gen1/scripts.js @@ -933,10 +933,10 @@ exports.BattleScripts = { var template = this.getTemplate(poke); // Level balance: calculate directly from stats rather than using some silly lookup table. - var mbstmin = 1307; // sunkern has the lowest modified base stat total, and that total is 807 + var mbstmin = 1307; var stats = template.baseStats; - // Modified base stat total assumes 30 IVs, 255 EVs in every stat + // Modified base stat total assumes 15 DVs, 255 EVs in every stat var mbst = (stats["hp"] * 2 + 30 + 63 + 100) + 10; mbst += (stats["atk"] * 2 + 30 + 63 + 100) + 5; mbst += (stats["def"] * 2 + 30 + 63 + 100) + 5; @@ -959,7 +959,7 @@ exports.BattleScripts = { level++; } - // Random DVs + // Random DVs. var ivs = { hp: Math.floor(Math.random() * 30), atk: Math.floor(Math.random() * 30), @@ -969,7 +969,7 @@ exports.BattleScripts = { spe: Math.floor(Math.random() * 30) }; - // ALl EVs + // All EVs. var evs = { hp: 255, atk: 255,