mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Refactor learnsets.js (#6466)
This commit is contained in:
parent
6b31c251c7
commit
3e26318758
3234
data/formats-data.js
3234
data/formats-data.js
File diff suppressed because it is too large
Load Diff
151429
data/learnsets.js
151429
data/learnsets.js
File diff suppressed because it is too large
Load Diff
|
|
@ -112,9 +112,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
fearow: {
|
||||
randomBattleMoves: ["drillpeck", "doubleedge", "hyperbeam", "agility"],
|
||||
eventPokemon: [
|
||||
{"generation": 1, "level": 20, "moves": ["growl", "leer", "furyattack", "payday"]},
|
||||
],
|
||||
tier: "UU",
|
||||
},
|
||||
ekans: {
|
||||
|
|
@ -130,11 +127,6 @@ let BattleFormatsData = {
|
|||
randomBattleMoves: ["thunderwave", "surf"],
|
||||
essentialMove: "thunderbolt",
|
||||
exclusiveMoves: ["bodyslam", "thunder", "agility", "seismictoss"],
|
||||
eventPokemon: [
|
||||
{"generation": 1, "level": 5, "moves": ["surf"]},
|
||||
{"generation": 1, "level": 5, "moves": ["fly"]},
|
||||
{"generation": 1, "level": 5, "moves": ["thundershock", "growl", "surf"]},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
raichu: {
|
||||
|
|
@ -289,9 +281,6 @@ let BattleFormatsData = {
|
|||
randomBattleMoves: ["blizzard", "amnesia"],
|
||||
essentialMove: "surf",
|
||||
exclusiveMoves: ["bodyslam", "seismictoss", "rest", "hydropump"],
|
||||
eventPokemon: [
|
||||
{"generation": 1, "level": 15, "moves": ["scratch", "amnesia"]},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
golduck: {
|
||||
|
|
@ -414,9 +403,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
rapidash: {
|
||||
randomBattleMoves: ["fireblast", "agility", "bodyslam", "hyperbeam"],
|
||||
eventPokemon: [
|
||||
{"generation": 1, "level": 40, "moves": ["ember", "firespin", "stomp", "payday"]},
|
||||
],
|
||||
tier: "UU",
|
||||
},
|
||||
slowpoke: {
|
||||
|
|
@ -671,9 +657,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
magikarp: {
|
||||
randomBattleMoves: ["tackle", "dragonrage"],
|
||||
eventPokemon: [
|
||||
{"generation": 1, "level": 5, "moves": ["dragonrage"]},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
gyarados: {
|
||||
|
|
@ -791,10 +774,6 @@ let BattleFormatsData = {
|
|||
essentialMove: "psychic",
|
||||
exclusiveMoves: ["softboiled", "softboiled", "explosion"],
|
||||
comboMoves: ["swordsdance", "earthquake", "hyperbeam"],
|
||||
eventPokemon: [
|
||||
{"generation": 1, "level": 5, "moves": ["pound"]},
|
||||
],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
},
|
||||
missingno: {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ class RandomGen1Teams extends RandomGen2Teams {
|
|||
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.learnset || template.forme) continue;
|
||||
let lsetData = this.dex.getLearnsetData(/** @type {ID} */ (id));
|
||||
if (!lsetData.learnset || template.forme) continue;
|
||||
formes[hasDexNumber[template.num]].push(template.species);
|
||||
if (++formeCounter >= 6) {
|
||||
// Gen 1 had no alternate formes, so we can break out of the loop already.
|
||||
|
|
@ -37,6 +38,7 @@ class RandomGen1Teams extends RandomGen2Teams {
|
|||
// Choose forme.
|
||||
let poke = this.sample(formes[i]);
|
||||
let template = this.dex.getTemplate(poke);
|
||||
let lsetData = this.dex.getLearnsetData(template.speciesid);
|
||||
|
||||
// Level balance: calculate directly from stats rather than using some silly lookup table.
|
||||
let mbstmin = 1307;
|
||||
|
|
@ -88,10 +90,10 @@ class RandomGen1Teams extends RandomGen2Teams {
|
|||
let moves;
|
||||
/**@type {string[]} */
|
||||
let pool = [];
|
||||
if (template.learnset) {
|
||||
for (let move in template.learnset) {
|
||||
if (lsetData.learnset) {
|
||||
for (let move in lsetData.learnset) {
|
||||
if (this.dex.getMove(move).gen !== 1) continue;
|
||||
if (template.learnset[move].some(learned => learned[0] === '1')) {
|
||||
if (lsetData.learnset[move].some(learned => learned[0] === '1')) {
|
||||
pool.push(move);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -21,6 +21,7 @@ class RandomGen3Teams extends RandomGen4Teams {
|
|||
|
||||
if (template.battleOnly) species = this.dex.getOutOfBattleSpecies(template);
|
||||
|
||||
// @ts-ignore
|
||||
let movePool = (template.randomBattleMoves || Object.keys(this.dex.data.Learnsets[template.id].learnset)).slice();
|
||||
/**@type {string[]} */
|
||||
let moves = [];
|
||||
|
|
|
|||
|
|
@ -1683,17 +1683,14 @@ let BattleFormatsData = {
|
|||
},
|
||||
deoxysattack: {
|
||||
randomBattleMoves: ["psychoboost", "shadowball", "superpower", "extremespeed", "icebeam", "hiddenpowerfire", "stealthrock"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
},
|
||||
deoxysdefense: {
|
||||
randomBattleMoves: ["spikes", "stealthrock", "recover", "taunt", "toxic", "seismictoss"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
},
|
||||
deoxysspeed: {
|
||||
randomBattleMoves: ["spikes", "stealthrock", "psychoboost", "taunt", "lightscreen", "reflect", "superpower"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
},
|
||||
turtwig: {
|
||||
|
|
@ -2000,7 +1997,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
giratinaorigin: {
|
||||
randomBattleMoves: ["dracometeor", "shadowsneak", "hiddenpowerfire", "calmmind", "substitute", "dragonpulse", "shadowball", "aurasphere", "outrage"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Griseous Orb",
|
||||
tier: "Uber",
|
||||
},
|
||||
|
|
@ -2031,7 +2027,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
shayminsky: {
|
||||
randomBattleMoves: ["seedflare", "earthpower", "airslash", "hiddenpowerice", "hiddenpowerfire", "substitute", "leechseed"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
},
|
||||
arceus: {
|
||||
|
|
@ -2041,82 +2036,66 @@ let BattleFormatsData = {
|
|||
},
|
||||
arceusbug: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "earthpower", "icebeam", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Insect Plate",
|
||||
},
|
||||
arceusdark: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "focusblast", "recover", "refresh"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Dread Plate",
|
||||
},
|
||||
arceusdragon: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "flamethrower", "willowisp", "refresh", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Draco Plate",
|
||||
},
|
||||
arceuselectric: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "recover", "icebeam", "earthpower"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Zap Plate",
|
||||
},
|
||||
arceusfighting: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "icebeam", "darkpulse", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Fist Plate",
|
||||
},
|
||||
arceusfire: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "earthpower", "thunderbolt", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Flame Plate",
|
||||
},
|
||||
arceusflying: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "refresh", "earthpower", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Sky Plate",
|
||||
},
|
||||
arceusghost: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "focusblast", "willowisp", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Spooky Plate",
|
||||
},
|
||||
arceusgrass: {
|
||||
randomBattleMoves: ["calmmind", "icebeam", "judgment", "earthpower", "recover", "thunderwave"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Meadow Plate",
|
||||
},
|
||||
arceusground: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "icebeam", "thunderbolt", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Earth Plate",
|
||||
},
|
||||
arceusice: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "earthpower", "thunderbolt", "flamethrower", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Icicle Plate",
|
||||
},
|
||||
arceuspoison: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "earthpower", "willowisp", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Toxic Plate",
|
||||
},
|
||||
arceuspsychic: {
|
||||
randomBattleMoves: ["calmmind", "focusblast", "recover", "shadowball", "judgment"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Mind Plate",
|
||||
},
|
||||
arceusrock: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "earthpower", "willowisp", "refresh", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Stone Plate",
|
||||
},
|
||||
arceussteel: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "earthpower", "willowisp", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Iron Plate",
|
||||
},
|
||||
arceuswater: {
|
||||
randomBattleMoves: ["recover", "calmmind", "judgment", "icebeam", "thunderbolt", "willowisp", "refresh"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Splash Plate",
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ class RandomGen4Teams extends RandomGen5Teams {
|
|||
|
||||
if (template.battleOnly) species = this.dex.getOutOfBattleSpecies(template);
|
||||
|
||||
// @ts-ignore
|
||||
let movePool = (template.randomBattleMoves || Object.keys(this.dex.data.Learnsets[template.id].learnset)).slice();
|
||||
/** @type {string[]} */
|
||||
let rejectedPool = [];
|
||||
/**@type {string[]} */
|
||||
let moves = [];
|
||||
|
|
@ -390,6 +392,7 @@ class RandomGen4Teams extends RandomGen5Teams {
|
|||
// Reject defensive status moves if a reliable recovery move is available but not selected.
|
||||
// Toxic is only defensive if used with another status move other than Protect (Toxic + 3 attacks and Toxic + Protect are ok).
|
||||
if ((defensiveStatusMoves.includes(moveid) || moveid === 'toxic' && ((counter.Status > 1 && !hasMove['protect']) || counter.Status > 2)) &&
|
||||
// @ts-ignore
|
||||
!moves.some(id => recoveryMoves.includes(id)) && movePool.some(id => recoveryMoves.includes(id))) {
|
||||
rejected = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1983,19 +1983,16 @@ let BattleFormatsData = {
|
|||
},
|
||||
deoxysattack: {
|
||||
randomBattleMoves: ["extremespeed", "hiddenpowerfire", "icebeam", "psychoboost", "superpower", "stealthrock"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DUU",
|
||||
},
|
||||
deoxysdefense: {
|
||||
randomBattleMoves: ["magiccoat", "recover", "seismictoss", "spikes", "taunt", "toxic"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DUU",
|
||||
},
|
||||
deoxysspeed: {
|
||||
randomBattleMoves: ["icebeam", "lightscreen", "magiccoat", "psychoboost", "reflect", "spikes", "stealthrock", "superpower", "taunt"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DUU",
|
||||
},
|
||||
|
|
@ -2372,7 +2369,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
giratinaorigin: {
|
||||
randomBattleMoves: ["dracometeor", "dragontail", "earthquake", "hiddenpowerfire", "rest", "shadowsneak", "sleeptalk", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Griseous Orb",
|
||||
tier: "Uber",
|
||||
doublesTier: "DUber",
|
||||
|
|
@ -2409,7 +2405,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
shayminsky: {
|
||||
randomBattleMoves: ["airslash", "earthpower", "hiddenpowerfire", "hiddenpowerice", "leechseed", "seedflare", "substitute"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -2421,82 +2416,66 @@ let BattleFormatsData = {
|
|||
},
|
||||
arceusbug: {
|
||||
randomBattleMoves: ["earthquake", "recover", "stoneedge", "swordsdance", "xscissor"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Insect Plate",
|
||||
},
|
||||
arceusdark: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "recover", "refresh"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Dread Plate",
|
||||
},
|
||||
arceusdragon: {
|
||||
randomBattleMoves: ["earthquake", "extremespeed", "outrage", "recover", "swordsdance"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Draco Plate",
|
||||
},
|
||||
arceuselectric: {
|
||||
randomBattleMoves: ["calmmind", "icebeam", "judgment", "recover", "substitute"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Zap Plate",
|
||||
},
|
||||
arceusfighting: {
|
||||
randomBattleMoves: ["calmmind", "darkpulse", "icebeam", "judgment", "recover", "toxic"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Fist Plate",
|
||||
},
|
||||
arceusfire: {
|
||||
randomBattleMoves: ["calmmind", "fireblast", "flamethrower", "recover", "thunderbolt"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Flame Plate",
|
||||
},
|
||||
arceusflying: {
|
||||
randomBattleMoves: ["calmmind", "focusblast", "judgment", "recover", "substitute"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Sky Plate",
|
||||
},
|
||||
arceusghost: {
|
||||
randomBattleMoves: ["calmmind", "focusblast", "judgment", "recover", "roar", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Spooky Plate",
|
||||
},
|
||||
arceusgrass: {
|
||||
randomBattleMoves: ["calmmind", "earthpower", "icebeam", "judgment", "recover", "stealthrock", "thunderwave"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Meadow Plate",
|
||||
},
|
||||
arceusground: {
|
||||
randomBattleMoves: ["earthquake", "recover", "stoneedge", "swordsdance", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Earth Plate",
|
||||
},
|
||||
arceusice: {
|
||||
randomBattleMoves: ["calmmind", "focusblast", "icebeam", "judgment", "recover", "thunderbolt"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Icicle Plate",
|
||||
},
|
||||
arceuspoison: {
|
||||
randomBattleMoves: ["calmmind", "focusblast", "icebeam", "recover", "sludgebomb", "stealthrock", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Toxic Plate",
|
||||
},
|
||||
arceuspsychic: {
|
||||
randomBattleMoves: ["calmmind", "focusblast", "icebeam", "psyshock", "recover", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Mind Plate",
|
||||
},
|
||||
arceusrock: {
|
||||
randomBattleMoves: ["earthquake", "stoneedge", "swordsdance", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Stone Plate",
|
||||
},
|
||||
arceussteel: {
|
||||
randomBattleMoves: ["calmmind", "icebeam", "judgment", "recover", "roar", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Iron Plate",
|
||||
},
|
||||
arceuswater: {
|
||||
randomBattleMoves: ["calmmind", "fireblast", "icebeam", "judgment", "recover"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Splash Plate",
|
||||
},
|
||||
victini: {
|
||||
|
|
@ -3146,7 +3125,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
tornadustherian: {
|
||||
randomBattleMoves: ["focusblast", "heatwave", "hurricane", "superpower", "uturn"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DUU",
|
||||
},
|
||||
|
|
@ -3158,7 +3136,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
thundurustherian: {
|
||||
randomBattleMoves: ["agility", "focusblast", "grassknot", "hiddenpowerice", "nastyplot", "thunderbolt"],
|
||||
eventOnly: true,
|
||||
tier: "OU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -3182,7 +3159,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
landorustherian: {
|
||||
randomBattleMoves: ["earthquake", "hiddenpowerice", "rockpolish", "stealthrock", "stoneedge", "swordsdance", "superpower", "uturn"],
|
||||
eventOnly: true,
|
||||
tier: "OU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ class RandomGen5Teams extends RandomGen6Teams {
|
|||
species = this.dex.getOutOfBattleSpecies(template);
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
let movePool = (template.randomBattleMoves || Object.keys(this.dex.data.Learnsets[template.id].learnset)).slice();
|
||||
let rejectedPool = [];
|
||||
/**@type {string[]} */
|
||||
|
|
|
|||
|
|
@ -2511,21 +2511,18 @@ let BattleFormatsData = {
|
|||
deoxysattack: {
|
||||
randomBattleMoves: ["psychoboost", "superpower", "icebeam", "knockoff", "extremespeed", "firepunch", "stealthrock"],
|
||||
randomDoubleBattleMoves: ["psychoboost", "superpower", "extremespeed", "icebeam", "thunderbolt", "firepunch", "protect", "knockoff"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "(DUU)",
|
||||
},
|
||||
deoxysdefense: {
|
||||
randomBattleMoves: ["spikes", "stealthrock", "recover", "taunt", "toxic", "seismictoss", "knockoff"],
|
||||
randomDoubleBattleMoves: ["protect", "stealthrock", "recover", "taunt", "reflect", "seismictoss", "lightscreen", "trickroom"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "(DUU)",
|
||||
},
|
||||
deoxysspeed: {
|
||||
randomBattleMoves: ["spikes", "stealthrock", "superpower", "psychoboost", "taunt", "magiccoat", "knockoff"],
|
||||
randomDoubleBattleMoves: ["superpower", "icebeam", "psychoboost", "taunt", "lightscreen", "reflect", "protect", "knockoff"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "(DUU)",
|
||||
},
|
||||
|
|
@ -2972,7 +2969,6 @@ let BattleFormatsData = {
|
|||
giratinaorigin: {
|
||||
randomBattleMoves: ["dracometeor", "shadowsneak", "dragontail", "willowisp", "defog", "toxic", "shadowball", "earthquake"],
|
||||
randomDoubleBattleMoves: ["dracometeor", "shadowsneak", "tailwind", "hiddenpowerfire", "willowisp", "calmmind", "substitute", "dragonpulse", "shadowball", "aurasphere", "protect", "earthquake"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Griseous Orb",
|
||||
tier: "Uber",
|
||||
doublesTier: "DUber",
|
||||
|
|
@ -3015,7 +3011,6 @@ let BattleFormatsData = {
|
|||
shayminsky: {
|
||||
randomBattleMoves: ["seedflare", "airslash", "earthpower", "hiddenpowerice", "substitute", "leechseed"],
|
||||
randomDoubleBattleMoves: ["seedflare", "earthpower", "airslash", "rest", "substitute", "leechseed", "tailwind", "protect", "hiddenpowerice"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DUber",
|
||||
},
|
||||
|
|
@ -3029,104 +3024,87 @@ let BattleFormatsData = {
|
|||
arceusbug: {
|
||||
randomBattleMoves: ["swordsdance", "xscissor", "stoneedge", "recover", "earthquake", "ironhead"],
|
||||
randomDoubleBattleMoves: ["swordsdance", "xscissor", "stoneedge", "recover", "earthquake", "ironhead", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Insect Plate",
|
||||
},
|
||||
arceusdark: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "recover", "fireblast", "toxic"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "focusblast", "safeguard", "snarl", "willowisp", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Dread Plate",
|
||||
},
|
||||
arceusdragon: {
|
||||
randomBattleMoves: ["swordsdance", "outrage", "extremespeed", "earthquake", "recover", "judgment", "fireblast", "willowisp", "defog"],
|
||||
randomDoubleBattleMoves: ["swordsdance", "dragonclaw", "extremespeed", "earthquake", "recover", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Draco Plate",
|
||||
},
|
||||
arceuselectric: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "recover", "icebeam", "earthpower"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "icebeam", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Zap Plate",
|
||||
},
|
||||
arceusfairy: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "recover", "willowisp", "defog", "toxic", "earthpower"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "willowisp", "protect", "earthpower", "thunderbolt"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Pixie Plate",
|
||||
gen: 6,
|
||||
},
|
||||
arceusfighting: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "stoneedge", "shadowball", "recover", "roar", "icebeam"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "icebeam", "shadowball", "recover", "willowisp", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Fist Plate",
|
||||
},
|
||||
arceusfire: {
|
||||
randomBattleMoves: ["calmmind", "fireblast", "roar", "thunderbolt", "icebeam", "recover"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "thunderbolt", "recover", "heatwave", "protect", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Flame Plate",
|
||||
},
|
||||
arceusflying: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "earthpower", "fireblast", "toxic", "recover"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "safeguard", "recover", "substitute", "tailwind", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Sky Plate",
|
||||
},
|
||||
arceusghost: {
|
||||
randomBattleMoves: ["swordsdance", "shadowforce", "shadowclaw", "brickbreak", "extremespeed", "recover", "judgment", "toxic", "defog"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "focusblast", "recover", "swordsdance", "shadowforce", "brickbreak", "willowisp", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Spooky Plate",
|
||||
},
|
||||
arceusgrass: {
|
||||
randomBattleMoves: ["judgment", "recover", "calmmind", "icebeam", "fireblast"],
|
||||
randomDoubleBattleMoves: ["calmmind", "icebeam", "judgment", "earthpower", "recover", "safeguard", "thunderwave", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Meadow Plate",
|
||||
},
|
||||
arceusground: {
|
||||
randomBattleMoves: ["swordsdance", "earthquake", "stoneedge", "recover", "judgment", "icebeam", "toxic", "stealthrock"],
|
||||
randomDoubleBattleMoves: ["swordsdance", "earthquake", "stoneedge", "recover", "calmmind", "judgment", "icebeam", "rockslide", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Earth Plate",
|
||||
},
|
||||
arceusice: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "thunderbolt", "fireblast", "recover"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "thunderbolt", "focusblast", "recover", "protect", "icywind"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Icicle Plate",
|
||||
},
|
||||
arceuspoison: {
|
||||
randomBattleMoves: ["calmmind", "sludgebomb", "fireblast", "recover", "icebeam", "defog"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "sludgebomb", "heatwave", "recover", "willowisp", "protect", "earthpower"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Toxic Plate",
|
||||
},
|
||||
arceuspsychic: {
|
||||
randomBattleMoves: ["judgment", "calmmind", "fireblast", "recover", "icebeam", "toxic"],
|
||||
randomDoubleBattleMoves: ["calmmind", "psyshock", "focusblast", "recover", "willowisp", "judgment", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Mind Plate",
|
||||
},
|
||||
arceusrock: {
|
||||
randomBattleMoves: ["swordsdance", "earthquake", "stoneedge", "recover", "judgment", "willowisp", "stealthrock"],
|
||||
randomDoubleBattleMoves: ["swordsdance", "stoneedge", "recover", "rockslide", "earthquake", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Stone Plate",
|
||||
},
|
||||
arceussteel: {
|
||||
randomBattleMoves: ["judgment", "recover", "willowisp", "defog", "roar", "swordsdance", "ironhead", "earthquake", "stoneedge"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "protect", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Iron Plate",
|
||||
},
|
||||
arceuswater: {
|
||||
randomBattleMoves: ["recover", "calmmind", "judgment", "icebeam", "toxic", "defog"],
|
||||
randomDoubleBattleMoves: ["recover", "calmmind", "judgment", "icebeam", "fireblast", "icywind", "surf", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Splash Plate",
|
||||
},
|
||||
victini: {
|
||||
|
|
@ -3856,7 +3834,6 @@ let BattleFormatsData = {
|
|||
tornadustherian: {
|
||||
randomBattleMoves: ["hurricane", "heatwave", "knockoff", "superpower", "uturn", "taunt"],
|
||||
randomDoubleBattleMoves: ["hurricane", "airslash", "focusblast", "uturn", "heatwave", "skydrop", "tailwind", "taunt", "protect"],
|
||||
eventOnly: true,
|
||||
tier: "OU",
|
||||
doublesTier: "(DUU)",
|
||||
},
|
||||
|
|
@ -3870,7 +3847,6 @@ let BattleFormatsData = {
|
|||
thundurustherian: {
|
||||
randomBattleMoves: ["nastyplot", "thunderbolt", "hiddenpowerflying", "hiddenpowerice", "focusblast", "voltswitch"],
|
||||
randomDoubleBattleMoves: ["nastyplot", "thunderbolt", "hiddenpowerflying", "hiddenpowerice", "focusblast", "voltswitch", "protect"],
|
||||
eventOnly: true,
|
||||
tier: "UUBL",
|
||||
doublesTier: "(DUU)",
|
||||
},
|
||||
|
|
@ -3898,7 +3874,6 @@ let BattleFormatsData = {
|
|||
landorustherian: {
|
||||
randomBattleMoves: ["swordsdance", "rockpolish", "earthquake", "stoneedge", "uturn", "superpower", "stealthrock"],
|
||||
randomDoubleBattleMoves: ["rockslide", "earthquake", "stoneedge", "uturn", "superpower", "knockoff", "protect"],
|
||||
eventOnly: true,
|
||||
tier: "OU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -3951,19 +3926,15 @@ let BattleFormatsData = {
|
|||
doublesTier: "DUU",
|
||||
},
|
||||
genesectburn: {
|
||||
eventOnly: true,
|
||||
requiredItem: "Burn Drive",
|
||||
},
|
||||
genesectchill: {
|
||||
eventOnly: true,
|
||||
requiredItem: "Chill Drive",
|
||||
},
|
||||
genesectdouse: {
|
||||
eventOnly: true,
|
||||
requiredItem: "Douse Drive",
|
||||
},
|
||||
genesectshock: {
|
||||
eventOnly: true,
|
||||
requiredItem: "Shock Drive",
|
||||
},
|
||||
chespin: {
|
||||
|
|
@ -4361,7 +4332,6 @@ let BattleFormatsData = {
|
|||
hoopaunbound: {
|
||||
randomBattleMoves: ["nastyplot", "substitute", "psychic", "darkpulse", "focusblast", "hyperspacefury", "zenheadbutt", "icepunch", "drainpunch", "gunkshot", "trick"],
|
||||
randomDoubleBattleMoves: ["psychic", "darkpulse", "focusblast", "protect", "hyperspacefury", "zenheadbutt", "icepunch", "drainpunch", "gunkshot"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,246 +1,255 @@
|
|||
'use strict';
|
||||
|
||||
/**@type {{[k: string]: {learnset: {[k: string]: MoveSource[]}}}} */
|
||||
/**@type {{[k: string]: ModdedLearnsetData}} */
|
||||
let BattleLearnsets = {
|
||||
tomohawk: {learnset: {
|
||||
acrobatics: ["7M", "5M"],
|
||||
aerialace: ["7M", "7L17", "5M", "5L17"],
|
||||
airslash: ["7L33", "5L37"],
|
||||
aquatail: ["7T"],
|
||||
attract: ["7M", "5M"],
|
||||
aurasphere: ["7L1", "5L1"],
|
||||
batonpass: ["7E", "5E"],
|
||||
brickbreak: ["7E", "5M"],
|
||||
bulkup: ["7M", "5M"],
|
||||
bulldoze: ["7M", "5M"],
|
||||
confide: ["7M"],
|
||||
confuseray: ["7M", "5E"],
|
||||
doubleteam: ["7M", "5M"],
|
||||
earthpower: ["5L33"],
|
||||
earthquake: ["7M", "5M"],
|
||||
echoedvoice: ["7M", "5M"],
|
||||
facade: ["7M", "5M"],
|
||||
falseswipe: ["7M", "5M"],
|
||||
flash: ["6M", "5M"],
|
||||
fling: ["7M", "5M"],
|
||||
fly: ["7M", "5M"],
|
||||
focusblast: ["7M", "5M"],
|
||||
focusenergy: ["7E", "5E"],
|
||||
frustration: ["7E", "5M"],
|
||||
furyswipes: ["7L1", "5L1"],
|
||||
gigaimpact: ["7M", "5M"],
|
||||
grassknot: ["7M", "5M"],
|
||||
harden: ["7L1", "5L1"],
|
||||
haze: ["7E", "5E"],
|
||||
healingwish: ["7L60", "5L60"],
|
||||
heatwave: ["7L42", "5L45"],
|
||||
helpinghand: ["7T"],
|
||||
hiddenpower: ["7M", "5M"],
|
||||
hurricane: ["7L51", "5L55"],
|
||||
hyperbeam: ["7M", "5M"],
|
||||
hypervoice: ["7L45", "5L49"],
|
||||
incinerate: ["6M", "5M"],
|
||||
irontail: ["7T"],
|
||||
memento: ["7E", "5E"],
|
||||
morningsun: ["7L20", "5L20"],
|
||||
naturepower: ["7E", "5E"],
|
||||
poweruppunch: ["6L99"],
|
||||
protect: ["7M", "5M"],
|
||||
quash: ["7M", "5M"],
|
||||
raindance: ["7M", "7L29", "5M", "5L29"],
|
||||
rapidspin: ["7E", "5E"],
|
||||
reflect: ["5M"],
|
||||
rest: ["7M", "7L53", "5M", "5L53"],
|
||||
retaliate: ["6M", "5M"],
|
||||
return: ["7M", "5M"],
|
||||
roar: ["7M", "5M"],
|
||||
rockslide: ["7M", "5M"],
|
||||
rocksmash: ["6M", "5M"],
|
||||
rocktomb: ["7M", "5M"],
|
||||
roost: ["7M", "7E", "5E"],
|
||||
round: ["7M", "5M"],
|
||||
safeguard: ["7M", "5M"],
|
||||
scratch: ["7L4"],
|
||||
secretpower: ["7M"],
|
||||
skyattack: ["7L55"],
|
||||
skydrop: ["7M", "7L49", "5M", "5L50"],
|
||||
snore: ["7T"],
|
||||
solarbeam: ["7M", "5M"],
|
||||
stealthrock: ["7E", "5E"],
|
||||
steelwing: ["7M"],
|
||||
strength: ["6M", "5M"],
|
||||
submission: ["7L37", "5L42"],
|
||||
substitute: ["7M", "5M"],
|
||||
sunnyday: ["7M", "7L1", "5M", "5L1"],
|
||||
superpower: ["7L50", "5L51"],
|
||||
swagger: ["7M", "5M"],
|
||||
taunt: ["7M", "5M"],
|
||||
thief: ["7M", "5M"],
|
||||
toxic: ["7M", "5M"],
|
||||
whirlwind: ["7L23", "5L23"],
|
||||
workup: ["7M", "5M"],
|
||||
yawn: ["7E", "5E"],
|
||||
}},
|
||||
aurumoth: {learnset: {
|
||||
allyswitch: ["5M"],
|
||||
ancientpower: ["7L47", "5L47"],
|
||||
attract: ["7M", "5M"],
|
||||
blizzard: ["7M", "5M"],
|
||||
bugbite: ["7T", "5T"],
|
||||
bugbuzz: ["7E", "5E"],
|
||||
closecombat: ["7E", "5E"],
|
||||
confide: ["7M"],
|
||||
counter: ["7E", "5E"],
|
||||
cut: ["6M", "5M"],
|
||||
disable: ["7E", "5E"],
|
||||
doubleteam: ["7M", "5M"],
|
||||
dragondance: ["7L1", "5L1"],
|
||||
dreameater: ["7M", "5M"],
|
||||
echoedvoice: ["7M", "5M"],
|
||||
electroweb: ["7T", "5T"],
|
||||
facade: ["7M", "5M"],
|
||||
feint: ["7E", "5E"],
|
||||
finalgambit: ["5L41", "5L41"],
|
||||
flash: ["6M", "5M"],
|
||||
fling: ["7M", "5M"],
|
||||
focusblast: ["7M", "5M"],
|
||||
frustration: ["7M", "5M"],
|
||||
gigaimpact: ["7M", "5M"],
|
||||
hail: ["7M", "5M"],
|
||||
healingwish: ["7L61", "5L61"],
|
||||
healpulse: ["7L21", "5L21"],
|
||||
helpinghand: ["7T", "5T"],
|
||||
hiddenpower: ["7M", "5M"],
|
||||
hydropump: ["7E", "5E"],
|
||||
hyperbeam: ["7M", "5M"],
|
||||
icebeam: ["7M", "5M"],
|
||||
icywind: ["7T", "5T"],
|
||||
infestation: ["7M"],
|
||||
lightscreen: ["7M", "5M"],
|
||||
magiccoat: ["7T", "5T"],
|
||||
magicroom: ["7T", "5T"],
|
||||
megahorn: ["7E", "5E"],
|
||||
ominouswind: ["7L27", "5L27"],
|
||||
overheat: ["7M", "5M"],
|
||||
protect: ["7M", "5M"],
|
||||
psychic: ["7M", "5M"],
|
||||
psychicterrain: ["7L1"],
|
||||
psychup: ["7M", "5M"],
|
||||
psyshock: ["7M", "5M"],
|
||||
quiverdance: ["5L1"],
|
||||
raindance: ["7M", "5M"],
|
||||
recycle: ["7T", "5T"],
|
||||
reflect: ["7M", "5M"],
|
||||
rest: ["7M", "5M"],
|
||||
retaliate: ["5M"],
|
||||
return: ["7M", "5M"],
|
||||
roleplay: ["7T", "5T"],
|
||||
round: ["7M", "5M"],
|
||||
safeguard: ["7M", "7E", "5M", "5E"],
|
||||
secretpower: ["7M"],
|
||||
shadowball: ["7M", "5M"],
|
||||
shockwave: ["7M"],
|
||||
signalbeam: ["7T"],
|
||||
silverwind: ["7L1", "5L1"],
|
||||
skillswap: ["7T", "5T"],
|
||||
sleeptalk: ["7M"],
|
||||
snore: ["7T"],
|
||||
solarbeam: ["7M", "5M"],
|
||||
spotlight: ["7L1"],
|
||||
steelwing: ["7M"],
|
||||
stringshot: ["7L1", "5L1"],
|
||||
strugglebug: ["5M"],
|
||||
substitute: ["7M", "5M"],
|
||||
sunnyday: ["7M", "7L1", "5M", "5L1"],
|
||||
surf: ["7M", "5M"],
|
||||
swagger: ["7M", "5M"],
|
||||
tackle: ["7L1", "5L1"],
|
||||
tailglow: ["7L67", "5L67"],
|
||||
telekinesis: ["5M"],
|
||||
thunder: ["7M", "5M"],
|
||||
thunderbolt: ["7M", "5M"],
|
||||
toxic: ["7M", "5M"],
|
||||
trick: ["7T", "5T"],
|
||||
waterpulse: ["7T"],
|
||||
willowisp: ["7M", "7L34", "5M", "5L34"],
|
||||
wingattack: ["7E", "5E"],
|
||||
wish: ["7L54", "5L54"],
|
||||
wonderroom: ["7T", "5T"],
|
||||
xscissor: ["7M", "5M"],
|
||||
zenheadbutt: ["7T", "5T"],
|
||||
}},
|
||||
crucibelle: {learnset: {
|
||||
acidarmor: ["7L32", "6L32"],
|
||||
astonish: ["7L1", "6L1"],
|
||||
attract: ["7M", "6M"],
|
||||
block: ["6T"],
|
||||
coil: ["7E", "6E"],
|
||||
confuseray: ["7L16", "6L16"],
|
||||
confusion: ["7L14", "6L14"],
|
||||
defensecurl: ["7E", "6E"],
|
||||
doubleteam: ["7M", "6M"],
|
||||
embargo: ["7M", "6M"],
|
||||
endure: ["7L1", "6L1"],
|
||||
explosion: ["7M", "7L60", "6M", "6L60"],
|
||||
facade: ["7M", "6M"],
|
||||
faketears: ["7L10", "6L10"],
|
||||
frustration: ["7M", "6M"],
|
||||
gigaimpact: ["7M", "6M"],
|
||||
grassknot: ["7M", "6M"],
|
||||
gravity: ["6T"],
|
||||
gunkshot: ["7L56", "6T", "6L56"],
|
||||
headsmash: ["6L1"],
|
||||
helpinghand: ["6T"],
|
||||
hex: ["7L44", "6L44"],
|
||||
hiddenpower: ["7M", "6M"],
|
||||
hyperbeam: ["7M", "6M"],
|
||||
infestation: ["7M", "6M"],
|
||||
ironhead: ["6T"],
|
||||
lowkick: ["6T"],
|
||||
magicroom: ["6T"],
|
||||
payback: ["7M", "6M"],
|
||||
poisonjab: ["7M", "6M"],
|
||||
protect: ["7M", "7L1", "6M", "6L1"],
|
||||
psybeam: ["7L40", "6L40"],
|
||||
psychic: ["7M", "6M"],
|
||||
reflect: ["7M", "7L25", "6M", "6L25"],
|
||||
rest: ["7M", "6M"],
|
||||
return: ["7M", "6M"],
|
||||
rockblast: ["7L52", "6L52"],
|
||||
rockpolish: ["7M", "6M"],
|
||||
rockslide: ["7M", "7L36", "6M", "6L36"],
|
||||
rocksmash: ["7M", "6M"],
|
||||
rockthrow: ["7L5", "6L5"],
|
||||
rocktomb: ["7M", "6M"],
|
||||
rollout: ["7E", "6E"],
|
||||
round: ["7M", "6M"],
|
||||
safeguard: ["7M", "6M"],
|
||||
sandstorm: ["7M", "6M"],
|
||||
secretpower: ["7M"],
|
||||
shadowball: ["7M", "6M"],
|
||||
skillswap: ["6T"],
|
||||
sleeptalk: ["7M", "6M"],
|
||||
sludge: ["7L28", "6L28"],
|
||||
sludgebomb: ["7M", "6M"],
|
||||
sludgewave: ["7M", "6M"],
|
||||
smackdown: ["7M", "7L23", "6M", "6L23"],
|
||||
snatch: ["6T"],
|
||||
snore: ["6T"],
|
||||
stealthrock: ["6T"],
|
||||
stoneedge: ["7M", "6M"],
|
||||
substitute: ["7M", "6M"],
|
||||
swagger: ["7M", "6M"],
|
||||
torment: ["7M", "7L48", "6M", "6L48"],
|
||||
toxic: ["7M", "7L7", "6M", "6L7"],
|
||||
toxicspikes: ["7L19", "6L19"],
|
||||
trick: ["6T"],
|
||||
uturn: ["7M", "6M"],
|
||||
venoshock: ["7M", "6M"],
|
||||
withdraw: ["7L1", "6L1"],
|
||||
wonderroom: ["6T"],
|
||||
woodhammer: ["7E", "6E"],
|
||||
zenheadbutt: ["6T"],
|
||||
}},
|
||||
tomohawk: {
|
||||
inherit: true,
|
||||
learnset: {
|
||||
acrobatics: ["7M", "5M"],
|
||||
aerialace: ["7M", "7L17", "5M", "5L17"],
|
||||
airslash: ["7L33", "5L37"],
|
||||
aquatail: ["7T"],
|
||||
attract: ["7M", "5M"],
|
||||
aurasphere: ["7L1", "5L1"],
|
||||
batonpass: ["7E", "5E"],
|
||||
brickbreak: ["7E", "5M"],
|
||||
bulkup: ["7M", "5M"],
|
||||
bulldoze: ["7M", "5M"],
|
||||
confide: ["7M"],
|
||||
confuseray: ["7M", "5E"],
|
||||
doubleteam: ["7M", "5M"],
|
||||
earthpower: ["5L33"],
|
||||
earthquake: ["7M", "5M"],
|
||||
echoedvoice: ["7M", "5M"],
|
||||
facade: ["7M", "5M"],
|
||||
falseswipe: ["7M", "5M"],
|
||||
flash: ["6M", "5M"],
|
||||
fling: ["7M", "5M"],
|
||||
fly: ["7M", "5M"],
|
||||
focusblast: ["7M", "5M"],
|
||||
focusenergy: ["7E", "5E"],
|
||||
frustration: ["7E", "5M"],
|
||||
furyswipes: ["7L1", "5L1"],
|
||||
gigaimpact: ["7M", "5M"],
|
||||
grassknot: ["7M", "5M"],
|
||||
harden: ["7L1", "5L1"],
|
||||
haze: ["7E", "5E"],
|
||||
healingwish: ["7L60", "5L60"],
|
||||
heatwave: ["7L42", "5L45"],
|
||||
helpinghand: ["7T"],
|
||||
hiddenpower: ["7M", "5M"],
|
||||
hurricane: ["7L51", "5L55"],
|
||||
hyperbeam: ["7M", "5M"],
|
||||
hypervoice: ["7L45", "5L49"],
|
||||
incinerate: ["6M", "5M"],
|
||||
irontail: ["7T"],
|
||||
memento: ["7E", "5E"],
|
||||
morningsun: ["7L20", "5L20"],
|
||||
naturepower: ["7E", "5E"],
|
||||
poweruppunch: ["6L99"],
|
||||
protect: ["7M", "5M"],
|
||||
quash: ["7M", "5M"],
|
||||
raindance: ["7M", "7L29", "5M", "5L29"],
|
||||
rapidspin: ["7E", "5E"],
|
||||
reflect: ["5M"],
|
||||
rest: ["7M", "7L53", "5M", "5L53"],
|
||||
retaliate: ["6M", "5M"],
|
||||
return: ["7M", "5M"],
|
||||
roar: ["7M", "5M"],
|
||||
rockslide: ["7M", "5M"],
|
||||
rocksmash: ["6M", "5M"],
|
||||
rocktomb: ["7M", "5M"],
|
||||
roost: ["7M", "7E", "5E"],
|
||||
round: ["7M", "5M"],
|
||||
safeguard: ["7M", "5M"],
|
||||
scratch: ["7L4"],
|
||||
secretpower: ["7M"],
|
||||
skyattack: ["7L55"],
|
||||
skydrop: ["7M", "7L49", "5M", "5L50"],
|
||||
snore: ["7T"],
|
||||
solarbeam: ["7M", "5M"],
|
||||
stealthrock: ["7E", "5E"],
|
||||
steelwing: ["7M"],
|
||||
strength: ["6M", "5M"],
|
||||
submission: ["7L37", "5L42"],
|
||||
substitute: ["7M", "5M"],
|
||||
sunnyday: ["7M", "7L1", "5M", "5L1"],
|
||||
superpower: ["7L50", "5L51"],
|
||||
swagger: ["7M", "5M"],
|
||||
taunt: ["7M", "5M"],
|
||||
thief: ["7M", "5M"],
|
||||
toxic: ["7M", "5M"],
|
||||
whirlwind: ["7L23", "5L23"],
|
||||
workup: ["7M", "5M"],
|
||||
yawn: ["7E", "5E"],
|
||||
},
|
||||
},
|
||||
aurumoth: {
|
||||
inherit: true,
|
||||
learnset: {
|
||||
allyswitch: ["5M"],
|
||||
ancientpower: ["7L47", "5L47"],
|
||||
attract: ["7M", "5M"],
|
||||
blizzard: ["7M", "5M"],
|
||||
bugbite: ["7T", "5T"],
|
||||
bugbuzz: ["7E", "5E"],
|
||||
closecombat: ["7E", "5E"],
|
||||
confide: ["7M"],
|
||||
counter: ["7E", "5E"],
|
||||
cut: ["6M", "5M"],
|
||||
disable: ["7E", "5E"],
|
||||
doubleteam: ["7M", "5M"],
|
||||
dragondance: ["7L1", "5L1"],
|
||||
dreameater: ["7M", "5M"],
|
||||
echoedvoice: ["7M", "5M"],
|
||||
electroweb: ["7T", "5T"],
|
||||
facade: ["7M", "5M"],
|
||||
feint: ["7E", "5E"],
|
||||
finalgambit: ["5L41", "5L41"],
|
||||
flash: ["6M", "5M"],
|
||||
fling: ["7M", "5M"],
|
||||
focusblast: ["7M", "5M"],
|
||||
frustration: ["7M", "5M"],
|
||||
gigaimpact: ["7M", "5M"],
|
||||
hail: ["7M", "5M"],
|
||||
healingwish: ["7L61", "5L61"],
|
||||
healpulse: ["7L21", "5L21"],
|
||||
helpinghand: ["7T", "5T"],
|
||||
hiddenpower: ["7M", "5M"],
|
||||
hydropump: ["7E", "5E"],
|
||||
hyperbeam: ["7M", "5M"],
|
||||
icebeam: ["7M", "5M"],
|
||||
icywind: ["7T", "5T"],
|
||||
infestation: ["7M"],
|
||||
lightscreen: ["7M", "5M"],
|
||||
magiccoat: ["7T", "5T"],
|
||||
magicroom: ["7T", "5T"],
|
||||
megahorn: ["7E", "5E"],
|
||||
ominouswind: ["7L27", "5L27"],
|
||||
overheat: ["7M", "5M"],
|
||||
protect: ["7M", "5M"],
|
||||
psychic: ["7M", "5M"],
|
||||
psychicterrain: ["7L1"],
|
||||
psychup: ["7M", "5M"],
|
||||
psyshock: ["7M", "5M"],
|
||||
quiverdance: ["5L1"],
|
||||
raindance: ["7M", "5M"],
|
||||
recycle: ["7T", "5T"],
|
||||
reflect: ["7M", "5M"],
|
||||
rest: ["7M", "5M"],
|
||||
retaliate: ["5M"],
|
||||
return: ["7M", "5M"],
|
||||
roleplay: ["7T", "5T"],
|
||||
round: ["7M", "5M"],
|
||||
safeguard: ["7M", "7E", "5M", "5E"],
|
||||
secretpower: ["7M"],
|
||||
shadowball: ["7M", "5M"],
|
||||
shockwave: ["7M"],
|
||||
signalbeam: ["7T"],
|
||||
silverwind: ["7L1", "5L1"],
|
||||
skillswap: ["7T", "5T"],
|
||||
sleeptalk: ["7M"],
|
||||
snore: ["7T"],
|
||||
solarbeam: ["7M", "5M"],
|
||||
spotlight: ["7L1"],
|
||||
steelwing: ["7M"],
|
||||
stringshot: ["7L1", "5L1"],
|
||||
strugglebug: ["5M"],
|
||||
substitute: ["7M", "5M"],
|
||||
sunnyday: ["7M", "7L1", "5M", "5L1"],
|
||||
surf: ["7M", "5M"],
|
||||
swagger: ["7M", "5M"],
|
||||
tackle: ["7L1", "5L1"],
|
||||
tailglow: ["7L67", "5L67"],
|
||||
telekinesis: ["5M"],
|
||||
thunder: ["7M", "5M"],
|
||||
thunderbolt: ["7M", "5M"],
|
||||
toxic: ["7M", "5M"],
|
||||
trick: ["7T", "5T"],
|
||||
waterpulse: ["7T"],
|
||||
willowisp: ["7M", "7L34", "5M", "5L34"],
|
||||
wingattack: ["7E", "5E"],
|
||||
wish: ["7L54", "5L54"],
|
||||
wonderroom: ["7T", "5T"],
|
||||
xscissor: ["7M", "5M"],
|
||||
zenheadbutt: ["7T", "5T"],
|
||||
},
|
||||
},
|
||||
crucibelle: {
|
||||
inherit: true,
|
||||
learnset: {
|
||||
acidarmor: ["7L32", "6L32"],
|
||||
astonish: ["7L1", "6L1"],
|
||||
attract: ["7M", "6M"],
|
||||
block: ["6T"],
|
||||
coil: ["7E", "6E"],
|
||||
confuseray: ["7L16", "6L16"],
|
||||
confusion: ["7L14", "6L14"],
|
||||
defensecurl: ["7E", "6E"],
|
||||
doubleteam: ["7M", "6M"],
|
||||
embargo: ["7M", "6M"],
|
||||
endure: ["7L1", "6L1"],
|
||||
explosion: ["7M", "7L60", "6M", "6L60"],
|
||||
facade: ["7M", "6M"],
|
||||
faketears: ["7L10", "6L10"],
|
||||
frustration: ["7M", "6M"],
|
||||
gigaimpact: ["7M", "6M"],
|
||||
grassknot: ["7M", "6M"],
|
||||
gravity: ["6T"],
|
||||
gunkshot: ["7L56", "6T", "6L56"],
|
||||
headsmash: ["6L1"],
|
||||
helpinghand: ["6T"],
|
||||
hex: ["7L44", "6L44"],
|
||||
hiddenpower: ["7M", "6M"],
|
||||
hyperbeam: ["7M", "6M"],
|
||||
infestation: ["7M", "6M"],
|
||||
ironhead: ["6T"],
|
||||
lowkick: ["6T"],
|
||||
magicroom: ["6T"],
|
||||
payback: ["7M", "6M"],
|
||||
poisonjab: ["7M", "6M"],
|
||||
protect: ["7M", "7L1", "6M", "6L1"],
|
||||
psybeam: ["7L40", "6L40"],
|
||||
psychic: ["7M", "6M"],
|
||||
reflect: ["7M", "7L25", "6M", "6L25"],
|
||||
rest: ["7M", "6M"],
|
||||
return: ["7M", "6M"],
|
||||
rockblast: ["7L52", "6L52"],
|
||||
rockpolish: ["7M", "6M"],
|
||||
rockslide: ["7M", "7L36", "6M", "6L36"],
|
||||
rocksmash: ["7M", "6M"],
|
||||
rockthrow: ["7L5", "6L5"],
|
||||
rocktomb: ["7M", "6M"],
|
||||
rollout: ["7E", "6E"],
|
||||
round: ["7M", "6M"],
|
||||
safeguard: ["7M", "6M"],
|
||||
sandstorm: ["7M", "6M"],
|
||||
secretpower: ["7M"],
|
||||
shadowball: ["7M", "6M"],
|
||||
skillswap: ["6T"],
|
||||
sleeptalk: ["7M", "6M"],
|
||||
sludge: ["7L28", "6L28"],
|
||||
sludgebomb: ["7M", "6M"],
|
||||
sludgewave: ["7M", "6M"],
|
||||
smackdown: ["7M", "7L23", "6M", "6L23"],
|
||||
snatch: ["6T"],
|
||||
snore: ["6T"],
|
||||
stealthrock: ["6T"],
|
||||
stoneedge: ["7M", "6M"],
|
||||
substitute: ["7M", "6M"],
|
||||
swagger: ["7M", "6M"],
|
||||
torment: ["7M", "7L48", "6M", "6L48"],
|
||||
toxic: ["7M", "7L7", "6M", "6L7"],
|
||||
toxicspikes: ["7L19", "6L19"],
|
||||
trick: ["6T"],
|
||||
uturn: ["7M", "6M"],
|
||||
venoshock: ["7M", "6M"],
|
||||
withdraw: ["7L1", "6L1"],
|
||||
wonderroom: ["6T"],
|
||||
woodhammer: ["7E", "6E"],
|
||||
zenheadbutt: ["6T"],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
exports.BattleLearnsets = BattleLearnsets;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ class RandomGen6Teams extends RandomGen7Teams {
|
|||
template = this.dex.getTemplate(template.otherFormes.length >= 2 ? this.sample(template.otherFormes) : template.otherFormes[0]);
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
let movePool = (template.randomBattleMoves || Object.keys(this.dex.data.Learnsets[template.id].learnset)).slice();
|
||||
let rejectedPool = [];
|
||||
/**@type {string[]} */
|
||||
|
|
|
|||
|
|
@ -2926,21 +2926,18 @@ let BattleFormatsData = {
|
|||
deoxysattack: {
|
||||
randomBattleMoves: ["psychoboost", "superpower", "icebeam", "knockoff", "extremespeed", "firepunch", "stealthrock"],
|
||||
randomDoubleBattleMoves: ["psychoboost", "superpower", "extremespeed", "icebeam", "thunderbolt", "firepunch", "protect", "knockoff"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DUU",
|
||||
},
|
||||
deoxysdefense: {
|
||||
randomBattleMoves: ["spikes", "stealthrock", "recover", "taunt", "toxic", "seismictoss", "knockoff"],
|
||||
randomDoubleBattleMoves: ["protect", "stealthrock", "recover", "taunt", "reflect", "seismictoss", "lightscreen", "trickroom", "psychic"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "(DUU)",
|
||||
},
|
||||
deoxysspeed: {
|
||||
randomBattleMoves: ["spikes", "stealthrock", "superpower", "psychoboost", "taunt", "magiccoat", "knockoff"],
|
||||
randomDoubleBattleMoves: ["superpower", "icebeam", "psychoboost", "taunt", "lightscreen", "reflect", "protect", "knockoff"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "(DUU)",
|
||||
},
|
||||
|
|
@ -3424,7 +3421,6 @@ let BattleFormatsData = {
|
|||
giratinaorigin: {
|
||||
randomBattleMoves: ["dracometeor", "shadowsneak", "dragontail", "willowisp", "defog", "toxic", "shadowball", "earthquake"],
|
||||
randomDoubleBattleMoves: ["dracometeor", "shadowsneak", "tailwind", "hiddenpowerfire", "willowisp", "calmmind", "substitute", "dragonpulse", "shadowball", "aurasphere", "protect", "earthquake"],
|
||||
eventOnly: true,
|
||||
requiredItem: "Griseous Orb",
|
||||
tier: "Uber",
|
||||
doublesTier: "DUber",
|
||||
|
|
@ -3472,7 +3468,6 @@ let BattleFormatsData = {
|
|||
shayminsky: {
|
||||
randomBattleMoves: ["seedflare", "airslash", "earthpower", "hiddenpowerice", "substitute", "leechseed"],
|
||||
randomDoubleBattleMoves: ["seedflare", "earthpower", "airslash", "rest", "substitute", "leechseed", "tailwind", "protect", "hiddenpowerice"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DUU",
|
||||
},
|
||||
|
|
@ -3487,103 +3482,86 @@ let BattleFormatsData = {
|
|||
arceusbug: {
|
||||
randomBattleMoves: ["swordsdance", "xscissor", "stoneedge", "recover", "earthquake", "ironhead"],
|
||||
randomDoubleBattleMoves: ["swordsdance", "xscissor", "stoneedge", "recover", "earthquake", "ironhead", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Insect Plate", "Buginium Z"],
|
||||
},
|
||||
arceusdark: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "recover", "fireblast", "toxic"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "focusblast", "safeguard", "snarl", "willowisp", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Dread Plate", "Darkinium Z"],
|
||||
},
|
||||
arceusdragon: {
|
||||
randomBattleMoves: ["swordsdance", "outrage", "extremespeed", "earthquake", "recover", "judgment", "fireblast", "willowisp", "defog"],
|
||||
randomDoubleBattleMoves: ["swordsdance", "dragonclaw", "extremespeed", "earthquake", "recover", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Draco Plate", "Dragonium Z"],
|
||||
},
|
||||
arceuselectric: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "recover", "icebeam", "earthpower"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "icebeam", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Zap Plate", "Electrium Z"],
|
||||
},
|
||||
arceusfairy: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "recover", "willowisp", "defog", "earthpower", "toxic"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "willowisp", "protect", "earthpower", "thunderbolt"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Pixie Plate", "Fairium Z"],
|
||||
},
|
||||
arceusfighting: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "stoneedge", "shadowball", "recover", "roar", "icebeam"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "icebeam", "shadowball", "recover", "willowisp", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Fist Plate", "Fightinium Z"],
|
||||
},
|
||||
arceusfire: {
|
||||
randomBattleMoves: ["calmmind", "fireblast", "roar", "thunderbolt", "icebeam", "recover"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "thunderbolt", "recover", "heatwave", "protect", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Flame Plate", "Firium Z"],
|
||||
},
|
||||
arceusflying: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "earthpower", "fireblast", "toxic", "recover"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "safeguard", "recover", "substitute", "tailwind", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Sky Plate", "Flyinium Z"],
|
||||
},
|
||||
arceusghost: {
|
||||
randomBattleMoves: ["swordsdance", "shadowforce", "shadowclaw", "brickbreak", "extremespeed", "recover", "judgment", "toxic", "defog"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "focusblast", "recover", "swordsdance", "shadowforce", "brickbreak", "willowisp", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Spooky Plate", "Ghostium Z"],
|
||||
},
|
||||
arceusgrass: {
|
||||
randomBattleMoves: ["judgment", "recover", "calmmind", "icebeam", "fireblast"],
|
||||
randomDoubleBattleMoves: ["calmmind", "icebeam", "judgment", "earthpower", "recover", "safeguard", "thunderwave", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Meadow Plate", "Grassium Z"],
|
||||
},
|
||||
arceusground: {
|
||||
randomBattleMoves: ["swordsdance", "earthquake", "stoneedge", "recover", "judgment", "icebeam", "toxic", "stealthrock"],
|
||||
randomDoubleBattleMoves: ["swordsdance", "earthquake", "stoneedge", "recover", "calmmind", "judgment", "icebeam", "rockslide", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Earth Plate", "Groundium Z"],
|
||||
},
|
||||
arceusice: {
|
||||
randomBattleMoves: ["calmmind", "judgment", "thunderbolt", "fireblast", "recover"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "thunderbolt", "focusblast", "recover", "protect", "icywind"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Icicle Plate", "Icium Z"],
|
||||
},
|
||||
arceuspoison: {
|
||||
randomBattleMoves: ["calmmind", "sludgebomb", "fireblast", "recover", "icebeam", "defog"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "sludgebomb", "heatwave", "recover", "willowisp", "protect", "earthpower"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Toxic Plate", "Poisonium Z"],
|
||||
},
|
||||
arceuspsychic: {
|
||||
randomBattleMoves: ["judgment", "calmmind", "fireblast", "recover", "icebeam", "toxic"],
|
||||
randomDoubleBattleMoves: ["calmmind", "psyshock", "focusblast", "recover", "willowisp", "judgment", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Mind Plate", "Psychium Z"],
|
||||
},
|
||||
arceusrock: {
|
||||
randomBattleMoves: ["swordsdance", "earthquake", "stoneedge", "recover", "judgment", "willowisp", "stealthrock"],
|
||||
randomDoubleBattleMoves: ["swordsdance", "stoneedge", "recover", "rockslide", "earthquake", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Stone Plate", "Rockium Z"],
|
||||
},
|
||||
arceussteel: {
|
||||
randomBattleMoves: ["judgment", "recover", "willowisp", "defog", "roar", "swordsdance", "ironhead", "earthquake", "stoneedge"],
|
||||
randomDoubleBattleMoves: ["calmmind", "judgment", "recover", "protect", "willowisp"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Iron Plate", "Steelium Z"],
|
||||
},
|
||||
arceuswater: {
|
||||
randomBattleMoves: ["recover", "calmmind", "judgment", "icebeam", "toxic", "defog"],
|
||||
randomDoubleBattleMoves: ["recover", "calmmind", "judgment", "icebeam", "fireblast", "icywind", "surf", "protect"],
|
||||
eventOnly: true,
|
||||
requiredItems: ["Splash Plate", "Waterium Z"],
|
||||
},
|
||||
victini: {
|
||||
|
|
@ -4442,7 +4420,6 @@ let BattleFormatsData = {
|
|||
doublesTier: "(DUU)",
|
||||
},
|
||||
keldeoresolute: {
|
||||
eventOnly: true,
|
||||
requiredMove: "Secret Sword",
|
||||
},
|
||||
meloetta: {
|
||||
|
|
@ -4468,19 +4445,15 @@ let BattleFormatsData = {
|
|||
doublesTier: "DOU",
|
||||
},
|
||||
genesectburn: {
|
||||
eventOnly: true,
|
||||
requiredItem: "Burn Drive",
|
||||
},
|
||||
genesectchill: {
|
||||
eventOnly: true,
|
||||
requiredItem: "Chill Drive",
|
||||
},
|
||||
genesectdouse: {
|
||||
eventOnly: true,
|
||||
requiredItem: "Douse Drive",
|
||||
},
|
||||
genesectshock: {
|
||||
eventOnly: true,
|
||||
requiredItem: "Shock Drive",
|
||||
},
|
||||
chespin: {
|
||||
|
|
@ -4930,7 +4903,6 @@ let BattleFormatsData = {
|
|||
hoopaunbound: {
|
||||
randomBattleMoves: ["nastyplot", "substitute", "psychic", "darkpulse", "focusblast", "hyperspacefury", "zenheadbutt", "icepunch", "drainpunch", "gunkshot", "trick"],
|
||||
randomDoubleBattleMoves: ["psychic", "darkpulse", "focusblast", "protect", "hyperspacefury", "zenheadbutt", "icepunch", "drainpunch", "gunkshot"],
|
||||
eventOnly: true,
|
||||
tier: "UUBL",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -5598,13 +5570,11 @@ let BattleFormatsData = {
|
|||
necrozmaduskmane: {
|
||||
randomBattleMoves: ["swordsdance", "sunsteelstrike", "photongeyser", "earthquake", "knockoff", "autotomize"],
|
||||
randomDoubleBattleMoves: ["swordsdance", "sunsteelstrike", "photongeyser", "earthquake", "knockoff", "rockslide"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DUber",
|
||||
},
|
||||
necrozmadawnwings: {
|
||||
randomBattleMoves: ["calmmind", "moongeistbeam", "photongeyser", "heatwave", "powergem", "trickroom"],
|
||||
eventOnly: true,
|
||||
tier: "Uber",
|
||||
doublesTier: "DUber",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class RandomGen7Teams extends RandomTeams {
|
|||
}
|
||||
|
||||
const randMoves = !isDoubles ? template.randomBattleMoves : (template.randomDoubleBattleMoves || template.randomBattleMoves);
|
||||
// @ts-ignore
|
||||
let movePool = (randMoves || Object.keys(this.dex.data.Learnsets[template.id].learnset)).slice();
|
||||
let rejectedPool = [];
|
||||
/**@type {string[]} */
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@
|
|||
let BattleFormatsData = {
|
||||
bulbasaur: {
|
||||
inherit: true,
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 12, "shiny": 1, "ivs": {hp: 31, atk: 25, def: 30, spa: 25, spd: 30, spe: 25}, "moves": ["leechseed", "vinewhip", "growl", "tackle"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
ivysaur: {
|
||||
|
|
@ -27,9 +24,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
charmander: {
|
||||
inherit: true,
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 14, "shiny": 1, "ivs": {hp: 25, atk: 30, def: 25, spa: 30, spd: 25, spe: 31}, "moves": ["ember", "smokescreen", "growl", "scratch"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
charmeleon: {
|
||||
|
|
@ -56,9 +50,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
squirtle: {
|
||||
inherit: true,
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 16, "shiny": 1, "ivs": {hp: 25, atk: 25, def: 30, spa: 31, spd: 30, spe: 25}, "moves": ["withdraw", "bubble", "tailwhip", "tackle"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
wartortle: {
|
||||
|
|
@ -357,9 +348,6 @@ let BattleFormatsData = {
|
|||
persian: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["fakeout", "uturn", "taunt", "headbutt", "playrough"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 16, "shiny": 1, "ivs": {hp: 30, atk: 30, def: 25, spa: 25, spd: 25, spe: 31}, "moves": ["feint", "payday", "taunt", "fakeout"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "UU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -396,9 +384,6 @@ let BattleFormatsData = {
|
|||
arcanine: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["flareblitz", "willowisp", "crunch", "playrough", "superpower"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 16, "shiny": 1, "ivs": {hp: 25, atk: 30, def: 25, spa: 30, spd: 25, spe: 31}, "moves": ["roar", "leer", "ember", "doubleedge"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "OU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -642,17 +627,11 @@ let BattleFormatsData = {
|
|||
},
|
||||
voltorb: {
|
||||
inherit: true,
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 42, "shiny": 1, "perfectIVs": 3, "moves": ["mirrorcoat", "thunderbolt", "swift", "selfdestruct"]},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
electrode: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["thunderbolt", "taunt", "thunderwave", "explosion", "reflect", "lightscreen"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 42, "shiny": 1, "perfectIVs": 3, "moves": ["thunderbolt", "screech", "selfdestruct", "swift"]},
|
||||
],
|
||||
tier: "UU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -691,18 +670,12 @@ let BattleFormatsData = {
|
|||
hitmonlee: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["highjumpkick", "earthquake", "bulkup", "rockslide", "poisonjab"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 30, "shiny": 1, "ivs": {hp: 25, atk: 30, def: 25, spa: 25, spd: 30, spe: 31}, "moves": ["jumpkick", "facade", "brickbreak", "feint"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "UU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
hitmonchan: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["icepunch", "thunderpunch", "brickbreak", "firepunch", "earthquake", "bulkup"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 30, "shiny": 1, "ivs": {hp: 25, atk: 31, def: 30, spa: 25, spd: 30, spe: 25}, "moves": ["firepunch", "icepunch", "thunderpunch", "dizzypunch"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "UU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -735,9 +708,6 @@ let BattleFormatsData = {
|
|||
chansey: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["softboiled", "seismictoss", "toxic", "stealthrock", "teleport"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 1, "gender": "F", "nature": "Mild", "moves": ["celebrate", "pound"], "pokeball": "cherishball"},
|
||||
],
|
||||
tier: "OU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -839,9 +809,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
magikarp: {
|
||||
inherit: true,
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 5, "shiny": 1, "ivs": {hp: 30, atk: 31, def: 25, spa: 25, spd: 25, spe: 31}, "moves": ["splash"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
gyarados: {
|
||||
|
|
@ -859,9 +826,6 @@ let BattleFormatsData = {
|
|||
lapras: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["icebeam", "thunderbolt", "surf", "hydropump", "toxic"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 34, "shiny": 1, "ivs": {hp: 31, atk: 25, def: 25, spa: 30, spd: 30, spe: 25}, "moves": ["bodyslam", "confuseray", "iceshard", "mist"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "UU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -903,17 +867,11 @@ let BattleFormatsData = {
|
|||
porygon: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["triattack", "recover", "icebeam", "toxic", "psychic"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 34, "shiny": 1, "ivs": {hp: 25, atk: 25, def: 30, spa: 31, spd: 30, spe: 25}, "moves": ["conversion", "thunderwave", "triattack", "barrier"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "UU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
omanyte: {
|
||||
inherit: true,
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 44, "shiny": 1, "perfectIVs": 3, "moves": ["hydropump", "rockslide", "protect", "rockthrow"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
omastar: {
|
||||
|
|
@ -924,9 +882,6 @@ let BattleFormatsData = {
|
|||
},
|
||||
kabuto: {
|
||||
inherit: true,
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 44, "shiny": 1, "perfectIVs": 3, "moves": ["rockslide", "sandattack", "rockthrow", "aquajet"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "LC",
|
||||
},
|
||||
kabutops: {
|
||||
|
|
@ -938,9 +893,6 @@ let BattleFormatsData = {
|
|||
aerodactyl: {
|
||||
inherit: true,
|
||||
randomBattleMoves: [],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 44, "shiny": 1, "perfectIVs": 3, "moves": ["rockslide", "crunch", "rockthrow", "agility"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "OU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -953,40 +905,24 @@ let BattleFormatsData = {
|
|||
snorlax: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["earthquake", "bodyslam", "rest", "crunch", "toxic"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 34, "shiny": 1, "perfectIVs": 3, "moves": ["rest", "headbutt", "lick", "yawn"]},
|
||||
{"generation": 7, "level": 34, "shiny": 1, "perfectIVs": 3, "moves": ["rest", "headbutt", "lick", "yawn"]},
|
||||
],
|
||||
tier: "OU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
articuno: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["icebeam", "roost", "toxic", "uturn", "substitute"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 50, "shiny": 1, "perfectIVs": 3, "moves": ["reflect", "agility", "icebeam", "mirrorcoat"]},
|
||||
],
|
||||
eventOnly: false,
|
||||
tier: "UU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
zapdos: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["thunderbolt", "roost", "uturn", "toxic", "drillpeck"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 50, "shiny": 1, "perfectIVs": 3, "moves": ["lightscreen", "agility", "thunderbolt", "drillpeck"]},
|
||||
],
|
||||
eventOnly: false,
|
||||
tier: "OU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
moltres: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["roost", "airslash", "flamethrower", "fireblast", "willowisp", "uturn"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 50, "shiny": 1, "perfectIVs": 3, "moves": ["heatwave", "agility", "flamethrower", "airslash"]},
|
||||
],
|
||||
eventOnly: false,
|
||||
tier: "UU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
@ -1007,9 +943,6 @@ let BattleFormatsData = {
|
|||
mewtwo: {
|
||||
inherit: true,
|
||||
randomBattleMoves: [],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 70, "shiny": 1, "perfectIVs": 3, "moves": ["psychic", "recover", "amnesia", "swift"]},
|
||||
],
|
||||
tier: "Uber",
|
||||
doublesTier: "DUber",
|
||||
},
|
||||
|
|
@ -1028,9 +961,6 @@ let BattleFormatsData = {
|
|||
mew: {
|
||||
inherit: true,
|
||||
randomBattleMoves: ["roost", "psychic", "willowisp", "flamethrower", "stealthrock", "nastyplot"],
|
||||
eventPokemon: [
|
||||
{"generation": 7, "level": 1, "perfectIVs": 3, "moves": ["pound"], "pokeball": "pokeball"},
|
||||
],
|
||||
tier: "OU",
|
||||
doublesTier: "DOU",
|
||||
},
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -24,6 +24,7 @@ class RandomLetsGoTeams extends RandomTeams {
|
|||
species = this.dex.getOutOfBattleSpecies(template);
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
let movePool = (template.randomBattleMoves || Object.keys(this.dex.data.Learnsets[template.id].learnset)).slice();
|
||||
/**@type {string[]} */
|
||||
let moves = [];
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -197,13 +197,13 @@ class RandomTeams {
|
|||
if (species === 'Smeargle') {
|
||||
pool = Object.keys(this.dex.data.Movedex).filter(moveid => !(this.dex.data.Movedex[moveid].isNonstandard || this.dex.data.Movedex[moveid].isZ || this.dex.data.Movedex[moveid].id === 'hiddenpower' && moveid !== 'hiddenpower'));
|
||||
} else {
|
||||
let learnset = template.learnset || this.dex.getTemplate(template.baseSpecies).learnset;
|
||||
let lsetData = this.dex.getLearnsetData(template.speciesid);
|
||||
// @ts-ignore
|
||||
if (learnset) pool = Object.keys(learnset).filter(moveid => learnset[moveid].find(learned => learned.startsWith(this.gen)));
|
||||
if (lsetData.exists) pool = Object.keys(lsetData.learnset).filter(moveid => lsetData.learnset[moveid].find(learned => learned.startsWith(this.gen.toString())));
|
||||
if (template.species.substr(0, 9) === 'Necrozma-' || template.species.substr(0, 6) === 'Rotom-') {
|
||||
learnset = this.dex.getTemplate(template.baseSpecies).learnset;
|
||||
lsetData = this.dex.getLearnsetData(toID(template.baseSpecies));
|
||||
// @ts-ignore
|
||||
const basePool = Object.keys(learnset).filter(moveid => learnset[moveid].find(learned => learned.startsWith(this.gen)));
|
||||
const basePool = Object.keys(lsetData.learnset).filter(moveid => lsetData.learnset[moveid].find(learned => learned.startsWith(this.gen.toString())));
|
||||
pool = [...new Set(pool.concat(basePool))];
|
||||
}
|
||||
}
|
||||
|
|
@ -629,6 +629,7 @@ class RandomTeams {
|
|||
}
|
||||
|
||||
const randMoves = !isDoubles ? template.randomBattleMoves : (template.randomDoubleBattleMoves || template.randomBattleMoves);
|
||||
// @ts-ignore
|
||||
let movePool = (randMoves || Object.keys(this.dex.data.Learnsets[template.id].learnset)).slice();
|
||||
let rejectedPool = [];
|
||||
/**@type {string[]} */
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ export const commands: ChatCommands = {
|
|||
await FS('data/learnsets.js').write(`'use strict';\n\nexports.BattleLearnsets = {\n` +
|
||||
Object.entries(Dex.data.Learnsets).map(([speciesid, entry]) => (
|
||||
`\t${speciesid}: {learnset: {\n` +
|
||||
Object.entries(entry.learnset).sort(
|
||||
Object.entries(Dex.getLearnsetData(speciesid as ID)).sort(
|
||||
(a, b) => (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0)
|
||||
).map(([moveid, sources]) => (
|
||||
`\t\t${moveid}: ["` + sources.join(`", "`) + `"],\n`
|
||||
|
|
|
|||
|
|
@ -807,9 +807,10 @@ function runDexsearch(target: string, cmd: string, canAll: boolean, message: str
|
|||
!format.banlist.includes(dex[mon].species) &&
|
||||
!format.banlist.includes(dex[mon].species + "-Base")
|
||||
) {
|
||||
if (dex[mon].eventPokemon && dex[mon].eventOnly) {
|
||||
const lsetData = Dex.getLearnsetData(dex[mon].speciesid);
|
||||
if (lsetData.exists && lsetData.eventData && lsetData.eventOnly) {
|
||||
let validEvents = 0;
|
||||
for (const event of dex[mon].eventPokemon!) {
|
||||
for (const event of lsetData.eventData) {
|
||||
if (event.level && event.level <= 5) validEvents++;
|
||||
}
|
||||
if (validEvents > 0) continue;
|
||||
|
|
|
|||
|
|
@ -494,6 +494,30 @@ export class Ability extends BasicEffect implements Readonly<BasicEffect & Abili
|
|||
}
|
||||
}
|
||||
|
||||
export class Learnset {
|
||||
readonly effectType: 'Learnset';
|
||||
/**
|
||||
* Keeps track of exactly how a pokemon might learn a move, in the
|
||||
* form moveid:sources[].
|
||||
*/
|
||||
readonly learnset?: {[moveid: string]: MoveSource[]};
|
||||
/** True if the only way to get this Pokemon is from events. */
|
||||
readonly eventOnly: boolean;
|
||||
/** List of event data for each event. */
|
||||
readonly eventData?: EventInfo[];
|
||||
readonly encounters?: EventInfo[];
|
||||
readonly exists: boolean;
|
||||
|
||||
constructor(data: AnyObject) {
|
||||
this.exists = true;
|
||||
this.effectType = 'Learnset';
|
||||
this.learnset = data.learnset || undefined;
|
||||
this.eventOnly = !!data.eventOnly;
|
||||
this.eventData = data.eventData || undefined;
|
||||
this.encounters = data.encounters || undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export class Template extends BasicEffect implements Readonly<BasicEffect & TemplateData & TemplateFormatsData> {
|
||||
readonly effectType: 'Pokemon';
|
||||
/**
|
||||
|
|
@ -606,11 +630,6 @@ export class Template extends BasicEffect implements Readonly<BasicEffect & Temp
|
|||
*/
|
||||
readonly requiredItems?: string[];
|
||||
|
||||
/**
|
||||
* Keeps track of exactly how a pokemon might learn a move, in the
|
||||
* form moveid:sources[].
|
||||
*/
|
||||
readonly learnset?: {[moveid: string]: MoveSource[]};
|
||||
/**
|
||||
* Formes that can transform into this Pokemon, to inherit learnsets
|
||||
* from. (Like `prevo`, but for transformations that aren't
|
||||
|
|
@ -621,10 +640,6 @@ export class Template extends BasicEffect implements Readonly<BasicEffect & Temp
|
|||
* for in-battle formes.
|
||||
*/
|
||||
readonly inheritsFrom: ID;
|
||||
/** True if the only way to get this pokemon is from events. */
|
||||
readonly eventOnly: boolean;
|
||||
/** List of event data for each event. */
|
||||
readonly eventPokemon?: EventInfo[];
|
||||
|
||||
/**
|
||||
* Singles Tier. The Pokemon's location in the Smogon tier system.
|
||||
|
|
@ -686,9 +701,6 @@ export class Template extends BasicEffect implements Readonly<BasicEffect & Temp
|
|||
this.unreleasedHidden = data.unreleasedHidden || false;
|
||||
this.maleOnlyHidden = !!data.maleOnlyHidden;
|
||||
this.maxHP = data.maxHP || undefined;
|
||||
this.learnset = data.learnset || undefined;
|
||||
this.eventOnly = !!data.eventOnly;
|
||||
this.eventPokemon = data.eventPokemon || undefined;
|
||||
this.isMega = !!(this.forme && ['Mega', 'Mega-X', 'Mega-Y'].includes(this.forme)) || undefined;
|
||||
this.isGigantamax = data.isGigantamax || undefined;
|
||||
this.battleOnly = !!data.battleOnly || !!this.isMega || !!this.isGigantamax || undefined;
|
||||
|
|
|
|||
24
sim/dex.ts
24
sim/dex.ts
|
|
@ -93,7 +93,7 @@ interface DexTableData {
|
|||
Formats: DexTable<Format>;
|
||||
FormatsData: DexTable<ModdedTemplateFormatsData>;
|
||||
Items: DexTable<Item>;
|
||||
Learnsets: DexTable<{learnset: {[k: string]: MoveSource[]}}>;
|
||||
Learnsets: DexTable<LearnsetData>;
|
||||
Movedex: DexTable<Move>;
|
||||
Natures: DexTable<Nature>;
|
||||
Pokedex: DexTable<Template>;
|
||||
|
|
@ -146,6 +146,7 @@ export class ModdedDex {
|
|||
readonly abilityCache: Map<ID, Ability>;
|
||||
readonly effectCache: Map<ID, Effect | Move>;
|
||||
readonly itemCache: Map<ID, Item>;
|
||||
readonly learnsetCache: Map<ID, LearnsetData>;
|
||||
readonly moveCache: Map<ID, Move>;
|
||||
readonly templateCache: Map<ID, Template>;
|
||||
readonly typeCache: Map<string, TypeInfo>;
|
||||
|
|
@ -172,6 +173,7 @@ export class ModdedDex {
|
|||
this.effectCache = new Map();
|
||||
this.itemCache = new Map();
|
||||
this.moveCache = new Map();
|
||||
this.learnsetCache = new Map();
|
||||
this.templateCache = new Map();
|
||||
this.typeCache = new Map();
|
||||
|
||||
|
|
@ -191,6 +193,7 @@ export class ModdedDex {
|
|||
|
||||
this.abilityCache = original.abilityCache;
|
||||
this.itemCache = original.itemCache;
|
||||
this.learnsetCache = original.learnsetCache;
|
||||
this.moveCache = original.moveCache;
|
||||
this.templateCache = original.templateCache;
|
||||
|
||||
|
|
@ -398,7 +401,7 @@ export class ModdedDex {
|
|||
}
|
||||
}
|
||||
if (id && this.data.Pokedex.hasOwnProperty(id)) {
|
||||
template = new Data.Template({name}, this.data.Pokedex[id], this.data.FormatsData[id], this.data.Learnsets[id]);
|
||||
template = new Data.Template({name}, this.data.Pokedex[id], this.data.FormatsData[id]);
|
||||
// Inherit any statuses from the base species (Arceus, Silvally).
|
||||
const baseSpeciesStatuses = this.data.Statuses[toID(template.baseSpecies)];
|
||||
if (baseSpeciesStatuses !== undefined) {
|
||||
|
|
@ -450,13 +453,20 @@ export class ModdedDex {
|
|||
}
|
||||
|
||||
getOutOfBattleSpecies(template: Template) {
|
||||
return template.inheritsFrom ? this.getTemplate(template.inheritsFrom).species : template.baseSpecies;
|
||||
return !template.battleOnly ? template.species :
|
||||
template.inheritsFrom ? this.getTemplate(template.inheritsFrom).species :
|
||||
template.baseSpecies;
|
||||
}
|
||||
|
||||
getLearnset(template: string | AnyObject): AnyObject | null {
|
||||
const id = toID(template);
|
||||
if (!this.data.Learnsets[id]) return null;
|
||||
return this.data.Learnsets[id].learnset;
|
||||
getLearnsetData(id: ID): LearnsetData {
|
||||
let learnsetData = this.learnsetCache.get(id);
|
||||
if (learnsetData) return learnsetData;
|
||||
if (!this.data.Learnsets.hasOwnProperty(id)) {
|
||||
return new Data.Learnset({exists: false});
|
||||
}
|
||||
learnsetData = new Data.Learnset(this.data.Learnsets[id]);
|
||||
this.learnsetCache.set(id, learnsetData);
|
||||
return learnsetData;
|
||||
}
|
||||
|
||||
getMove(name?: string | Move): Move {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ interface PokemonSet {
|
|||
* - T = tutor
|
||||
* - R = restricted (special moves like Rotom moves)
|
||||
* - E = egg
|
||||
* - S = event, 3rd char+ is the index in .eventPokemon
|
||||
* - S = event, 3rd char+ is the index in .eventData
|
||||
* - D = Dream World, only 5D is valid
|
||||
* - V = Virtual Console or Let's Go transfer, only 7V/8V is valid
|
||||
* - C = NOT A REAL SOURCE, see note, only 3C/4C is valid
|
||||
|
|
@ -1091,10 +1091,7 @@ interface TemplateFormatsData {
|
|||
battleOnly?: boolean;
|
||||
comboMoves?: readonly string[];
|
||||
doublesTier?: string;
|
||||
encounters?: EventInfo[];
|
||||
essentialMove?: string;
|
||||
eventOnly?: boolean;
|
||||
eventPokemon?: EventInfo[];
|
||||
exclusiveMoves?: readonly string[];
|
||||
gen?: number;
|
||||
isGigantamax?: string;
|
||||
|
|
@ -1116,6 +1113,18 @@ interface ModdedTemplateFormatsData extends Partial<TemplateFormatsData> {
|
|||
inherit?: true;
|
||||
}
|
||||
|
||||
interface LearnsetData {
|
||||
learnset?: {[moveid: string]: MoveSource[]};
|
||||
eventData?: EventInfo[];
|
||||
eventOnly?: boolean;
|
||||
encounters?: EventInfo[];
|
||||
exists?: boolean;
|
||||
}
|
||||
|
||||
interface ModdedLearnsetData extends Partial<LearnsetData> {
|
||||
inherit?: true;
|
||||
}
|
||||
|
||||
type Template = import('./dex-data').Template;
|
||||
|
||||
type GameType = 'singles' | 'doubles' | 'triples' | 'rotation' | 'multi' | 'free-for-all';
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import {Dex} from './dex';
|
|||
*
|
||||
* - E = egg, 3rd char+ is the father in gen 2-5, empty in gen 6-7
|
||||
* because egg moves aren't restricted to fathers anymore
|
||||
* - S = event, 3rd char+ is the index in .eventPokemon
|
||||
* - S = event, 3rd char+ is the index in .eventData
|
||||
* - D = Dream World, only 5D is valid
|
||||
* - V = Virtual Console or Let's Go transfer, only 7V/8V is valid
|
||||
*
|
||||
|
|
@ -397,12 +397,13 @@ export class TeamValidator {
|
|||
item = dex.getItem(set.item);
|
||||
ability = dex.getAbility(set.ability);
|
||||
|
||||
let learnsetTemplate = template;
|
||||
let outOfBattleTemplate = template;
|
||||
const learnsetTemplate = dex.getLearnsetData(outOfBattleTemplate.speciesid);
|
||||
let tierTemplate = template;
|
||||
if (ability.id === 'battlebond' && template.id === 'greninja') {
|
||||
learnsetTemplate = dex.getTemplate('greninjaash');
|
||||
outOfBattleTemplate = dex.getTemplate('greninjaash');
|
||||
if (ruleTable.has('obtainableformes')) {
|
||||
tierTemplate = learnsetTemplate;
|
||||
tierTemplate = outOfBattleTemplate;
|
||||
}
|
||||
if (ruleTable.has('obtainablemisc')) {
|
||||
if (set.gender && set.gender !== 'M') {
|
||||
|
|
@ -412,7 +413,7 @@ export class TeamValidator {
|
|||
}
|
||||
}
|
||||
if (ability.id === 'owntempo' && template.id === 'rockruff') {
|
||||
tierTemplate = learnsetTemplate = dex.getTemplate('rockruffdusk');
|
||||
tierTemplate = outOfBattleTemplate = dex.getTemplate('rockruffdusk');
|
||||
}
|
||||
if (!template.exists) {
|
||||
return [`The Pokemon "${set.species}" does not exist.`];
|
||||
|
|
@ -553,7 +554,7 @@ export class TeamValidator {
|
|||
|
||||
if (ruleTable.has('obtainablemoves')) {
|
||||
const checkLearnset = (ruleTable.checkLearnset && ruleTable.checkLearnset[0] || this.checkLearnset);
|
||||
lsetProblem = checkLearnset.call(this, move, learnsetTemplate, setSources, set);
|
||||
lsetProblem = checkLearnset.call(this, move, outOfBattleTemplate, setSources, set);
|
||||
if (lsetProblem) {
|
||||
lsetProblem.moveName = move.name;
|
||||
break;
|
||||
|
|
@ -561,10 +562,10 @@ export class TeamValidator {
|
|||
}
|
||||
}
|
||||
|
||||
const lsetProblems = this.reconcileLearnset(learnsetTemplate, setSources, lsetProblem, name);
|
||||
const lsetProblems = this.reconcileLearnset(outOfBattleTemplate, setSources, lsetProblem, name);
|
||||
if (lsetProblems) problems.push(...lsetProblems);
|
||||
|
||||
if (ruleTable.has('obtainablemisc') && learnsetTemplate.forme?.includes('Gmax')) {
|
||||
if (ruleTable.has('obtainablemisc') && outOfBattleTemplate.forme?.includes('Gmax')) {
|
||||
if (!setSources.sourcesBefore) {
|
||||
problems.push(`${name} has an exclusive move that it doesn't qualify for (because Gmax Pokemon can only be obtained from a Max Raid).`);
|
||||
} else if (setSources.sourcesBefore < 8) {
|
||||
|
|
@ -573,7 +574,7 @@ export class TeamValidator {
|
|||
} else if (!setSources.sourcesBefore && setSources.sources.length) {
|
||||
let legal = false;
|
||||
for (const source of setSources.sources) {
|
||||
if (this.validateSource(set, source, setSources, learnsetTemplate)) continue;
|
||||
if (this.validateSource(set, source, setSources, outOfBattleTemplate)) continue;
|
||||
legal = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -595,19 +596,21 @@ export class TeamValidator {
|
|||
problems.push(`${name} has an event-exclusive move that it doesn't qualify for (only one of several ways to get the move will be listed):`);
|
||||
}
|
||||
const eventProblems = this.validateSource(
|
||||
set, nonEggSource, setSources, learnsetTemplate, ` because it has a move only available`
|
||||
set, nonEggSource, setSources, outOfBattleTemplate, ` because it has a move only available`
|
||||
);
|
||||
if (eventProblems) problems.push(...eventProblems);
|
||||
}
|
||||
}
|
||||
} else if (ruleTable.has('obtainablemisc') && learnsetTemplate.eventOnly) {
|
||||
const eventTemplate = !learnsetTemplate.eventPokemon && learnsetTemplate.baseSpecies !== learnsetTemplate.species ?
|
||||
dex.getTemplate(learnsetTemplate.baseSpecies) : learnsetTemplate;
|
||||
const eventPokemon = eventTemplate.eventPokemon;
|
||||
if (!eventPokemon) throw new Error(`Event-only template ${template.species} has no eventPokemon table`);
|
||||
const eventTemplate = !learnsetTemplate.eventData &&
|
||||
outOfBattleTemplate.baseSpecies !== outOfBattleTemplate.species ?
|
||||
dex.getTemplate(outOfBattleTemplate.baseSpecies) : outOfBattleTemplate;
|
||||
const eventData = learnsetTemplate.eventData ||
|
||||
dex.getLearnsetData(eventTemplate.id).eventData;
|
||||
if (!eventData) throw new Error(`Event-only template ${template.species} has no eventData table`);
|
||||
let legal = false;
|
||||
for (const eventData of eventPokemon) {
|
||||
if (this.validateEvent(set, eventData, eventTemplate)) continue;
|
||||
for (const event of eventData) {
|
||||
if (this.validateEvent(set, event, eventTemplate)) continue;
|
||||
legal = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -615,21 +618,21 @@ export class TeamValidator {
|
|||
legal = true;
|
||||
}
|
||||
if (!legal) {
|
||||
if (eventPokemon.length === 1) {
|
||||
if (eventData.length === 1) {
|
||||
problems.push(`${template.species} is only obtainable from an event - it needs to match its event:`);
|
||||
} else {
|
||||
problems.push(`${template.species} is only obtainable from events - it needs to match one of its events, such as:`);
|
||||
}
|
||||
let eventInfo = eventPokemon[0];
|
||||
let eventInfo = eventData[0];
|
||||
let eventNum = 1;
|
||||
for (const [i, eventData] of eventPokemon.entries()) {
|
||||
if (eventData.generation <= dex.gen && eventData.generation >= this.minSourceGen) {
|
||||
eventInfo = eventData;
|
||||
for (const [i, event] of eventData.entries()) {
|
||||
if (event.generation <= dex.gen && event.generation >= this.minSourceGen) {
|
||||
eventInfo = event;
|
||||
eventNum = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const eventName = eventPokemon.length > 1 ? ` #${eventNum}` : ``;
|
||||
const eventName = eventData.length > 1 ? ` #${eventNum}` : ``;
|
||||
const eventProblems = this.validateEvent(set, eventInfo, eventTemplate, ` to be`, `from its event${eventName}`);
|
||||
if (eventProblems) problems.push(...eventProblems);
|
||||
}
|
||||
|
|
@ -924,13 +927,14 @@ export class TeamValidator {
|
|||
validateSource(
|
||||
set: PokemonSet, source: PokemonSource, setSources: PokemonSources, template: Template, because?: string
|
||||
) {
|
||||
let eventData: EventInfo | null = null;
|
||||
let eventData: EventInfo | undefined;
|
||||
let eventTemplate = template;
|
||||
if (source.charAt(1) === 'S') {
|
||||
const splitSource = source.substr(source.charAt(2) === 'T' ? 3 : 2).split(' ');
|
||||
const dex = (this.dex.gen === 1 ? Dex.mod('gen2') : this.dex);
|
||||
eventTemplate = dex.getTemplate(splitSource[1]);
|
||||
if (eventTemplate.eventPokemon) eventData = eventTemplate.eventPokemon[parseInt(splitSource[0])];
|
||||
const eventLsetData = this.dex.getLearnsetData(eventTemplate.speciesid);
|
||||
eventData = eventLsetData.eventData?.[parseInt(splitSource[0])];
|
||||
if (!eventData) {
|
||||
throw new Error(`${eventTemplate.species} from ${template.species} doesn't have data for event ${source}`);
|
||||
}
|
||||
|
|
@ -1011,6 +1015,7 @@ export class TeamValidator {
|
|||
// try to find a father to inherit the egg move combination from
|
||||
for (const fatherid in dex.data.Pokedex) {
|
||||
const father = dex.getTemplate(fatherid);
|
||||
const fatherLsetData = dex.getLearnsetData(fatherid as ID);
|
||||
// can't inherit from CAP pokemon
|
||||
if (father.isNonstandard) continue;
|
||||
// can't breed mons from future gens
|
||||
|
|
@ -1018,7 +1023,7 @@ export class TeamValidator {
|
|||
// father must be male
|
||||
if (father.gender === 'N' || father.gender === 'F') continue;
|
||||
// can't inherit from dex entries with no learnsets
|
||||
if (!father.learnset) continue;
|
||||
if (!fatherLsetData.exists || !fatherLsetData.learnset) continue;
|
||||
// something is clearly wrong if its only possible father is itself
|
||||
// (exceptions: ExtremeSpeed Dragonite, Self-destruct Snorlax)
|
||||
if (template.speciesid === fatherid && !['dragonite', 'snorlax'].includes(fatherid)) continue;
|
||||
|
|
@ -1053,7 +1058,8 @@ export class TeamValidator {
|
|||
* function (the answer is always yes).
|
||||
*/
|
||||
fatherCanLearn(template: Template, moves: ID[], eggGen: number) {
|
||||
if (!template.learnset) return false;
|
||||
let lsetData = this.dex.getLearnsetData(template.speciesid);
|
||||
if (!lsetData.learnset) return false;
|
||||
if (template.id === 'smeargle') return true;
|
||||
let eggMoveCount = 0;
|
||||
const noEggIncompatibility = template.eggGroups.includes('Field');
|
||||
|
|
@ -1063,8 +1069,9 @@ export class TeamValidator {
|
|||
let canLearn: 0 | 1 | 2 = 0;
|
||||
|
||||
while (curTemplate) {
|
||||
if (curTemplate.learnset && curTemplate.learnset[move]) {
|
||||
for (const moveSource of curTemplate.learnset[move]) {
|
||||
lsetData = this.dex.getLearnsetData(curTemplate.id);
|
||||
if (lsetData.learnset && lsetData.learnset[move]) {
|
||||
for (const moveSource of lsetData.learnset[move]) {
|
||||
if (parseInt(moveSource.charAt(0)) > eggGen) continue;
|
||||
if (!'ESDV'.includes(moveSource.charAt(1)) || (
|
||||
moveSource.charAt(1) === 'E' && noEggIncompatibility
|
||||
|
|
@ -1699,7 +1706,8 @@ export class TeamValidator {
|
|||
while (template?.species && !alreadyChecked[template.speciesid]) {
|
||||
alreadyChecked[template.speciesid] = true;
|
||||
if (dex.gen <= 2 && template.gen === 1) tradebackEligible = true;
|
||||
if (!template.learnset) {
|
||||
const lsetData = dex.getLearnsetData(template.speciesid);
|
||||
if (!lsetData.learnset) {
|
||||
if (template.baseSpecies !== template.species) {
|
||||
// forme without its own learnset
|
||||
template = dex.getTemplate(template.baseSpecies);
|
||||
|
|
@ -1717,12 +1725,12 @@ export class TeamValidator {
|
|||
}
|
||||
}
|
||||
|
||||
if (template.learnset[moveid] || template.learnset['sketch']) {
|
||||
if (lsetData.learnset[moveid] || lsetData.learnset['sketch']) {
|
||||
sometimesPossible = true;
|
||||
let lset = template.learnset[moveid];
|
||||
let lset = lsetData.learnset[moveid];
|
||||
if (moveid === 'sketch' || !lset || template.speciesid === 'smeargle') {
|
||||
if (move.noSketch || move.isZ) return {type: 'invalid'};
|
||||
lset = template.learnset['sketch'];
|
||||
lset = lsetData.learnset['sketch'];
|
||||
sketch = true;
|
||||
}
|
||||
if (typeof lset === 'string') lset = [lset];
|
||||
|
|
@ -1849,7 +1857,7 @@ export class TeamValidator {
|
|||
const glitchMoves = ['metronome', 'copycat', 'transform', 'mimic', 'assist'];
|
||||
let getGlitch = false;
|
||||
for (const i of glitchMoves) {
|
||||
if (template.learnset[i]) {
|
||||
if (lsetData.learnset[i]) {
|
||||
if (!(i === 'mimic' && dex.getAbility(set.ability).gen === 4 && !template.prevo)) {
|
||||
getGlitch = true;
|
||||
break;
|
||||
|
|
@ -1929,9 +1937,6 @@ export class TeamValidator {
|
|||
return template;
|
||||
} else if (template.inheritsFrom) {
|
||||
// For Pokemon like Rotom, Necrozma, and Gmax formes whose movesets are extensions are their base formes
|
||||
if (Array.isArray(template.inheritsFrom)) {
|
||||
throw new Error(`Ambiguous template ${template.species} passed to learnsetParent`);
|
||||
}
|
||||
return this.dex.getTemplate(template.inheritsFrom);
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user