mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-27 10:59:16 -05:00
606 lines
18 KiB
JavaScript
606 lines
18 KiB
JavaScript
exports.BattleFormats = {
|
|
|
|
// formats
|
|
|
|
randombattle: {
|
|
effectType: 'Format',
|
|
name: "Random Battle",
|
|
team: 'random',
|
|
canUseRandomTeam: true,
|
|
searchDefault: true,
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
ruleset: ['PotD', 'Pokemon', 'Sleep Clause']
|
|
},
|
|
unratedrandombattle: {
|
|
effectType: 'Format',
|
|
name: "Unrated Random Battle",
|
|
team: 'random',
|
|
canUseRandomTeam: true,
|
|
searchShow: true,
|
|
ruleset: ['Random Battle']
|
|
},
|
|
seasonalseasoningsgreetings: {
|
|
effectType: 'Format',
|
|
name: "[Seasonal] Seasoning's Greetings",
|
|
team: 'randomSeasonal',
|
|
canUseRandomTeam: true,
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
ruleset: ['PotD', 'Pokemon', 'Sleep Clause']
|
|
},
|
|
challengecup: {
|
|
effectType: 'Format',
|
|
name: "Challenge Cup",
|
|
team: 'randomCC',
|
|
canUseRandomTeam: true,
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
ruleset: ['Pokemon']
|
|
},
|
|
ou: {
|
|
effectType: 'Format',
|
|
name: "OU",
|
|
challengeDefault: true,
|
|
rated: true,
|
|
// challengeShow: true,
|
|
// searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['Pokemon', 'Standard', 'Team Preview'],
|
|
banlist: ['Uber', 'Drizzle ++ Swift Swim', 'Soul Dew']
|
|
},
|
|
oucurrent: {
|
|
effectType: 'Format',
|
|
name: "OU (current)",
|
|
challengeDefault: true,
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['Pokemon', 'Standard', 'Team Preview'],
|
|
banlist: ['Uber', 'Drizzle ++ Swift Swim', 'Soul Dew']
|
|
},
|
|
oususpecttest: {
|
|
effectType: 'Format',
|
|
name: "OU (suspect test)",
|
|
challengeDefault: true,
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
teambuilderFormat: 'ou',
|
|
ruleset: ['Pokemon', 'Standard', 'Team Preview'],
|
|
/* banlist: [
|
|
'Arceus-Bug', 'Arceus-Dark', 'Arceus-Dragon', 'Arceus-Electric', 'Arceus-Fighting', 'Arceus-Fire', 'Arceus-Flying', 'Arceus-Ghost', 'Arceus-Grass', 'Arceus-Ground', 'Arceus-Ice', 'Arceus', 'Arceus-Poison', 'Arceus-Psychic', 'Arceus-Rock', 'Arceus-Steel', 'Arceus-Water', 'Blaziken', 'Darkrai', 'Deoxys', 'Deoxys-Attack', 'Deoxys-Speed', 'Dialga', 'Excadrill', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Lugia', 'Manaphy', 'Mewtwo', 'Palkia', 'Rayquaza', 'Reshiram', 'Shaymin-Sky', 'Thundurus', 'Zekrom', 'Kyurem-White', 'Drizzle ++ Swift Swim', 'Soul Dew'
|
|
] */
|
|
banlist: ['Uber', 'Drizzle ++ Swift Swim', 'Soul Dew', 'Genesect']
|
|
},
|
|
cap: {
|
|
effectType: 'Format',
|
|
name: "CAP",
|
|
rated: true,
|
|
challengeShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['CAP Pokemon', 'Standard', 'Team Preview'],
|
|
banlist: ['Uber', 'Drizzle ++ Swift Swim', 'Soul Dew']
|
|
},
|
|
capaurumothplaytest: {
|
|
effectType: 'Format',
|
|
name: "CAP Aurumoth Playtest",
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
rated: true,
|
|
ruleset: ['CAP'],
|
|
banlist: ['G4CAP','Tomohawk','Necturna','Mollux','Kyurem-Black','Garchomp','ShadowStrike','Paleo Wave']
|
|
},
|
|
ubers: {
|
|
effectType: 'Format',
|
|
name: "Ubers",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['Pokemon', 'Team Preview', 'Standard Ubers', 'Evasion Moves Clause'],
|
|
banlist: []
|
|
},
|
|
uu: {
|
|
effectType: 'Format',
|
|
name: "UU",
|
|
rated: true,
|
|
// challengeShow: true,
|
|
// searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['OU'],
|
|
banlist: ['OU', 'BL', 'Snow Warning', 'Drought', 'Sand Stream']
|
|
},
|
|
uususpecttest: {
|
|
effectType: 'Format',
|
|
name: "UU (suspect test)",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
ruleset: ['OU'],
|
|
banlist: ['OU', 'BL', 'Drought', 'Sand Stream']
|
|
},
|
|
ru: {
|
|
effectType: 'Format',
|
|
name: "RU",
|
|
rated: true,
|
|
// challengeShow: true,
|
|
// searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['UU'],
|
|
banlist: ['UU', 'BL2', 'Shell Smash + Baton Pass']
|
|
},
|
|
rucurrent: {
|
|
effectType: 'Format',
|
|
name: "RU (current)",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
ruleset: ['UU'],
|
|
banlist: ['UU', 'BL2', 'Shell Smash + Baton Pass']
|
|
},
|
|
// rususpecttest: {
|
|
// effectType: 'Format',
|
|
// name: "RU (Suspect Test)",
|
|
// rated: true,
|
|
// challengeShow: true,
|
|
// searchShow: true,
|
|
// isTeambuilderFormat: true,
|
|
// ruleset: ['UU'],
|
|
// banlist: ['UU', 'BL2', 'Shell Smash + Baton Pass', 'Nidoqueen', 'Cresselia']
|
|
// },
|
|
nu: {
|
|
effectType: 'Format',
|
|
name: "NU",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['RU'],
|
|
banlist: ['RU','BL3']
|
|
},
|
|
lc: {
|
|
effectType: 'Format',
|
|
name: "LC",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['Pokemon', 'Standard', 'Team Preview', 'Little Cup', 'Evasion Moves Clause'],
|
|
banlist: ['Sonicboom', 'Dragon Rage', 'Berry Juice', 'Carvanha', 'Meditite', 'Gligar', 'Scyther', 'Sneasel', 'Tangela', 'Vulpix', 'Yanma', 'Soul Dew']
|
|
},
|
|
lcubers: {
|
|
effectType: 'Format',
|
|
name: "LC Ubers",
|
|
challengeShow: true,
|
|
ruleset: ['Pokemon', 'Standard', 'Team Preview', 'Little Cup', 'Evasion Moves Clause'],
|
|
banlist: ['Sonicboom', 'Dragon Rage', 'Berry Juice', 'Soul Dew']
|
|
},
|
|
lcuu: {
|
|
effectType: 'Format',
|
|
name: "LC UU",
|
|
challengeShow: true,
|
|
ruleset: ['Pokemon', 'Standard', 'Team Preview', 'Little Cup', 'Evasion Moves Clause'],
|
|
banlist: ['Sonicboom', 'Dragon Rage', 'Berry Juice', 'Carvanha', 'Meditite', 'Gligar', 'Scyther', 'Sneasel', 'Tangela', 'Vulpix', 'Yanma', 'Soul Dew', 'Abra', 'Aipom', 'Archen', 'Aron', 'Axew', 'Bronzor', 'Chinchou', 'Clamperl', 'Cottonee', 'Cranidos', 'Croagunk', 'Cubone', 'Diglett', 'Dratini', 'Drifloon', 'Drilbur', 'Duskull', 'Dwebble', 'Elekid', 'Ferroseed', 'Foongus', 'Frillish', 'Gastly', 'Hippopotas', 'Houndour', 'Larvesta', 'Lileep', 'Machop', 'Magnemite', 'Mienfoo', 'Misdreavus', 'Munchlax', 'Murkrow', 'Natu', 'Onix', 'Pawniard', 'Ponyta', 'Porygon', 'Scraggy', 'Shellder', 'Slowpoke', 'Snover', 'Staryu', 'Taillow', 'Timburr', 'Zorua']
|
|
},
|
|
dwubers: {
|
|
effectType: 'Format',
|
|
name: "DW Ubers",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
isDWtier: true,
|
|
ruleset: ['Pokemon', 'Standard DW', 'Team Preview'],
|
|
banlist: []
|
|
},
|
|
dwou: {
|
|
effectType: 'Format',
|
|
name: "DW OU",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['Pokemon', 'Standard DW', 'Team Preview'],
|
|
banlist: ['Drizzle ++ Swift Swim', 'Soul Dew', 'Arceus', 'Arceus-Bug', 'Arceus-Dark', 'Arceus-Dragon', 'Arceus-Electric', 'Arceus-Fighting', 'Arceus-Fire', 'Arceus-Flying', 'Arceus-Ghost', 'Arceus-Grass', 'Arceus-Ground', 'Arceus-Ice', 'Arceus-Poison', 'Arceus-Psychic', 'Arceus-Rock', 'Arceus-Steel', 'Arceus-Water', 'Blaziken', 'Deoxys', 'Deoxys-Attack', 'Dialga', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Lugia', 'Mewtwo', 'Palkia', 'Rayquaza', 'Reshiram', 'Shaymin-Sky', 'Zekrom']
|
|
},
|
|
dwuu: {
|
|
effectType: 'Format',
|
|
name: "DW UU",
|
|
challengeShow: true,
|
|
ruleset: ['DW OU'],
|
|
banlist: ['Chandelure', 'Genesect', 'Tyranitar', 'Dragonite', 'Breloom', 'Ferrothorn', 'Politoed', 'Gliscor', 'Ninetales', 'Scizor', 'Excadrill', 'Keldeo', 'Infernape', 'Venusaur', 'Heatran', 'Rotom-Wash', 'Garchomp', 'Serperior', 'Gengar', 'Volcarona', 'Forretress', 'Conkeldurr', 'Espeon', 'Cloyster', 'Skarmory', 'Starmie', 'Salamence', 'Gyarados', 'Zapdos', 'Jirachi', 'Latios', 'Tentacruel', 'Haxorus', 'Landorus', 'Mamoswine', 'Charizard', 'Lucario', 'Jellicent', 'Blissey', 'Terrakion', 'Heracross', 'Metagross', 'Ditto', 'Hydreigon', 'Thundurus', 'Alakazam', 'Deoxys-Speed', 'Latias', 'Gastrodon', 'Togekiss', 'Donphan', 'Bronzong', 'Manaphy']
|
|
},
|
|
hackmons: {
|
|
effectType: 'Format',
|
|
name: "Hackmons",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['Pokemon'],
|
|
banlist: []
|
|
},
|
|
balancedhackmons: {
|
|
effectType: 'Format',
|
|
name: "Balanced Hackmons",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['Pokemon', 'OHKO Clause'],
|
|
banlist: ['Wonder Guard', 'Pure Power', 'Huge Power', 'Shadow Tag', 'Arena Trap']
|
|
},
|
|
pu: {
|
|
effectType: 'Format',
|
|
name: "PU",
|
|
challengeShow: true,
|
|
ruleset: ['NU'],
|
|
banlist: ["Charizard", "Wartortle", "Kadabra", "Golem", "Haunter", "Exeggutor", "Weezing", "Kangaskhan", "Pinsir", "Lapras", "Ampharos", "Misdreavus", "Piloswine", "Miltank", "Ludicolo", "Swellow", "Gardevoir", "Ninjask", "Camerupt", "Torkoal", "Cacturne", "Altaria", "Armaldo", "Absol", "Gorebyss", "Regirock", "Regice", "Torterra", "Bastiodon", "Floatzel", "Drifblim", "Skuntank", "Lickilicky", "Probopass", "Rotom-Fan", "Serperior", "Emboar", "Samurott", "Musharna", "Gurdurr", "Sawk", "Carracosta", "Garbodor", "Cinccino", "Sawsbuck", "Amoonguss", "Alomomola", "Golurk", "Braviary", "Rapidash", "Articuno"]
|
|
},
|
|
haxclause: {
|
|
effectType: 'Format',
|
|
name: "Hax Clause",
|
|
challengeShow: true,
|
|
canUseRandomTeam: true,
|
|
ruleset: ['Hax Clause rule', 'Team Preview']
|
|
},
|
|
glitchmons: {
|
|
effectType: 'Format',
|
|
name: "Glitchmons",
|
|
rated: true,
|
|
challengeShow: true,
|
|
searchShow: true,
|
|
isTeambuilderFormat: true,
|
|
ruleset: ['Pokemon', 'Team Preview'],
|
|
banlist: ['Illegal', 'Unreleased'],
|
|
mimicGlitch: true
|
|
},
|
|
customgame: {
|
|
effectType: 'Format',
|
|
name: "Custom Game",
|
|
challengeShow: true,
|
|
canUseRandomTeam: true,
|
|
debug: true,
|
|
// no restrictions, for serious
|
|
ruleset: ['Team Preview']
|
|
},
|
|
customgamenoteampreview: {
|
|
effectType: 'Format',
|
|
name: "Custom Game (no Team Preview)",
|
|
challengeShow: true,
|
|
canUseRandomTeam: true,
|
|
debug: true,
|
|
// no restrictions, for serious
|
|
ruleset: []
|
|
},
|
|
gen4hackmons: {
|
|
mod: 'gen4',
|
|
effectType: 'Format',
|
|
name: "[Gen 4] Hackmons",
|
|
challengeShow: true,
|
|
ruleset: ['Pokemon'],
|
|
banlist: []
|
|
},
|
|
gen4customgame: {
|
|
mod: 'gen4',
|
|
effectType: 'Format',
|
|
name: "[Gen 4] Custom Game",
|
|
challengeShow: true,
|
|
canUseRandomTeam: true,
|
|
debug: true,
|
|
// no restrictions, for serious
|
|
ruleset: []
|
|
},
|
|
gennextnextou: {
|
|
mod: 'gennext',
|
|
effectType: 'Format',
|
|
name: "[Gen NEXT] NEXT-OU",
|
|
challengeShow: true,
|
|
ruleset: ['Pokemon', 'Standard', 'Team Preview'],
|
|
banlist: ['Uber']
|
|
},
|
|
// doublesrandombattle: {
|
|
// effectType: 'Format',
|
|
// gameType: 'doubles',
|
|
// name: "Doubles Random Battle",
|
|
// team: 'random',
|
|
// canUseRandomTeam: true,
|
|
// rated: true,
|
|
// challengeShow: true,
|
|
// searchShow: true,
|
|
// ruleset: ['PotD', 'Pokemon']
|
|
// },
|
|
|
|
// rules
|
|
|
|
standard: {
|
|
effectType: 'Banlist',
|
|
ruleset: ['Sleep Clause', 'Species Clause', 'OHKO Clause', 'Moody Clause', 'Evasion Clause'],
|
|
banlist: ['Unreleased', 'Illegal'],
|
|
validateSet: function(set) {
|
|
// limit one of each move in Standard
|
|
var moves = [];
|
|
if (set.moves) {
|
|
var hasMove = {};
|
|
for (var i=0; i<set.moves.length; i++) {
|
|
var move = this.getMove(set.moves[i]);
|
|
var moveid = move.id;
|
|
if (hasMove[moveid]) continue;
|
|
hasMove[moveid] = true;
|
|
moves.push(set.moves[i]);
|
|
}
|
|
}
|
|
set.moves = moves;
|
|
}
|
|
},
|
|
standardubers: {
|
|
effectType: 'Banlist',
|
|
ruleset: ['Sleep Clause', 'Species Clause', 'Moody Clause', 'OHKO Clause'],
|
|
banlist: ['Unreleased', 'Illegal'],
|
|
validateSet: function(set) {
|
|
// limit one of each move in Standard
|
|
var moves = [];
|
|
if (set.moves) {
|
|
var hasMove = {};
|
|
for (var i=0; i<set.moves.length; i++) {
|
|
var move = this.getMove(set.moves[i]);
|
|
var moveid = move.id;
|
|
if (hasMove[moveid]) continue;
|
|
hasMove[moveid] = true;
|
|
moves.push(set.moves[i]);
|
|
}
|
|
}
|
|
set.moves = moves;
|
|
}
|
|
},
|
|
standarddw: {
|
|
effectType: 'Banlist',
|
|
ruleset: ['Sleep Clause', 'Species Clause', 'OHKO Clause', 'Evasion Clause'],
|
|
banlist: ['Illegal', 'Moody'],
|
|
validateSet: function(set) {
|
|
// limit one of each move in Standard
|
|
var moves = [];
|
|
if (set.moves) {
|
|
var hasMove = {};
|
|
for (var i=0; i<set.moves.length; i++) {
|
|
var move = this.getMove(set.moves[i]);
|
|
var moveid = move.id;
|
|
if (hasMove[moveid]) continue;
|
|
hasMove[moveid] = true;
|
|
moves.push(set.moves[i]);
|
|
}
|
|
}
|
|
set.moves = moves;
|
|
}
|
|
},
|
|
pokemon: {
|
|
effectType: 'Banlist',
|
|
validateSet: function(set, format) {
|
|
var item = this.getItem(set.item);
|
|
var template = this.getTemplate(set.species);
|
|
var problems = [];
|
|
|
|
if (set.species === set.name) delete set.name;
|
|
if (template.num == 493) { // Arceus
|
|
if (set.ability === 'Multitype' && item.onPlate) {
|
|
set.species = 'Arceus-'+item.onPlate;
|
|
} else {
|
|
set.species = 'Arceus';
|
|
}
|
|
}
|
|
if (template.num == 487) { // Giratina
|
|
if (item.id === 'griseousorb') {
|
|
set.species = 'Giratina-Origin';
|
|
if (format.banlistTable && format.banlistTable['illegal']) set.ability = 'Levitate';
|
|
} else {
|
|
set.species = 'Giratina';
|
|
if (format.banlistTable && format.banlistTable['illegal']) set.ability = 'Pressure';
|
|
}
|
|
}
|
|
if (template.num == 555) { // Darmanitan
|
|
set.species = 'Darmanitan';
|
|
}
|
|
if (template.num == 648) { // Meloetta
|
|
set.species = 'Meloetta';
|
|
}
|
|
if (template.num == 351) { // Castform
|
|
set.species = 'Castform';
|
|
}
|
|
if (template.num == 421) { // Cherrim
|
|
set.species = 'Cherrim';
|
|
}
|
|
if (template.num == 647) { // Keldeo
|
|
if (set.species === 'Keldeo-Resolution' && set.moves.indexOf('Secret Sword') < 0) {
|
|
set.species = 'Keldeo';
|
|
}
|
|
}
|
|
if (template.isNonstandard) {
|
|
problems.push(set.species+' is not a real Pokemon.');
|
|
}
|
|
if (set.moves) for (var i=0; i<set.moves.length; i++) {
|
|
var move = this.getMove(set.moves[i]);
|
|
if (move.isNonstandard) {
|
|
problems.push(move.name+' is not a real move.');
|
|
}
|
|
}
|
|
if (set.moves && set.moves.length > 4) {
|
|
problems.push((set.name||set.species) + ' has more than four moves.');
|
|
}
|
|
return problems;
|
|
}
|
|
},
|
|
cappokemon: {
|
|
effectType: 'Rule',
|
|
validateSet: function(set, format) {
|
|
// don't return
|
|
this.getEffect('Pokemon').validateSet.call(this, set, format);
|
|
}
|
|
},
|
|
legal: {
|
|
effectType: 'Banlist',
|
|
banlist: ['Crobat+BraveBird+Hypnosis']
|
|
},
|
|
potd: {
|
|
effectType: 'Rule',
|
|
onPotD: '',
|
|
onStart: function() {
|
|
if (this.effect.onPotD) {
|
|
this.add('rule', 'Pokemon of the Day: '+this.effect.onPotD);
|
|
}
|
|
}
|
|
},
|
|
teampreview: {
|
|
onStartPriority: -10,
|
|
onStart: function() {
|
|
this.add('clearpoke');
|
|
for (var i=0; i<this.sides[0].pokemon.length; i++) {
|
|
this.add('poke', this.sides[0].pokemon[i].side.id, this.sides[0].pokemon[i].details.replace(/Arceus(\-[a-zA-Z\?]+)?/, 'Arceus-*'));
|
|
}
|
|
for (var i=0; i<this.sides[1].pokemon.length; i++) {
|
|
this.add('poke', this.sides[1].pokemon[i].side.id, this.sides[1].pokemon[i].details.replace(/Arceus(\-[a-zA-Z\?]+)?/, 'Arceus-*'));
|
|
}
|
|
},
|
|
onTeamPreview: function() {
|
|
this.makeRequest('teampreview');
|
|
}
|
|
},
|
|
littlecup: {
|
|
effectType: 'Rule',
|
|
validateSet: function(set) {
|
|
var template = this.getTemplate(set.species || set.name);
|
|
|
|
if (template.prevo) {
|
|
return [set.species+" isn't the first in its evolution family."];
|
|
}
|
|
if (!template.nfe) {
|
|
return [set.species+" doesn't have an evolution family."];
|
|
}
|
|
if (!set.level || set.level > 5) {
|
|
set.level = 5;
|
|
}
|
|
}
|
|
},
|
|
haxclauserule: {
|
|
effectType: 'Rule',
|
|
onStart: function() {
|
|
this.add('rule', 'Hax Clause');
|
|
},
|
|
onModifyMovePriority: -100,
|
|
onModifyMove: function(move) {
|
|
if (move.secondaries) {
|
|
for (var s = 0; s < move.secondaries.length; ++s) {
|
|
move.secondaries[s].chance = 100;
|
|
}
|
|
}
|
|
if (move.accuracy !== true && move.accuracy <= 99) {
|
|
move.accuracy = 0;
|
|
}
|
|
move.willCrit = true;
|
|
}
|
|
},
|
|
speciesclause: {
|
|
effectType: 'Rule',
|
|
onStart: function() {
|
|
this.add('rule', 'Species Clause');
|
|
},
|
|
validateTeam: function(team, format) {
|
|
var speciesTable = {};
|
|
for (var i=0; i<team.length; i++) {
|
|
var template = this.getTemplate(team[i].species);
|
|
if (speciesTable[template.num]) {
|
|
return [template.name+" is banned by Species Clause."];
|
|
}
|
|
speciesTable[template.num] = true;
|
|
}
|
|
}
|
|
},
|
|
ohkoclause: {
|
|
effectType: 'Rule',
|
|
onStart: function() {
|
|
this.add('rule', 'OHKO Clause');
|
|
},
|
|
validateSet: function(set) {
|
|
var problems = [];
|
|
if (set.moves) {
|
|
for (var i in set.moves) {
|
|
var move = this.getMove(set.moves[i]);
|
|
if (move.ohko) problems.push(move.name+' is banned by OHKO Clause.');
|
|
}
|
|
}
|
|
return problems;
|
|
}
|
|
},
|
|
evasionmovesclause: {
|
|
effectType: 'Banlist',
|
|
name: 'Evasion Moves Clause',
|
|
banlist: ['Minimize', 'Double Team'],
|
|
onStart: function() {
|
|
this.add('rule', 'Evasion Moves Clause');
|
|
}
|
|
},
|
|
evasionclause: {
|
|
effectType: 'Banlist',
|
|
name: 'Evasion Clause',
|
|
banlist: ['Minimize', 'Double Team', 'Sand Veil', 'Snow Cloak'],
|
|
onStart: function() {
|
|
this.add('rule', 'Evasion Clause');
|
|
}
|
|
},
|
|
moodyclause: {
|
|
effectType: 'Banlist',
|
|
name: 'Moody Clause',
|
|
banlist: ['Moody'],
|
|
onStart: function() {
|
|
this.add('rule', 'Moody Clause');
|
|
}
|
|
},
|
|
sleepclause: {
|
|
effectType: 'Rule',
|
|
onStart: function() {
|
|
this.add('rule', 'Sleep Clause');
|
|
},
|
|
onSetStatus: function(status, target, source) {
|
|
if (source && source.side === target.side) {
|
|
return;
|
|
}
|
|
if (status.id === 'slp') {
|
|
for (var i=0; i<target.side.pokemon.length; i++) {
|
|
var pokemon = target.side.pokemon[i];
|
|
if (pokemon.status === 'slp') {
|
|
if (!pokemon.statusData.source ||
|
|
pokemon.statusData.source.side !== pokemon.side) {
|
|
this.add('-message', 'Sleep Clause activated.');
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
freezeclause: {
|
|
effectType: 'Rule',
|
|
onStart: function() {
|
|
this.add('rule', 'Freeze Clause');
|
|
},
|
|
onSetStatus: function(status, target, source) {
|
|
if (source && source.side === target.side) {
|
|
return;
|
|
}
|
|
if (status.id === 'frz') {
|
|
for (var i=0; i<target.side.pokemon.length; i++) {
|
|
var pokemon = target.side.pokemon[i];
|
|
if (pokemon.status === 'frz') {
|
|
this.add('-message', 'Freeze Clause activated.');
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|