Skip to content

Commit

Permalink
Implement challenge option for Gen 1 Challenge Cup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Joimer committed Mar 31, 2015
1 parent 4ee7d7e commit a9343c3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions config/formats.js
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions mods/gen1/scripts.js
Expand Up @@ -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;
Expand All @@ -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),
Expand All @@ -969,7 +969,7 @@ exports.BattleScripts = {
spe: Math.floor(Math.random() * 30)
};

// ALl EVs
// All EVs.
var evs = {
hp: 255,
atk: 255,
Expand Down

0 comments on commit a9343c3

Please sign in to comment.