Update Mix and Mega

This commit is contained in:
The Immortal 2017-06-14 05:08:09 +04:00
parent 1c0f9f7ac6
commit 8681546b3b
2 changed files with 0 additions and 62 deletions

View File

@ -408,64 +408,6 @@ exports.Formats = [
],
mod: 'mixandmega',
searchShow: false,
ruleset: ['Pokemon', 'Standard', 'Swagger Clause', 'Mega Rayquaza Clause', 'Team Preview'],
banlist: ['Baton Pass', 'Electrify'],
onValidateTeam: function (team) {
let itemTable = {};
for (let i = 0; i < team.length; i++) {
let item = this.getItem(team[i].item);
if (!item) continue;
if (!(item in itemTable)) {
itemTable[item] = 1;
} else if (itemTable[item] < 2) {
itemTable[item]++;
} else {
if (item.megaStone) return ["You are limited to two of each Mega Stone.", "(You have more than two " + this.getItem(item).name + ")"];
if (item.id === 'blueorb' || item.id === 'redorb') return ["You are limited to two of each Primal Orb.", "(You have more than two " + this.getItem(item).name + ")"];
}
}
},
onValidateSet: function (set) {
let template = this.getTemplate(set.species || set.name);
let item = this.getItem(set.item);
if (!item.megaEvolves && item.id !== 'blueorb' && item.id !== 'redorb') return;
if (template.baseSpecies === item.megaEvolves || (template.baseSpecies === 'Groudon' && item.id === 'redorb') || (template.baseSpecies === 'Kyogre' && item.id === 'blueorb')) return;
if (template.evos.length) return ["" + template.species + " is not allowed to hold " + item.name + " because it's not fully evolved."];
let uberStones = ['beedrillite', 'blazikenite', 'gengarite', 'kangaskhanite', 'mawilite', 'medichamite'];
if (template.tier === 'Uber' || set.ability === 'Power Construct' || uberStones.includes(item.id)) return ["" + template.species + " is not allowed to hold " + item.name + "."];
},
onBegin: function () {
let allPokemon = this.p1.pokemon.concat(this.p2.pokemon);
for (let i = 0, len = allPokemon.length; i < len; i++) {
let pokemon = allPokemon[i];
pokemon.originalSpecies = pokemon.baseTemplate.species;
}
},
onSwitchIn: function (pokemon) {
let oMegaTemplate = this.getTemplate(pokemon.template.originalMega);
if (oMegaTemplate.exists && pokemon.originalSpecies !== oMegaTemplate.baseSpecies) {
// Place volatiles on the Pokémon to show its mega-evolved condition and details
this.add('-start', pokemon, oMegaTemplate.requiredItem || oMegaTemplate.requiredMove, '[silent]');
let oTemplate = this.getTemplate(pokemon.originalSpecies);
if (oTemplate.types.length !== pokemon.template.types.length || oTemplate.types[1] !== pokemon.template.types[1]) {
this.add('-start', pokemon, 'typechange', pokemon.template.types.join('/'), '[silent]');
}
}
},
onSwitchOut: function (pokemon) {
let oMegaTemplate = this.getTemplate(pokemon.template.originalMega);
if (oMegaTemplate.exists && pokemon.originalSpecies !== oMegaTemplate.baseSpecies) {
this.add('-end', pokemon, oMegaTemplate.requiredItem || oMegaTemplate.requiredMove, '[silent]');
}
},
},
{
name: "[Gen 7] Mix and Mega (suspect test)",
desc: ["&bullet; <a href=\"https://www.smogon.com/forums/threads/3605195/\">M&M Suspect #4</a>"],
mod: 'mixandmega',
challengeShow: false,
ruleset: ['Pokemon', 'Standard', 'Swagger Clause', 'Mega Rayquaza Clause', 'Team Preview'],
banlist: ['Baton Pass', 'Electrify'],
onValidateTeam: function (team) {

View File

@ -41,8 +41,4 @@ exports.BattleFormatsData = {
inherit: true,
tier: "Uber",
},
shayminsky: {
inherit: true,
tier: "OU",
},
};