Add [Gen 6] Megas Revisited Random Battle (#11778)

* March PMOTM Part 1

* March PMOTM Part 2

* March PMOTM Part 3

* March PMOTM Part 4

* March PMOTM Part 5

* Update data/mods/gen6megasrevisited/abilities.ts

* Update data/mods/gen6megasrevisited/scripts.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
This commit is contained in:
Yoshiblaze 2026-03-01 05:37:04 -05:00 committed by GitHub
parent 1d8968acdf
commit 376da145ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 17649 additions and 4854 deletions

View File

@ -627,27 +627,18 @@ export const Formats: import('../sim/dex-formats').FormatList = [
banlist: ['ND UU', 'ND RUBL', 'Slowbronite'],
},
{
name: "[Gen 9] Six by Six Random Battle",
desc: `A Gen 9 micrometa featuring only 6 Pokemon with 6 forms each.`,
mod: 'sixbysix',
team: 'random6x6',
ruleset: [
'Species Clause', 'HP Percentage Mod', 'Cancel Mod', 'Sleep Clause Mod', 'Illusion Level Mod',
'Terastal Clause', 'Data Preview', 'Sprite Viewer',
],
name: "[Gen 6] Megas Revisited Random Battle",
desc: `A Gen 6 metagame where every Mega Evolution was reevaluated and redesigned.`,
mod: 'gen6megasrevisited',
team: 'random',
bestOfDefault: true,
ruleset: ['Obtainable', 'Sleep Clause Mod', 'HP Percentage Mod', 'Cancel Mod', 'Illusion Level Mod', 'Mega Data Mod'],
onBegin() {
this.add('-message', `Welcome to Six by Six!`);
this.add('-message', `This is a micrometa featuring just 6 Pokemon, each with 6 forms each!`);
this.add(`raw|<div class='broadcast-green'><b>Need help with all of the new Megas and abilities?<br />Then make sure to check out the <a href="https://docs.google.com/spreadsheets/d/1wK11cPHnPCmH7JFss6leKW6_-cumn3DuZA-YMzrzF-U/edit?usp=sharing" target="_blank">spreadsheet</a> or use /dt!</b></div>`);
this.add('-message', `Welcome to Megas Revisited!`);
this.add('-message', `This is a Generation 6 OU-based Pet Mod where every existing Mega Evolution has been redesigned.`);
this.add('-message', `You can find our thread and metagame resources here:`);
this.add('-message', `https://www.smogon.com/forums/threads/3769141/`);
},
onSwitchInPriority: 100,
onSwitchIn(pokemon) {
if ((pokemon.illusion || pokemon).getTypes(true, true).join('/') !==
this.dex.forGen(9).species.get((pokemon.illusion || pokemon).species.name).types.join('/') &&
!pokemon.terastallized) {
this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
}
this.add('-message', `https://www.smogon.com/forums/threads/3713949/`);
},
},
{
@ -3469,39 +3460,18 @@ export const Formats: import('../sim/dex-formats').FormatList = [
section: "Pet Mods",
},
{
name: "[Gen 9] Six by Six", // Roomtours
desc: `A Gen 9 micrometa featuring only 6 Pokemon with 6 forms each.`,
mod: 'sixbysix',
name: "[Gen 6] Megas Revisited", // Roomtours
desc: `A Gen 6 metagame where every Mega Evolution was reevaluated and redesigned.`,
mod: 'gen6megasrevisited',
searchShow: false,
ruleset: ['Standard', 'Sleep Moves Clause', '!Sleep Clause Mod', 'Terastal Clause', 'Data Preview', 'Sprite Viewer'],
banlist: [
'All Pokemon', 'Last Respects', 'Shed Tail',
'King\'s Rock', 'Razor Fang', 'Baton Pass',
],
unbanlist: [
'Kingdra-Classic', 'Kingdra-Brinepool', 'Kingdra-Druid', 'Kingdra-Bard', 'Kingdra-Gourmet', 'Kingdra-Ancient',
'Nidoqueen-Classic', 'Nidoqueen-Erudite', 'Nidoqueen-Volcanic',
'Nidoqueen-Rosegold', 'Nidoqueen-Shaman', 'Nidoqueen-Jasper',
'Bisharp-Centurion', 'Bisharp-Savage', 'Bisharp-Ronin', 'Bisharp-Mantis', 'Bisharp-Revenant', 'Bisharp-Assassin',
'Corviknight-Thunderbird', 'Corviknight-Genie', 'Corviknight-Yeti',
'Corviknight-Analytical', 'Corviknight-Martian', 'Corviknight-Falcon',
'Krookodile-Infernal', 'Krookodile-Abyssal', 'Krookodile-Wetlander',
'Krookodile-Cave Dweller', 'Krookodile-Cliffside', 'Krookodile-Quantum',
'Ogerpon-Muerta', 'Ogerpon-Easter', 'Ogerpon-Ankh', 'Ogerpon-Eid', 'Ogerpon-Vessel', 'Ogerpon-Kitsune',
],
ruleset: ['Standard', 'Swagger Clause', 'Mega Data Mod'],
banlist: ['Uber', 'Arena Trap', 'Shadow Tag', 'Soul Dew', 'Baton Pass', 'Blaziken + Speed Boost'],
onBegin() {
this.add('-message', `Welcome to Six by Six!`);
this.add('-message', `This is a micrometa featuring just 6 Pokemon, each with 6 forms each!`);
this.add(`raw|<div class='broadcast-green'><b>Need help with all of the new Megas and abilities?<br />Then make sure to check out the <a href="https://docs.google.com/spreadsheets/d/1wK11cPHnPCmH7JFss6leKW6_-cumn3DuZA-YMzrzF-U/edit?usp=sharing" target="_blank">spreadsheet</a> or use /dt!</b></div>`);
this.add('-message', `Welcome to Megas Revisited!`);
this.add('-message', `This is a Generation 6 OU-based Pet Mod where every existing Mega Evolution has been redesigned.`);
this.add('-message', `You can find our thread and metagame resources here:`);
this.add('-message', `https://www.smogon.com/forums/threads/3769141/`);
},
onSwitchInPriority: 100,
onSwitchIn(pokemon) {
if ((pokemon.illusion || pokemon).getTypes(true, true).join('/') !==
this.dex.forGen(9).species.get((pokemon.illusion || pokemon).species.name).types.join('/') &&
!pokemon.terastallized) {
this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
}
this.add('-message', `https://www.smogon.com/forums/threads/3713949/`);
},
},
{

View File

@ -0,0 +1,369 @@
export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTable = {
merciless: {
shortDesc: "This Pokemon's attacks are critical hits if the target is statused.",
onModifyCritRatio(critRatio, source, target) {
if (target?.status) return 5;
},
name: "Merciless",
rating: 1.5,
num: 196,
gen: 6,
},
pocketdimension: {
shortDesc: "This Pokemon switches out after using a status move.",
onModifyMove(move, pokemon) {
if (move.category === 'Status') {
move.selfSwitch = true;
this.add('-ability', pokemon, 'Pocket Dimension');
this.add('-message', `${pokemon.name} will switch out if this moves lands!`);
}
},
name: "Pocket Dimension",
rating: 4.5,
},
grassysurge: {
inherit: true,
gen: 6,
},
mistysurge: {
inherit: true,
gen: 6,
},
neutralizinggas: {
inherit: true,
// Ability suppression cancelled in scripts.ts
// new Ability suppression implemented in scripts.ts
onSwitchIn(pokemon) {},
onEnd(source) {},
onStart(pokemon) {
this.add('-ability', pokemon, 'Neutralizing Gas');
},
// onModifyPriority implemented in relevant abilities
onFoeBeforeMovePriority: 13,
onFoeBeforeMove(attacker, defender, move) {
attacker.addVolatile('neutralizinggas');
},
condition: {
onAfterMove(pokemon) {
pokemon.removeVolatile('neutralizinggas');
},
},
flags: { failroleplay: 1, noreceiver: 1, noentrain: 1, notrace: 1, failskillswap: 1, notransform: 1 },
desc: "While this Pokemon is active, opposing Pokemon's moves and their effects ignore its own Ability. Does not affect the As One, Battle Bond, Comatose, Disguise, Gulp Missile, Ice Face, Multitype, Power Construct, RKS System, Schooling, Shields Down, Stance Change, or Zen Mode Abilities.",
shortDesc: "While this Pokemon is active, opposing Pokemon's Ability has no effect when it uses moves.",
gen: 6,
},
nostalgiatrip: {
shortDesc: "This Pokemon's moves have the damage categories they would have in Gen 3. Fairy-type moves are Special.",
onStart(pokemon) {
this.add('-ability', pokemon, 'Nostalgia Trip');
this.add('-message', `This Pokemon is experiencing a nostalgia trip!`);
},
onModifyMovePriority: 8,
onModifyMove(move, pokemon) {
if (move.category === "Status") return;
if (['Fire', 'Water', 'Grass', 'Electric', 'Dark', 'Psychic', 'Dragon', 'Fairy', 'Ice'].includes(move.type)) {
move.category = "Special";
} else {
move.category = "Physical";
}
},
name: "Nostalgia Trip",
rating: 4,
gen: 6,
},
weatherreport: {
onBeforeMovePriority: 0.5,
onBeforeMove(target, source, move) {
if (move.type === 'Fire') {
this.field.setWeather('sunnyday');
} else if (move.type === 'Water') {
this.field.setWeather('raindance');
}
},
name: "Weather Report",
shortDesc: "Before using a Water or Fire-type move, this Pokemon sets Rain Dance or Sunny Day respectively.",
rating: 4,
gen: 6,
},
armortail: {
inherit: true,
gen: 6,
},
brainpower: {
onModifySpAPriority: 5,
onModifySpA(spa) {
return this.chainModify(2);
},
name: "Brain Power",
shortDesc: "This Pokemon's Special Attack is doubled.",
rating: 5,
},
neuroforce: {
inherit: true,
gen: 6,
},
bugzapper: {
onTryHit(target, source, move) {
if (target !== source && move.type === 'Bug') {
if (!source.addVolatile('trapped', target, move, 'trapper')) {
this.add('-immune', target, '[from] ability: Bug Zapper');
}
return null;
}
},
name: "Bug Zapper",
shortDesc: "This Pokemon is immune to Bug-type moves and traps the foe if hit by one.",
rating: 5,
},
exoskeleton: {
onSourceModifyDamage(damage, source, target, move) {
if (move.category === 'Physical') {
return this.chainModify(0.5);
}
},
name: "Exoskeleton",
shortDesc: "This Pokemon receives 1/2 damage from physical attacks; Hazard immunity.",
rating: 4,
},
icescales: {
inherit: true,
onModifyAtkPriority: 5,
onModifyAtk(atk, attacker, defender, move) {
if (move.type === 'Ice') {
this.debug('Ice Scales boost');
return this.chainModify(1.5);
}
},
onModifySpAPriority: 5,
onModifySpA(atk, attacker, defender, move) {
if (move.type === 'Ice') {
this.debug('Ice Scales boost');
return this.chainModify(1.5);
}
},
onImmunity(type, pokemon) {
if (type === 'hail') return false;
},
shortDesc: "This Pokemon receives 1/2 damage from special attacks. Ice moves have 1.5x power. Hail immunity.",
gen: 6,
},
eartheater: {
inherit: true,
onDamage(damage, target, source, effect) {
if (effect && (effect.id === 'stealthrock' || effect.id === 'spikes')) {
this.heal(damage);
return false;
}
},
shortDesc: "Heals 1/4 of its max HP when hit by Ground; Ground immunity. Healed by Spikes and Stealth Rock.",
gen: 6,
},
toxicchain: {
inherit: true,
gen: 6,
},
shellejection: {
onModifyMovePriority: -1,
onModifyMove(move, attacker) {
if (move.category === 'Special') {
attacker.addVolatile('shellejection');
this.add('-ability', attacker, 'Shell Ejection');
this.add('-message', `${attacker.name} is getting ready to leave the battlefield!`);
this.add('-message', `${attacker.name} can no longer use status moves!`);
}
},
condition: {
duration: 2,
onDisableMove(pokemon) {
for (const moveSlot of pokemon.moveSlots) {
const move = this.dex.moves.get(moveSlot.id);
if (move.category === 'Status' && move.id !== 'mefirst') {
pokemon.disableMove(moveSlot.id);
}
}
},
onSwitchOut(pokemon) {
pokemon.heal(pokemon.baseMaxhp / 3);
},
onEnd(pokemon) {
this.add('-ability', pokemon, 'Shell Ejection');
this.add('-message', `${pokemon.name} ejected itself from its shell!`);
pokemon.heal(pokemon.baseMaxhp / 3);
pokemon.switchFlag = true;
},
},
name: "Shell Ejection",
rating: 3.5,
gen: 6,
shortDesc: "On using Special move: switching heals 1/3, can't use status, switches out at end of next turn.",
},
sharpness: {
inherit: true,
gen: 6,
},
dauntlessshield: {
onStart(pokemon) {
this.boost({ def: 1 }, pokemon);
pokemon.addVolatile('dauntlessshield');
},
onResidualOrder: 6,
onResidual(pokemon) {
if (pokemon.positiveBoosts()) {
this.heal(pokemon.baseMaxhp / 16);
this.add('-message', `${pokemon.name}'s shield gives it strength!`);
}
},
name: "Dauntless Shield",
rating: 5,
num: 235,
shortDesc: "+1 Defense on switch-in. Heals 1/16 of max HP if it has a positive boost.",
gen: 6,
},
confidence: {
onSourceAfterFaint(length, target, source, effect) {
if (effect && effect.effectType === 'Move') {
this.boost({ spa: length }, source);
}
},
name: "Confidence",
rating: 3,
shortDesc: "This Pokemon's Sp. Atk is raised by 1 stage if it attacks and KOes another Pokemon.",
gen: 6,
},
electricsurge: {
inherit: true,
gen: 6,
},
goodasgold: {
inherit: true,
gen: 6,
},
opportunist: {
inherit: true,
onUpdate(pokemon) {
let activate = false;
const boosts: SparseBoostsTable = {};
let i: BoostID;
for (i in pokemon.boosts) {
if (pokemon.boosts[i] < 0) {
activate = true;
boosts[i] = 0;
}
}
if (this.effectState.herb) return;
if (activate) {
pokemon.setBoost(boosts);
this.effectState.herb = true;
this.add('-ability', pokemon, 'Opportunist');
this.add('-clearnegativeboost', pokemon, '[silent]');
}
},
onSwitchIn(pokemon) {
delete this.effectState.herb;
},
shortDesc: "Copies foe's stat gains as they happen. Resets negative stat changes once per switch-in.",
gen: 6,
},
intoxicate: {
onModifyTypePriority: -1,
onModifyType(move, pokemon) {
const noModifyType = [
'judgment', 'multiattack', 'naturalgift', 'revelationdance', 'technoblast', 'terrainpulse', 'weatherball',
];
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
move.type = 'Poison';
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
if (move.typeChangerBoosted) return this.chainModify([5325, 4096]);
},
name: "Intoxicate",
rating: 4,
shortDesc: "This Pokemon's Normal-type moves become Poison-type and have 1.3x power.",
},
dragonsgale: {
onStart(source) {
this.field.setWeather('deltastream');
},
onAnySetWeather(target, source, weather) {
const strongWeathers = ['desolateland', 'primordialsea', 'deltastream'];
if (this.field.getWeather().id === 'deltastream' && !strongWeathers.includes(weather.id)) return false;
},
onEnd(pokemon) {
if (this.field.weatherState.source !== pokemon) return;
for (const target of this.getAllActive()) {
if (target === pokemon) continue;
if (target.hasAbility('dragonsgale')) {
this.field.weatherState.source = target;
return;
}
}
this.field.clearWeather();
},
onDamage(damage, target, source, effect) {
if (effect && (effect.id === 'stealthrock' || effect.id === 'spikes')) {
return damage / 2;
}
},
flags: {},
name: "Dragon's Gale",
shortDesc: "On switch-in, sets Delta Stream. User takes halved damage from hazards.",
rating: 5,
},
parentalbond: {
onPrepareHit(source, target, move) {
if (move.category === 'Status' || move.selfdestruct || move.multihit) return;
if ([
'endeavor', 'seismictoss', 'psywave', 'nightshade', 'sonicboom', 'dragonrage',
'superfang', 'naturesmadness', 'bide', 'counter', 'mirrorcoat', 'metalburst',
].includes(move.id)) return;
if (!move.spreadHit && !move.isZ && !move.isMax) {
move.multihit = 2;
move.multihitType = 'parentalbond';
}
},
onSourceModifySecondaries(secondaries, target, source, move) {
if (move.multihitType === 'parentalbond' && move.id === 'secretpower' && move.hit < 2) {
// hack to prevent accidentally suppressing King's Rock/Razor Fang
return secondaries.filter(effect => effect.volatileStatus === 'flinch');
}
},
name: "Parental Bond",
rating: 4.5,
shortDesc: "This Pokemon's damaging moves hit twice. The second hit has its damage quartered.",
num: 184,
},
// for ngas
galewings: {
// for ngas
inherit: true,
onModifyPriority(priority, pokemon, target, move) {
for (const poke of this.getAllActive()) {
if (poke.hasAbility('neutralizinggas') && poke.side.id !== pokemon.side.id && !poke.abilityState.ending) {
return;
}
}
if (move && move.type === 'Flying') return priority + 1;
},
},
prankster: {
// for ngas
inherit: true,
onModifyPriority(priority, pokemon, target, move) {
for (const poke of this.getAllActive()) {
if (poke.hasAbility('neutralizinggas') && poke.side.id !== pokemon.side.id && !poke.abilityState.ending) {
return;
}
}
if (move?.category === 'Status') {
move.pranksterBoosted = true;
return priority + 1;
}
},
},
};

View File

@ -0,0 +1,26 @@
export const FormatsData: import('../../../sim/dex-species').ModdedSpeciesFormatsDataTable = {
blaziken: {
tier: "OU",
},
blazikenmega: {
tier: "OU",
},
gengarmega: {
tier: "OU",
},
kangaskhanmega: {
tier: "OU",
},
lucariomega: {
tier: "OU",
},
mawilemega: {
tier: "OU",
},
sableyemega: {
tier: "OU",
},
salamencemega: {
tier: "OU",
},
};

View File

@ -0,0 +1,12 @@
export const Items: import('../../../sim/dex-items').ModdedItemDataTable = {
meteorite: {
name: "Meteorite",
spritenum: 615,
megaStone: { "Rayquaza": "Rayquaza-Mega" },
itemUser: ["Rayquaza"],
onTakeItem(item, source) {
return !item.megaStone?.[source.baseSpecies.baseSpecies];
},
desc: "If held by a Rayquaza, this item allows it to Mega Evolve in battle.",
},
};

View File

@ -0,0 +1,77 @@
export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
stealthrock: {
inherit: true,
condition: {
// this is a side condition
onSideStart(side) {
this.add('-sidestart', side, 'move: Stealth Rock');
},
onSwitchIn(pokemon) {
if (pokemon.hasItem('heavydutyboots') || pokemon.hasAbility('exoskeleton')) return;
const typeMod = this.clampIntRange(pokemon.runEffectiveness(this.dex.getActiveMove('stealthrock')), -6, 6);
this.damage(pokemon.maxhp * (2 ** typeMod) / 8);
},
},
},
toxicspikes: {
inherit: true,
condition: {
// this is a side condition
onSideStart(side) {
this.add('-sidestart', side, 'move: Toxic Spikes');
this.effectState.layers = 1;
},
onSideRestart(side) {
if (this.effectState.layers >= 2) return false;
this.add('-sidestart', side, 'move: Toxic Spikes');
this.effectState.layers++;
},
onSwitchIn(pokemon) {
if (!pokemon.isGrounded()) return;
if (pokemon.hasType('Poison')) {
this.add('-sideend', pokemon.side, 'move: Toxic Spikes', `[of] ${pokemon}`);
pokemon.side.removeSideCondition('toxicspikes');
} else if (pokemon.hasType('Steel') || pokemon.hasItem('heavydutyboots') || pokemon.hasAbility('exoskeleton')) {
// do nothing
} else if (this.effectState.layers >= 2) {
pokemon.trySetStatus('tox', pokemon.side.foe.active[0]);
} else {
pokemon.trySetStatus('psn', pokemon.side.foe.active[0]);
}
},
},
},
spikes: {
inherit: true,
condition: {
// this is a side condition
onSideStart(side) {
this.add('-sidestart', side, 'Spikes');
this.effectState.layers = 1;
},
onSideRestart(side) {
if (this.effectState.layers >= 3) return false;
this.add('-sidestart', side, 'Spikes');
this.effectState.layers++;
},
onSwitchIn(pokemon) {
if (!pokemon.isGrounded() || pokemon.hasItem('heavydutyboots') || pokemon.hasAbility('exoskeleton')) return;
const damageAmounts = [0, 3, 4, 6]; // 1/8, 1/6, 1/4
this.damage(damageAmounts[this.effectState.layers] * pokemon.maxhp / 24);
},
},
},
stickyweb: {
inherit: true,
condition: {
onSideStart(side) {
this.add('-sidestart', side, 'move: Sticky Web');
},
onSwitchIn(pokemon) {
if (!pokemon.isGrounded() || pokemon.hasItem('heavydutyboots') || pokemon.hasAbility('exoskeleton')) return;
this.add('-activate', pokemon, 'move: Sticky Web');
this.boost({ spe: -1 }, pokemon, pokemon.side.foe.active[0], this.dex.getActiveMove('stickyweb'));
},
},
},
};

View File

@ -0,0 +1,249 @@
export const Pokedex: import('../../../sim/dex-species').ModdedSpeciesDataTable = {
audinomega: {
inherit: true,
types: ["Normal", "Electric"],
baseStats: { hp: 103, atk: 60, def: 120, spa: 110, spd: 97, spe: 55 },
abilities: { 0: "Regenerator" },
},
houndoommega: {
inherit: true,
types: ["Dark", "Fire"],
baseStats: { hp: 75, atk: 90, def: 90, spa: 140, spd: 90, spe: 115 },
abilities: { 0: "Merciless" },
},
lucariomega: {
inherit: true,
types: ["Fighting", "Steel"],
baseStats: { hp: 70, atk: 125, def: 70, spa: 140, spd: 94, spe: 126 },
abilities: { 0: "Lightning Rod" },
},
banettemega: {
inherit: true,
types: ["Ghost", "Steel"],
baseStats: { hp: 64, atk: 149, def: 75, spa: 83, spd: 83, spe: 101 },
abilities: { 0: "Pocket Dimension" },
},
glaliemega: {
inherit: true,
types: ["Ice", "Steel"],
baseStats: { hp: 80, atk: 160, def: 70, spa: 95, spd: 70, spe: 105 },
abilities: { 0: "Refrigerate" },
},
venusaurmega: {
inherit: true,
types: ["Grass", "Poison"],
baseStats: { hp: 80, atk: 82, def: 123, spa: 120, spd: 120, spe: 100 },
abilities: { 0: "Grassy Surge" },
},
blastoisemega: {
inherit: true,
types: ["Water", "Fairy"],
baseStats: { hp: 79, atk: 83, def: 130, spa: 135, spd: 105, spe: 98 },
abilities: { 0: "Misty Surge" },
},
charizardmegay: {
inherit: true,
types: ["Fire", "Flying"],
baseStats: { hp: 78, atk: 94, def: 93, spa: 159, spd: 110, spe: 100 },
abilities: { 0: "Dragon's Gale" },
},
alakazammega: {
inherit: true,
types: ["Psychic", "Ice"],
baseStats: { hp: 55, atk: 50, def: 75, spa: 155, spd: 125, spe: 140 },
abilities: { 0: "Magic Guard" },
},
pinsirmega: {
inherit: true,
types: ["Bug", "Ice"],
baseStats: { hp: 65, atk: 150, def: 110, spa: 80, spd: 85, spe: 110 },
abilities: { 0: "Mountaineer" },
},
gengarmega: {
inherit: true,
types: ["Ghost", "Poison"],
baseStats: { hp: 60, atk: 65, def: 105, spa: 155, spd: 105, spe: 110 },
abilities: { 0: "Neutralizing Gas" },
},
aerodactylmega: {
inherit: true,
types: ["Rock", "Flying"],
baseStats: { hp: 80, atk: 140, def: 65, spa: 85, spd: 100, spe: 145 },
abilities: { 0: "Nostalgia Trip" },
},
steelixmega: {
inherit: true,
types: ["Steel", "Ground"],
baseStats: { hp: 75, atk: 135, def: 210, spa: 55, spd: 105, spe: 30 },
abilities: { 0: "Flash Fire" },
weightkg: 999.9,
},
altariamega: {
inherit: true,
types: ["Dragon", "Fairy"],
baseStats: { hp: 75, atk: 90, def: 90, spa: 140, spd: 115, spe: 80 },
abilities: { 0: "Weather Report" },
},
sceptilemega: {
inherit: true,
types: ["Grass", "Dragon"],
baseStats: { hp: 70, atk: 95, def: 79, spa: 145, spd: 99, spe: 142 },
abilities: { 0: "Armor Tail" },
},
swampertmega: {
inherit: true,
types: ["Water", "Poison"],
baseStats: { hp: 100, atk: 145, def: 110, spa: 85, spd: 110, spe: 85 },
abilities: { 0: "Toxic Chain" },
},
manectricmega: {
inherit: true,
types: ["Electric"],
baseStats: { hp: 70, atk: 75, def: 80, spa: 135, spd: 85, spe: 130 },
abilities: { 0: "Bug Zapper" },
},
absolmega: {
inherit: true,
types: ["Dark", "Fairy"],
baseStats: { hp: 65, atk: 130, def: 60, spa: 135, spd: 60, spe: 115 },
abilities: { 0: "Neuroforce" },
},
medichammega: {
inherit: true,
types: ["Fighting", "Psychic"],
baseStats: { hp: 60, atk: 60, def: 100, spa: 90, spd: 100, spe: 100 },
abilities: { 0: "Brain Power" },
},
sableyemega: {
inherit: true,
types: ["Dark", "Ghost"],
baseStats: { hp: 50, atk: 95, def: 115, spa: 85, spd: 115, spe: 20 },
},
beedrillmega: {
inherit: true,
types: ["Bug", "Rock"],
baseStats: { hp: 65, atk: 140, def: 85, spa: 45, spd: 85, spe: 75 },
abilities: { 0: "Exoskeleton" },
},
mawilemega: {
inherit: true,
types: ["Steel", "Fairy"],
baseStats: { hp: 50, atk: 90, def: 125, spa: 70, spd: 95, spe: 50 },
abilities: { 0: "Huge Power" },
},
abomasnowmega: {
inherit: true,
types: ["Grass"],
abilities: { 0: "Ice Scales" },
},
cameruptmega: {
inherit: true,
types: ["Fire", "Ground"],
baseStats: { hp: 70, atk: 80, def: 140, spa: 135, spd: 115, spe: 20 },
abilities: { 0: "Earth Eater" },
},
slowbromega: {
inherit: true,
types: ["Water", "Psychic"],
baseStats: { hp: 95, atk: 75, def: 150, spa: 120, spd: 120, spe: 30 },
abilities: { 0: "Shell Ejection" },
},
gallademega: {
inherit: true,
types: ["Psychic", "Fighting"],
baseStats: { hp: 68, atk: 150, def: 100, spa: 75, spd: 127, spe: 98 },
abilities: { 0: "Sharpness" },
},
ampharosmega: {
inherit: true,
types: ["Electric", "Dragon"],
baseStats: { hp: 90, atk: 95, def: 95, spa: 165, spd: 110, spe: 55 },
abilities: { 0: "Mega Launcher" },
},
gyaradosmega: {
inherit: true,
types: ["Water", "Flying"],
baseStats: { hp: 95, atk: 130, def: 109, spa: 85, spd: 130, spe: 91 },
abilities: { 0: "Aerilate" },
},
heracrossmega: {
inherit: true,
types: ["Bug", "Fighting"],
baseStats: { hp: 80, atk: 150, def: 150, spa: 40, spd: 110, spe: 70 },
abilities: { 0: "Iron Barbs" },
},
sharpedomega: {
inherit: true,
types: ["Water", "Electric"],
baseStats: { hp: 70, atk: 130, def: 55, spa: 145, spd: 55, spe: 105 },
abilities: { 0: "No Guard" },
},
gardevoirmega: {
inherit: true,
types: ["Psychic", "Fairy"],
baseStats: { hp: 68, atk: 65, def: 100, spa: 150, spd: 127, spe: 108 },
},
aggronmega: {
inherit: true,
types: ["Steel"],
baseStats: { hp: 70, atk: 145, def: 185, spa: 85, spd: 85, spe: 60 },
abilities: { 0: "Dauntless Shield" },
},
kangaskhanmega: {
inherit: true,
types: ["Normal", "Ground"],
baseStats: { hp: 105, atk: 125, def: 105, spa: 50, spd: 105, spe: 100 },
},
salamencemega: {
inherit: true,
types: ["Dragon", "Flying"],
baseStats: { hp: 95, atk: 135, def: 105, spa: 155, spd: 105, spe: 105 },
abilities: { 0: "Confidence" },
},
garchompmega: {
inherit: true,
types: ["Dragon", "Ground"],
baseStats: { hp: 108, atk: 150, def: 115, spa: 140, spd: 85, spe: 102 },
abilities: { 0: "Water Absorb" },
},
tyranitarmega: {
inherit: true,
types: ["Rock", "Electric"],
baseStats: { hp: 100, atk: 144, def: 120, spa: 110, spd: 144, spe: 82 },
abilities: { 0: "Electric Surge" },
},
latiasmega: {
inherit: true,
abilities: { 0: "Trace" },
},
latiosmega: {
inherit: true,
baseStats: { hp: 80, atk: 140, def: 100, spa: 150, spd: 120, spe: 110 },
abilities: { 0: "Opportunist" },
},
dianciemega: {
inherit: true,
abilities: { 0: "Good As Gold" },
},
blazikenmega: {
inherit: true,
baseStats: { hp: 80, atk: 150, def: 80, spa: 120, spd: 90, spe: 110 },
abilities: { 0: "Regenerator" },
},
mewtwomegax: {
inherit: true,
types: ["Psychic", "Poison"],
baseStats: { hp: 106, atk: 140, def: 130, spa: 154, spd: 120, spe: 130 },
abilities: { 0: "Intoxicate" },
},
mewtwomegay: {
inherit: true,
types: ["Psychic", "Water"],
baseStats: { hp: 106, atk: 120, def: 110, spa: 194, spd: 130, spe: 120 },
abilities: { 0: "Levitate" },
},
rayquazamega: {
inherit: true,
requiredItem: "Meteorite",
},
};

View File

@ -0,0 +1,33 @@
export const Rulesets: import('../../../sim/dex-formats').ModdedFormatDataTable = {
megadatamod: {
effectType: 'Rule',
name: 'Mega Data Mod',
desc: 'Gives data on stats, Ability and types when a Pokémon Mega Evolves or undergoes Ultra Burst.',
onSwitchIn(pokemon) {
if (pokemon.species.forme.startsWith('Mega') || pokemon.species.forme.startsWith('Ultra')) {
this.add('-start', pokemon, 'typechange', pokemon.getTypes(true).join('/'), '[silent]');
}
},
onAfterMega(pokemon) {
this.add('-start', pokemon, 'typechange', pokemon.getTypes(true).join('/'), '[silent]');
const species = pokemon.species;
let buf = `<span class="col pokemonnamecol" style="white-space: nowrap">${species.name}</span> `;
buf += `<span class="col typecol">`;
buf += `<img src="https://${Config.routes.client}/sprites/types/${species.types[0]}.png" alt="${species.types[0]}" height="14" width="32">`;
if (species.types[1]) {
buf += `<img src="https://${Config.routes.client}/sprites/types/${species.types[1]}.png" alt="${species.types[1]}" height="14" width="32">`;
}
buf += `</span> `;
buf += `<span style="float: left ; min-height: 26px"><span class="col abilitycol">${species.abilities[0]}</span><span class="col abilitycol"></span></span>`;
const stats = [];
let stat: StatID;
for (stat in species.baseStats) {
const statNames: { [k in StatID]: string } = { hp: "HP", atk: "Atk", def: "Def", spa: "SpA", spd: "SpD", spe: "Spe" };
stats.push(`<span class="col statcol"><em>${statNames[stat]}</em><br>${species.baseStats[stat]}</span>`);
}
buf += `<span style="float: left ; min-height: 26px">${stats.join(' ')}</span>`;
buf += `</span>`;
this.add(`raw|<ul class="utilichart"><li class="result">${buf}</li><li style="clear: both"></li></ul>`);
},
},
};

View File

@ -0,0 +1,237 @@
export const Scripts: ModdedBattleScriptsData = {
gen: 6,
inherit: 'gen6',
actions: {
// for parental bond
modifyDamage(
baseDamage: number, pokemon: Pokemon, target: Pokemon, move: ActiveMove, suppressMessages = false
) {
const tr = this.battle.trunc;
if (!move.type) move.type = '???';
const type = move.type;
baseDamage += 2;
if (move.spreadHit) {
// multi-target modifier (doubles only)
const spreadModifier = this.battle.gameType === 'freeforall' ? 0.5 : 0.75;
this.battle.debug(`Spread modifier: ${spreadModifier}`);
baseDamage = this.battle.modify(baseDamage, spreadModifier);
} else if (move.multihitType === 'parentalbond' && move.hit > 1) {
// Parental Bond modifier
const bondModifier = 0.25;
this.battle.debug(`Parental Bond modifier: ${bondModifier}`);
baseDamage = this.battle.modify(baseDamage, bondModifier);
}
baseDamage = this.battle.runEvent('WeatherModifyDamage', pokemon, target, move, baseDamage);
const isCrit = target.getMoveHitData(move).crit;
if (isCrit) {
baseDamage = tr(baseDamage * (move.critModifier || (this.battle.gen >= 6 ? 1.5 : 2)));
}
baseDamage = this.battle.randomizer(baseDamage);
if (type !== '???') {
let stab: number | [number, number] = 1;
const isSTAB = move.forceSTAB || pokemon.hasType(type) || pokemon.getTypes(false, true).includes(type);
if (isSTAB) {
stab = 1.5;
}
if (pokemon.terastallized === 'Stellar') {
if (!pokemon.stellarBoostedTypes.includes(type) || move.stellarBoosted) {
stab = isSTAB ? 2 : [4915, 4096];
move.stellarBoosted = true;
if (pokemon.species.name !== 'Terapagos-Stellar') {
pokemon.stellarBoostedTypes.push(type);
}
}
} else {
if (pokemon.terastallized === type && pokemon.getTypes(false, true).includes(type)) {
stab = 2;
}
stab = this.battle.runEvent('ModifySTAB', pokemon, target, move, stab);
}
baseDamage = this.battle.modify(baseDamage, stab);
}
let typeMod = target.runEffectiveness(move);
typeMod = this.battle.clampIntRange(typeMod, -6, 6);
target.getMoveHitData(move).typeMod = typeMod;
if (typeMod > 0) {
if (!suppressMessages) this.battle.add('-supereffective', target);
for (let i = 0; i < typeMod; i++) {
baseDamage *= 2;
}
}
if (typeMod < 0) {
if (!suppressMessages) this.battle.add('-resisted', target);
for (let i = 0; i > typeMod; i--) {
baseDamage = tr(baseDamage / 2);
}
}
if (isCrit && !suppressMessages) this.battle.add('-crit', target);
if (pokemon.status === 'brn' && move.category === 'Physical' && !pokemon.hasAbility('guts')) {
if (this.battle.gen < 6 || move.id !== 'facade') {
baseDamage = this.battle.modify(baseDamage, 0.5);
}
}
// Generation 5, but nothing later, sets damage to 1 before the final damage modifiers
if (this.battle.gen === 5 && !baseDamage) baseDamage = 1;
// Final modifier. Modifiers that modify damage after min damage check, such as Life Orb.
baseDamage = this.battle.runEvent('ModifyDamage', pokemon, target, move, baseDamage);
if (move.isZOrMaxPowered && target.getMoveHitData(move).zBrokeProtect) {
baseDamage = this.battle.modify(baseDamage, 0.25);
this.battle.add('-zbroken', target);
}
// Generation 6-7 moves the check for minimum 1 damage after the final modifier...
if (this.battle.gen !== 5 && !baseDamage) return 1;
// ...but 16-bit truncation happens even later, and can truncate to 0
return tr(baseDamage, 16);
},
},
pokemon: {
// for neutralizing gas
ignoringAbility() {
if (this.battle.gen >= 5 && !this.isActive) return true;
if (this.getAbility().flags['notransform'] && this.transformed) return true;
if (this.getAbility().flags['cantsuppress']) return false;
if (this.volatiles['gastroacid']) return true;
if (this.ability === ('neutralizinggas' as ID)) return false;
if (this.volatiles['neutralizinggas']) return true;
return false;
},
},
init() {
this.modData("Learnsets", "lucario").learnset.meteormash = ["6L1"];
this.modData("Learnsets", "lucario").learnset.machpunch = ["6L1"];
this.modData("Learnsets", "houndoom").learnset.toxicspikes = ["6L1"];
this.modData("Learnsets", "houndoom").learnset.venoshock = ["6L1"];
this.modData("Learnsets", "houndoom").learnset.hex = ["6L1"];
this.modData("Learnsets", "audino").learnset.discharge = ["6L1"];
this.modData("Learnsets", "audino").learnset.voltswitch = ["6L1"];
this.modData("Learnsets", "audino").learnset.chargebeam = ["6L1"];
this.modData("Learnsets", "audino").learnset.charge = ["6L1"];
this.modData("Learnsets", "audino").learnset.zapcannon = ["6L1"];
this.modData("Learnsets", "glalie").learnset.thunderfang = ["6L1"];
this.modData("Learnsets", "glalie").learnset.partingshot = ["6L1"];
this.modData("Learnsets", "glalie").learnset.boomburst = ["6L1"];
this.modData("Learnsets", "banette").learnset.ironhead = ["6L1"];
this.modData("Learnsets", "banette").learnset.metalsound = ["6L1"];
this.modData("Learnsets", "banette").learnset.powder = ["6L1"];
this.modData("Learnsets", "banette").learnset.stealthrock = ["6L1"];
this.modData("Learnsets", "banette").learnset.defog = ["6L1"];
this.modData("Learnsets", "venusaur").learnset.psychic = ["6L1"];
this.modData("Learnsets", "venusaur").learnset.calmmind = ["6L1"];
this.modData("Learnsets", "blastoise").learnset.moonblast = ["6L1"];
this.modData("Learnsets", "blastoise").learnset.mistyterrain = ["6L1"];
this.modData("Learnsets", "blastoise").learnset.taunt = ["6L1"];
this.modData("Learnsets", "blastoise").learnset.drainingkiss = ["6L1"];
this.modData("Learnsets", "blastoise").learnset.dazzlinggleam = ["6L1"];
this.modData("Learnsets", "charizard").learnset.calmmind = ["6L1"];
this.modData("Learnsets", "charizard").learnset.hurricane = ["6L1"];
this.modData("Learnsets", "charizard").learnset.lavaplume = ["6L1"];
this.modData("Learnsets", "gengar").learnset.reflecttype = ["6L1"];
this.modData("Learnsets", "gengar").learnset.calmmind = ["6L1"];
this.modData("Learnsets", "alakazam").learnset.blizzard = ["6L1"];
this.modData("Learnsets", "alakazam").learnset.flashcannon = ["6L1"];
this.modData("Learnsets", "alakazam").learnset.icebeam = ["6L1"];
this.modData("Learnsets", "alakazam").learnset.hail = ["6L1"];
this.modData("Learnsets", "pinsir").learnset.hail = ["6L1"];
this.modData("Learnsets", "pinsir").learnset.megahorn = ["6L1"];
this.modData("Learnsets", "pinsir").learnset.uturn = ["6L1"];
this.modData("Learnsets", "pinsir").learnset.iceshard = ["6L1"];
this.modData("Learnsets", "pinsir").learnset.iciclecrash = ["6L1"];
this.modData("Learnsets", "pinsir").learnset.icebeam = ["6L1"];
this.modData("Learnsets", "pinsir").learnset.blizzard = ["6L1"];
this.modData("Learnsets", "pinsir").learnset.roost = ["6L1"];
this.modData("Learnsets", "pinsir").learnset.iciclespear = ["6L1"];
this.modData("Learnsets", "aerodactyl").learnset.powergem = ["6L1"];
this.modData("Learnsets", "aerodactyl").learnset.shadowball = ["6L1"];
this.modData("Learnsets", "aerodactyl").learnset.hurricane = ["6L1"];
this.modData("Learnsets", "steelix").learnset.heatcrash = ["6L1"];
this.modData("Learnsets", "steelix").learnset.rapidspin = ["6L1"];
this.modData("Learnsets", "steelix").learnset.smackdown = ["6L1"];
this.modData("Learnsets", "altaria").learnset.scald = ["6L1"];
this.modData("Learnsets", "altaria").learnset.hydropump = ["6L1"];
this.modData("Learnsets", "altaria").learnset.thunder = ["6L1"];
this.modData("Learnsets", "sceptile").learnset.calmmind = ["6L1"];
this.modData("Learnsets", "sceptile").learnset.sludgewave = ["6L1"];
this.modData("Learnsets", "swampert").learnset.sludgebomb = ["6L1"];
this.modData("Learnsets", "swampert").learnset.bulkup = ["6L1"];
this.modData("Learnsets", "swampert").learnset.toxicspikes = ["6L1"];
this.modData("Learnsets", "swampert").learnset.aquajet = ["6L1"];
this.modData("Learnsets", "swampert").learnset.gunkshot = ["6L1"];
this.modData("Learnsets", "swampert").learnset.poisonjab = ["6L1"];
this.modData("Learnsets", "pidgeot").learnset.focusblast = ["6L1"];
this.modData("Learnsets", "absol").learnset.closecombat = ["6L1"];
this.modData("Learnsets", "absol").learnset.moonblast = ["6L1"];
this.modData("Learnsets", "absol").learnset.moonlight = ["6L1"];
this.modData("Learnsets", "medicham").learnset.aurasphere = ["6L1"];
this.modData("Learnsets", "medicham").learnset.thunderbolt = ["6L1"];
this.modData("Learnsets", "medicham").learnset.closecombat = ["6L1"];
this.modData("Learnsets", "medicham").learnset.gunkshot = ["6L1"];
this.modData("Learnsets", "medicham").learnset.healingwish = ["6L1"];
this.modData("Learnsets", "beedrill").learnset.earthquake = ["6L1"];
this.modData("Learnsets", "beedrill").learnset.stoneedge = ["6L1"];
this.modData("Learnsets", "beedrill").learnset.rockslide = ["6L1"];
this.modData("Learnsets", "beedrill").learnset.smackdown = ["6L1"];
this.modData("Learnsets", "beedrill").learnset.stealthrock = ["6L1"];
this.modData("Learnsets", "beedrill").learnset.diamondstorm = ["6L1"];
this.modData("Learnsets", "mawile").learnset.firepunch = ["6L1"];
this.modData("Learnsets", "mawile").learnset.rockslide = ["6L1"];
this.modData("Learnsets", "mawile").learnset.slackoff = ["6L1"];
this.modData("Learnsets", "camerupt").learnset.morningsun = ["6L1"];
this.modData("Learnsets", "abomasnow").learnset.spikyshield = ["6L1"];
this.modData("Learnsets", "abomasnow").learnset.earthpower = ["6L1"];
this.modData("Learnsets", "abomasnow").learnset.hornleech = ["6L1"];
this.modData("Learnsets", "gallade").learnset.sacredsword = ["6L1"];
this.modData("Learnsets", "gallade").learnset.machpunch = ["6L1"];
this.modData('Moves', 'aerialace').flags.slicing = 1;
this.modData('Moves', 'aircutter').flags.slicing = 1;
this.modData('Moves', 'airslash').flags.slicing = 1;
this.modData('Moves', 'behemothblade').flags.slicing = 1;
this.modData('Moves', 'crosspoison').flags.slicing = 1;
this.modData('Moves', 'cut').flags.slicing = 1;
this.modData('Moves', 'furycutter').flags.slicing = 1;
this.modData('Moves', 'nightslash').flags.slicing = 1;
this.modData('Moves', 'psychocut').flags.slicing = 1;
this.modData('Moves', 'razorleaf').flags.slicing = 1;
this.modData('Moves', 'razorshell').flags.slicing = 1;
this.modData('Moves', 'sacredsword').flags.slicing = 1;
this.modData('Moves', 'slash').flags.slicing = 1;
this.modData('Moves', 'solarblade').flags.slicing = 1;
this.modData('Moves', 'xscissor').flags.slicing = 1;
this.modData("Learnsets", "ampharos").learnset.waterpulse = ["6L1"];
this.modData("Learnsets", "ampharos").learnset.aurasphere = ["6L1"];
this.modData("Learnsets", "ampharos").learnset.darkpulse = ["6L1"];
this.modData("Learnsets", "ampharos").learnset.defog = ["6L1"];
this.modData("Learnsets", "ampharos").learnset.slackoff = ["6L1"];
this.modData("Learnsets", "heracross").learnset.healorder = ["6L1"];
this.modData("Learnsets", "heracross").learnset.circlethrow = ["6L1"];
this.modData("Learnsets", "heracross").learnset.spikes = ["6L1"];
this.modData("Learnsets", "heracross").learnset.icepunch = ["6L1"];
this.modData("Learnsets", "sharpedo").learnset.thunder = ["6L1"];
this.modData("Learnsets", "gardevoir").learnset.rapidspin = ["6L1"];
this.modData("Learnsets", "gardevoir").learnset.mysticalfire = ["6L1"];
this.modData("Learnsets", "aggron").learnset.voltswitch = ["6L1"];
this.modData("Learnsets", "kangaskhan").learnset.milkdrink = ["6L1"];
this.modData("Learnsets", "salamence").learnset.hurricane = ["6L1"];
this.modData("Learnsets", "salamence").learnset.airslash = ["6L1"];
this.modData("Learnsets", "salamence").learnset.ironhead = ["6L1"];
this.modData("Learnsets", "tyranitar").learnset.wildcharge = ["6L1"];
this.modData("Learnsets", "tyranitar").learnset.waterfall = ["6L1"];
this.modData("Learnsets", "diancie").learnset.spikyshield = ["6L1"];
this.modData("Learnsets", "blaziken").learnset.uturn = ["6L1"];
this.modData("Learnsets", "blaziken").learnset.spikes = ["6L1"];
this.modData("Learnsets", "blaziken").learnset.roost = ["6L1"];
this.modData("Learnsets", "blaziken").learnset.closecombat = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.extremespeed = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.sludgewave = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.swordsdance = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.uturn = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.closecombat = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.drainpunch = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.machpunch = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.scald = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.surf = ["6L1"];
this.modData("Learnsets", "mewtwo").learnset.hydropump = ["6L1"];
this.modData("Learnsets", "rayquaza").learnset.coil = ["6L1"];
this.modData("Learnsets", "rayquaza").learnset.defog = ["6L1"];
},
};

View File

@ -1,113 +0,0 @@
export const FormatsData: import('../../../sim/dex-species').ModdedSpeciesFormatsDataTable = {
kingdraclassic: {
tier: "OU",
},
kingdrabrinepool: {
tier: "OU",
},
kingdradruid: {
tier: "OU",
},
kingdrabard: {
tier: "OU",
},
kingdragourmet: {
tier: "OU",
},
kingdraancient: {
tier: "OU",
},
nidoqueenclassic: {
tier: "OU",
},
nidoqueenerudite: {
tier: "OU",
},
nidoqueenvolcanic: {
tier: "OU",
},
nidoqueenrosegold: {
tier: "OU",
},
nidoqueenshaman: {
tier: "OU",
},
nidoqueenjasper: {
tier: "OU",
},
bisharpcenturion: {
tier: "OU",
},
bisharpsavage: {
tier: "OU",
},
bisharpronin: {
tier: "OU",
},
bisharpmantis: {
tier: "OU",
},
bisharprevenant: {
tier: "OU",
},
bisharpassassin: {
tier: "OU",
},
corviknightthunderbird: {
tier: "OU",
},
corviknightgenie: {
tier: "OU",
},
corviknightyeti: {
tier: "OU",
},
corviknightanalytical: {
tier: "OU",
},
corviknightmartian: {
tier: "OU",
},
corviknightfalcon: {
tier: "OU",
},
krookodileinfernal: {
tier: "OU",
},
krookodileabyssal: {
tier: "OU",
},
krookodilewetlander: {
tier: "OU",
},
krookodilecavedweller: {
tier: "OU",
},
krookodilecliffside: {
tier: "OU",
},
krookodilequantum: {
tier: "OU",
},
ogerponmuerta: {
tier: "OU",
},
ogerponeaster: {
tier: "OU",
},
ogerponankh: {
tier: "OU",
},
ogerponeid: {
tier: "OU",
},
ogerponvessel: {
tier: "OU",
},
ogerponkitsune: {
tier: "OU",
},
ogerpontealtera: {
tier: "Illegal",
},
};

View File

@ -1,32 +0,0 @@
export const Items: import('../../../sim/dex-items').ModdedItemDataTable = {
cornerstonemask: {
name: "Cornerstone Mask",
spritenum: 758,
fling: {
basePower: 60,
},
num: 2406,
gen: 9,
desc: "No competitive use.",
},
hearthflamemask: {
name: "Hearthflame Mask",
spritenum: 760,
fling: {
basePower: 60,
},
desc: "No competitive use.",
num: 2408,
gen: 9,
},
wellspringmask: {
name: "Wellspring Mask",
spritenum: 759,
fling: {
basePower: 60,
},
desc: "No competitive use.",
num: 2407,
gen: 9,
},
};

File diff suppressed because it is too large Load Diff

View File

@ -1,542 +0,0 @@
export const Pokedex: import('../../../sim/dex-species').ModdedSpeciesDataTable = {
kingdra: {
inherit: true,
otherFormes: ["Kingdra-Classic", "Kingdra-Brinepool", "Kingdra-Druid", "Kingdra-Bard", "Kingdra-Gourmet", "Kingdra-Ancient"],
formeOrder: ["Kingdra", "Kingdra-Classic", "Kingdra-Brinepool", "Kingdra-Druid", "Kingdra-Bard", "Kingdra-Gourmet", "Kingdra-Ancient"],
},
kingdraclassic: {
num: 230,
name: "Kingdra-Classic",
baseSpecies: "Kingdra",
forme: "Classic",
types: ["Water", "Dragon"],
baseStats: { hp: 90, atk: 70, def: 80, spa: 130, spd: 90, spe: 90 },
abilities: { 0: "Berserk", 1: "Heatproof", H: "Dry Skin" },
heightm: 1.8,
weightkg: 152,
color: "Blue",
prevo: '',
eggGroups: ["Water 1", "Dragon"],
},
kingdrabrinepool: {
num: 230,
name: "Kingdra-Brinepool",
baseSpecies: "Kingdra",
forme: "Brinepool",
types: ["Water", "Poison"],
baseStats: { hp: 130, atk: 35, def: 105, spa: 130, spd: 85, spe: 65 },
abilities: { 0: "Storm Drain", 1: "Purifying Salt", H: "Dry Skin" },
heightm: 1.8,
weightkg: 152,
color: "Blue",
prevo: '',
eggGroups: ["Water 1", "Dragon"],
},
kingdradruid: {
num: 230,
name: "Kingdra-Druid",
baseSpecies: "Kingdra",
forme: "Druid",
types: ["Steel", "Dragon"],
baseStats: { hp: 105, atk: 65, def: 90, spa: 120, spd: 120, spe: 50 },
abilities: { 0: "Berserk", 1: "Heatproof", H: "Water Absorb" },
heightm: 1.8,
weightkg: 152,
color: "Blue",
prevo: '',
eggGroups: ["Water 1", "Dragon"],
},
kingdrabard: {
num: 230,
name: "Kingdra-Bard",
baseSpecies: "Kingdra",
forme: "Bard",
types: ["Water", "Fairy"],
baseStats: { hp: 90, atk: 70, def: 80, spa: 130, spd: 100, spe: 80 },
abilities: { 0: "Punk Rock", 1: "Cute Charm", H: "Dancer" },
heightm: 1.8,
weightkg: 152,
color: "Blue",
prevo: '',
eggGroups: ["Water 1", "Dragon"],
},
kingdragourmet: {
num: 230,
name: "Kingdra-Gourmet",
baseSpecies: "Kingdra",
forme: "Gourmet",
types: ["Normal", "Dragon"],
baseStats: { hp: 110, atk: 110, def: 80, spa: 90, spd: 100, spe: 60 },
abilities: { 0: "Emergency Exit", 1: "Thick Fat", H: "Poison Heal" },
heightm: 1.8,
weightkg: 152,
color: "Blue",
prevo: '',
eggGroups: ["Water 1", "Dragon"],
},
kingdraancient: {
num: 230,
name: "Kingdra-Ancient",
baseSpecies: "Kingdra",
forme: "Ancient",
types: ["Fire", "Grass"],
baseStats: { hp: 89, atk: 89, def: 91, spa: 111, spd: 91, spe: 79 },
abilities: { 0: "Competitive", 1: "Heatproof", H: "Protosynthesis" },
heightm: 1.8,
weightkg: 152,
color: "Blue",
prevo: '',
eggGroups: ["Water 1", "Dragon"],
},
nidoqueen: {
inherit: true,
otherFormes: ["Nidoqueen-Classic", "Nidoqueen-Erudite", "Nidoqueen-Volcanic", "Nidoqueen-Rosegold", "Nidoqueen-Shaman", "Nidoqueen-Jasper"],
formeOrder: ["Nidoqueen", "Nidoqueen-Classic", "Nidoqueen-Erudite", "Nidoqueen-Volcanic", "Nidoqueen-Rosegold", "Nidoqueen-Shaman", "Nidoqueen-Jasper"],
},
nidoqueenclassic: {
num: 31,
name: "Nidoqueen-Classic",
baseSpecies: "Nidoqueen",
forme: "Classic",
types: ["Poison", "Ground"],
gender: "F",
baseStats: { hp: 135, atk: 115, def: 60, spa: 90, spd: 85, spe: 55 },
abilities: { 0: "Poison Point", 1: "Cheek Pouch", H: "Serene Grace" },
heightm: 1.3,
weightkg: 60,
color: "Blue",
prevo: '',
eggGroups: ["Undiscovered"],
},
nidoqueenerudite: {
num: 31,
name: "Nidoqueen-Erudite",
baseSpecies: "Nidoqueen",
forme: "Erudite",
types: ["Psychic", "Ground"],
gender: "F",
baseStats: { hp: 95, atk: 100, def: 80, spa: 115, spd: 110, spe: 40 },
abilities: { 0: "Cute Charm", 1: "Regenerator", H: "Serene Grace" },
heightm: 1.3,
weightkg: 60,
color: "Blue",
prevo: '',
eggGroups: ["Undiscovered"],
},
nidoqueenvolcanic: {
num: 31,
name: "Nidoqueen-Volcanic",
baseSpecies: "Nidoqueen",
forme: "Volcanic",
types: ["Fire", "Ground"],
gender: "F",
baseStats: { hp: 125, atk: 75, def: 100, spa: 110, spd: 75, spe: 55 },
abilities: { 0: "Flame Body", 1: "Cheek Pouch", H: "Sheer Force" },
heightm: 1.3,
weightkg: 60,
color: "Blue",
prevo: '',
eggGroups: ["Undiscovered"],
},
nidoqueenrosegold: {
num: 31,
name: "Nidoqueen-Rosegold",
baseSpecies: "Nidoqueen",
forme: "Rosegold",
types: ["Poison", "Grass"],
gender: "F",
baseStats: { hp: 125, atk: 70, def: 100, spa: 100, spd: 85, spe: 60 },
abilities: { 0: "Rough Skin", 1: "Cheek Pouch", H: "Shield Dust" },
heightm: 1.3,
weightkg: 60,
color: "Blue",
prevo: '',
eggGroups: ["Undiscovered"],
},
nidoqueenshaman: {
num: 31,
name: "Nidoqueen-Shaman",
baseSpecies: "Nidoqueen",
forme: "Shaman",
types: ["Poison", "Ghost"],
gender: "F",
baseStats: { hp: 95, atk: 120, def: 60, spa: 90, spd: 80, spe: 95 },
abilities: { 0: "Toxic Chain", 1: "Regenerator", H: "Sheer Force" },
heightm: 1.3,
weightkg: 60,
color: "Blue",
prevo: '',
eggGroups: ["Undiscovered"],
},
nidoqueenjasper: {
num: 31,
name: "Nidoqueen-Jasper",
baseSpecies: "Nidoqueen",
forme: "Jasper",
types: ["Poison", "Rock"],
gender: "F",
baseStats: { hp: 135, atk: 125, def: 70, spa: 80, spd: 85, spe: 45 },
abilities: { 0: "Clear Body", 1: "Earth Eater", H: "Sand Stream" },
heightm: 1.3,
weightkg: 60,
color: "Blue",
prevo: '',
eggGroups: ["Undiscovered"],
},
bisharp: {
inherit: true,
otherFormes: ["Bisharp-Centurion", "Bisharp-Savage", "Bisharp-Ronin", "Bisharp-Mantis", "Bisharp-Revenant", "Bisharp-Assassin"],
formeOrder: ["Bisharp", "Bisharp-Centurion", "Bisharp-Savage", "Bisharp-Ronin", "Bisharp-Mantis", "Bisharp-Revenant", "Bisharp-Assassin"],
},
bisharpcenturion: {
num: 625,
name: "Bisharp-Centurion",
baseSpecies: "Bisharp",
forme: "Centurion",
types: ["Fighting", "Steel"],
baseStats: { hp: 70, atk: 140, def: 115, spa: 55, spd: 70, spe: 70 },
abilities: { 0: "Overcoat", 1: "Technician", H: "Solar Power" },
heightm: 1.6,
weightkg: 70,
color: "Red",
prevo: '',
eggGroups: ["Human-Like"],
},
bisharpsavage: {
num: 625,
name: "Bisharp-Savage",
baseSpecies: "Bisharp",
forme: "Savage",
types: ["Grass", "Steel"],
baseStats: { hp: 90, atk: 110, def: 135, spa: 40, spd: 80, spe: 65 },
abilities: { 0: "Bulletproof", 1: "Technician", H: "Leaf Guard" },
heightm: 1.6,
weightkg: 70,
color: "Red",
prevo: '',
eggGroups: ["Human-Like"],
},
bisharpronin: {
num: 625,
name: "Bisharp-Ronin",
baseSpecies: "Bisharp",
forme: "Ronin",
types: ["Fighting", "Poison"],
baseStats: { hp: 70, atk: 115, def: 110, spa: 45, spd: 70, spe: 110 },
abilities: { 0: "Overcoat", 1: "Technician", H: "Dry Skin" },
heightm: 1.6,
weightkg: 70,
color: "Red",
prevo: '',
eggGroups: ["Human-Like"],
},
bisharpmantis: {
num: 625,
name: "Bisharp-Mantis",
baseSpecies: "Bisharp",
forme: "Mantis",
types: ["Dark", "Bug"],
baseStats: { hp: 80, atk: 120, def: 105, spa: 45, spd: 85, spe: 85 },
abilities: { 0: "Overcoat", 1: "Sharpness", H: "Orichalcum Pulse" },
heightm: 1.6,
weightkg: 70,
color: "Red",
prevo: '',
eggGroups: ["Human-Like"],
},
bisharprevenant: {
num: 625,
name: "Bisharp-Revenant",
baseSpecies: "Bisharp",
forme: "Revenant",
types: ["Ghost", "Steel"],
baseStats: { hp: 80, atk: 135, def: 120, spa: 45, spd: 70, spe: 70 },
abilities: { 0: "Magic Bounce", 1: "Mirror Armor", H: "Justified" },
heightm: 1.6,
weightkg: 70,
color: "Red",
prevo: '',
eggGroups: ["Human-Like"],
},
bisharpassassin: {
num: 625,
name: "Bisharp-Assassin",
baseSpecies: "Bisharp",
forme: "Assassin",
types: ["Fighting", "Ice"],
baseStats: { hp: 80, atk: 130, def: 110, spa: 55, spd: 70, spe: 75 },
abilities: { 0: "Dazzling", 1: "No Guard", H: "Slush Rush" },
heightm: 1.6,
weightkg: 70,
color: "Red",
prevo: '',
eggGroups: ["Human-Like"],
},
corviknight: {
inherit: true,
otherFormes: ["Corviknight-Thunderbird", "Corviknight-Genie", "Corviknight-Yeti", "Corviknight-Analytical", "Corviknight-Martian", "Corviknight-Falcon"],
formeOrder: ["Corviknight", "Corviknight-Thunderbird", "Corviknight-Genie", "Corviknight-Yeti", "Corviknight-Analytical", "Corviknight-Martian", "Corviknight-Falcon"],
},
corviknightthunderbird: {
num: 823,
name: "Corviknight-Thunderbird",
baseSpecies: "Corviknight",
forme: "Thunderbird",
types: ["Flying", "Electric"],
baseStats: { hp: 85, atk: 55, def: 105, spa: 115, spd: 85, spe: 85 },
abilities: { 0: "Pickpocket", 1: "Quick Feet", H: "Drizzle" },
heightm: 2.2,
weightkg: 75,
color: "Purple",
prevo: '',
eggGroups: ["Flying"],
},
corviknightgenie: {
num: 823,
name: "Corviknight-Genie",
baseSpecies: "Corviknight",
forme: "Genie",
types: ["Flying", "Ground"],
baseStats: { hp: 89, atk: 45, def: 95, spa: 120, spd: 90, spe: 91 },
abilities: { 0: "Intimidate", 1: "Sand Force", H: "Prankster" },
heightm: 2.2,
weightkg: 75,
color: "Purple",
prevo: '',
eggGroups: ["Flying"],
},
corviknightyeti: {
num: 823,
name: "Corviknight-Yeti",
baseSpecies: "Corviknight",
forme: "Yeti",
types: ["Flying", "Ice"],
baseStats: { hp: 85, atk: 55, def: 80, spa: 95, spd: 110, spe: 110 },
abilities: { 0: "Mummy", 1: "Quick Feet", H: "Snow Warning" },
heightm: 2.2,
weightkg: 75,
color: "Purple",
prevo: '',
eggGroups: ["Flying"],
},
corviknightanalytical: {
num: 823,
name: "Corviknight-Analytical",
baseSpecies: "Corviknight",
forme: "Analytical",
types: ["Psychic", "Electric"],
baseStats: { hp: 85, atk: 55, def: 80, spa: 110, spd: 85, spe: 115 },
abilities: { 0: "Pickpocket", 1: "Flare Boost", H: "Psychic Surge" },
heightm: 2.2,
weightkg: 75,
color: "Purple",
prevo: '',
eggGroups: ["Flying"],
},
corviknightmartian: {
num: 823,
name: "Corviknight-Martian",
baseSpecies: "Corviknight",
forme: "Martian",
types: ["Psychic", "Steel"],
baseStats: { hp: 95, atk: 45, def: 120, spa: 100, spd: 105, spe: 65 },
abilities: { 0: "Iron Barbs", 1: "Quick Feet", H: "Hadron Engine" },
heightm: 2.2,
weightkg: 75,
color: "Purple",
prevo: '',
eggGroups: ["Flying"],
},
corviknightfalcon: {
num: 823,
name: "Corviknight-Falcon",
baseSpecies: "Corviknight",
forme: "Falcon",
types: ["Flying", "Fighting"],
baseStats: { hp: 86, atk: 95, def: 75, spa: 75, spd: 85, spe: 114 },
abilities: { 0: "Pickpocket", 1: "Guts", H: "Delta Stream" },
heightm: 2.2,
weightkg: 75,
color: "Purple",
prevo: '',
eggGroups: ["Flying"],
},
krookodile: {
inherit: true,
otherFormes: ["Krookodile-Infernal", "Krookodile-Abyssal", "Krookodile-Wetlander", "Krookodile-Cave Dweller", "Krookodile-Cliffside", "Krookodile-Quantum"],
formeOrder: ["Krookodile", "Krookodile-Infernal", "Krookodile-Abyssal", "Krookodile-Wetlander", "Krookodile-Cave Dweller", "Krookodile-Cliffside", "Krookodile-Quantum"],
},
krookodileinfernal: {
num: 553,
name: "Krookodile-Infernal",
baseSpecies: "Krookodile",
forme: "Infernal",
types: ["Fire", "Dark"],
baseStats: { hp: 90, atk: 80, def: 85, spa: 105, spd: 90, spe: 100 },
abilities: { 0: "Magic Guard", 1: "Wonder Skin", H: "Sturdy" },
heightm: 1.5,
weightkg: 96.3,
color: "Red",
prevo: '',
eggGroups: ["Field"],
},
krookodileabyssal: {
num: 553,
name: "Krookodile-Abyssal",
baseSpecies: "Krookodile",
forme: "Abyssal",
types: ["Ground", "Dark"],
baseStats: { hp: 90, atk: 120, def: 85, spa: 75, spd: 90, spe: 90 },
abilities: { 0: "Rock Head", 1: "Wonder Skin", H: "Multiscale" },
heightm: 1.5,
weightkg: 96.3,
color: "Red",
prevo: '',
eggGroups: ["Field"],
},
krookodilewetlander: {
num: 553,
name: "Krookodile-Wetlander",
baseSpecies: "Krookodile",
forme: "Wetlander",
types: ["Grass", "Water"],
baseStats: { hp: 100, atk: 100, def: 75, spa: 85, spd: 110, spe: 80 },
abilities: { 0: "Rock Head", 1: "Wonder Skin", H: "Wind Rider" },
heightm: 1.5,
weightkg: 96.3,
color: "Red",
prevo: '',
eggGroups: ["Field"],
},
krookodilecavedweller: {
num: 553,
name: "Krookodile-Cave Dweller",
baseSpecies: "Krookodile",
forme: "Cave Dweller",
types: ["Fire", "Rock"],
baseStats: { hp: 80, atk: 110, def: 75, spa: 85, spd: 80, spe: 120 },
abilities: { 0: "Magic Guard", 1: "Wonder Skin", H: "Sturdy" },
heightm: 1.5,
weightkg: 96.3,
color: "Red",
prevo: '',
eggGroups: ["Field"],
},
krookodilecliffside: {
num: 553,
name: "Krookodile-Cliffside",
baseSpecies: "Krookodile",
forme: "Cliffside",
types: ["Dragon", "Dark"],
baseStats: { hp: 90, atk: 70, def: 85, spa: 115, spd: 80, spe: 110 },
abilities: { 0: "Intimidate", 1: "Merciless", H: "Mold Breaker" },
heightm: 1.5,
weightkg: 96.3,
color: "Red",
prevo: '',
eggGroups: ["Field"],
},
krookodilequantum: {
num: 553,
name: "Krookodile-Quantum",
baseSpecies: "Krookodile",
forme: "Quantum",
types: ["Electric", "Rock"],
baseStats: { hp: 95, atk: 100, def: 85, spa: 85, spd: 85, spe: 100 },
abilities: { 0: "Rock Head", 1: "Prankster", H: "Sturdy" },
heightm: 1.5,
weightkg: 96.3,
color: "Red",
prevo: '',
eggGroups: ["Field"],
},
ogerpon: {
inherit: true,
otherFormes: ["Ogerpon-Muerta", "Ogerpon-Easter", "Ogerpon-Ankh", "Ogerpon-Eid", "Ogerpon-Vessel", "Ogerpon-Kitsune"],
formeOrder: ["Ogerpon", "Ogerpon-Muerta", "Ogerpon-Easter", "Ogerpon-Ankh", "Ogerpon-Eid", "Ogerpon-Vessel", "Ogerpon-Kitsune"],
},
ogerponmuerta: {
num: 1017,
name: "Ogerpon-Muerta",
baseSpecies: "Ogerpon",
forme: "Muerta",
types: ["Fairy", "Ghost"],
gender: "F",
baseStats: { hp: 90, atk: 120, def: 70, spa: 100, spd: 90, spe: 130 },
abilities: { 0: "Wandering Spirit" },
heightm: 1.2,
weightkg: 39.8,
color: "Green",
eggGroups: ["Undiscovered"],
},
ogerponeaster: {
num: 1017,
name: "Ogerpon-Easter",
baseSpecies: "Ogerpon",
forme: "Easter",
types: ["Fairy", "Normal"],
gender: "F",
baseStats: { hp: 105, atk: 95, def: 95, spa: 110, spd: 80, spe: 115 },
abilities: { 0: "Pickpocket" },
heightm: 1.2,
weightkg: 39.8,
color: "Green",
eggGroups: ["Undiscovered"],
},
ogerponankh: {
num: 1017,
name: "Ogerpon-Ankh",
baseSpecies: "Ogerpon",
forme: "Ankh",
types: ["Ghost"],
gender: "F",
baseStats: { hp: 85, atk: 130, def: 70, spa: 130, spd: 90, spe: 95 },
abilities: { 0: "Mummy", H: "Good as Gold" },
heightm: 1.2,
weightkg: 39.8,
color: "Green",
eggGroups: ["Undiscovered"],
},
ogerponeid: {
num: 1017,
name: "Ogerpon-Eid",
baseSpecies: "Ogerpon",
forme: "Eid",
types: ["Water", "Ghost"],
gender: "F",
baseStats: { hp: 95, atk: 98, def: 100, spa: 105, spd: 110, spe: 92 },
abilities: { 0: "Tangling Hair" },
heightm: 1.2,
weightkg: 39.8,
color: "Green",
eggGroups: ["Undiscovered"],
},
ogerponvessel: {
num: 1017,
name: "Ogerpon-Vessel",
baseSpecies: "Ogerpon",
forme: "Vessel",
types: ["Bug", "Fighting"],
gender: "F",
baseStats: { hp: 95, atk: 115, def: 80, spa: 80, spd: 80, spe: 150 },
abilities: { 0: "Trace" },
heightm: 1.2,
weightkg: 39.8,
color: "Green",
eggGroups: ["Undiscovered"],
},
ogerponkitsune: {
num: 1017,
name: "Ogerpon-Kitsune",
baseSpecies: "Ogerpon",
forme: "Kitsune",
types: ["Fairy"],
gender: "F",
baseStats: { hp: 100, atk: 100, def: 100, spa: 100, spd: 100, spe: 100 },
abilities: { 0: "Protean" },
heightm: 1.2,
weightkg: 39.8,
color: "Green",
eggGroups: ["Undiscovered"],
},
};

View File

@ -1,17 +0,0 @@
export const Rulesets: import('../../../sim/dex-formats').ModdedFormatDataTable = {
spriteviewer: {
effectType: 'ValidatorRule',
name: 'Sprite Viewer',
desc: "Displays a fakemon's sprite in chat when it is switched in for the first time",
onBegin() {
this.add('rule', 'Sprite Viewer: Displays sprites in chat');
},
onSwitchIn(pokemon) {
if (!this.effectState[pokemon.species.id]) {
this.add('-message', `${pokemon.species.name}'s Sprite:`);
this.add(`raw|<img src="https://raw.githubusercontent.com/scoopapa/DH2/refs/heads/main/data/mods/sixbysix/sprites/front/${pokemon.species.id}.png" height="96" width="96">`);
this.effectState[pokemon.species.id] = true;
}
},
},
};

View File

@ -1,3 +0,0 @@
export const Scripts: ModdedBattleScriptsData = {
gen: 9,
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
import RandomGen6Teams from '../gen6/teams';
export class RandomMRTeams extends RandomGen6Teams {
override randomSets: { [species: string]: RandomTeamsTypes.RandomSpeciesData } = require('./sets.json');
}
export default RandomMRTeams;

View File

@ -1,558 +0,0 @@
{
"kingdraancient": {
"level": 100,
"sets": [
{
"role": "Fast Bulky Setup",
"movepool": ["Fire Blast", "Agility", "Energy Ball", "Hydro Pump"],
"abilities": ["Protosynthesis"]
},
{
"role": "Bulky Attacker",
"movepool": ["Giga Drain", "Fire Blast", "Flip Turn", "Synthesis"],
"abilities": ["Competitive"]
}
]
},
"kingdrabard": {
"level": 100,
"sets": [
{
"role": "Setup Sweeper",
"movepool": ["Hydro Pump", "Agility", "Psychic Noise", "Alluring Voice"],
"abilities": ["Punk Rock"]
},
{
"role": "Wallbreaker",
"movepool": ["Hydro Pump", "Flip Turn", "Psychic Noise", "Alluring Voice"],
"abilities": ["Punk Rock"]
}
]
},
"kingdrabrinepool": {
"level": 100,
"sets": [
{
"role": "Bulky Support",
"movepool": ["Scald", "Protect", "Knock Off", "Mortal Spin"],
"abilities": ["Purifying Salt"]
},
{
"role": "Wallbreaker",
"movepool": ["Hydro Pump", "Water Shuriken", "Sludge Wave", "Flip Turn"],
"abilities": ["Purifying Salt", "Storm Drain"]
}
]
},
"kingdraclassic": {
"level": 100,
"sets": [
{
"role": "Setup Sweeper",
"movepool": ["Hydro Pump", "Draco Meteor", "Agility", "Ice Beam"],
"abilities": ["Berserk"]
},
{
"role": "Wallbreaker",
"movepool": ["Hydro Pump", "Draco Meteor", "Flip Turn", "Ice Beam"],
"abilities": ["Berserk"]
}
]
},
"kingdradruid": {
"level": 100,
"sets": [
{
"role": "Wallbreaker",
"movepool": ["Tachyon Cutter", "Draco Meteor", "Flamethrower", "Ice Beam"],
"abilities": ["Berserk"]
},
{
"role": "Bulky Setup",
"movepool": ["Tachyon Cutter", "Protect", "Flamethrower", "Calm Mind"],
"abilities": ["Berserk"]
},
{
"role": "Bulky Attacker",
"movepool": ["Doom Desire", "Parting Shot", "Draco Meteor", "Protect"],
"abilities": ["Berserk", "Heatproof"]
}
]
},
"kingdragourmet": {
"level": 100,
"sets": [
{
"role": "Bulky Support",
"movepool": ["Facade", "Baneful Bunker", "Knock Off", "Toxic"],
"abilities": ["Poison Heal"]
},
{
"role": "Bulky Attacker",
"movepool": ["Facade", "Fake Out", "Knock Off", "Flip Turn"],
"abilities": ["Poison Heal"]
}
]
},
"nidoqueenclassic": {
"level": 100,
"sets": [
{
"role": "Bulky Support",
"movepool": ["Barb Barrage", "Earthquake", "Spikes", "Slack Off"],
"abilities": ["Poison Point"]
},
{
"role": "Bulky Attacker",
"movepool": ["Poison Jab", "Earthquake", "Ice Punch", "Slack Off"],
"abilities": ["Sheer Force"]
}
]
},
"nidoqueenerudite": {
"level": 100,
"sets": [
{
"role": "Bulky Setup",
"movepool": ["Calm Mind", "Earth Power", "Psychic", "Slack Off"],
"abilities": ["Sheer Force"]
},
{
"role": "Bulky Attacker",
"movepool": ["Trick Room", "Earth Power", "Psychic", "Ice Beam"],
"abilities": ["Sheer Force"]
},
{
"role": "Bulky Support",
"movepool": ["Future Sight", "Earth Power", "Roar", "Chilly Reception"],
"abilities": ["Regenerator"]
}
]
},
"nidoqueenjasper": {
"level": 100,
"sets": [
{
"role": "Bulky Support",
"movepool": ["Salt Cure", "Earthquake", "Protect", "Glare"],
"abilities": ["Earth Eater"]
},
{
"role": "Wallbreaker",
"movepool": ["Accelerock", "Earthquake", "Gunk Shot", "Stone Edge"],
"abilities": ["Earth Eater"]
}
]
},
"nidoqueenrosegold": {
"level": 100,
"sets": [
{
"role": "Bulky Support",
"movepool": ["Slack Off", "Giga Drain", "Earth Power", "Toxic Spikes"],
"abilities": ["Rough Skin"]
},
{
"role": "Bulky Attacker",
"movepool": ["Spiky Shield", "Earth Power", "Sludge Bomb", "Leech Seed"],
"abilities": ["Rough Skin"]
}
]
},
"nidoqueenshaman": {
"level": 100,
"sets": [
{
"role": "Wallbreaker",
"movepool": ["Poltergeist", "Poison Jab", "Superpower", "Shadow Sneak"],
"abilities": ["Toxic Chain"]
},
{
"role": "AV Pivot",
"movepool": ["Poltergeist", "Poison Jab", "Earthquake", "Shadow Sneak"],
"abilities": ["Regenerator"]
}
]
},
"nidoqueenvolcanic": {
"level": 100,
"sets": [
{
"role": "Bulky Support",
"movepool": ["Protect", "Lava Plume", "Earth Power", "Wish"],
"abilities": ["Flame Body"]
},
{
"role": "Wallbreaker",
"movepool": ["Thunderbolt", "Fire Blast", "Earth Power", "Ice Beam"],
"abilities": ["Sheer Force"]
},
{
"role": "Bulky Attacker",
"movepool": ["Protect", "Fire Blast", "Earth Power", "Wish"],
"abilities": ["Sheer Force"]
}
]
},
"bisharpassassin": {
"level": 100,
"sets": [
{
"role": "Wallbreaker",
"movepool": ["Triple Axel", "Dynamic Punch", "Parting Shot", "Ice Shard"],
"abilities": ["No Guard"]
},
{
"role": "Bulky Setup",
"movepool": ["Triple Axel", "Dynamic Punch", "Curse", "Ice Shard"],
"abilities": ["No Guard"]
}
]
},
"bisharpcenturion": {
"level": 100,
"sets": [
{
"role": "Wallbreaker",
"movepool": ["Bullet Punch", "Superpower", "Switcheroo", "Iron Head"],
"abilities": ["Technician"]
},
{
"role": "Wallbreaker",
"movepool": ["Bullet Punch", "Drain Punch", "Bulk Up", "Iron Head"],
"abilities": ["Technician"]
},
{
"role": "Setup Sweeper",
"movepool": ["Bullet Punch", "Drain Punch", "Swords Dance", "Iron Head"],
"abilities": ["Technician"]
}
]
},
"bisharpmantis": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Ceaseless Edge", "Leech Life", "First Impression", "Bitter Blade"],
"abilities": ["Orichalcum Pulse"]
},
{
"role": "Setup Sweeper",
"movepool": ["Sucker Punch", "Leech Life", "Swords Dance", "Bitter Blade"],
"abilities": ["Orichalcum Pulse"]
}
]
},
"bisharprevenant": {
"level": 100,
"sets": [
{
"role": "Bulky Attacker",
"movepool": ["Recover", "Shadow Sneak", "Sacred Sword", "Poltergeist"],
"abilities": ["Magic Bounce"]
},
{
"role": "Bulky Setup",
"movepool": ["Recover", "Shadow Sneak", "Swords Dance", "Behemoth Blade"],
"abilities": ["Magic Bounce"]
}
]
},
"bisharpronin": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Barb Barrage", "U-turn", "Sacred Sword", "Stealth Rock"],
"abilities": ["Technician"]
},
{
"role": "Wallbreaker",
"movepool": ["Barb Barrage", "U-turn", "Sacred Sword", "Bulldoze"],
"abilities": ["Technician"]
}
]
},
"bisharpsavage": {
"level": 100,
"sets": [
{
"role": "Bulky Support",
"movepool": ["Leech Seed", "Bullet Punch", "Power Whip", "Thunder Wave"],
"abilities": ["Technician"]
},
{
"role": "Bulky Setup",
"movepool": ["Bulk Up", "Bullet Punch", "Power Whip", "Body Press"],
"abilities": ["Technician"]
}
]
},
"corviknightanalytical": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Psychic", "Thunderbolt", "U-turn", "Heat Wave"],
"abilities": ["Psychic Surge"]
},
{
"role": "Fast Support",
"movepool": ["Reflect", "Light Screen", "U-turn", "Psychic"],
"abilities": ["Psychic Surge"]
},
{
"role": "Fast Bulky Setup",
"movepool": ["Psychic", "Thunderbolt", "Calm Mind", "Heat Wave"],
"abilities": ["Psychic Surge"]
}
]
},
"corviknightfalcon": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Brave Bird", "Close Combat", "U-turn", "Knock Off"],
"abilities": ["Guts"]
},
{
"role": "Fast Support",
"movepool": ["Reflect", "Light Screen", "U-turn", "Taunt"],
"abilities": ["Delta Stream"]
}
]
},
"corviknightgenie": {
"level": 100,
"sets": [
{
"role": "Fast Bulky Setup",
"movepool": ["Earth Power", "Calm Mind", "Heat Wave", "Rest"],
"abilities": ["Prankster"]
},
{
"role": "AV Pivot",
"movepool": ["Scorching Sands", "U-turn", "Heat Wave", "Thunderbolt"],
"abilities": ["Intimidate"]
},
{
"role": "Fast Support",
"movepool": ["Reflect", "Light Screen", "U-turn", "Earth Power"],
"abilities": ["Prankster"]
}
]
},
"corviknightmartian": {
"level": 100,
"sets": [
{
"role": "Bulky Attacker",
"movepool": ["Trick Room", "Teleport", "Thunderbolt", "Psychic"],
"abilities": ["Hadron Engine"]
},
{
"role": "Bulky Support",
"movepool": ["Doom Desire", "Teleport", "Thunderbolt", "Psychic"],
"abilities": ["Hadron Engine"]
},
{
"role": "Bulky Setup",
"movepool": ["Calm Mind", "Flash Cannon", "Thunderbolt", "Psychic Noise"],
"abilities": ["Hadron Engine"]
}
]
},
"corviknightthunderbird": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Thunder", "Hurricane", "U-turn", "Roost"],
"abilities": ["Drizzle"]
},
{
"role": "Fast Support",
"movepool": ["Reflect", "Light Screen", "U-turn", "Hurricane"],
"abilities": ["Drizzle"]
}
]
},
"corviknightyeti": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Blizzard", "Bleakwind Storm", "Volt Switch", "Roost"],
"abilities": ["Snow Warning"]
},
{
"role": "Fast Support",
"movepool": ["Reflect", "Light Screen", "U-turn", "Blizzard"],
"abilities": ["Snow Warning"]
}
]
},
"krookodileabyssal": {
"level": 100,
"sets": [
{
"role": "Setup Sweeper",
"movepool": ["Dragon Dance", "Earthquake", "Knock Off", "Flare Blitz"],
"abilities": ["Multiscale"]
},
{
"role": "Fast Attacker",
"movepool": ["Parting Shot", "Earthquake", "Knock Off", "Flare Blitz"],
"abilities": ["Multiscale"]
}
]
},
"krookodilecavedweller": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Parting Shot", "Earthquake", "Stone Edge", "Flare Blitz"],
"abilities": ["Magic Guard"]
},
{
"role": "Wallbreaker",
"movepool": ["Explosion", "Earthquake", "Stone Edge", "Flare Blitz"],
"abilities": ["Magic Guard"]
}
]
},
"krookodilecliffside": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Parting Shot", "Dark Pulse", "Draco Meteor", "Flamethrower"],
"abilities": ["Intimidate"]
},
{
"role": "Wallbreaker",
"movepool": ["Switcheroo", "Dark Pulse", "Draco Meteor", "Flamethrower"],
"abilities": ["Intimidate"]
}
]
},
"krookodileinfernal": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Parting Shot", "Magma Storm", "Fiery Wrath", "Eruption"],
"abilities": ["Magic Guard"]
},
{
"role": "Fast Support",
"movepool": ["Parting Shot", "Fire Lash", "Knock Off", "Will-O-Wisp"],
"abilities": ["Magic Guard"]
}
]
},
"krookodilequantum": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Parting Shot", "Volt Tackle", "Head Smash", "Earthquake"],
"abilities": ["Rock Head"]
},
{
"role": "Fast Support",
"movepool": ["Parting Shot", "Encore", "Head Smash", "Volt Tackle"],
"abilities": ["Prankster"]
}
]
},
"krookodilewetlander": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Synthesis", "Wave Crash", "Wood Hammer", "Knock Off"],
"abilities": ["Wind Rider", "Wonder Skin"]
},
{
"role": "Wallbreaker",
"movepool": ["Parting Shot", "Wave Crash", "Wood Hammer", "Knock Off"],
"abilities": ["Wind Rider", "Wonder Skin"]
}
]
},
"ogerponankh": {
"level": 100,
"sets": [
{
"role": "Setup Sweeper",
"movepool": ["Swords Dance", "Poltergeist", "Earthquake", "Stone Edge"],
"abilities": ["Good as Gold"]
},
{
"role": "Wallbreaker",
"movepool": ["U-turn", "Shadow Ball", "Earth Power", "Dazzling Gleam"],
"abilities": ["Good as Gold"]
}
]
},
"ogerponeaster": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["U-turn", "Moonblast", "Hyper Voice", "Mystical Fire"],
"abilities": ["Pickpocket"]
},
{
"role": "Setup Sweeper",
"movepool": ["Calm Mind", "Moonblast", "Soft-Boiled", "Mystical Fire"],
"abilities": ["Pickpocket"]
}
]
},
"ogerponeid": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Knock Off", "Recover", "Surf", "Shadow Ball"],
"abilities": ["Tangling Hair"]
},
{
"role": "Fast Support",
"movepool": ["Hex", "Recover", "Surf", "Toxic"],
"abilities": ["Tangling Hair"]
}
]
},
"ogerponkitsune": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Knock Off", "U-turn", "Earth Power", "Power Whip"],
"abilities": ["Protean"]
}
]
},
"ogerponmuerta": {
"level": 100,
"sets": [
{
"role": "Fast Attacker",
"movepool": ["Poltergeist", "Moonblast", "U-turn", "Will-O-Wisp"],
"abilities": ["Wandering Spirit"]
},
{
"role": "Wallbreaker",
"movepool": ["Poltergeist", "Moonblast", "U-turn", "Shadow Sneak"],
"abilities": ["Wandering Spirit"]
}
]
}
}

