Random Battle updates

This commit is contained in:
The Immortal 2020-03-16 14:03:48 +04:00
parent 64c3d75f1c
commit db6b9add6b
2 changed files with 104 additions and 39 deletions

View File

@ -576,6 +576,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
nidoqueen: {
randomBattleMoves: ["earthpower", "icebeam", "sludgewave", "stealthrock", "toxicspikes"],
eventPokemon: [
{"generation": 6, "level": 41, "perfectIVs": 2, "isHidden": false, "abilities": ["poisonpoint"], "moves": ["tailwhip", "doublekick", "poisonsting", "bodyslam"], "pokeball": "cherishball"},
],
@ -597,6 +598,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
nidoking: {
randomBattleMoves: ["earthpower", "icebeam", "sludgewave", "substitute", "superpower"],
eventPokemon: [
{"generation": 7, "level": 68, "isHidden": false, "abilities": ["poisonpoint"], "moves": ["earthquake", "poisonjab", "throatchop", "aquatail"], "pokeball": "cherishball"},
],
@ -691,6 +693,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
crobat: {
randomBattleMoves: ["bravebird", "defog", "roost", "superfang", "taunt", "toxic", "uturn"],
eventPokemon: [
{"generation": 4, "level": 30, "gender": "M", "nature": "Timid", "moves": ["heatwave", "airslash", "sludgebomb", "superfang"], "pokeball": "cherishball"},
{"generation": 7, "level": 64, "gender": "M", "isHidden": false, "moves": ["airslash", "toxic", "darkpulse", "sludgebomb"], "pokeball": "cherishball"},
@ -1136,6 +1139,7 @@ let BattleFormatsData = {
doublesTier: "(DUU)",
},
slowbro: {
randomBattleMoves: ["calmmind", "icebeam", "psyshock", "scald", "slackoff", "toxic"],
eventPokemon: [
{"generation": 6, "level": 100, "nature": "Quiet", "isHidden": false, "abilities": ["oblivious"], "moves": ["scald", "trickroom", "slackoff", "irontail"], "pokeball": "cherishball"},
],
@ -1156,6 +1160,7 @@ let BattleFormatsData = {
isNonstandard: "Past",
},
slowking: {
randomBattleMoves: ["dragontail", "fireblast", "icebeam", "psyshock", "scald", "slackoff", "toxic", "trickroom"],
isNonstandard: "Past",
tier: "Illegal",
},
@ -1179,6 +1184,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
magnezone: {
randomBattleMoves: ["bodypress", "flashcannon", "mirrorcoat", "thunderbolt", "voltswitch"],
isNonstandard: "Past",
tier: "Illegal",
},
@ -1651,6 +1657,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
kingdra: {
randomBattleMoves: ["dracometeor", "hurricane", "hydropump", "icebeam", "toxic"],
eventPokemon: [
{"generation": 3, "level": 50, "abilities": ["swiftswim"], "moves": ["leer", "watergun", "twister", "agility"], "pokeball": "pokeball"},
{"generation": 5, "level": 50, "gender": "M", "nature": "Timid", "ivs": {"hp": 31, "atk": 17, "def": 8, "spa": 31, "spd": 11, "spe": 31}, "isHidden": false, "abilities": ["swiftswim"], "moves": ["dracometeor", "muddywater", "dragonpulse", "protect"], "pokeball": "cherishball"},
@ -2127,6 +2134,7 @@ let BattleFormatsData = {
doublesTier: "DOU",
},
articuno: {
randomBattleMoves: ["defog", "freezedry", "healbell", "roost", "toxic"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves": ["mist", "agility", "mindreader", "icebeam"]},
{"generation": 3, "level": 70, "moves": ["agility", "mindreader", "icebeam", "reflect"], "pokeball": "pokeball"},
@ -2145,6 +2153,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
zapdos: {
randomBattleMoves: ["defog", "heatwave", "hurricane", "roost", "voltswitch"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves": ["thunderwave", "agility", "detect", "drillpeck"]},
{"generation": 3, "level": 70, "moves": ["agility", "detect", "drillpeck", "charge"], "pokeball": "pokeball"},
@ -2163,6 +2172,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
moltres: {
randomBattleMoves: ["airslash", "defog", "fireblast", "roost", "uturn"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves": ["firespin", "agility", "endure", "flamethrower"]},
{"generation": 3, "level": 70, "moves": ["agility", "endure", "flamethrower", "safeguard"], "pokeball": "pokeball"},
@ -2789,7 +2799,7 @@ let BattleFormatsData = {
doublesTier: "DUU",
},
corsolagalar: {
randomBattleMoves: ["nightshade", "stealthrock", "strengthsap", "willowisp"],
randomBattleMoves: ["haze", "nightshade", "stealthrock", "strengthsap", "willowisp"],
tier: "UU",
doublesTier: "LC Uber",
},
@ -2897,6 +2907,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
raikou: {
randomBattleMoves: ["aurasphere", "calmmind", "scald", "substitute", "thunderbolt", "voltswitch"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves": ["thundershock", "roar", "quickattack", "spark"]},
{"generation": 3, "level": 70, "moves": ["quickattack", "spark", "reflect", "crunch"], "pokeball": "pokeball"},
@ -2916,6 +2927,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
entei: {
randomBattleMoves: ["extremespeed", "flareblitz", "stompingtantrum", "stoneedge"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves": ["ember", "roar", "firespin", "stomp"]},
{"generation": 3, "level": 70, "moves": ["firespin", "stomp", "flamethrower", "swagger"], "pokeball": "pokeball"},
@ -2935,6 +2947,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
suicune: {
randomBattleMoves: ["airslash", "calmmind", "icebeam", "rest", "scald", "sleeptalk"],
eventPokemon: [
{"generation": 3, "level": 50, "shiny": 1, "moves": ["bubblebeam", "raindance", "gust", "aurorabeam"]},
{"generation": 3, "level": 70, "moves": ["gust", "aurorabeam", "mist", "mirrorcoat"], "pokeball": "pokeball"},
@ -2984,6 +2997,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
lugia: {
randomBattleMoves: ["airslash", "calmmind", "earthquake", "psyshock", "roost", "substitute", "toxic"],
eventPokemon: [
{"generation": 3, "level": 70, "shiny": 1, "moves": ["recover", "hydropump", "raindance", "swift"]},
{"generation": 3, "level": 50, "moves": ["psychoboost", "earthquake", "hydropump", "featherdance"]},
@ -3005,6 +3019,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
hooh: {
randomBattleMoves: ["bravebird", "defog", "earthquake", "flareblitz", "roost", "toxic"],
eventPokemon: [
{"generation": 3, "level": 70, "shiny": 1, "moves": ["recover", "fireblast", "sunnyday", "swift"]},
{"generation": 4, "level": 45, "shiny": 1, "moves": ["extrasensory", "sunnyday", "fireblast", "sacredfire"]},
@ -3989,6 +4004,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
walrein: {
randomBattleMoves: ["icebeam", "protect", "surf", "toxic"],
eventPokemon: [
{"generation": 5, "level": 50, "isHidden": false, "abilities": ["thickfat"], "moves": ["icebeam", "brine", "hail", "sheercold"], "pokeball": "cherishball"},
],
@ -4067,6 +4083,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
metagross: {
randomBattleMoves: ["agility", "bulletpunch", "earthquake", "explosion", "meteormash", "stealthrock", "thunderpunch"],
eventPokemon: [
{"generation": 4, "level": 62, "nature": "Brave", "moves": ["bulletpunch", "meteormash", "hammerarm", "zenheadbutt"], "pokeball": "cherishball"},
{"generation": 5, "level": 50, "shiny": 1, "isHidden": false, "moves": ["meteormash", "earthquake", "bulletpunch", "hammerarm"], "pokeball": "cherishball"},
@ -4085,6 +4102,7 @@ let BattleFormatsData = {
isNonstandard: "Past",
},
regirock: {
randomBattleMoves: ["bodypress", "curse", "earthquake", "explosion", "rest", "rockslide", "stoneedge"],
eventPokemon: [
{"generation": 3, "level": 40, "shiny": 1, "moves": ["rockthrow", "curse", "superpower", "ancientpower"]},
{"generation": 3, "level": 40, "moves": ["curse", "superpower", "ancientpower", "hyperbeam"], "pokeball": "pokeball"},
@ -4099,6 +4117,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
regice: {
randomBattleMoves: ["focusblast", "icebeam", "rest", "rockpolish", "sleeptalk", "thunderbolt"],
eventPokemon: [
{"generation": 3, "level": 40, "shiny": 1, "moves": ["icywind", "curse", "superpower", "ancientpower"]},
{"generation": 3, "level": 40, "moves": ["curse", "superpower", "ancientpower", "hyperbeam"], "pokeball": "pokeball"},
@ -4113,6 +4132,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
registeel: {
randomBattleMoves: ["bodypress", "protect", "stealthrock", "toxic"],
eventPokemon: [
{"generation": 3, "level": 40, "shiny": 1, "moves": ["metalclaw", "curse", "superpower", "ancientpower"]},
{"generation": 3, "level": 40, "moves": ["curse", "superpower", "ancientpower", "hyperbeam"], "pokeball": "pokeball"},
@ -4194,6 +4214,7 @@ let BattleFormatsData = {
isNonstandard: "Past",
},
groudon: {
randomBattleMoves: ["earthquake", "heatcrash", "heavyslam", "stealthrock", "stoneedge", "swordsdance", "thunderwave"],
eventPokemon: [
{"generation": 3, "level": 45, "shiny": 1, "moves": ["slash", "bulkup", "earthquake", "fireblast"]},
{"generation": 3, "level": 70, "shiny": 1, "moves": ["fireblast", "rest", "fissure", "solarbeam"]},
@ -4216,7 +4237,7 @@ let BattleFormatsData = {
isNonstandard: "Past",
},
rayquaza: {
randomBattleMoves: ["defog", "dragondance", "earthquake", "extremespeed", "outrage", "vcreate"],
randomBattleMoves: ["dragondance", "earthquake", "extremespeed", "outrage", "vcreate"],
eventPokemon: [
{"generation": 3, "level": 70, "shiny": 1, "moves": ["fly", "rest", "extremespeed", "outrage"]},
{"generation": 4, "level": 50, "shiny": 1, "moves": ["rest", "airslash", "ancientpower", "outrage"]},
@ -4730,6 +4751,7 @@ let BattleFormatsData = {
doublesTier: "(DUU)",
},
uxie: {
randomBattleMoves: ["healbell", "knockoff", "psychic", "stealthrock", "uturn", "yawn"],
eventPokemon: [
{"generation": 4, "level": 50, "shiny": 1, "moves": ["confusion", "yawn", "futuresight", "amnesia"]},
{"generation": 4, "level": 50, "shiny": 1, "moves": ["swift", "yawn", "futuresight", "amnesia"]},
@ -4742,6 +4764,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
mesprit: {
randomBattleMoves: ["energyball", "healingwish", "icebeam", "nastyplot", "psyshock", "stealthrock", "thunderwave", "uturn"],
eventPokemon: [
{"generation": 4, "level": 50, "shiny": 1, "moves": ["confusion", "luckychant", "futuresight", "charm"]},
{"generation": 4, "level": 50, "shiny": 1, "moves": ["swift", "luckychant", "futuresight", "charm"]},
@ -4754,6 +4777,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
azelf: {
randomBattleMoves: ["dazzlinggleam", "fireblast", "nastyplot", "psychic", "stealthrock", "taunt", "uturn"],
eventPokemon: [
{"generation": 4, "level": 50, "shiny": 1, "moves": ["confusion", "uproar", "futuresight", "nastyplot"]},
{"generation": 4, "level": 50, "shiny": 1, "moves": ["swift", "uproar", "futuresight", "nastyplot"]},
@ -4766,6 +4790,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
dialga: {
randomBattleMoves: ["dracometeor", "dragontail", "fireblast", "flashcannon", "stealthrock", "thunderbolt", "toxic"],
eventPokemon: [
{"generation": 4, "level": 47, "shiny": 1, "moves": ["metalclaw", "ancientpower", "dragonclaw", "roaroftime"]},
{"generation": 4, "level": 70, "shiny": 1, "moves": ["roaroftime", "healblock", "earthpower", "slash"]},
@ -4784,6 +4809,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
palkia: {
randomBattleMoves: ["dracometeor", "dragonpulse", "fireblast", "hydropump", "thunderwave"],
eventPokemon: [
{"generation": 4, "level": 47, "shiny": 1, "moves": ["waterpulse", "ancientpower", "dragonclaw", "spacialrend"]},
{"generation": 4, "level": 70, "shiny": 1, "moves": ["spacialrend", "healblock", "earthpower", "slash"]},
@ -4818,6 +4844,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
regigigas: {
randomBattleMoves: ["bodyslam", "protect", "substitute", "toxic"],
eventPokemon: [
{"generation": 4, "level": 70, "shiny": 1, "moves": ["confuseray", "stomp", "superpower", "zenheadbutt"]},
{"generation": 4, "level": 1, "shiny": 1, "moves": ["dizzypunch", "knockoff", "foresight", "confuseray"]},
@ -4855,6 +4882,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
cresselia: {
randomBattleMoves: ["calmmind", "moonblast", "moonlight", "psyshock", "thunderwave", "toxic"],
eventPokemon: [
{"generation": 4, "level": 50, "shiny": 1, "moves": ["mist", "aurorabeam", "futuresight", "slash"]},
{"generation": 5, "level": 68, "shiny": 1, "moves": ["futuresight", "slash", "moonlight", "psychocut"]},
@ -5728,6 +5756,7 @@ let BattleFormatsData = {
doublesTier: "(DUU)",
},
cryogonal: {
randomBattleMoves: ["freezedry", "haze", "rapidspin", "recover", "toxic"],
isNonstandard: "Past",
tier: "Illegal",
},
@ -6184,6 +6213,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
talonflame: {
randomBattleMoves: ["bravebird", "defog", "flareblitz", "roost", "swordsdance", "uturn"],
isNonstandard: "Past",
tier: "Illegal",
},
@ -6397,6 +6427,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
aurorus: {
randomBattleMoves: ["ancientpower", "blizzard", "earthpower", "freezedry", "hypervoice", "stealthrock", "thunderwave"],
isNonstandard: "Past",
tier: "Illegal",
},
@ -6406,6 +6437,7 @@ let BattleFormatsData = {
doublesTier: "DUU",
},
dedenne: {
randomBattleMoves: ["grassknot", "recycle", "substitute", "thunderbolt", "toxic"],
isNonstandard: "Past",
tier: "Illegal",
},
@ -6498,6 +6530,7 @@ let BattleFormatsData = {
doublesTier: "DUU",
},
xerneas: {
randomBattleMoves: ["closecombat", "defog", "playrough", "rockslide", "zenheadbutt"],
eventPokemon: [
{"generation": 6, "level": 50, "moves": ["gravity", "geomancy", "moonblast", "megahorn"]},
{"generation": 6, "level": 100, "shiny": true, "moves": ["geomancy", "moonblast", "aromatherapy", "focusblast"], "pokeball": "cherishball"},
@ -6510,6 +6543,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
yveltal: {
randomBattleMoves: ["darkpulse", "foulplay", "heatwave", "hurricane", "roost", "suckerpunch", "taunt", "uturn"],
eventPokemon: [
{"generation": 6, "level": 50, "moves": ["snarl", "oblivionwing", "disable", "darkpulse"]},
{"generation": 6, "level": 100, "shiny": true, "moves": ["oblivionwing", "suckerpunch", "darkpulse", "foulplay"], "pokeball": "cherishball"},
@ -6739,6 +6773,7 @@ let BattleFormatsData = {
tier: "Illegal",
},
lycanroc: {
randomBattleMoves: ["accelerock", "closecombat", "psychicfangs", "stealthrock", "stoneedge", "swordsdance"],
isNonstandard: "Past",
tier: "Illegal",
},
@ -7199,7 +7234,7 @@ let BattleFormatsData = {
doublesTier: "DUber",
},
lunala: {
randomBattleMoves: ["calmmind", "moonblast", "moongeistbeam", "psychic", "roost"],
randomBattleMoves: ["calmmind", "moonblast", "moongeistbeam", "psyshock", "roost"],
eventPokemon: [
{"generation": 7, "level": 55, "moves": ["moongeistbeam", "cosmicpower", "nightdaze", "shadowball"]},
{"generation": 7, "level": 60, "moves": ["moongeistbeam", "cosmicpower", "nightdaze", "shadowball"]},
@ -7382,7 +7417,7 @@ let BattleFormatsData = {
tier: "NFE",
},
rillaboom: {
randomBattleMoves: ["bulkup", "drumbeating", "highhorsepower", "substitute", "superpower", "uturn"],
randomBattleMoves: ["bulkup", "drumbeating", "highhorsepower", "knockoff", "substitute", "uturn", "woodhammer"],
unreleasedHidden: true,
tier: "RU",
doublesTier: "DUU",
@ -7631,6 +7666,7 @@ let BattleFormatsData = {
},
sinisteaantique: {
unreleasedHidden: true,
tier: "LC",
},
polteageist: {
randomBattleMoves: ["gigadrain", "shadowball", "shellsmash", "storedpower", "strengthsap"],
@ -7639,6 +7675,8 @@ let BattleFormatsData = {
},
polteageistantique: {
unreleasedHidden: true,
tier: "UU",
doublesTier: "(DUU)",
},
hatenna: {
tier: "LC",

View File

@ -594,7 +594,7 @@ class RandomTeams {
counter.setupType = pool.Physical > pool.Special ? 'Physical' : 'Special';
}
// @ts-ignore
} else if (!pool[counter.setupType] || pool[counter.setupType] === 1 && (!moves.includes('rest') || !moves.includes('sleeptalk'))) {
} else if (!pool[counter.setupType] || pool[counter.setupType] < 2 && (!moves.includes('rest') || !moves.includes('sleeptalk'))) {
counter.setupType = '';
}
}
@ -687,6 +687,10 @@ class RandomTeams {
switch (moveid) {
// Not very useful without their supporting moves
case 'earthquake':
if (movePool.includes('bodypress') && movePool.includes('shellsmash')) rejected = true;
if (hasMove['substitute'] && movePool.includes('toxic')) rejected = true;
break;
case 'focuspunch': case 'reversal':
if (!hasMove['substitute'] || counter.damagingMoves.length < 2) rejected = true;
break;
@ -694,7 +698,8 @@ class RandomTeams {
if (!counter.Status || hasMove['rest'] && hasMove['sleeptalk']) rejected = true;
break;
case 'protect':
if (movePool.includes('leechseed') || counter.Status < 2 && !isDoubles) rejected = true;
if (movePool.includes('leechseed') || movePool.includes('toxic') && !hasMove['wish']) rejected = true;
if (counter.Status < 2 && !isDoubles) rejected = true;
break;
case 'reflect':
if (!hasMove['calmmind'] && !hasMove['lightscreen']) rejected = true;
@ -705,11 +710,11 @@ class RandomTeams {
break;
case 'rest':
if (movePool.includes('sleeptalk')) rejected = true;
if (movePool.includes('calmmind') || movePool.includes('coil') || movePool.includes('curse')) rejected = true;
if (!hasMove['sleeptalk'] && (movePool.includes('bulkup') || movePool.includes('calmmind') || movePool.includes('coil') || movePool.includes('curse'))) rejected = true;
break;
case 'sleeptalk':
if (!hasMove['rest']) rejected = true;
if (movePool.length > 1) {
if (movePool.length > 1 && !hasAbility['Contrary']) {
let rest = movePool.indexOf('rest');
if (rest >= 0) this.fastPop(movePool, rest);
}
@ -746,7 +751,7 @@ class RandomTeams {
isSetup = true;
break;
case 'agility': case 'autotomize': case 'rockpolish': case 'shiftgear':
if (counter.damagingMoves.length < 2 || hasMove['stickyweb'] || hasMove['rest'] && hasMove['sleeptalk']) rejected = true;
if (counter.damagingMoves.length < 2 || hasMove['stickyweb'] || hasMove['rest']) rejected = true;
if (moveid === 'autotomize' && movePool.includes('calmmind')) rejected = true;
if (!counter.setupType) isSetup = true;
break;
@ -756,11 +761,15 @@ class RandomTeams {
break;
// Bad after setup
case 'bounce': case 'firstimpression': case 'glare': case 'haze':
case 'bounce': case 'firstimpression': case 'glare':
if (counter.setupType || !!counter['speedsetup'] || hasMove['rest']) rejected = true;
break;
case 'bulletpunch': case 'rockblast': case 'trickroom':
if (!!counter['speedsetup'] || counter.damagingMoves.length < 2) rejected = true;
break;
case 'circlethrow': case 'dragontail':
if (!!counter['speedsetup'] || hasMove['encore'] || !(hasMove['rest'] && hasMove['sleeptalk'])) rejected = true;
if (hasMove['psyshock'] && !!counter.Status) rejected = true;
break;
case 'dracometeor': case 'stormthrow':
if (hasMove['rest'] && hasMove['sleeptalk']) rejected = true;
@ -769,7 +778,7 @@ class RandomTeams {
if (counter.setupType || hasMove['partingshot'] || hasMove['rapidspin'] || hasMove['substitute'] || hasMove['uturn']) rejected = true;
break;
case 'healingwish': case 'memento':
if (counter.setupType || !!counter['recovery'] || hasMove['substitute']) rejected = true;
if (counter.setupType || !!counter['recovery'] || hasMove['substitute'] || hasMove['uturn']) rejected = true;
break;
case 'icywind': case 'leechseed': case 'roar': case 'whirlwind':
if (counter.setupType || !!counter['speedsetup'] || hasMove['dragontail']) rejected = true;
@ -781,9 +790,6 @@ class RandomTeams {
if (hasMove['curse'] || hasMove['nastyplot'] || hasMove['shellsmash'] || teamDetails.rapidSpin) rejected = true;
if (counter.setupType && counter['Fighting'] >= 2) rejected = true;
break;
case 'rockblast': case 'trickroom':
if (!!counter['speedsetup'] || counter.damagingMoves.length < 2) rejected = true;
break;
case 'spikes':
if (counter.setupType || teamDetails.spikes && teamDetails.spikes > 1) rejected = true;
break;
@ -799,7 +805,7 @@ class RandomTeams {
if (counter.setupType || !!counter['speedsetup'] || hasMove['raindance']) rejected = true;
break;
case 'toxic':
if (counter.setupType || hasMove['sludgewave'] || hasMove['willowisp']) rejected = true;
if (counter.setupType || hasMove['sludgewave'] || hasMove['thunderwave'] || hasMove['trickroom'] || hasMove['willowisp']) rejected = true;
break;
case 'toxicspikes':
if (counter.setupType || teamDetails.toxicSpikes) rejected = true;
@ -810,15 +816,19 @@ class RandomTeams {
// Ineffective having both
// Attacks:
case 'bodyslam':
case 'bodyslam': case 'clearsmog':
if (hasMove['toxic'] || hasMove['trick']) rejected = true;
break;
case 'explosion':
if (!!counter['recovery'] || hasMove['drainpunch'] || hasMove['painsplit'] || hasMove['rockblast']) rejected = true;
if (hasMove['curse'] || !!counter['speedsetup'] || !!counter['recovery']) rejected = true;
if (hasMove['drainpunch'] || hasMove['painsplit'] || hasMove['rockblast']) rejected = true;
break;
case 'facade':
if ((hasMove['bulkup'] && hasType['Fighting']) || !hasAbility['Guts'] && !!counter.Status) rejected = true;
break;
case 'hypervoice':
if (hasMove['blizzard']) rejected = true;
break;
case 'quickattack':
if (!!counter['speedsetup'] || hasType['Rock'] && !!counter.Status) rejected = true;
if (counter.Physical > 3 && movePool.includes('uturn')) rejected = true;
@ -844,22 +854,20 @@ class RandomTeams {
break;
case 'woodhammer':
if (hasMove['hornleech'] && counter.Physical < 4) rejected = true;
break;
case 'earthquake':
if (movePool.includes('bodypress') && movePool.includes('shellsmash')) rejected = true;
if (hasMove['drumbeating'] || counter.Physical < 4 && movePool.includes('drumbeating')) rejected = true;
break;
case 'icebeam':
if (hasMove['freezedry']) rejected = true;
if (!counter.setupType && (movePool.includes('recover') || movePool.includes('roost'))) rejected = true;
break;
case 'bodypress':
if (hasMove['shellsmash'] || hasMove['earthquake'] && movePool.includes('shellsmash')) rejected = true;
if (hasMove['mirrorcoat'] || hasMove['shellsmash'] || hasMove['earthquake'] && movePool.includes('shellsmash')) rejected = true;
break;
case 'dynamicpunch':
if (hasMove['closecombat'] || hasMove['facade']) rejected = true;
break;
case 'focusblast':
if (hasMove['superpower'] && counter.setupType !== 'Special') rejected = true;
if ((hasMove['superpower'] && counter.setupType !== 'Special') || hasMove['rest'] && hasMove['sleeptalk']) rejected = true;
break;
case 'poisonjab':
if (!hasType['Poison'] && counter.Status >= 2) rejected = true;
@ -869,12 +877,13 @@ class RandomTeams {
break;
case 'psyshock':
if ((hasMove['psychic'] || hasAbility['Pixilate']) && counter.Special < 4 && !counter.setupType) rejected = true;
if (hasAbility['Multiscale'] && !counter.setupType) rejected = true;
break;
case 'bugbuzz':
if (hasMove['uturn'] && !counter.setupType) rejected = true;
break;
case 'stoneedge':
if (hasMove['rockblast'] || isDoubles && hasMove['rockslide']) rejected = true;
if (hasMove['rockblast'] || hasMove['rockslide'] || !!counter.Status && movePool.includes('rockslide')) rejected = true;
if ((hasAbility['No Guard'] && !hasMove['dynamicpunch']) || hasAbility['Iron Fist'] && movePool.includes('machpunch')) rejected = true;
break;
case 'airslash':
@ -924,6 +933,9 @@ class RandomTeams {
case 'stickyweb':
if (teamDetails.stickyWeb) rejected = true;
break;
case 'haze':
if (hasMove['stealthrock'] || movePool.includes('stealthrock') && !teamDetails.stealthRock) rejected = true;
break;
case 'painsplit': case 'recover': case 'roost': case 'synthesis':
if (hasMove['rest'] || hasMove['selfdestruct'] || hasMove['wish']) rejected = true;
if (move.id === 'roost' && (hasMove['stoneedge'] || hasMove['throatchop'])) rejected = true;
@ -933,7 +945,7 @@ class RandomTeams {
break;
case 'substitute':
if (hasMove['uturn'] || hasMove['rest'] && hasMove['sleeptalk']) rejected = true;
if (movePool.includes('calmmind') || movePool.includes('painsplit')) rejected = true;
if (movePool.includes('painsplit') || movePool.includes('roost') || movePool.includes('calmmind') && !counter['recovery']) rejected = true;
break;
case 'wideguard':
if (hasMove['protect']) rejected = true;
@ -947,12 +959,6 @@ class RandomTeams {
let stabs = counter[template.types[0]] + (counter[template.types[1]] || 0);
if (!hasType[move.type] || stabs > 1 || counter[move.category] < 2) rejected = true;
}
// @ts-ignore
if (counter.setupType && !isSetup && counter.setupType !== 'Mixed' && move.category !== counter.setupType && counter[counter.setupType] < 2 && (move.category !== 'Status' || !move.flags.heal) && moveid !== 'sleeptalk' && !move.stallingMove) {
// Reject Status moves only if there is nothing else to reject
// @ts-ignore
if (move.category !== 'Status' || counter[counter.setupType] + counter.Status > 3 && counter['physicalsetup'] + counter['specialsetup'] < 2) rejected = true;
}
// Pokemon should have moves that benefit their Type/Ability/Weather, as well as moves required by its forme
// @ts-ignore
@ -969,20 +975,21 @@ class RandomTeams {
(hasType['Ghost'] && !counter['Ghost'] && !hasType['Dark'] && !hasAbility['Steelworker']) ||
(hasType['Grass'] && !counter['Grass'] && (hasAbility['Grassy Surge'] || !hasType['Fairy'] && !hasType['Poison'] && !hasType['Steel'])) ||
(hasType['Ground'] && !counter['Ground']) ||
(hasType['Ice'] && (!counter['Ice'] || (hasAbility['Snow Warning'] && movePool.includes('blizzard')))) ||
(hasType['Ice'] && (!counter['Ice'] || (hasAbility['Snow Warning'] && movePool.includes('blizzard') && !hasMove['hypervoice']))) ||
((hasType['Normal'] && movePool.includes('facade')) || (hasAbility['Pixilate'] && !counter['Normal'])) ||
(hasType['Psychic'] && !counter['Psychic'] && (hasAbility['Psychic Surge'] || counter.setupType || movePool.includes('psychicfangs'))) ||
(hasType['Psychic'] && !counter['Psychic'] && !hasType['Ghost'] && (hasAbility['Psychic Surge'] || counter.setupType || movePool.includes('psychicfangs'))) ||
(hasType['Rock'] && !counter['Rock'] && template.baseStats.atk >= 80) ||
((hasType['Steel'] || hasAbility['Steelworker']) && !counter['Steel'] && template.baseStats.atk >= 95) ||
(hasType['Water'] && !counter['Water']) ||
(hasAbility['Cheek Pouch'] && movePool.includes('recycle') && moveid !== 'substitute') ||
((hasAbility['Moody'] || hasMove['wish']) && movePool.includes('protect')) ||
(hasAbility['Stance Change'] && !counter.setupType && movePool.includes('kingsshield')) ||
(!counter['recovery'] && !counter.setupType && (movePool.includes('recover') || movePool.includes('roost') || movePool.includes('slackoff') || movePool.includes('softboiled')) && counter.Status > 1) ||
(!counter['recovery'] && !counter.setupType && !hasMove['trickroom'] && (movePool.includes('recover') || movePool.includes('roost') || movePool.includes('slackoff') || movePool.includes('softboiled')) && !!counter.Status) ||
(movePool.includes('stickyweb') && !counter.setupType && !teamDetails.stickyWeb) ||
(template.requiredMove && movePool.includes(toID(template.requiredMove))))) {
// Reject Status or non-STAB
if (!isSetup && !move.weather && !move.sideCondition && !move.stallingMove && !move.damage && (move.category !== 'Status' || !move.flags.heal) && moveid !== 'sleeptalk') {
if (move.category === 'Status' || !hasType[move.type] || move.selfSwitch || move.basePower && move.basePower < 40 && !move.multihit) rejected = true;
if ((move.category === 'Status' && (counter.setupType || !move.status)) || !hasType[move.type] || move.selfSwitch || move.basePower && move.basePower < 40 && !move.multihit) rejected = true;
}
}
@ -1085,6 +1092,8 @@ class RandomTeams {
rejectAbility = !counter['Status'];
} else if (ability === 'Pressure' || ability === 'Synchronize') {
rejectAbility = (counter.setupType || counter.Status < 2);
} else if (ability === 'Refrigerate') {
rejectAbility = !counter['Normal'];
} else if (ability === 'Regenerator') {
rejectAbility = hasAbility['Magic Guard'];
} else if (ability === 'Reckless' || ability === 'Rock Head') {
@ -1097,6 +1106,8 @@ class RandomTeams {
rejectAbility = (!counter['sheerforce'] || hasAbility['Guts']);
} else if (ability === 'Sniper') {
rejectAbility = counter['Water'] > 1;
} else if (ability === 'Snow Warning') {
rejectAbility = (hasAbility['Refrigerate'] && !!counter['Normal']);
} else if (ability === 'Sturdy') {
rejectAbility = !!counter['recoil'];
} else if (ability === 'Swarm') {
@ -1165,11 +1176,13 @@ class RandomTeams {
item = 'Mental Herb';
} else if (template.species === 'Unfezant') {
item = 'Scope Lens';
} else if (template.species === 'Wobbuffet' || ability === 'Cheek Pouch' || (ability === 'Emergency Exit' && !!counter['Status']) || ability === 'Ripen' && isDoubles) {
} else if (template.species === 'Wobbuffet' || (ability === 'Emergency Exit' && !!counter['Status']) || ability === 'Ripen' && isDoubles) {
item = 'Sitrus Berry';
} else if (ability === 'Cheek Pouch') {
item = hasMove['recycle'] ? 'Petaya Berry' : 'Sitrus Berry';
} else if (ability === 'Gluttony') {
item = this.sample(['Aguav', 'Figy', 'Iapapa', 'Mago', 'Wiki']) + ' Berry';
} else if (ability === 'Gorilla Tactics' || ability === 'Imposter') {
} else if (ability === 'Gorilla Tactics' || ability === 'Imposter' || ability === 'Magnet Pull' && hasMove['bodypress']) {
item = 'Choice Scarf';
} else if (hasMove['switcheroo'] || hasMove['trick']) {
if (template.baseStats.spe >= 60 && template.baseStats.spe <= 108 && !counter['priority']) {
@ -1229,10 +1242,10 @@ class RandomTeams {
item = 'Leftovers';
// Better than Leftovers
} else if (counter.damagingMoves.length >= 4 && template.baseStats.hp + template.baseStats.def + template.baseStats.spd >= 235) {
item = 'Assault Vest';
} else if ((template.species === 'Necrozma-Dusk-Mane' && counter.setupType) || counter.damagingMoves.length >= 3 && !!counter['speedsetup'] && template.baseStats.hp + template.baseStats.def + template.baseStats.spd >= 300) {
item = 'Weakness Policy';
} else if (counter.Physical + counter.Special >= 4 && template.baseStats.hp + template.baseStats.def + template.baseStats.spd >= 235) {
item = 'Assault Vest';
} else if (isLead && !['Disguise', 'Sturdy'].includes(ability) && !hasMove['substitute'] && !counter['recoil'] && !counter['recovery'] && template.baseStats.hp + template.baseStats.def + template.baseStats.spd < 255 && !isDoubles) {
item = 'Focus Sash';
} else if (ability === 'Water Bubble') {
@ -1267,9 +1280,23 @@ class RandomTeams {
Delibird: 100, Shedinja: 100,
};
let tier = toID((template.isGigantamax ? this.dex.getTemplate(template.baseSpecies) : template).tier).replace('bl', '');
// For future DLC Pokemon
if (tier === 'illegal') {
tier = toID(Dex.mod('gen7').getTemplate(template.species).tier);
switch (tier) {
case 'uubl': case 'uu':
tier = 'ou';
break;
case 'rubl': case 'ru':
tier = 'uu';
break;
case 'nubl': case 'nu': case 'publ': case 'pu':
tier = 'ru';
break;
}
}
level = levelScale[tier] || (template.nfe ? 90 : 80);
if (customScale[template.species]) level = customScale[template.species];
if (tier === 'illegal' && Dex.mod('gen7').getTemplate(species).tier === 'Uber') level = 72;
} else {
// We choose level based on BST. Min level is 70, max level is 99. 600+ BST is 70, less than 300 is 99. Calculate with those values.
// Every 10.34 BST adds a level from 70 up to 99. Results are floored.