Skip to content

Commit

Permalink
Delete VGC Plat and Spring Mayhem
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaD173 committed Sep 7, 2024
1 parent 8b458a1 commit 60f68bf
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 127 deletions.
44 changes: 10 additions & 34 deletions build-tools/build-indexes
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
const LC = GENS.map(num => num + 0.7);
const STADIUM = [2.04, 1.04];
const NATDEX = [9.1, 8.1];
const ADDED = [-4.81, -9.81, 9.21, -9.82];
const ADDED = [-9.81, 9.21];
const OTHER = [9.9, 9.6, 9.411, 9.41, 9.401, 9.4, 9.2, -9.4, -9.401, 8.6, 8.4, 8.2, 8.1, -8.4, -8.6, 7.1, 5.1];

// process.stdout.write("\n ");
Expand All @@ -339,9 +339,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
const isStadium = ('' + genIdent).endsWith('.04');
const isDoubles = (genIdent < 0);
const isVGC = ('' + genIdent).endsWith('.5');
const isVGCPlat = (genIdent === -4.81);
const isGay = (genIdent === -9.81);
const isSpring = (genIdent === -9.82);
const isMet = (genIdent === 9.21);
const isGen9BH = genIdent === 9.9;
const isSSB = genIdent === 9.6;
Expand All @@ -355,9 +353,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
if (isPreDLC) genStr += 'predlc';
if (isSVDLC1) genStr += 'dlc1';
if (isStadium) genStr += 'stadium' + (genNum > 1 ? genNum : '');
if (isVGCPlat) genStr = 'gen4vgcplat';
if (isGay) genStr = 'gen9vgcgay';
if (isSpring) genStr = 'gen9vgcspringmayhem';
if (isMet) genStr = 'gen9metronome';
if (isSSB) genStr += 'ssb';
if (isBW1) genStr += 'bw1';
Expand Down Expand Up @@ -430,13 +426,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
if (species.name === 'Pikachu-Alola') return 'Illegal';
return species.tier;
}
if (isVGCPlat) {
if (species.isNonstandard && species.isNonstandard !== 'Gigantamax') return 'Illegal';
if (baseSpecies.tags.includes('Mythical')) return 'Mythical';
if (baseSpecies.tags.includes('Restricted Legendary')) return 'Restricted Legendary';
return species.tier;
}
if (isVGC || isGay || isSpring) {
if (isVGC) {
if (species.isNonstandard && species.isNonstandard !== 'Gigantamax') return 'Illegal';
if (baseSpecies.tags.includes('Mythical')) return 'Mythical';
if (baseSpecies.tags.includes('Restricted Legendary')) return 'Restricted Legendary';
Expand All @@ -461,7 +451,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
if (species.tier === 'CAP' || species.tier === 'CAP NFE' || species.tier === 'CAP LC') {
return species.tier;
}
if (isDoubles && genNum > 4) {
if (isDoubles && genNum > 4 && !isGay) {
return species.doublesTier;
}
if (isNatDex || (isPreDLC && genNum === 9.41) || (isSVDLC1 && genNum === 9.411)) {
Expand Down Expand Up @@ -555,7 +545,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
BattleTeambuilderTable['gen8bdsp'].overrideTier = overrideTier;
BattleTeambuilderTable['gen8bdsp'].monotypeBans = monotypeBans;
BattleTeambuilderTable['gen8bdsp'].formatSlices = formatSlices;
} else if (isVGCPlat || isGay || isMet || isSpring) {
} else if (isGay || isMet) {
BattleTeambuilderTable[gen] = {};
BattleTeambuilderTable[gen].learnsets = {};
BattleTeambuilderTable[gen].tiers = tiers;
Expand Down Expand Up @@ -616,13 +606,10 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
}

const tierOrder = (() => {
if (isVGCPlat) {
return ["18", "17", "16", "15", "14", "13", "12", "11", "10", "9", "8", "7", "6", "5", "4", "3", "2", "1"];
}
if (isVGC || isGen9BH || isGay || isSpring) {
if (isVGC || isGen9BH) {
return ["Mythical", "Restricted Legendary", "Regular", "NFE", "LC"];
}
if (isDoubles && genNum > 4) {
if (isDoubles && genNum > 4 && !isGay) {
return ["DUber", "(DUber)", "DOU", "DBL", "(DOU)", "DUU", "(DUU)", "New", "NFE", "LC"];
}
return ["CAP", "CAP NFE", "CAP LC", "AG", "Uber", "(Uber)", "OU", "(OU)", "UUBL", "UU", "RUBL", "RU", "NUBL", "NU", "PUBL", "PU", "ZUBL", "ZU", "SUBL", "SU", "IUBL", "IU", "6UBL", "6U", "7UBL", "7U", "8UBL", "8U", "9UBL", "9U", "10UBL", "10U", "UR", "New", "NFE", "LC", "Unreleased", "11UBL", "11U"];
Expand Down Expand Up @@ -669,7 +656,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
if (genNum === 6) unreleasedItems.push(['header', "Unreleased"]);
for (const id of itemList) {
const item = Dex.mod(gen).items.get(id);
if (item.gen > genNum && !isVGCPlat) {
if (item.gen > genNum) {
continue;
}
if (item.isNonstandard && !isMetBattle) {
Expand Down Expand Up @@ -709,7 +696,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
greatItems.push(id);
break;
case 'mentalherb':
if (genNum > 4 || isVGCPlat) greatItems.push(id);
if (genNum > 4) greatItems.push(id);
else poorItems.push(id);
break;
case 'lumberry':
Expand Down Expand Up @@ -995,18 +982,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
}
}

const VGCPlatLearnsets = Dex.mod('gen4vgcplat').data.Learnsets;
for (const id in VGCPlatLearnsets) {
const species = Dex.mod('gen4vgcplat').species.get(id);
if (species.isNonstandard && !['Unobtainable', 'CAP'].includes(species.isNonstandard)) continue;
const learnset = VGCPlatLearnsets[id].learnset;
BattleTeambuilderTable['gen4vgcplat'].learnsets[id] = {};
for (const moveid in learnset) {
BattleTeambuilderTable['gen4vgcplat'].learnsets[id][moveid] = '4';
}
}

for (const format of ['gen9vgcgay', 'gen9vgcspringmayhem']) {
for (const format of ['gen9vgcgay']) {
const TempLearnsets = Dex.mod(format).data.Learnsets;
for (const id in TempLearnsets) {
// const species = Dex.mod(format).species.get(id);
Expand Down Expand Up @@ -1248,7 +1224,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
// Mods
//

for (const mod of ['gen5bw1', 'gen7letsgo', 'gen8bdsp', 'gen9ssb', 'gen4vgcplat', 'gen9vgcgay', 'gen9vgcspringmayhem']) {
for (const mod of ['gen5bw1', 'gen7letsgo', 'gen8bdsp', 'gen9ssb', 'gen9vgcgay']) {
const modDex = Dex.mod(mod);
const modData = modDex.data;
const parentDex = Dex.forGen(modDex.gen);
Expand Down
Binary file removed play.pokemonshowdown.com/fx/weather-darkness.png
Binary file not shown.
Binary file removed play.pokemonshowdown.com/fx/weather-ghost.jpg
Binary file not shown.
Binary file removed play.pokemonshowdown.com/fx/weather-locusts.jpg
Binary file not shown.
Binary file removed play.pokemonshowdown.com/fx/weather-loveintheair.jpg
Binary file not shown.
8 changes: 0 additions & 8 deletions play.pokemonshowdown.com/src/battle-animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -953,14 +953,6 @@ export class BattleScene implements BattleSceneStub {
raindance: 'Rain',
primordialsea: 'Heavy Rain',
sandstorm: 'Sandstorm',
locusts: 'Locusts',
acidrain: 'Acid Rain',
stellarstorm: 'Stellar Storm',
darkness: 'Darkness',
twilightzone: 'Twilight Zone',
thunderstorm: 'Thunderstorm',
pollen: 'Pollen',
loveintheair: 'Love In The Air',
hail: 'Hail',
snow: 'Snow',
deltastream: 'Strong Winds',
Expand Down
72 changes: 24 additions & 48 deletions play.pokemonshowdown.com/src/battle-dex-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ abstract class BattleTypedSearch<T extends SearchType> {
*/
set: PokemonSet | null = null;

protected formatType: 'vgcplat' | 'doubles' | 'bdsp' | 'bdspdoubles' | 'bw1' | 'letsgo' | 'metronome' | 'natdex' | 'nfe' |
protected formatType: 'doubles' | 'bdsp' | 'bdspdoubles' | 'bw1' | 'letsgo' | 'metronome' | 'natdex' | 'nfe' |
'ssdlc1' | 'ssdlc1doubles' | 'predlc' | 'predlcdoubles' | 'predlcnatdex' | 'svdlc1' | 'svdlc1doubles' |
'svdlc1natdex' | 'stadium' | 'lc' | null = null;

Expand Down Expand Up @@ -615,9 +615,6 @@ abstract class BattleTypedSearch<T extends SearchType> {
}
if (format.startsWith('vgc')) {
this.formatType = 'doubles';
if (format.startsWith("vgcplat")) {
this.formatType = 'vgcplat';
}
}
if (format.startsWith('vgc')) this.formatType = 'doubles';
if (format === 'vgc2020') this.formatType = 'ssdlc1doubles';
Expand Down Expand Up @@ -824,15 +821,7 @@ abstract class BattleTypedSearch<T extends SearchType> {
table = table['gen9vgcgay'];
genChar = `${gen}`;
}
if (this.format?.startsWith('vgcspringmayhem')) {
table = table['gen9vgcspringmayhem'];
genChar = `${gen}`;
}
if (this.formatType === 'letsgo') table = table['gen7letsgo'];
if (this.formatType?.startsWith('vgcplat')) {
table = table['gen4vgcplat'];
genChar = '4';
}
if (this.formatType === 'bw1') table = table['gen5bw1'];
let learnset = table.learnsets[learnsetid];
if (learnset && (moveid in learnset) && (!this.format.startsWith('tradebacks') ? learnset[moveid].includes(genChar) :
Expand All @@ -852,9 +841,7 @@ abstract class BattleTypedSearch<T extends SearchType> {
const gen = this.dex.gen;
const tableKey =
this.format?.startsWith('metronomeffa') ? 'gen9metronome' :
this.formatType?.startsWith('vgcplat') ? 'gen4vgcplat' :
this.format.startsWith('vgcgay') ? 'gen9vgcgay' :
this.format.startsWith('vgcspringmayhem') ? 'gen9vgcspringmayhem' :
this.formatType === 'doubles' ? `gen${gen}doubles` :
this.formatType === 'letsgo' ? 'gen7letsgo' :
this.formatType === 'bdsp' ? 'gen8bdsp' :
Expand Down Expand Up @@ -965,10 +952,6 @@ class BattlePokemonSearch extends BattleTypedSearch<'pokemon'> {
table = table['gen9metronome'];
} else if (format.startsWith("vgcgay")) {
table = table['gen9vgcgay'];
} else if (format.startsWith("vgcspringmayhem")) {
table = table['gen9vgcspringmayhem'];
} else if (format.startsWith("vgcplat")) {
table = table['gen4vgcplat'];
} else if (isVGCOrBS) {
table = table['gen' + dex.gen + 'vgc'];
} else if (dex.gen === 9 && isHackmons && !this.formatType) {
Expand Down Expand Up @@ -1037,7 +1020,8 @@ class BattlePokemonSearch extends BattleTypedSearch<'pokemon'> {
}
let tierSet: SearchRow[] = table.tierSet;
let slices: {[k: string]: number} = table.formatSlices;
if (format.endsWith('ubers') || format === 'uber' || format === 'ubersuu' || format === 'nationaldexdoubles') {
if (format.endsWith('ubers') || format === 'uber' || format === 'ubersuu' || format === 'nationaldexdoubles'
|| format.endsWith('restricted')) {
tierSet = tierSet.slice(slices.Uber);
} else if (isVGCOrBS || (isHackmons && dex.gen === 9 && !this.formatType)) {
if (format.endsWith('series13') || isHackmons) {
Expand All @@ -1059,7 +1043,7 @@ class BattlePokemonSearch extends BattleTypedSearch<'pokemon'> {
!['gougingfire', 'ironboulder', 'ironcrown', 'ragingbolt'].includes(id);
});
}
} else if (format === 'ou') tierSet = tierSet.slice(slices.OU);
} else if (format.endsWith('ou')) tierSet = tierSet.slice(slices.OU);
else if (format.endsWith('tiershift')) tierSet = tierSet.slice(slices.OU);
else if (format.endsWith('uu')) tierSet = tierSet.slice(slices.UU);
else if (format.endsWith('ru')) tierSet = tierSet.slice(slices.RU || slices.UU);
Expand Down Expand Up @@ -1311,12 +1295,8 @@ class BattleItemSearch extends BattleTypedSearch<'item'> {
let table = BattleTeambuilderTable;
if (this.formatType?.startsWith('bdsp')) {
table = table['gen8bdsp'];
} else if (this.formatType?.startsWith('vgcplat')) {
table = table['gen4vgcplat'];
} else if (this.format.startsWith('vgcgay')) {
table = table['gen9vgcgay'];
} else if (this.format.startsWith('vgcspringmayhem')) {
table = table['gen9vgcspringmayhem'];
} else if (this.formatType === 'bw1') {
table = table['gen5bw1'];
} else if (this.formatType === 'natdex') {
Expand Down Expand Up @@ -1656,7 +1636,7 @@ class BattleMoveSearch extends BattleTypedSearch<'move'> {
(/^battle(spot|stadium|festival)/.test(format) || format.startsWith('bss') ||
format.startsWith('vgc') || (dex.gen === 9 && this.formatType !== 'natdex'));

if (this.format.includes("vgcgay") || this.format.includes("vgcspringmayhem")) regionBornLegality = false;
if (this.format.includes("vgcgay")) regionBornLegality = false;

let learnsetid = this.firstLearnsetid(species.id);
let moves: string[] = [];
Expand All @@ -1666,9 +1646,7 @@ class BattleMoveSearch extends BattleTypedSearch<'move'> {
let lsetTable = BattleTeambuilderTable;
if (this.formatType?.startsWith('bdsp')) lsetTable = lsetTable['gen8bdsp'];
if (this.formatType === 'letsgo') lsetTable = lsetTable['gen7letsgo'];
if (this.formatType?.startsWith('vgcplat')) lsetTable = lsetTable['gen4vgcplat'];
if (this.format.startsWith('vgcgay')) lsetTable = lsetTable['gen9vgcgay'];
if (this.format.startsWith('vgcspringmayhem')) lsetTable = lsetTable['gen9vgcspringmayhem'];
if (this.formatType === 'bw1') lsetTable = lsetTable['gen5bw1'];
if (this.formatType?.startsWith('ssdlc1')) lsetTable = lsetTable['gen8dlc1'];
if (this.formatType?.startsWith('predlc')) lsetTable = lsetTable['gen9predlc'];
Expand All @@ -1678,27 +1656,25 @@ class BattleMoveSearch extends BattleTypedSearch<'move'> {
if (learnset) {
for (let moveid in learnset) {
let learnsetEntry = learnset[moveid];
if (!this.formatType?.startsWith("vgcplat")) {
const move = dex.moves.get(moveid);
const minGenCode: {[gen: number]: string} = {6: 'p', 7: 'q', 8: 'g', 9: 'a'};
if (regionBornLegality && !learnsetEntry.includes(minGenCode[dex.gen])) {
continue;
}
if (
!learnsetEntry.includes(gen) &&
(!isTradebacks ? true : !(move.gen <= dex.gen && learnsetEntry.includes('' + (dex.gen + 1))))
) {
continue;
}
if (this.formatType !== 'natdex' && move.isNonstandard === "Past") {
continue;
}
if (
this.formatType?.startsWith('dlc1') &&
BattleTeambuilderTable['gen8dlc1']?.nonstandardMoves.includes(moveid)
) {
continue;
}
const move = dex.moves.get(moveid);
const minGenCode: {[gen: number]: string} = {6: 'p', 7: 'q', 8: 'g', 9: 'a'};
if (regionBornLegality && !learnsetEntry.includes(minGenCode[dex.gen])) {
continue;
}
if (
!learnsetEntry.includes(gen) &&
(!isTradebacks ? true : !(move.gen <= dex.gen && learnsetEntry.includes('' + (dex.gen + 1))))
) {
continue;
}
if (this.formatType !== 'natdex' && move.isNonstandard === "Past") {
continue;
}
if (
this.formatType?.startsWith('dlc1') &&
BattleTeambuilderTable['gen8dlc1']?.nonstandardMoves.includes(moveid)
) {
continue;
}
const currentSpecies = dex.species.get(learnsetid);
const originalSpecies = dex.species.get(species.id);
Expand Down
12 changes: 1 addition & 11 deletions play.pokemonshowdown.com/src/battle-dex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,9 @@ const Dex = new class implements ModdedDex {
if (format.includes('bdsp')) {
return this.mod('gen8bdsp' as ID, format);
}
if (format.includes('vgcplat')) {
return this.mod('gen4vgcplat' as ID, format);
}
if (format.includes('vgcgay')) {
return this.mod('gen9vgcgay' as ID, format);
}
if (format.includes('vgcspringmayhem')) {
return this.mod('gen9vgcspringmayhem' as ID, format);
}
if (format.includes('tiershift')) {
return this.mod(format.slice(0, 4) as ID, format);
}
Expand Down Expand Up @@ -1010,11 +1004,7 @@ class ModdedDex {
}
const gen = parseInt(modid.substr(3, 1), 10);
if (!modid.startsWith('gen') || !gen) throw new Error("Unsupported modid");
if (modid.endsWith("vgcplat")) {
this.gen = 9;
} else {
this.gen = gen;
}
this.gen = gen;
}
moves = {
get: (name: string): Move => {
Expand Down
6 changes: 0 additions & 6 deletions play.pokemonshowdown.com/src/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3402,15 +3402,9 @@ export class Battle {
if (this.tier.includes(`Let's Go`)) {
this.dex = Dex.mod('gen7letsgo' as ID);
}
if (this.tier.includes('VGC Plat')) {
this.dex = Dex.mod('gen4vgcplat' as ID);
}
if (this.tier.includes('VGC Gay')) {
this.dex = Dex.mod('gen9vgcgay' as ID);
}
if (this.tier.includes('Spring Mayhem')) {
this.dex = Dex.mod('gen9vgcspringmayhem' as ID);
}
if (this.tier.includes('Tier Shift')) {
this.dex = Dex.forGen(this.gen, "gen" + this.gen + "tiershift");
}
Expand Down
20 changes: 0 additions & 20 deletions play.pokemonshowdown.com/style/battle.css
Original file line number Diff line number Diff line change
Expand Up @@ -446,42 +446,22 @@ License: GPLv2
background: #AADDEE url(../fx/weather-hail.png) no-repeat scroll left top;
color: #114455;
}
.locustsweather {
background: #E6E0AC url(../fx/weather-locusts.jpg) no-repeat scroll left top;
color: #554433;
}
.darknessweather {
background: #AAAAAA url(../fx/weather-darkness.png) no-repeat scroll left top;
color: #000000;
}
.twilightzoneweather {
background: #EEAACC url(../fx/weather-ghost.jpg) no-repeat scroll left top;
color: #554433;
}
.deltastreamweather {
background: #AAAAAA url(../fx/weather-strongwind.png) no-repeat scroll left top;
color: #666666;
}
.stellarstormweather,
.mistyterrainweather {
background: #EEAACC url(../fx/weather-mistyterrain.png) no-repeat scroll left top;
color: #551144;
}
.loveintheairweather {
background: #EEAACC url(../fx/weather-loveintheair.jpg) no-repeat scroll left top;
color: #551144;
}
.thunderstormweather,
.electricterrainweather {
background: #EEEEAA url(../fx/weather-electricterrain.png) no-repeat scroll left top;
color: #444411;
}
.pollenweather,
.grassyterrainweather {
background: #CCEEAA url(../fx/weather-grassyterrain.png) no-repeat scroll left top;
color: #335511;
}
.acidrainweather,
.psychicterrainweather {
background: #CCAAEE url(../fx/weather-psychicterrain.png) no-repeat scroll left top;
color: #441155;
Expand Down

0 comments on commit 60f68bf

Please sign in to comment.