Pikachuun
the entire waruda machine
config/formats.js
Code:
{
name: "Retaliation",
section: "Other Metagames",
ruleset: ['Pokemon', 'Standard', 'Team Preview', 'Swagger Clause', 'Baton Pass Clause'],
banlist: ['Uber', 'Soul Dew', 'Gengarite', 'Kangaskhanite', 'Lucarionite', 'Mawilite'],
onModifyMove: function (basePower, pokemon, move) {
if (move.id === 'retaliate') {
return;
} else if (move && pokemon.side.faintedLastTurn) {
this.debug('Boosted for a faint last turn');
move.basePower = move.basePower*2;
}
},
},
config/formats.js
Code:
{
name: "Playstyle Reversal",
section: "Other Metagames",
ruleset: ['Pokemon', 'Standard', 'Team Preview', 'Swagger Clause', 'Baton Pass Clause'],
banlist: ['Uber', 'Soul Dew', 'Gengarite', 'Kangaskhanite', 'Lucarionite', 'Mawilite'],
onModifyMove: function (move) {
if (move && move.self) {
if (move.category === "Status") {
move.onHit = function(source) {
return this.boost({atk: 1, spa: 1, def: -1, spd: -1});
}
} else {
move.onHit = function(attacker, defender) {
return this.boost({atk: -1, spa: -1, def: 1, spd: 1}, defender, attacker);
}
}
} else if (move && move.category === "Status") {
if (move.target === "self" && move.boosts) {
move.self = {boosts: {atk: -1, spa: -1, def: 1, spd: 1}};
} else {
move.self = {boosts: {atk: 1, spa: 1, def: -1, spd: -1}};
}
} else if (move) {
move.self = {boosts: {atk: -1, spa: -1, def: 1, spd: 1}};
}
}
},
config/formats.js
Thanks to 00001111a for getting this started! I just fixed an error.
Code:
{
name: "Reliablemons",
section: "Other Metagames",
ruleset: ['Pokemon', 'Standard', 'Team Preview'],
banlist: ['Uber', 'Soul Dew', 'Gengarite', 'Kangaskhanite', 'Lucarionite'],
onModifyMove: function(move, pokemon) {
var moves = pokemon.moves;
if (move.id === moves[0]) {
var cheese = 0;
var crackers = true;
} else if (move.id === moves[1] && pokemon.typesData[1]) {
var cheese = 1;
var crackers = true;
} else {
var crackers = false;
}
if (crackers) {
move.type = pokemon.typesData[cheese].type;
}
}
},
config/formats.js
Code:
{
name: "No Legends pls",
section: "Other Metagames",
ruleset: ['Pokemon', 'Standard', 'Team Preview', 'Swagger Clause', 'Baton Pass Clause'],
banlist: ['Uber', 'Gengarite', 'Kangaskhanite', 'Lucarionite', 'Mawilite', 'Articuno', 'Zapdos', 'Moltres', 'Mew', 'Entei', 'Suicune', 'Raikou', 'Celebi', 'Regirock', 'Regice', 'Registeel', 'Latios', 'Latias', 'Jirachi', 'Azelf', 'Mesprit', 'Uxie', 'Manaphy', 'Phione', 'Heatran', 'Regigigas', 'Shaymin', 'Victini', 'Cobalion', 'Terrakion', 'Virizion', 'Keldeo', 'Tornadus', 'Tornadus-Therian', 'Thundurus', 'Thundurus-Therian', 'Landorus', 'Landorus-Therian', 'Kyurem', 'Kyurem-Black', 'Meloetta', 'Zygarde']
},
config/formats.js
data/scripts.js
I did this one for fun. Nobody requested it, but I thought I'd share it anyway FOR SOME REASON
Code:
{
name: "Balanced Hackmons Challenge Cup",
section: 'Other Metagames',
team: 'randomCCBH',
searchShow: false,
ruleset: ['Pokemon', 'HP Percentage Mod']
},
Code:
randomCCBHTeam: function (side) {
var teamdexno = [];
var team = [];
//pick six random pokmeon--no repeats, even among formes
//also need to either normalize for formes or select formes at random
//unreleased are okay. No CAP for now, but maybe at some later date
for (var i = 0; i < 6; i++)
{
while (true) {
var x = Math.floor(Math.random() * 718) + 1;
teamdexno.push(x);
break;
}
}
for (var i = 0; i < 6; i++) {
//choose forme
var formes = [];
for (var j in this.data.Pokedex) {
if (this.data.Pokedex[j].num === teamdexno[i] && this.data.Pokedex[j].species !== 'Pichu-Spiky-eared') {
formes.push(this.data.Pokedex[j].species);
}
}
var poke = formes.sample();
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 stats = template.baseStats;
//modified base stat total assumes 31 IVs, 85 EVs in every stat
var mbst = (stats["hp"] * 2 + 31 + 21 + 100) + 10;
mbst += (stats["atk"] * 2 + 31 + 21 + 100) + 5;
mbst += (stats["def"] * 2 + 31 + 21 + 100) + 5;
mbst += (stats["spa"] * 2 + 31 + 21 + 100) + 5;
mbst += (stats["spd"] * 2 + 31 + 21 + 100) + 5;
mbst += (stats["spe"] * 2 + 31 + 21 + 100) + 5;
var level = Math.floor(100 * mbstmin/mbst); //initial level guess will underestimate
while (level < 100) {
mbst = Math.floor((stats["hp"] * 2 + 31 + 21 + 100) * level / 100 + 10);
mbst += Math.floor(((stats["atk"] * 2 + 31 + 21 + 100) * level / 100 + 5) * level / 100); //since damage is roughly proportional to lvl
mbst += Math.floor((stats["def"] * 2 + 31 + 21 + 100) * level / 100 + 5);
mbst += Math.floor(((stats["spa"] * 2 + 31 + 21 + 100) * level / 100 + 5) * level / 100);
mbst += Math.floor((stats["spd"] * 2 + 31 + 21 + 100) * level / 100 + 5);
mbst += Math.floor((stats["spe"] * 2 + 31 + 21 + 100) * level/100 + 5);
if (mbst >= mbstmin)
break;
level++;
}
//random gender--already handled by PS?
//random ability (unreleased hidden are par for the course)
var abilities = Object.keys(this.data.Abilities).exclude('arenatrap', 'hugepower', 'mountaineer', 'parentalbond', 'persistent', 'purepower', 'rebound', 'shadowtag', 'wonderguard');
var ability = abilities.sample();
//random nature
var nature = ["Adamant", "Bashful", "Bold", "Brave", "Calm", "Careful", "Docile", "Gentle", "Hardy", "Hasty", "Impish", "Jolly", "Lax", "Lonely", "Mild", "Modest", "Naive", "Naughty", "Quiet", "Quirky", "Rash", "Relaxed", "Sassy", "Serious", "Timid"].sample();
//random item--I guess if it's in items.js, it's okay
var item = Object.keys(this.data.Items).sample();
//random IVs
var ivs = {
hp: Math.floor(Math.random() * 32),
atk: Math.floor(Math.random() * 32),
def: Math.floor(Math.random() * 32),
spa: Math.floor(Math.random() * 32),
spd: Math.floor(Math.random() * 32),
spe: Math.floor(Math.random() * 32)
};
//random EVs
var evs = {
hp: 0,
atk: 0,
def: 0,
spa: 0,
spd: 0,
spe: 0
};
var s = ["hp", "atk", "def", "spa", "spd", "spe"];
var evpool = 510;
do
{
var x = s.sample();
var y = Math.floor(Math.random() * Math.min(256 - evs[x], evpool + 1));
evs[x] += y;
evpool -= y;
} while (evpool > 0);
//random happiness--useless, since return/frustration is currently a "cheat"
var happiness = Math.floor(Math.random() * 256);
//random shininess?
var shiny = (Math.random() * 1024 <= 1);
//four random unique moves from movepool. don't worry about "attacking" or "viable"
var moves;
var pool = Object.keys(this.data.Movedex).exclude('fissure', 'guillotine', 'horndrill', 'magikarpsrevenge', 'paleowave', 'shadowstrike', 'sheercold', 'minimize', 'doubleteam');
moves = pool.sample(4);
team.push({
name: poke,
moves: moves,
ability: ability,
evs: evs,
ivs: ivs,
nature: nature,
item: item,
level: level,
happiness: happiness,
shiny: shiny
});
}
//console.log(team);
return team;
},
config/formats.js
mods/prioritycup/scripts.js
Code:
{
name: "Priority Cup",
section: "Other Metagames",
mod: 'prioritycup',
ruleset: ['Pokemon', 'Standard', 'Team Preview', 'Swagger Clause', 'Baton Pass Clause'],
banlist: ['Uber', 'Soul Dew', 'Gengarite', 'Kangaskhanite', 'Lucarionite']
},
Code:
exports.BattleScripts = {
init: function() {
for (var i in this.data.Movedex) {
var move = this.data.Movedex[i];
var basePower = move.basePower;
var priority = move.priority;
var category = move.category;
if (basePower <= 40 && priority === 0 && category !== "Status" && !move.basePowerCallback) {
this.modData('Movedex', i).priority = 1;
}
}
}
}
Last edited: