Improve validation for unobtainable Pokemon

This merges the Glitch and Pokestar tags into a new Unobtainable tag that defines Pokemon that are only obtainable through hacking (such as Floette-Eternal and Missingno.). These Pokemon are legal in Hackmons of their specific generation only. Custom is used in future gens instead of Past because of National Dex legality.
This commit is contained in:
The Immortal 2019-12-25 00:35:39 +04:00
parent b82aeb623b
commit f62ff19e8a
11 changed files with 149 additions and 84 deletions

View File

@ -2877,16 +2877,6 @@ let BattleFormatsData = {
isNonstandard: "Past",
tier: "Illegal",
},
pokestarsmeargle: {
isNonstandard: "Pokestar",
eventPokemon: [
{"generation": 5, "level": 60, "gender": "M", "abilities": ["owntempo"], "moves": ["mindreader", "guillotine", "tailwhip", "gastroacid"]},
{"generation": 5, "level": 30, "gender": "M", "abilities": ["owntempo"], "moves": ["outrage", "magiccoat"]},
{"generation": 5, "level": 99, "gender": "M", "abilities": ["owntempo"], "moves": ["nastyplot", "sheercold", "attract", "shadowball"]},
],
gen: 5,
tier: "Illegal",
},
miltank: {
eventPokemon: [
{"generation": 6, "level": 20, "perfectIVs": 3, "isHidden": false, "abilities": ["scrappy"], "moves": ["rollout", "attract", "stomp", "milkdrink"], "pokeball": "cherishball"},
@ -7820,11 +7810,11 @@ let BattleFormatsData = {
doublesTier: "DUber",
},
eternatuseternamax: {
battleOnly: true,
isNonstandard: "Unobtainable",
tier: "Illegal",
},
missingno: {
isNonstandard: "Glitch",
isNonstandard: "Custom",
tier: "Illegal",
},
syclar: {
@ -8115,8 +8105,18 @@ let BattleFormatsData = {
gen: 7,
tier: "CAP",
},
pokestarsmeargle: {
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 60, "gender": "M", "abilities": ["owntempo"], "moves": ["mindreader", "guillotine", "tailwhip", "gastroacid"]},
{"generation": 5, "level": 30, "gender": "M", "abilities": ["owntempo"], "moves": ["outrage", "magiccoat"]},
{"generation": 5, "level": 99, "gender": "M", "abilities": ["owntempo"], "moves": ["nastyplot", "sheercold", "attract", "shadowball"]},
],
gen: 5,
tier: "Illegal",
},
pokestarufo: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 38, "moves": ["bubblebeam", "counter", "recover", "signalbeam"]},
],
@ -8124,7 +8124,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarufo2: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 47, "moves": ["darkpulse", "flamethrower", "hyperbeam", "icebeam"]},
],
@ -8132,7 +8132,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarbrycenman: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 56, "moves": ["icebeam", "nightshade", "psychic", "uturn"]},
],
@ -8140,7 +8140,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarmt: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 63, "moves": ["earthquake", "ironhead", "spark", "surf"]},
],
@ -8148,7 +8148,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarmt2: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 72, "moves": ["dragonpulse", "flamethrower", "metalburst", "thunderbolt"]},
],
@ -8156,7 +8156,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestartransport: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 20, "moves": ["clearsmog", "flameburst", "discharge"]},
{"generation": 5, "level": 50, "moves": ["iciclecrash", "overheat", "signalbeam"]},
@ -8165,7 +8165,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestargiant: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 99, "moves": ["crushgrip", "focuspunch", "growl", "rage"]},
],
@ -8173,7 +8173,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestargiant2: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 99, "moves": ["crushgrip", "doubleslap", "teeterdance", "stomp"]},
],
@ -8181,7 +8181,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarhumanoid: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 20, "gender": "M", "moves": ["scratch", "shadowclaw", "acid"]},
{"generation": 5, "level": 30, "gender": "M", "moves": ["darkpulse", "shadowclaw", "slash"]},
@ -8200,7 +8200,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarmonster: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 50, "moves": ["darkpulse", "confusion"]},
],
@ -8208,7 +8208,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarf00: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 10, "moves": ["teeterdance", "growl", "flail", "chatter"]},
{"generation": 5, "level": 58, "moves": ["needlearm", "headsmash", "headbutt", "defensecurl"]},
@ -8218,7 +8218,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarf002: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 52, "moves": ["flareblitz", "ironhead", "psychic", "wildcharge"]},
],
@ -8226,7 +8226,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarspirit: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 99, "moves": ["crunch", "dualchop", "slackoff", "swordsdance"]},
],
@ -8234,7 +8234,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarblackdoor: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 53, "moves": ["luckychant", "amnesia", "ingrain", "rest"]},
{"generation": 5, "level": 70, "moves": ["batonpass", "counter", "flamecharge", "toxic"]},
@ -8243,7 +8243,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarwhitedoor: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 7, "moves": ["batonpass", "inferno", "mirrorcoat", "toxic"]},
],
@ -8251,7 +8251,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarblackbelt: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 30, "moves": ["focuspunch", "machpunch", "taunt"]},
{"generation": 5, "level": 40, "moves": ["machpunch", "hammerarm", "jumpkick"]},
@ -8260,7 +8260,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestargiantpropo2: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 99, "moves": ["crushgrip", "doubleslap", "teeterdance", "stomp"]},
],
@ -8268,7 +8268,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
pokestarufopropu2: {
isNonstandard: "Pokestar",
isNonstandard: "Custom",
eventPokemon: [
{"generation": 5, "level": 47, "moves": ["darkpulse", "flamethrower", "hyperbeam", "icebeam"]},
],

View File

@ -797,6 +797,10 @@ let BattleFormatsData = {
eventOnly: true,
tier: "Uber",
},
missingno: {
isNonstandard: "Unobtainable",
tier: "Illegal",
},
};
exports.BattleFormatsData = BattleFormatsData;

