mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Correct validation for UU NFE Clause/Little Cup (#6395)
This commit is contained in:
parent
38daf467fc
commit
03f2378d8c
|
|
@ -8,28 +8,6 @@ let BattleFormats = {
|
|||
desc: "The standard ruleset for all offical Smogon singles tiers (Ubers, OU, etc.)",
|
||||
ruleset: ['Obtainable', 'Sleep Clause Mod', 'Switch Priority Clause Mod', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Moody Clause', 'Evasion Moves Clause', 'Endless Battle Clause', 'HP Percentage Mod', 'Cancel Mod'],
|
||||
},
|
||||
uunfeclause: {
|
||||
effectType: 'ValidatorRule',
|
||||
name: 'UU NFE Clause',
|
||||
desc: "Bans all NFE Pokemon, except Scyther.",
|
||||
banlist: [
|
||||
'Abra', 'Anorith', 'Aron', 'Azurill', 'Bagon', 'Baltoy', 'Barboach', 'Bayleef', 'Beldum', 'Bellsprout', 'Bulbasaur',
|
||||
'Cacnea', 'Carvanha', 'Cascoon', 'Caterpie', 'Charmander', 'Charmeleon', 'Chikorita', 'Chinchou', 'Clamperl', 'Clefairy',
|
||||
'Cleffa', 'Combusken', 'Corphish', 'Croconaw', 'Cubone', 'Cyndaquil', 'Diglett', 'Doduo', 'Dragonair', 'Dratini',
|
||||
'Drowzee', 'Duskull', 'Eevee', 'Ekans', 'Electrike', 'Elekid', 'Exeggcute', 'Feebas', 'Flaaffy', 'Gastly', 'Geodude',
|
||||
'Gloom', 'Goldeen', 'Grimer', 'Grovyle', 'Growlithe', 'Gulpin', 'Hoothoot', 'Hoppip', 'Horsea', 'Houndour', 'Igglybuff',
|
||||
'Ivysaur', 'Jigglypuff', 'Kabuto', 'Kakuna', 'Kirlia', 'Koffing', 'Krabby', 'Lairon', 'Larvitar', 'Ledyba', 'Lileep',
|
||||
'Lombre', 'Lotad', 'Loudred', 'Machoke', 'Machop', 'Magby', 'Magikarp', 'Magnemite', 'Makuhita', 'Mankey', 'Mareep', 'Marill',
|
||||
'Marshtomp', 'Meditite', 'Meowth', 'Metang', 'Metapod', 'Mudkip', 'Natu', 'Nidoran-F', 'Nidoran-M', 'Nidorina', 'Nidorino',
|
||||
'Nincada', 'Numel', 'Nuzleaf', 'Oddish', 'Omanyte', 'Onix', 'Paras', 'Phanpy', 'Pichu', 'Pidgeotto', 'Pidgey', 'Pikachu',
|
||||
'Pineco', 'Poliwag', 'Poliwhirl', 'Ponyta', 'Poochyena', 'Porygon', 'Psyduck', 'Pupitar', 'Quilava', 'Ralts', 'Rattata',
|
||||
'Remoraid', 'Rhyhorn', 'Sandshrew', 'Seadra', 'Sealeo', 'Seedot', 'Seel', 'Sentret', 'Shelgon', 'Shellder', 'Shroomish',
|
||||
'Shuppet', 'Silcoon', 'Skiploom', 'Skitty', 'Slakoth', 'Slowpoke', 'Slugma', 'Smoochum', 'Snorunt', 'Snubbull', 'Spearow',
|
||||
'Spheal', 'Spinarak', 'Spoink', 'Squirtle', 'Staryu', 'Sunkern', 'Surskit', 'Swablu', 'Swinub', 'Taillow', 'Teddiursa',
|
||||
'Tentacool', 'Togepi', 'Torchic', 'Totodile', 'Trapinch', 'Treecko', 'Tyrogue', 'Venonat', 'Vibrava', 'Vigoroth', 'Voltorb',
|
||||
'Vulpix', 'Wailmer', 'Wartortle', 'Weedle', 'Weepinbell', 'Whismur', 'Wingull', 'Wooper', 'Wurmple', 'Zigzagoon', 'Zubat',
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
exports.BattleFormats = BattleFormats;
|
||||
|
|
|
|||
|
|
@ -292,6 +292,10 @@ let BattleFormats = {
|
|||
if (!template.nfe || futureGenEvo) {
|
||||
return [set.species + " doesn't have an evolution family."];
|
||||
}
|
||||
// Temporary hack for LC past-gen formats and other mashups
|
||||
if (set.level > 5) {
|
||||
return [`${set.species} can't be above level 5 in Little Cup formats.`];
|
||||
}
|
||||
},
|
||||
},
|
||||
blitz: {
|
||||
|
|
@ -840,8 +844,15 @@ let BattleFormats = {
|
|||
uunfeclause: {
|
||||
effectType: 'ValidatorRule',
|
||||
name: 'UU NFE Clause',
|
||||
desc: "Bans all NFE Pokemon, except Scyther, from [Gen 3] UU.",
|
||||
// Implemented in mods/gen3/rulesets.js
|
||||
desc: "Bans all NFE Pokemon, except Scyther in Gen 3",
|
||||
onValidateSet(set) {
|
||||
const template = this.dex.getTemplate(set.species || set.name);
|
||||
const feInCurrentGen = template.evos && this.dex.getTemplate(template.evos[0]).gen > this.gen;
|
||||
if (template.nfe && !feInCurrentGen) {
|
||||
if (template.species === 'Scyther' && this.gen === 3) return;
|
||||
return [`${set.species} is banned due to UU NFE Clause.`];
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user