Update randomized formats (#9184)

* Update randomized formats

* Delete/hide more stuff

* Fix Mayhem

* copy error

* oops !

Co-authored-by: Karthik <32044378+Karthik99999@users.noreply.github.com>

Co-authored-by: Karthik <32044378+Karthik99999@users.noreply.github.com>
This commit is contained in:
Alexander B
2022-12-14 13:44:46 -06:00
committed by GitHub
parent 0e6ba79c13
commit d8720e6706
3 changed files with 105 additions and 153 deletions

View File

@@ -36,6 +36,22 @@ export const Formats: FormatList = [
team: 'random',
ruleset: ['PotD', 'Obtainable', 'Species Clause', 'HP Percentage Mod', 'Cancel Mod', 'Sleep Clause Mod'],
},
{
name: "[Gen 9] Unrated Random Battle",
mod: 'gen9',
team: 'random',
challengeShow: false,
rated: false,
ruleset: ['Obtainable', 'Species Clause', 'HP Percentage Mod', 'Cancel Mod', 'Sleep Clause Mod'],
},
{
name: "[Gen 9] Random Battle (Blitz)",
mod: 'gen9',
team: 'random',
ruleset: ['[Gen 9] Random Battle', 'Blitz'],
},
{
name: "[Gen 9] OU",
@@ -116,48 +132,6 @@ export const Formats: FormatList = [
ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Paldea Pokedex', 'Min Source Gen = 9', 'VGC Timer'],
banlist: ['Sub-Legendary'],
},
{
name: "[Gen 9] Hackmons Cup",
desc: `Randomized teams of level-balanced Pok&eacute;mon with absolutely any ability, moves, and item.`,
mod: 'gen9',
team: 'randomHC',
ruleset: ['HP Percentage Mod', 'Cancel Mod'],
banlist: ['Nonexistent'],
},
{
name: "[Gen 9] Doubles Hackmons Cup",
desc: `Randomized teams of level-balanced Pok&eacute;mon with absolutely any ability, moves, and item. Now with TWICE the Pok&eacute;mon per side!`,
mod: 'gen9',
team: 'randomHC',
searchShow: false,
gameType: 'doubles',
ruleset: ['[Gen 9] Hackmons Cup'],
},
{
name: "[Gen 9] Challenge Cup 1v1",
mod: 'gen9',
team: 'randomCC',
ruleset: ['Obtainable', 'HP Percentage Mod', 'Cancel Mod', 'Team Preview', 'Dynamax Clause', 'Picked Team Size = 1'],
},
{
name: "[Gen 9] Challenge Cup 2v2",
mod: 'gen9',
team: 'randomCC',
gameType: 'doubles',
ruleset: ['[Gen 9] Challenge Cup 1v1', '!! Picked Team Size = 2'],
},
{
name: "[Gen 9] Challenge Cup 6v6",
mod: 'gen9',
team: 'randomCC',
searchShow: false,
ruleset: ['[Gen 9] Challenge Cup 1v1', '!Picked Team Size'],
},
{
name: "[Gen 9] Custom Game",
@@ -2063,6 +2037,86 @@ export const Formats: FormatList = [
section: "Randomized Metas",
column: 3,
},
{
name: "[Gen 9] Monotype Random Battle",
mod: 'gen9',
team: 'random',
ruleset: ['Obtainable', 'Same Type Clause', 'HP Percentage Mod', 'Cancel Mod', 'Sleep Clause Mod'],
},
{
name: "[Gen 9] Random Battle Mayhem",
desc: `[Gen 9] Random Battle with Team Preview and elements of Camomons, Inverse, Scalemons, and Shared Power.`,
mod: 'sharedpower',
team: 'random',
ruleset: ['[Gen 9] Random Battle', 'Team Preview', 'Camomons Mod', 'Inverse Mod', 'Scalemons Mod'],
onBeforeSwitchIn(pokemon) {
let format = this.format;
if (!format.getSharedPower) format = this.dex.formats.get('gen9sharedpower');
for (const ability of format.getSharedPower!(pokemon)) {
const effect = 'ability:' + ability;
pokemon.volatiles[effect] = {id: this.toID(effect), target: pokemon};
if (!pokemon.m.abils) pokemon.m.abils = [];
if (!pokemon.m.abils.includes(effect)) pokemon.m.abils.push(effect);
}
},
onSwitchInPriority: 2,
onSwitchIn(pokemon) {
let format = this.format;
if (!format.getSharedPower) format = this.dex.formats.get('gen9sharedpower');
for (const ability of format.getSharedPower!(pokemon)) {
if (ability === 'noability') {
this.hint(`Mirror Armor and Trace break in Shared Power formats that don't use Shared Power as a base, so they get removed from non-base users.`);
}
const effect = 'ability:' + ability;
delete pokemon.volatiles[effect];
pokemon.addVolatile(effect);
}
},
},
{
name: "[Gen 9] Hackmons Cup",
desc: `Randomized teams of level-balanced Pok&eacute;mon with absolutely any ability, moves, and item.`,
mod: 'gen9',
team: 'randomHC',
ruleset: ['HP Percentage Mod', 'Cancel Mod'],
banlist: ['Nonexistent'],
},
{
name: "[Gen 9] Doubles Hackmons Cup",
desc: `Randomized teams of level-balanced Pok&eacute;mon with absolutely any ability, moves, and item. Now with TWICE the Pok&eacute;mon per side!`,
mod: 'gen9',
team: 'randomHC',
searchShow: false,
gameType: 'doubles',
ruleset: ['[Gen 9] Hackmons Cup'],
},
{
name: "[Gen 9] Challenge Cup 1v1",
mod: 'gen9',
team: 'randomCC',
ruleset: ['Obtainable', 'HP Percentage Mod', 'Cancel Mod', 'Team Preview', 'Dynamax Clause', 'Picked Team Size = 1'],
},
{
name: "[Gen 9] Challenge Cup 2v2",
mod: 'gen9',
team: 'randomCC',
gameType: 'doubles',
ruleset: ['[Gen 9] Challenge Cup 1v1', '!! Picked Team Size = 2'],
},
{
name: "[Gen 9] Challenge Cup 6v6",
mod: 'gen9',
team: 'randomCC',
searchShow: false,
ruleset: ['[Gen 9] Challenge Cup 1v1', '!Picked Team Size'],
},
{
name: "[Gen 8] Random Battle",
desc: `Randomized teams of level-balanced Pok&eacute;mon with sets that are generated to be competitively viable.`,
@@ -2074,13 +2128,6 @@ export const Formats: FormatList = [
team: 'random',
ruleset: ['PotD', 'Obtainable', 'Species Clause', 'HP Percentage Mod', 'Cancel Mod', 'Sleep Clause Mod'],
},
{
name: "[Gen 8] Random Battle (Blitz)",
desc: `gotta go fast!! like Random Battle, but you only have 10 seconds per turn.`,
mod: 'gen8',
team: 'random',
ruleset: ['[Gen 8] Random Battle', 'Blitz'],
},
{
name: "[Gen 8] Free-For-All Random Battle",
@@ -2106,44 +2153,6 @@ export const Formats: FormatList = [
'Obtainable', 'Species Clause', 'HP Percentage Mod', 'Cancel Mod', 'Sleep Clause Mod',
],
},
{
name: "[Gen 8] Monotype Random Battle",
mod: 'gen8',
team: 'random',
ruleset: ['Obtainable', 'Same Type Clause', 'HP Percentage Mod', 'Cancel Mod', 'Sleep Clause Mod'],
},
{
name: "[Gen 8] Random Battle Mayhem",
desc: `[Gen 8] Random Battle (No Dmax) with Team Preview and elements of Camomons, Inverse, Scalemons, and Shared Power.`,
mod: 'gen8sharedpower',
team: 'random',
ruleset: ['[Gen 8] Random Battle', 'Team Preview', 'Dynamax Clause', 'Camomons Mod', 'Inverse Mod', 'Scalemons Mod'],
onBeforeSwitchIn(pokemon) {
let format = this.format;
if (!format.getSharedPower) format = this.dex.formats.get('gen9sharedpower');
for (const ability of format.getSharedPower!(pokemon)) {
const effect = 'ability:' + ability;
pokemon.volatiles[effect] = {id: this.toID(effect), target: pokemon};
if (!pokemon.m.abils) pokemon.m.abils = [];
if (!pokemon.m.abils.includes(effect)) pokemon.m.abils.push(effect);
}
},
onSwitchInPriority: 2,
onSwitchIn(pokemon) {
let format = this.format;
if (!format.getSharedPower) format = this.dex.formats.get('gen9sharedpower');
for (const ability of format.getSharedPower!(pokemon)) {
if (ability === 'noability') {
this.hint(`Mirror Armor and Trace break in Shared Power formats that don't use Shared Power as a base, so they get removed from non-base users.`);
}
const effect = 'ability:' + ability;
delete pokemon.volatiles[effect];
pokemon.addVolatile(effect);
}
},
},
{
name: "[Gen 8] Battle Factory",
desc: `Randomized teams of Pok&eacute;mon for a generated Smogon tier with sets that are competitively viable.`,
@@ -2225,22 +2234,6 @@ export const Formats: FormatList = [
}
},
},
{
name: "[Gen 8] Challenge Cup 1v1",
mod: 'gen8',
team: 'randomCC',
ruleset: ['Obtainable', 'HP Percentage Mod', 'Cancel Mod', 'Team Preview', 'Dynamax Clause', 'Picked Team Size = 1'],
},
{
name: "[Gen 8] Challenge Cup 2v2",
mod: 'gen8',
team: 'randomCC',
gameType: 'doubles',
searchShow: false,
ruleset: ['[Gen 8] Challenge Cup 1v1', '!! Picked Team Size = 2'],
},
{
name: "[Gen 8] Hackmons Cup",
desc: `Randomized teams of level-balanced Pok&eacute;mon with absolutely any ability, moves, and item.`,
@@ -2250,16 +2243,6 @@ export const Formats: FormatList = [
ruleset: ['HP Percentage Mod', 'Cancel Mod'],
banlist: ['Nonexistent'],
},
{
name: "[Gen 8] Doubles Hackmons Cup",
mod: 'gen8',
gameType: 'doubles',
team: 'randomHC',
searchShow: false,
ruleset: ['HP Percentage Mod', 'Cancel Mod'],
banlist: ['Nonexistent'],
},
{
name: "[Gen 8] CAP 1v1",
desc: `Randomly generated 1v1-style teams only including Pok&eacute;mon made by the Create-A-Pok&eacute;mon Project.`,
@@ -2308,6 +2291,7 @@ export const Formats: FormatList = [
gameType: 'doubles',
team: 'random',
searchShow: false,
challengeShow: false,
ruleset: ['Obtainable', 'HP Percentage Mod', 'Cancel Mod'],
},
{
@@ -2318,14 +2302,6 @@ export const Formats: FormatList = [
team: 'randomFactory',
ruleset: ['Obtainable', 'Sleep Clause Mod', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Mega Rayquaza Clause'],
},
{
name: "[Gen 7] Monotype Battle Factory",
desc: `Randomized teams of Pok&eacute;mon with competitively-viable sets that all share a type.`,
mod: 'gen7',
team: 'randomFactory',
ruleset: ['[Gen 7] Battle Factory', 'Same Type Clause'],
},
{
name: "[Gen 7] BSS Factory",
desc: `Randomized 3v3 Singles featuring Pok&eacute;mon and movesets popular in Battle Spot Singles.`,
@@ -2370,6 +2346,7 @@ export const Formats: FormatList = [
mod: 'gen6',
team: 'randomFactory',
searchShow: false,
challengeShow: false,
ruleset: ['Obtainable', 'Sleep Clause Mod', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Mega Rayquaza Clause'],
},
{
@@ -2413,6 +2390,7 @@ export const Formats: FormatList = [
mod: 'gen1',
team: 'randomCC',
searchShow: false,
challengeShow: false,
ruleset: ['Obtainable', 'HP Percentage Mod', 'Cancel Mod', 'Desync Clause Mod', 'Sleep Clause Mod', 'Freeze Clause Mod'],
},
{
@@ -2422,6 +2400,7 @@ export const Formats: FormatList = [
mod: 'gen1',
team: 'randomHC',
searchShow: false,
challengeShow: false,
ruleset: ['HP Percentage Mod', 'Cancel Mod', 'Desync Clause Mod', 'Sleep Clause Mod', 'Freeze Clause Mod', 'Team Type Preview'],
banlist: ['Nonexistent'],
onModifySpecies(species, target, source, effect) {

View File

@@ -1,32 +0,0 @@
import {PRNG, PRNGSeed} from '../../../sim/prng';
import RandomGen8Teams from '../gen8/random-teams';
export class RandomSharedPowerTeams extends RandomGen8Teams {
constructor(format: Format | string, prng: PRNG | PRNGSeed | null) {
super(format, prng);
}
getPokemonPool(
type: string,
pokemonToExclude: RandomTeamsTypes.RandomSet[] = [],
isMonotype = false,
) {
const exclude = ['golisopod', ...pokemonToExclude.map(p => toID(p.species))];
const pokemonPool = [];
for (let species of this.dex.species.all()) {
if (species.gen > this.gen || exclude.includes(species.id)) continue;
if (this.dex.currentMod === 'gen8bdsp' && species.gen > 4) continue;
if (isMonotype) {
if (!species.types.includes(type)) continue;
if (typeof species.battleOnly === 'string') {
species = this.dex.species.get(species.battleOnly);
if (!species.types.includes(type)) continue;
}
}
pokemonPool.push(species.id);
}
return pokemonPool;
}
}
export default RandomSharedPowerTeams;

View File

@@ -0,0 +1,5 @@
import RandomTeams from '../../random-teams';
export class RandomSharedPowerTeams extends RandomTeams {}
export default RandomSharedPowerTeams;