View File

@ -3538,6 +3538,82 @@ let BattleFormatsData = {
eventOnly: true,
requiredItem: "Shock Drive",
},
pokestarsmeargle: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarufo: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarufo2: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarbrycenman: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarmt: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarmt2: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestartransport: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestargiant: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestargiant2: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarhumanoid: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarmonster: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarf00: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarf002: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarspirit: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarblackdoor: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarwhitedoor: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarblackbelt: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestargiantpropo2: {
inherit: true,
isNonstandard: "Unobtainable",
},
pokestarufopropu2: {
inherit: true,
isNonstandard: "Unobtainable",
},
};
exports.BattleFormatsData = BattleFormatsData;

View File

@ -4057,10 +4057,9 @@ let BattleFormatsData = {
tier: "NFE",
},
floetteeternal: {
inherit: true,
randomBattleMoves: ["lightofruin", "psychic", "hiddenpowerfire", "hiddenpowerground", "moonblast"],
randomDoubleBattleMoves: ["lightofruin", "dazzlinggleam", "wish", "psychic", "aromatherapy", "protect", "calmmind"],
isUnreleased: true,
tier: "Unreleased",
},
florges: {
randomBattleMoves: ["calmmind", "moonblast", "synthesis", "aromatherapy", "wish", "toxic", "protect"],

View File

@ -4648,12 +4648,10 @@ let BattleFormatsData = {
tier: "NFE",
},
floetteeternal: {
inherit: true,
randomBattleMoves: ["lightofruin", "psychic", "hiddenpowerfire", "hiddenpowerground", "moonblast"],
randomDoubleBattleMoves: ["lightofruin", "dazzlinggleam", "wish", "psychic", "aromatherapy", "protect", "calmmind"],
isNonstandard: null,
isUnreleased: true,
tier: "Unreleased",
isNonstandard: "Unobtainable",
tier: "Illegal",
},
florges: {
randomBattleMoves: ["calmmind", "moonblast", "synthesis", "aromatherapy", "wish", "toxic", "protect", "defog"],
@ -5688,9 +5686,8 @@ let BattleFormatsData = {
doublesTier: "DUber",
},
magearnaoriginal: {
isNonstandard: null,
isUnreleased: true,
tier: "Unreleased",
isNonstandard: "Unobtainable",
tier: "Illegal",
},
marshadow: {
inherit: true,

View File

@ -6824,7 +6824,7 @@ let BattleMovedex = {
desc: "Sleeps, poisons, or paralyzes opponent(s). Base Power scales with the base move's Base Power.",
shortDesc: "Foes: SLP/PSN/PAR. BP scales with base move.",
id: "gmaxbefuddle",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Befuddle",
pp: 5,
priority: 0,
@ -6856,7 +6856,7 @@ let BattleMovedex = {
desc: "Prevents the target from switching for four or five turns (seven turns if the user is holding Grip Claw). Causes damage to the target equal to 1/8 of its maximum HP (1/6 if the user is holding Binding Band), rounded down, at the end of each turn during effect. The target can still switch out if it is holding Shed Shell or uses Baton Pass, Parting Shot, Teleport, U-turn, or Volt Switch. The effect ends if target leaves the field, or if the target uses Rapid Spin or Substitute successfully. This effect is not stackable or reset by using this or another binding move. Base Power scales with the base move's Base Power.",
shortDesc: "Traps/damages foes. BP scales w/ base move.",
id: "gmaxcentiferno",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Centiferno",
pp: 5,
priority: 0,
@ -6882,7 +6882,7 @@ let BattleMovedex = {
desc: "Applies Focus Energy to the user and its allies. Base Power scales with the base move's Base Power.",
shortDesc: "User side: Focus Energy. BP scales w/ base move.",
id: "gmaxchistrike",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Chi Strike",
pp: 5,
priority: 0,
@ -6908,7 +6908,7 @@ let BattleMovedex = {
desc: "Infatuates opponents. Base Power scales with the base move's Base Power.",
shortDesc: "Infatuates opponents. BP scales with base move.",
id: "gmaxcuddle",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Cuddle",
pp: 5,
priority: 0,
@ -6934,7 +6934,7 @@ let BattleMovedex = {
desc: "Lowers the PP of the opponent(s) last used move. Base Power scales with the base move's Base Power.",
shortDesc: "Foe: Lowers PP of last move. BP scales w/ base move.",
id: "gmaxdepletion",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Depletion",
pp: 5,
priority: 0,
@ -6968,7 +6968,7 @@ let BattleMovedex = {
desc: "Heals user and allies for 1/6 of their post-Gigantamax max HP. Base Power scales with the base move's Base Power.",
shortDesc: "Heals user and allies. BP scales with base move.",
id: "gmaxfinale",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Finale",
pp: 5,
priority: 0,
@ -6994,7 +6994,7 @@ let BattleMovedex = {
desc: "Lowers the Speed of opponents by 2 stages. Base Power scales with the base move's Base Power.",
shortDesc: "Foes: -2 Speed. BP scales with base move's BP.",
id: "gmaxfoamburst",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Foam Burst",
pp: 5,
priority: 0,
@ -7020,7 +7020,7 @@ let BattleMovedex = {
desc: "Confuses opponents. Base Power scales with the base move's Base Power.",
shortDesc: "Confuses foes. BP scales with base move's BP.",
id: "gmaxgoldrush",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Gold Rush",
pp: 5,
priority: 0,
@ -7046,7 +7046,7 @@ let BattleMovedex = {
desc: "Summons Gravity. Base Power scales with the base move's Base Power.",
shortDesc: "Summons Gravity. BP scales with base move.",
id: "gmaxgravitas",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Gravitas",
pp: 5,
priority: 0,
@ -7067,7 +7067,7 @@ let BattleMovedex = {
desc: "Poisons opponents. Base Power scales with the base move's Base Power.",
shortDesc: "Poisons opponents. BP scales with base move.",
id: "gmaxmalodor",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Malodor",
pp: 5,
priority: 0,
@ -7092,7 +7092,7 @@ let BattleMovedex = {
desc: "Applies Torment to opponents. Base Power scales with the base move's Base Power.",
shortDesc: "Applies Torment to foes. BP scales with base move.",
id: "gmaxmeltdown",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Meltdown",
pp: 5,
priority: 0,
@ -7118,7 +7118,7 @@ let BattleMovedex = {
desc: "Has a 50% chance of restoring all Berries on the user's side. Base Power scales with the base move's Base Power.",
shortDesc: "50% restore berries. BP scales w/ base move.",
id: "gmaxreplenish",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Replenish",
pp: 5,
priority: 0,
@ -7150,7 +7150,7 @@ let BattleMovedex = {
desc: "Summons Aurora Veil. Base Power scales with the base move's Base Power.",
shortDesc: "Summons Aurora Veil. BP scales w/ base move.",
id: "gmaxresonance",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Resonance",
pp: 5,
priority: 0,
@ -7172,7 +7172,7 @@ let BattleMovedex = {
desc: "Prevents the target from switching for four or five turns (seven turns if the user is holding Grip Claw). Causes damage to the target equal to 1/8 of its maximum HP (1/6 if the user is holding Binding Band), rounded down, at the end of each turn during effect. The target can still switch out if it is holding Shed Shell or uses Baton Pass, Parting Shot, Teleport, U-turn, or Volt Switch. The effect ends if target leaves the field, or if the target uses Rapid Spin or Substitute successfully. This effect is not stackable or reset by using this or another binding move. Base Power scales with the base move's Base Power.",
shortDesc: "Traps/damages foes. BP scales w/ base move.",
id: "gmaxsandblast",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Sandblast",
pp: 5,
priority: 0,
@ -7198,7 +7198,7 @@ let BattleMovedex = {
desc: "Confuses opponents. Base Power scales with the base move's Base Power.",
shortDesc: "Confuses opponents. BP scales with base move.",
id: "gmaxsmite",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Smite",
pp: 5,
priority: 0,
@ -7224,7 +7224,7 @@ let BattleMovedex = {
desc: "Has a 50% chance of applying Yawn to the target. Base Power scales with the base move's Base Power.",
shortDesc: "50% Yawn chance. BP scales w/ base move.",
id: "gmaxsnooze",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Snooze",
pp: 5,
priority: 0,
@ -7253,7 +7253,7 @@ let BattleMovedex = {
desc: "Sets a Steel-type entry hazard. Base Power scales with the base move's Base Power.",
shortDesc: "Sets Steel entry hazard. BP scales w/ base move.",
id: "gmaxsteelsurge",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Steelsurge",
pp: 5,
priority: 0,
@ -7287,7 +7287,7 @@ let BattleMovedex = {
desc: "Sets Stealth Rock. Base Power scales with the base move's Base Power.",
shortDesc: "Sets Stealth Rock. BP scales w/ base move's BP.",
id: "gmaxstonesurge",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Stonesurge",
pp: 5,
priority: 0,
@ -7311,7 +7311,7 @@ let BattleMovedex = {
desc: "Opponents are each randomly paralyzed or poisoned. Base Power scales with the base move's Base Power.",
shortDesc: "Foe(s): Par/Psn. BP scales with base move's BP.",
id: "gmaxstunshock",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Stun Shock",
pp: 10,
priority: 0,
@ -7342,7 +7342,7 @@ let BattleMovedex = {
desc: "Cures status on user's team. Base Power scales with the base move's Base Power.",
shortDesc: "Cures team's statuses. BP scales with base move's BP.",
id: "gmaxsweetness",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Sweetness",
pp: 10,
priority: 0,
@ -7369,7 +7369,7 @@ let BattleMovedex = {
desc: "Lowers opponents' evasion by 1 stage. Base Power scales with the base move's Base Power.",
shortDesc: "Foe(s): -1 evasion. BP scales with base move's BP.",
id: "gmaxtartness",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Tartness",
pp: 10,
priority: 0,
@ -7395,7 +7395,7 @@ let BattleMovedex = {
desc: "Traps opponents. Base Power scales with the base move's Base Power.",
shortDesc: "Traps foe(s). BP scales with base move's BP.",
id: "gmaxterror",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Terror",
pp: 10,
priority: 0,
@ -7421,7 +7421,7 @@ let BattleMovedex = {
desc: "Damages opponent(s) by 1/8 of their maximum HP for four turns. Base Power scales with the base move's Base Power.",
shortDesc: "Damages foes for 4 turns. BP scales w/ base move.",
id: "gmaxvolcalith",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Volcalith",
pp: 10,
priority: 0,
@ -7459,7 +7459,7 @@ let BattleMovedex = {
desc: "Paralyzes opponents. Base Power scales with the base move's Base Power.",
shortDesc: "Paralyzes foe(s). BP scales with base move's BP.",
id: "gmaxvoltcrash",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Volt Crash",
pp: 10,
priority: 0,
@ -7485,7 +7485,7 @@ let BattleMovedex = {
desc: "Damages non-Fire-type opponent(s) by 1/6 of their maximum HP for four turns. Base Power scales with the base move's Base Power.",
shortDesc: "Damages foes for 4 turns. BP scales w/ base move.",
id: "gmaxwildfire",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Wildfire",
pp: 10,
priority: 0,
@ -7524,7 +7524,7 @@ let BattleMovedex = {
desc: "Removes Reflect, Light Screen, Aurora Veil, Spikes, Toxic Spikes, Stealth Rock, Sticky Web, Mist, Safeguard, G-Max Steelsurge, and Terrains from the field. This move's Base Power scales with the base move's Base Power.",
shortDesc: "Clears field. BP scales with base move's BP.",
id: "gmaxwindrage",
isNonstandard: "Custom",
isNonstandard: "Unobtainable",
name: "G-Max Wind Rage",
pp: 10,
priority: 0,

View File

@ -297,7 +297,7 @@ class RandomTeams {
/**@type {number[]} */
let pool = [];
for (let id in this.dex.data.FormatsData) {
if (!this.dex.data.Pokedex[id] || this.dex.data.FormatsData[id].isNonstandard) continue;
if (!this.dex.data.Pokedex[id] || this.dex.data.FormatsData[id].isNonstandard && this.dex.data.FormatsData[id].isNonstandard !== 'Unobtainable') continue;
let num = this.dex.data.Pokedex[id].num;
if (pool.includes(num)) continue;
if (num > last) break;
@ -316,7 +316,7 @@ class RandomTeams {
for (let id in this.dex.data.Pokedex) {
if (!(this.dex.data.Pokedex[id].num in hasDexNumber)) continue;
let template = this.dex.getTemplate(id);
if (template.gen <= this.gen && !template.isNonstandard) {
if (template.gen <= this.gen && template.isNonstandard !== 'Past') {
formes[hasDexNumber[template.num]].push(template.species);
}
}
@ -1429,7 +1429,7 @@ class RandomTeams {
if (template.battleOnly) types = this.dex.getTemplate(template.baseSpecies).types;
if (types.indexOf(type) < 0) continue;
}
if (template.gen <= this.gen && (!template.nfe || allowedNFE.includes(template.species)) && !template.isMega && !template.isPrimal && !template.isNonstandard && template.randomBattleMoves) {
if (template.gen <= this.gen && (!template.nfe || allowedNFE.includes(template.species)) && !template.isMega && !template.isPrimal && template.randomBattleMoves) {
pokemonPool.push(id);
}
}

View File

@ -102,7 +102,7 @@ let BattleFormats = {
name: 'Obtainable',
desc: "Makes sure the team is possible to obtain in-game.",
ruleset: ['Obtainable Moves', 'Obtainable Abilities', 'Obtainable Formes', 'Obtainable Misc'],
banlist: ['Unreleased', 'Nonexistent'],
banlist: ['Unreleased', 'Unobtainable', 'Nonexistent'],
// Mostly hardcoded in team-validator.ts
onValidateTeam(team, format) {
let kyuremCount = 0;

View File

@ -954,7 +954,7 @@ export class ModdedDex {
// custom tags
'mega',
// illegal/nonstandard reasons
'glitch', 'past', 'future', 'lgpe', 'pokestar', 'custom',
'past', 'future', 'unobtainable', 'lgpe', 'custom',
];
if (validTags.includes(ruleid)) matches.push('pokemontag:' + ruleid);
continue;

View File

@ -20,7 +20,7 @@ type SparseStatsTable = Partial<StatsTable>;
type BoostName = StatNameExceptHP | 'accuracy' | 'evasion';
type BoostsTable = {[boost in BoostName]: number };
type SparseBoostsTable = Partial<BoostsTable>;
type Nonstandard = 'Glitch' | 'Past' | 'Future' | 'CAP' | 'LGPE' | 'Pokestar' | 'Custom';
type Nonstandard = 'Past' | 'Future' | 'Unobtainable' | 'CAP' | 'LGPE' | 'Custom';
type PokemonSet = {
name: string,
species: string,

View File

@ -1193,21 +1193,10 @@ export class TeamValidator {
if (banReason === '') return null;
// obtainability
if (tierTemplate.isNonstandard) {
if (tierTemplate.isNonstandard === 'Unobtainable') {
banReason = ruleTable.check('pokemontag:' + toID(tierTemplate.isNonstandard));
if (banReason) {
return `${tierTemplate.species} is tagged ${tierTemplate.isNonstandard}, which is ${banReason}.`;
}
if (banReason === '') return null;
}
if (
tierTemplate.isNonstandard === 'Pokestar' && dex.gen === 5 ||
tierTemplate.isNonstandard === 'Glitch' && dex.gen === 1
) {
banReason = ruleTable.check('pokemontag:hackmons', setHas);
if (banReason) {
return `${tierTemplate.species} is not obtainable without hacking.`;
return `${tierTemplate.species} is not obtainable without hacking or glitches.`;
}
if (banReason === '') return null;
} else if (tierTemplate.isNonstandard) {