View File

@ -1,960 +0,0 @@
import { RandomTeams, type MoveCounter } from "../gen9/teams";
// Moves that restore HP:
const RECOVERY_MOVES = [
'healorder', 'milkdrink', 'moonlight', 'morningsun', 'recover', 'roost', 'shoreup', 'slackoff', 'softboiled', 'strengthsap', 'synthesis',
];
// Moves that boost Attack:
const PHYSICAL_SETUP = [
'bellydrum', 'bulkup', 'coil', 'curse', 'dragondance', 'honeclaws', 'howl', 'meditate', 'poweruppunch', 'swordsdance', 'tidyup', 'victorydance',
'filletaway',
];
// Moves which boost Special Attack:
const SPECIAL_SETUP = [
'calmmind', 'chargebeam', 'geomancy', 'nastyplot', 'quiverdance', 'tailglow', 'takeheart', 'torchsong', 'filletaway',
];
// Some moves that only boost Speed:
const SPEED_SETUP = [
'agility', 'autotomize', 'flamecharge', 'rockpolish', 'trailblaze',
];
// Conglomerate for ease of access
const SETUP = [
'acidarmor', 'agility', 'autotomize', 'bellydrum', 'bulkup', 'calmmind', 'clangoroussoul', 'coil', 'cosmicpower', 'curse', 'dragondance',
'filletaway', 'flamecharge', 'growth', 'honeclaws', 'howl', 'irondefense', 'meditate', 'nastyplot', 'noretreat', 'poweruppunch', 'quiverdance',
'rockpolish', 'shellsmash', 'shiftgear', 'swordsdance', 'tailglow', 'takeheart', 'tidyup', 'trailblaze', 'trickroom', 'workup', 'victorydance',
'feralresilience', 'feralspray', 'crystalfortification',
];
const SPEED_CONTROL = [
'electroweb', 'glare', 'icywind', 'lowsweep', 'quash', 'stringshot', 'tailwind', 'thunderwave', 'trickroom',
];
// Hazard-setting moves
const HAZARDS = [
'spikes', 'stealthrock', 'stickyweb', 'toxicspikes', 'crystalshard',
];
// Protect and its variants
const PROTECT_MOVES = [
'banefulbunker', 'burningbulwark', 'protect', 'silktrap', 'spikyshield',
];
// Moves that switch the user out
const PIVOT_MOVES = [
'chillyreception', 'flipturn', 'partingshot', 'shedtail', 'teleport', 'uturn', 'voltswitch',
];
// Moves that should be paired together when possible
const MOVE_PAIRS = [
['lightscreen', 'reflect'],
['sleeptalk', 'rest'],
['protect', 'wish'],
['spikyshield', 'wish'],
['leechseed', 'protect'],
['leechseed', 'substitute'],
['moongeistbeam', 'moonlight'],
['hex', 'willowisp'],
['hex', 'toxic'],
['hex', 'thunderwave'],
['nightmare', 'willowisp'],
['nightmare', 'toxic'],
['nightmare', 'thunderwave'],
];
/** Pokemon who always want priority STAB, and are fine with it as its only STAB move of that type */
const PRIORITY_POKEMON = [
'breloom', 'brutebonnet', 'cacturne', 'honchkrow', 'mimikyu', 'ragingbolt', 'scizor',
];
/** Pokemon who should never be in the lead slot */
const NO_LEAD_POKEMON = [
'Zacian', 'Zamazenta',
];
const DOUBLES_NO_LEAD_POKEMON = [
'Basculegion', 'Houndstone', 'Iron Bundle', 'Roaring Moon', 'Zacian', 'Zamazenta',
];
export class Random6x6Teams extends RandomTeams {
override cullMovePool(
types: string[],
moves: Set<string>,
abilities: string[],
counter: MoveCounter,
movePool: string[],
teamDetails: RandomTeamsTypes.TeamDetails,
species: Species,
isLead: boolean,
isDoubles: boolean,
teraType: string,
role: RandomTeamsTypes.Role,
): void {
if (moves.size + movePool.length <= this.maxMoveCount) return;
// If we have two unfilled moves and only one unpaired move, cull the unpaired move.
if (moves.size === this.maxMoveCount - 2) {
const unpairedMoves = [...movePool];
for (const pair of MOVE_PAIRS) {
if (movePool.includes(pair[0]) && movePool.includes(pair[1])) {
this.fastPop(unpairedMoves, unpairedMoves.indexOf(pair[0]));
this.fastPop(unpairedMoves, unpairedMoves.indexOf(pair[1]));
}
}
if (unpairedMoves.length === 1) {
this.fastPop(movePool, movePool.indexOf(unpairedMoves[0]));
}
}
// These moves are paired, and shouldn't appear if there is not room for them both.
if (moves.size === this.maxMoveCount - 1) {
for (const pair of MOVE_PAIRS) {
if (movePool.includes(pair[0]) && movePool.includes(pair[1])) {
this.fastPop(movePool, movePool.indexOf(pair[0]));
this.fastPop(movePool, movePool.indexOf(pair[1]));
}
}
}
// Develop additional move lists
const statusMoves = this.cachedStatusMoves;
// Team-based move culls
if (teamDetails.screens) {
if (movePool.includes('auroraveil')) this.fastPop(movePool, movePool.indexOf('auroraveil'));
if (movePool.length >= this.maxMoveCount + 2) {
if (movePool.includes('reflect')) this.fastPop(movePool, movePool.indexOf('reflect'));
if (movePool.includes('lightscreen')) this.fastPop(movePool, movePool.indexOf('lightscreen'));
}
}
if (teamDetails.stickyWeb) {
if (movePool.includes('stickyweb')) this.fastPop(movePool, movePool.indexOf('stickyweb'));
if (moves.size + movePool.length <= this.maxMoveCount) return;
}
if (teamDetails.stealthRock) {
if (movePool.includes('stealthrock')) this.fastPop(movePool, movePool.indexOf('stealthrock'));
if (moves.size + movePool.length <= this.maxMoveCount) return;
}
if (teamDetails.defog || teamDetails.rapidSpin) {
if (movePool.includes('defog')) this.fastPop(movePool, movePool.indexOf('defog'));
if (movePool.includes('rapidspin')) this.fastPop(movePool, movePool.indexOf('rapidspin'));
if (moves.size + movePool.length <= this.maxMoveCount) return;
}
if (teamDetails.toxicSpikes) {
if (movePool.includes('toxicspikes')) this.fastPop(movePool, movePool.indexOf('toxicspikes'));
if (moves.size + movePool.length <= this.maxMoveCount) return;
}
if (teamDetails.spikes && teamDetails.spikes >= 2) {
if (movePool.includes('spikes')) this.fastPop(movePool, movePool.indexOf('spikes'));
if (moves.size + movePool.length <= this.maxMoveCount) return;
}
if (teamDetails.statusCure) {
if (movePool.includes('healbell')) this.fastPop(movePool, movePool.indexOf('healbell'));
if (moves.size + movePool.length <= this.maxMoveCount) return;
}
if (isDoubles) {
const doublesIncompatiblePairs = [
// In order of decreasing generalizability
[SPEED_CONTROL, SPEED_CONTROL],
[HAZARDS, HAZARDS],
['rockslide', 'stoneedge'],
[SETUP, ['fakeout', 'helpinghand']],
[PROTECT_MOVES, 'wideguard'],
[['fierydance', 'fireblast'], 'heatwave'],
['dazzlinggleam', ['fleurcannon', 'moonblast']],
['poisongas', ['toxicspikes', 'willowisp']],
[RECOVERY_MOVES, ['healpulse', 'lifedew']],
['healpulse', 'lifedew'],
['haze', 'icywind'],
[['hydropump', 'muddywater'], ['muddywater', 'scald']],
['disable', 'encore'],
['freezedry', 'icebeam'],
['energyball', 'leafstorm'],
['earthpower', 'sandsearstorm'],
['coaching', ['helpinghand', 'howl']],
];
for (const pair of doublesIncompatiblePairs) this.incompatibleMoves(moves, movePool, pair[0], pair[1]);
if (role !== 'Offensive Protect') this.incompatibleMoves(moves, movePool, PROTECT_MOVES, ['flipturn', 'uturn']);
}
// General incompatibilities
const incompatiblePairs = [
// These moves don't mesh well with other aspects of the set
[statusMoves, ['healingwish', 'switcheroo', 'trick']],
[SETUP, PIVOT_MOVES],
[SETUP, HAZARDS],
[SETUP, ['defog', 'nuzzle', 'toxic', 'yawn', 'haze']],
[PHYSICAL_SETUP, PHYSICAL_SETUP],
[SPECIAL_SETUP, 'thunderwave'],
['substitute', PIVOT_MOVES],
[SPEED_SETUP, ['aquajet', 'rest', 'trickroom']],
['curse', ['irondefense', 'rapidspin']],
['dragondance', 'dracometeor'],
['yawn', 'roar'],
['trick', 'uturn'],
// These attacks are redundant with each other
[['psychic', 'psychicnoise'], ['psyshock', 'psychicnoise']],
['surf', ['hydropump', 'scald']],
['liquidation', 'wavecrash'],
['aquajet', 'flipturn'],
['gigadrain', 'leafstorm'],
['powerwhip', 'hornleech'],
['airslash', 'hurricane'],
['knockoff', 'foulplay'],
['throatchop', ['crunch', 'lashout']],
['doubleedge', ['bodyslam', 'headbutt']],
[['fireblast', 'magmastorm'], ['fierydance', 'flamethrower', 'lavaplume']],
['thunderpunch', 'wildcharge'],
['thunderbolt', 'discharge'],
['gunkshot', ['direclaw', 'poisonjab', 'sludgebomb']],
['aurasphere', 'focusblast'],
['closecombat', 'drainpunch'],
[['dragonpulse', 'spacialrend'], 'dracometeor'],
['heavyslam', 'flashcannon'],
['alluringvoice', 'dazzlinggleam'],
['defog', 'rapidspin'],
// These status moves are redundant with each other
['taunt', 'disable'],
[['thunderwave', 'toxic'], ['thunderwave', 'willowisp']],
[['thunderwave', 'toxic', 'willowisp'], 'toxicspikes'],
// This space reserved for assorted hardcodes that otherwise make little sense out of context
// Landorus and Thundurus
['nastyplot', ['rockslide', 'knockoff']],
// Persian
['switcheroo', 'fakeout'],
// Amoonguss, though this can work well as a general rule later
['toxic', 'clearsmog'],
// Chansey and Blissey
['healbell', 'stealthrock'],
// Araquanid and Magnezone
['mirrorcoat', ['hydropump', 'bodypress']],
];
for (const pair of incompatiblePairs) this.incompatibleMoves(moves, movePool, pair[0], pair[1]);
if (!types.includes('Ice')) this.incompatibleMoves(moves, movePool, 'icebeam', 'icywind');
if (!isDoubles) this.incompatibleMoves(moves, movePool, 'taunt', 'encore');
if (!types.includes('Dark') && teraType !== 'Dark') this.incompatibleMoves(moves, movePool, 'knockoff', 'suckerpunch');
if (!abilities.includes('Prankster')) this.incompatibleMoves(moves, movePool, 'thunderwave', 'yawn');
// This space reserved for assorted hardcodes that otherwise make little sense out of context:
// To force Close Combat on Barraskewda without locking it to Tera Fighting
if (species.id === 'barraskewda') {
this.incompatibleMoves(moves, movePool, ['psychicfangs', 'throatchop'], ['poisonjab', 'throatchop']);
}
// To force Toxic on Quagsire
if (species.id === 'quagsire') this.incompatibleMoves(moves, movePool, 'spikes', 'icebeam');
// Taunt/Knock should be Cyclizar's flex moveslot
if (species.id === 'cyclizar') this.incompatibleMoves(moves, movePool, 'taunt', 'knockoff');
// To force Stealth Rock on Camerupt
if (species.id === 'camerupt') this.incompatibleMoves(moves, movePool, 'roar', 'willowisp');
// nothing else rolls these lol
if (species.id === 'coalossal') this.incompatibleMoves(moves, movePool, 'flamethrower', 'overheat');
}
override randomMoveset(
types: string[],
abilities: string[],
teamDetails: RandomTeamsTypes.TeamDetails,
species: Species,
isLead: boolean,
isDoubles: boolean,
movePool: string[],
teraType: string,
role: RandomTeamsTypes.Role,
): Set<string> {
const moves = new Set<string>();
let counter = this.queryMoves(moves, species, teraType, abilities);
this.cullMovePool(types, moves, abilities, counter, movePool, teamDetails, species, isLead, isDoubles, teraType, role);
// If there are only four moves, add all moves and return early
if (movePool.length <= this.maxMoveCount) {
for (const moveid of movePool) {
moves.add(moveid);
}
return moves;
}
const runEnforcementChecker = (checkerName: string) => {
if (!this.moveEnforcementCheckers[checkerName]) return false;
return this.moveEnforcementCheckers[checkerName](
movePool, moves, abilities, types, counter, species, teamDetails, isLead, isDoubles, teraType, role
);
};
if (role === 'Tera Blast user') {
counter = this.addMove('terablast', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
// Add required move (e.g. Relic Song for Meloetta-P)
if (species.requiredMove) {
const move = this.dex.moves.get(species.requiredMove).id;
counter = this.addMove(move, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
// Add other moves you really want to have, e.g. STAB, recovery, setup.
// Enforce Facade if Guts is a possible ability
if (movePool.includes('facade') && abilities.includes('Guts')) {
counter = this.addMove('facade', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
// Enforce Night Shade, Revelation Dance, Revival Blessing, and Sticky Web
for (const moveid of ['nightshade', 'revelationdance', 'revivalblessing', 'stickyweb']) {
if (movePool.includes(moveid)) {
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce Trick Room on Doubles Wallbreaker
if (movePool.includes('trickroom') && role === 'Doubles Wallbreaker') {
counter = this.addMove('trickroom', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
// Enforce hazard removal on Bulky Support if the team doesn't already have it
if (role === 'Bulky Support' && !teamDetails.defog && !teamDetails.rapidSpin) {
if (movePool.includes('rapidspin')) {
counter = this.addMove('rapidspin', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
if (movePool.includes('defog')) {
counter = this.addMove('defog', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce Knock Off on pure Normal- and Fighting-types in singles
if (!isDoubles && types.length === 1 && (types.includes('Normal') || types.includes('Fighting'))) {
if (movePool.includes('knockoff')) {
counter = this.addMove('knockoff', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce Flip Turn on pure Water-type Wallbreakers
if (types.length === 1 && types.includes('Water') &&
role === 'Wallbreaker' && movePool.includes('flipturn')) {
counter = this.addMove('flipturn', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
// Enforce Spore on Smeargle
if (species.id === 'smeargle') {
if (movePool.includes('spore')) {
counter = this.addMove('spore', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce moves in doubles
if (isDoubles) {
const doublesEnforcedMoves = ['auroraveil', 'mortalspin', 'spore'];
for (const moveid of doublesEnforcedMoves) {
if (movePool.includes(moveid)) {
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce Fake Out on slow Pokemon
if (movePool.includes('fakeout') && species.baseStats.spe <= 50) {
counter = this.addMove('fakeout', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
// Enforce Tailwind on Prankster and Gale Wings users
if (movePool.includes('tailwind') && (abilities.includes('Prankster') || abilities.includes('Gale Wings'))) {
counter = this.addMove('tailwind', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
// Enforce Thunder Wave on Prankster users as well
if (movePool.includes('thunderwave') && abilities.includes('Prankster')) {
counter = this.addMove('thunderwave', moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce STAB priority
if (
['Bulky Attacker', 'Bulky Setup', 'Wallbreaker', 'Doubles Wallbreaker'].includes(role) ||
PRIORITY_POKEMON.includes(species.id)
) {
const priorityMoves = [];
for (const moveid of movePool) {
const move = this.dex.moves.get(moveid);
const moveType = this.getMoveType(move, species, abilities, teraType);
if (
types.includes(moveType) && (move.priority > 0 || (moveid === 'grassyglide' && abilities.includes('Grassy Surge'))) &&
(move.basePower || move.basePowerCallback)
) {
priorityMoves.push(moveid);
}
}
if (priorityMoves.length) {
const moveid = this.sample(priorityMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce a single STAB for Moltres
if (species.id === 'moltres') {
const typeToEnforce = this.randomChance(1, 2) ? 'Fire' : 'Flying';
const stabMoves = [];
for (const moveid of movePool) {
const move = this.dex.moves.get(moveid);
const moveType = this.getMoveType(move, species, abilities, teraType);
if (!this.noStab.includes(moveid) && (move.basePower || move.basePowerCallback) && typeToEnforce === moveType) {
stabMoves.push(moveid);
}
}
while (runEnforcementChecker(typeToEnforce)) {
if (!stabMoves.length) break;
const moveid = this.sampleNoReplace(stabMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce STAB
for (const type of types) {
// Moltres already has STAB, so ignore this block
if (species.id === 'moltres') break;
// prevents Meowscarada from being enforced stab moves
if (species.id === 'meowscarada') break;
// Check if a STAB move of that type should be required
const stabMoves = [];
for (const moveid of movePool) {
const move = this.dex.moves.get(moveid);
const moveType = this.getMoveType(move, species, abilities, teraType);
if (!this.noStab.includes(moveid) && (move.basePower || move.basePowerCallback) && type === moveType) {
stabMoves.push(moveid);
}
}
while (runEnforcementChecker(type)) {
if (!stabMoves.length) break;
const moveid = this.sampleNoReplace(stabMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce Tera STAB
// prevents Meowscarada from being enforced stab moves (since it has Protean and doesn't care)
if (!counter.get('stabtera') && !['Bulky Support', 'Doubles Support'].includes(role) &&
!abilities.includes('Protean')) {
const stabMoves = [];
for (const moveid of movePool) {
const move = this.dex.moves.get(moveid);
const moveType = this.getMoveType(move, species, abilities, teraType);
if (!this.noStab.includes(moveid) && (move.basePower || move.basePowerCallback) && teraType === moveType) {
stabMoves.push(moveid);
}
}
if (stabMoves.length) {
const moveid = this.sample(stabMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// If no STAB move was added, add a STAB move
// prevents Meowscarada from being enforced stab moves (since it has Protean and doesn't care)
if (!counter.get('stab') && !abilities.includes('Protean')) {
const stabMoves = [];
for (const moveid of movePool) {
const move = this.dex.moves.get(moveid);
const moveType = this.getMoveType(move, species, abilities, teraType);
if (!this.noStab.includes(moveid) && (move.basePower || move.basePowerCallback) && types.includes(moveType)) {
stabMoves.push(moveid);
}
}
if (stabMoves.length) {
const moveid = this.sample(stabMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce recovery
if (['Bulky Support', 'Bulky Attacker', 'Bulky Setup'].includes(role)) {
const recoveryMoves = movePool.filter(moveid => RECOVERY_MOVES.includes(moveid));
if (recoveryMoves.length) {
const moveid = this.sample(recoveryMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce setup
if (role.includes('Setup') || role === 'Tera Blast user') {
// First, try to add a non-Speed setup move
const nonSpeedSetupMoves = movePool.filter(moveid => SETUP.includes(moveid) && !SPEED_SETUP.includes(moveid));
if (nonSpeedSetupMoves.length) {
const moveid = this.sample(nonSpeedSetupMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
} else {
// No non-Speed setup moves, so add any (Speed) setup move
const setupMoves = movePool.filter(moveid => SETUP.includes(moveid));
if (setupMoves.length) {
const moveid = this.sample(setupMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
}
// Enforce redirecting moves and Fake Out on Doubles Support
if (role === 'Doubles Support') {
for (const moveid of ['fakeout', 'followme', 'ragepowder']) {
if (movePool.includes(moveid)) {
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
}
// Enforce Protect
if (role.includes('Protect')) {
const protectMoves = movePool.filter(moveid => PROTECT_MOVES.includes(moveid));
if (protectMoves.length) {
const moveid = this.sample(protectMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce a move not on the noSTAB list
if (!counter.damagingMoves.size) {
// Choose an attacking move
const attackingMoves = [];
for (const moveid of movePool) {
const move = this.dex.moves.get(moveid);
if (!this.noStab.includes(moveid) && (move.category !== 'Status')) attackingMoves.push(moveid);
}
if (attackingMoves.length) {
const moveid = this.sample(attackingMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
// Enforce coverage move
if (!['AV Pivot', 'Fast Support', 'Bulky Support', 'Bulky Protect', 'Doubles Support'].includes(role)) {
if (counter.damagingMoves.size === 1) {
// Find the type of the current attacking move
const currentAttackType = counter.damagingMoves.values().next().value!.type;
// Choose an attacking move that is of different type to the current single attack
const coverageMoves = [];
for (const moveid of movePool) {
const move = this.dex.moves.get(moveid);
const moveType = this.getMoveType(move, species, abilities, teraType);
if (!this.noStab.includes(moveid) && (move.basePower || move.basePowerCallback)) {
if (currentAttackType !== moveType) coverageMoves.push(moveid);
}
}
if (coverageMoves.length) {
const moveid = this.sample(coverageMoves);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
}
// Add (moves.size < this.maxMoveCount) as a condition if moves is getting larger than 4 moves.
// If you want moves to be favored but not required, add something like && this.randomChance(1, 2) to your condition.
// Choose remaining moves randomly from movepool and add them to moves list:
while (moves.size < this.maxMoveCount && movePool.length) {
if (moves.size + movePool.length <= this.maxMoveCount) {
for (const moveid of movePool) {
moves.add(moveid);
}
break;
}
const moveid = this.sample(movePool);
counter = this.addMove(moveid, moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
for (const pair of MOVE_PAIRS) {
if (moveid === pair[0] && movePool.includes(pair[1])) {
counter = this.addMove(pair[1], moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
if (moveid === pair[1] && movePool.includes(pair[0])) {
counter = this.addMove(pair[0], moves, types, abilities, teamDetails, species, isLead, isDoubles,
movePool, teraType, role);
}
}
}
return moves;
}
override getPriorityItem(
ability: string,
types: string[],
moves: Set<string>,
counter: MoveCounter,
teamDetails: RandomTeamsTypes.TeamDetails,
species: Species,
isLead: boolean,
isDoubles: boolean,
teraType: string,
role: RandomTeamsTypes.Role,
) {
if (!isDoubles) {
if (role === 'Fast Bulky Setup' && (ability === 'Quark Drive' || ability === 'Protosynthesis')) {
return 'Booster Energy';
}
if (species.id === 'lokix') {
return (role === 'Fast Attacker') ? 'Silver Powder' : 'Life Orb';
}
}
if (species.requiredItems) {
// Z-Crystals aren't available in Gen 9, so require Plates
if (species.baseSpecies === 'Arceus') {
return species.requiredItems[0];
}
return this.sample(species.requiredItems);
}
if (role === 'AV Pivot') return 'Assault Vest';
// other
if (moves.has('substitute')) return 'Leftovers';
if (moves.has('protect') && ability !== 'Speed Boost') return 'Leftovers';
if (counter.get('skilllink') && ability !== 'Skill Link' && species.id !== 'breloom') return 'Loaded Dice';
if (moves.has('shellsmash') && ability !== 'Weak Armor') return 'White Herb';
if ((ability === 'Guts' || moves.has('facade')) && !moves.has('sleeptalk')) {
return (types.includes('Fire') || ability === 'Toxic Boost' || ability === 'Poison Heal') ? 'Toxic Orb' : 'Flame Orb';
}
if (['healingwish', 'switcheroo', 'trick'].some(m => moves.has(m))) {
if (
species.baseStats.spe >= 60 && species.baseStats.spe <= 108 &&
role !== 'Wallbreaker' && role !== 'Doubles Wallbreaker' && !counter.get('priority')
) {
return 'Choice Scarf';
} else {
return (counter.get('Physical') > counter.get('Special')) ? 'Choice Band' : 'Choice Specs';
}
}
if (
role === 'Wallbreaker' && (counter.get('Physical') > counter.get('Special')) && !counter.get('Status')
) {
return 'Choice Band';
}
if (
role === 'Wallbreaker' && (counter.get('Physical') < counter.get('Special')) && !counter.get('Status')
) {
return 'Choice Specs';
}
if (ability === 'Poison Heal' || ability === 'Quick Feet') return 'Toxic Orb';
if (moves.has('acrobatics') && ability !== 'Quark Drive' && ability !== 'Protosynthesis') return '';
if (moves.has('auroraveil') || moves.has('lightscreen') && moves.has('reflect')) return 'Light Clay';
if (ability === 'Gluttony') return `${this.sample(['Aguav', 'Figy', 'Iapapa', 'Mago', 'Wiki'])} Berry`;
if (
['Cheek Pouch', 'Cud Chew', 'Harvest', 'Ripen'].some(m => ability === m) ||
moves.has('bellydrum') || moves.has('filletaway')
) {
return 'Sitrus Berry';
}
if (this.dex.getEffectiveness('Rock', species) >= 2) return 'Heavy-Duty Boots';
if (species.nfe) return 'Eviolite';
if (['Bulky Attacker', 'Bulky Support', 'Bulky Setup'].some(m => role === (m))) return 'Leftovers';
if (role === 'Fast Support' || role === 'Fast Bulky Setup') {
return (counter.get('Physical') + counter.get('Special') >= 3) ? 'Life Orb' : 'Leftovers';
}
}
override randomSet(
s: string | Species,
teamDetails: RandomTeamsTypes.TeamDetails = {},
isLead = false,
isDoubles = false
): RandomTeamsTypes.RandomSet {
const species = this.dex.species.get(s);
const forme = this.getForme(species);
const sets = this.randomSets[species.id]["sets"];
const possibleSets: RandomTeamsTypes.RandomSetData[] = [];
// const ruleTable = this.dex.formats.getRuleTable(this.format);
for (const set of sets) {
// Prevent Fast Bulky Setup on lead Paradox Pokemon, since it generates Booster Energy.
const abilities = set.abilities!;
if (
isLead && (abilities.includes('Protosynthesis') || abilities.includes('Quark Drive')) &&
set.role === 'Fast Bulky Setup'
) continue;
// Prevent Tera Blast user if the team already has one, or if Terastallizion is prevented.
if (teamDetails.teraBlast && set.role === 'Tera Blast user') {
continue;
}
possibleSets.push(set);
}
const set = this.sampleIfArray(possibleSets);
const role = set.role;
const movePool: string[] = [];
for (const movename of set.movepool) {
movePool.push(this.dex.moves.get(movename).id);
}
const teraTypes = set.teraTypes!;
let teraType = this.sampleIfArray(teraTypes);
let ability = '';
let item = undefined;
const evs = { hp: 85, atk: 85, def: 85, spa: 85, spd: 85, spe: 85 };
const ivs = { hp: 31, atk: 31, def: 31, spa: 31, spd: 31, spe: 31 };
const types = [];
types[0] = species.types[0];
if (species.types[1]) types[1] = species.types[1];
const abilities = set.abilities!;
// Get moves
const moves = this.randomMoveset(types, abilities, teamDetails, species, isLead, isDoubles, movePool, teraType, role);
const counter = this.queryMoves(moves, species, teraType, abilities);
// Get ability
ability = this.getAbility(types, moves, abilities, counter, teamDetails, species, isLead, isDoubles, teraType, role);
// Get items
// First, the priority items
item = this.getPriorityItem(ability, types, moves, counter, teamDetails, species, isLead, isDoubles, teraType, role);
if (item === undefined) {
if (isDoubles) {
item = this.getDoublesItem(ability, types, moves, counter, teamDetails, species, isLead, teraType, role);
} else {
item = this.getItem(ability, types, moves, counter, teamDetails, species, isLead, teraType, role);
}
}
// Get level
const level = this.getLevel(species, isDoubles);
// Prepare optimal HP
const srImmunity = ability === 'Magic Guard' || item === 'Heavy-Duty Boots';
let srWeakness = srImmunity ? 0 : this.dex.getEffectiveness('Rock', species);
// Crash damage move users want an odd HP to survive two misses
if (['axekick', 'highjumpkick', 'jumpkick'].some(m => moves.has(m))) srWeakness = 2;
while (evs.hp > 1) {
const hp = Math.floor(Math.floor(2 * species.baseStats.hp + ivs.hp + Math.floor(evs.hp / 4) + 100) * level / 100 + 10);
if ((moves.has('substitute') && ['Sitrus Berry', 'Salac Berry'].includes(item))) {
// Two Substitutes should activate Sitrus Berry
if (hp % 4 === 0) break;
} else if ((moves.has('bellydrum') || moves.has('filletaway')) && (item === 'Sitrus Berry' || ability === 'Gluttony')) {
// Belly Drum should activate Sitrus Berry
if (hp % 2 === 0) break;
} else if (moves.has('substitute') && moves.has('endeavor')) {
// Luvdisc should be able to Substitute down to very low HP
if (hp % 4 > 0) break;
} else {
// Maximize number of Stealth Rock switch-ins
if (srWeakness <= 0 || ability === 'Regenerator' || ['Leftovers', 'Life Orb', 'Eviolite'].includes(item)) break;
if (item !== 'Sitrus Berry' && hp % (4 / srWeakness) > 0) break;
// Minimise number of Stealth Rock switch-ins to activate Sitrus Berry
if (item === 'Sitrus Berry' && hp % (4 / srWeakness) === 0) break;
}
evs.hp -= 4;
}
// Minimize confusion damage
const noAttackStatMoves = [...moves].every(m => {
const move = this.dex.moves.get(m);
if (move.damageCallback || move.damage) return true;
if (move.id === 'shellsidearm') return false;
// Magearna and doubles Dragonite, though these can work well as a general rule
if (move.id === 'terablast' && (
species.id === 'porygon2' || moves.has('shiftgear') || species.baseStats.atk > species.baseStats.spa)
) return false;
return move.category !== 'Physical' || move.id === 'bodypress' || move.id === 'foulplay';
});
// prevents Illumise (who can turn into Volbeat with Physical moves) from having 0 Atk EVs
if (noAttackStatMoves && !moves.has('transform') && this.format.mod !== 'partnersincrime' &&
species.id !== 'illumise') {
evs.atk = 0;
ivs.atk = 0;
}
// Enforce Tera Type after all set generation is done to prevent infinite generation
if (this.forceTeraType) teraType = this.forceTeraType;
// shuffle moves to add more randomness to camomons
const shuffledMoves = Array.from(moves);
this.prng.shuffle(shuffledMoves);
return {
name: species.baseSpecies,
species: forme,
gender: species.baseSpecies === 'Greninja' ? 'M' : (species.gender || (this.random(2) ? 'F' : 'M')),
shiny: this.randomChance(1, 1024),
level,
moves: shuffledMoves,
ability,
evs,
ivs,
item,
teraType,
role,
};
}
override randomSets: { [species: string]: RandomTeamsTypes.RandomSpeciesData } = require('./random-sets.json');
random6x6Team() {
this.enforceNoDirectCustomBanlistChanges();
const seed = this.prng.getSeed();
const ruleTable = this.dex.formats.getRuleTable(this.format);
const pokemon: RandomTeamsTypes.RandomSet[] = [];
// For Monotype
const isMonotype = !!this.forceMonotype || ruleTable.has('sametypeclause');
const isDoubles = this.format.gameType !== 'singles';
const typePool = this.dex.types.names().filter(name => name !== "Stellar");
const type = this.forceMonotype || this.sample(typePool);
// PotD stuff
// const usePotD = global.Config && Config.potd && ruleTable.has('potd');
// const potd = usePotD ? this.dex.species.get(Config.potd) : null;
const baseFormes: { [k: string]: number } = {};
const typeCount: { [k: string]: number } = {};
const typeComboCount: { [k: string]: number } = {};
const typeWeaknesses: { [k: string]: number } = {};
const typeDoubleWeaknesses: { [k: string]: number } = {};
const teamDetails: RandomTeamsTypes.TeamDetails = {};
const pokemonList = Object.keys(this.randomSets);
const [pokemonPool, baseSpeciesPool] = this.getPokemonPool(type, pokemon, isMonotype, pokemonList);
let leadsRemaining = this.format.gameType === 'doubles' ? 2 : 1;
while (baseSpeciesPool.length && pokemon.length < this.maxTeamSize) {
const baseSpecies = this.sampleNoReplace(baseSpeciesPool);
// const z = 0;
const species = this.dex.species.get(this.sample(pokemonPool[baseSpecies]));
if (!species.exists) continue;
// Limit to one of each species (Species Clause)
if (baseFormes[species.baseSpecies]) continue;
// Treat Ogerpon formes and Terapagos like the Tera Blast user role; reject if team has one already
if (['ogerpon', 'ogerponhearthflame', 'terapagos'].includes(species.id) && teamDetails.teraBlast) continue;
const types = species.types;
const typeCombo = types.slice().sort().join();
const weakToFreezeDry = (
this.dex.getEffectiveness('Ice', species) > 0 ||
(this.dex.getEffectiveness('Ice', species) > -2 && types.includes('Water'))
);
// Dynamically scale limits for different team sizes. The default and minimum value is 1.
const limitFactor = Math.round(this.maxTeamSize / 6) || 1;
// Limit three of any type combination in Monotype
if (!this.forceMonotype && isMonotype && (typeComboCount[typeCombo] >= 3 * limitFactor)) continue;
// The Pokemon of the Day
// if (potd?.exists && (pokemon.length === 1 || this.maxTeamSize === 1)) species = potd;
// testing code
// if (pokemon.length === 0 || this.maxTeamSize === 1) species = this.dex.species.get('Terapagos');
let set: RandomTeamsTypes.RandomSet;
if (leadsRemaining) {
if (
isDoubles && DOUBLES_NO_LEAD_POKEMON.includes(species.baseSpecies) ||
!isDoubles && NO_LEAD_POKEMON.includes(species.baseSpecies)
) {
if (pokemon.length + leadsRemaining === this.maxTeamSize) continue;
set = this.randomSet(species, teamDetails, false, isDoubles);
if (teamDetails.teraBlast) continue;
pokemon.push(set);
} else {
set = this.randomSet(species, teamDetails, true, isDoubles);
// if (teamDetails.teraBlast) continue;
pokemon.unshift(set);
leadsRemaining--;
}
} else {
set = this.randomSet(species, teamDetails, false, isDoubles);
// if (teamDetails.teraBlast) continue;
pokemon.push(set);
}
// Don't bother tracking details for the last Pokemon
if (pokemon.length === this.maxTeamSize) break;
// Now that our Pokemon has passed all checks, we can increment our counters
baseFormes[species.baseSpecies] = 1;
// Increment type counters
for (const typeName of types) {
if (typeName in typeCount) {
typeCount[typeName]++;
} else {
typeCount[typeName] = 1;
}
}
if (typeCombo in typeComboCount) {
typeComboCount[typeCombo]++;
} else {
typeComboCount[typeCombo] = 1;
}
// Increment weakness counter
for (const typeName of this.dex.types.names()) {
// it's weak to the type
if (this.dex.getEffectiveness(typeName, species) > 0) {
typeWeaknesses[typeName]++;
}
if (this.dex.getEffectiveness(typeName, species) > 1) {
typeDoubleWeaknesses[typeName]++;
}
}
// Count Dry Skin/Fluffy as Fire weaknesses
if (['Dry Skin', 'Fluffy'].includes(set.ability) && this.dex.getEffectiveness('Fire', species) === 0) {
typeWeaknesses['Fire']++;
}
if (weakToFreezeDry) typeWeaknesses['Freeze-Dry']++;
// Increment level 100 counter
// if (set.level === 100) numMaxLevelPokemon++;
// Track what the team has
if (set.ability === 'Drizzle' || set.moves.includes('raindance')) teamDetails.rain = 1;
if (set.ability === 'Drought' || set.ability === 'Orichalcum Pulse' || set.moves.includes('sunnyday')) {
teamDetails.sun = 1;
}
if (set.ability === 'Sand Stream') teamDetails.sand = 1;
if (set.ability === 'Snow Warning' || set.moves.includes('snowscape') || set.moves.includes('chillyreception')) {
teamDetails.snow = 1;
}
if (set.moves.includes('healbell')) teamDetails.statusCure = 1;
if (set.moves.includes('spikes') || set.moves.includes('ceaselessedge')) {
teamDetails.spikes = (teamDetails.spikes || 0) + 1;
}
if (set.moves.includes('toxicspikes') || set.ability === 'Toxic Debris') teamDetails.toxicSpikes = 1;
if (set.moves.includes('stealthrock') || set.moves.includes('stoneaxe')) teamDetails.stealthRock = 1;
if (set.moves.includes('stickyweb')) teamDetails.stickyWeb = 1;
if (set.moves.includes('defog')) teamDetails.defog = 1;
if (set.moves.includes('rapidspin') || set.moves.includes('mortalspin')) teamDetails.rapidSpin = 1;
if (set.moves.includes('auroraveil') || (set.moves.includes('reflect') && set.moves.includes('lightscreen'))) {
teamDetails.screens = 1;
}
if (set.role === 'Tera Blast user' || species.baseSpecies === "Ogerpon" || species.baseSpecies === "Terapagos") {
teamDetails.teraBlast = 1;
}
}
if (pokemon.length < this.maxTeamSize && pokemon.length < 12) { // large teams sometimes cannot be built
throw new Error(`Could not build a random team for ${this.format} (seed=${seed})`);
}
return pokemon;
}
}
export default Random6x6Teams;