Skip to content

Commit c99b3a6

Browse files
committed
35_pokes mod
1 parent 3ed492d commit c99b3a6

File tree

3 files changed

+54
-7
lines changed

3 files changed

+54
-7
lines changed

build-tools/build-indexes-custom-v2

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
370370
const LC = GENS.map(num => num + 0.7);
371371
const STADIUM = [2.04, 1.04];
372372
const NATDEX = [9.1, 8.1];
373-
const OTHER = [9.9, 9.69, 9.68, 9.67, 9.66, 9.65, 9.64, 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];
373+
const OTHER = [9.9, 9.69, 9.68, 9.67, 9.66, 9.65, 9.64, 9.63, 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];
374374

375375
// process.stdout.write("\n ");
376376
for (const genIdent of [...GENS, ...DOUBLES, ...VGC, ...NFE, ...STADIUM, ...OTHER, ...NATDEX, ...LC]) {
@@ -382,6 +382,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
382382
const isEspionage = (genIdent === 9.66);
383383
const isRebalanced = (genIdent === 9.65);
384384
const isGPT = (genIdent === 9.64);
385+
const is35Pokes = (genIdent === 9.63);
385386
const isMetBattle = ('' + genIdent).endsWith('.2');
386387
const isNFE = ('' + genIdent).endsWith('.3');
387388
const isLC = ('' + genIdent).endsWith('.7');
@@ -434,6 +435,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
434435
if (isEspionage) continue;
435436
if (isRebalanced) continue;
436437
if (isGPT) continue;
438+
if (is35Pokes) continue;
437439
const tier = (() => {
438440
if (isMetBattle) {
439441
let tier = species.tier;
@@ -630,6 +632,20 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
630632
tierTable[tier].push(id);
631633
}
632634

635+
const ThirtyFivePokesFormatsData = requireNoCache(dawnPath + 'dist/data/mods/35_pokes/formats-data.js').FormatsData;
636+
for (const id of ThirtyFivePokesFormatsData) {
637+
const species = DawnDex.mod('35_pokes').species.get(id);
638+
if (!is35Pokes) continue;
639+
let tier = "Illegal"
640+
const entry = ThirtyFivePokesFormatsData[id];
641+
if (entry && entry.tier && typeof entry.tier === "string") {
642+
tier = entry.tier;
643+
}
644+
overrideTier[species.id] = tier;
645+
if (!tierTable[tier]) tierTable[tier] = [];
646+
tierTable[tier].push(id);
647+
}
648+
633649
nonstandardMoves.push(...Object.keys(Dex.data.Moves).filter(id => {
634650
const move = Dex.mod(isSSDLC1 ? 'gen8dlc1' : isPreDLC ? 'gen9predlc' : 'gen9dlc1').moves.get(id);
635651
const bMove = Dex.mod(isSSDLC1 ? 'gen8' : 'gen9').moves.get(id);
@@ -718,6 +734,13 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
718734
BattleTeambuilderTable['gen9gpt'].tiers = tiers;
719735
BattleTeambuilderTable['gen9gpt'].overrideTier = overrideTier;
720736
BattleTeambuilderTable['gen9gpt'].formatSlices = formatSlices;
737+
} else if (is35Pokes) {
738+
BattleTeambuilderTable['35_pokes'] = {};
739+
BattleTeambuilderTable['35_pokes'].learnsets = {};
740+
BattleTeambuilderTable['35_pokes'].items = items;
741+
BattleTeambuilderTable['35_pokes'].tiers = tiers;
742+
BattleTeambuilderTable['35_pokes'].overrideTier = overrideTier;
743+
BattleTeambuilderTable['35_pokes'].formatSlices = formatSlices;
721744
} else if (isVGC) {
722745
BattleTeambuilderTable[gen + 'vgc'] = {};
723746
BattleTeambuilderTable[gen + 'vgc'].tiers = tiers;
@@ -755,6 +778,9 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
755778
}
756779

757780
const tierOrder = (() => {
781+
if (is35Pokes) {
782+
return ["Permitted"]
783+
}
758784
if (isSanctified || isUniversal || isRebalanced || isGPT) {
759785
return ["AG", "Uber", "(Uber)", "OUBL", "OU", "(OU)", "UUBL", "UU", "RUBL", "RU", 'HUBL', 'HU', "NUBL", "NU", "AUBL", "AU", "PUBL", "PU", "ZUBL", "ZU", "FUBL", "FU", "NFE", "LC"];
760786
}
@@ -815,7 +841,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
815841
continue;
816842
}
817843
if (item.isNonstandard && !isMetBattle) {
818-
if (isNatDex || isSanctified || isOmnifield || isUniversal || isEspionage || isRebalanced || isGPT) {
844+
if (isNatDex || isSanctified || isOmnifield || isUniversal || isEspionage || isRebalanced || isGPT || is35Pokes) {
819845
let curItem = item;
820846
let curGen = genNum;
821847
while (item.isNonstandard && curGen >= 7) {
@@ -1455,7 +1481,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
14551481
// Mods
14561482
//
14571483

1458-
for (const mod of ['gen7letsgo', 'gen8bdsp', 'gen9sanctified', 'gen9universal', 'omnifield', 'gen9espionage', 'gen9rebalanced', 'gen9gpt']) {
1484+
for (const mod of ['gen7letsgo', 'gen8bdsp', 'gen9sanctified', 'gen9universal', 'omnifield', 'gen9espionage', 'gen9rebalanced', 'gen9gpt', '35_pokes']) {
14591485
const modDex = DawnDex.mod(mod);
14601486
const modData = modDex.data;
14611487
const parentDex = DawnDex.forGen(modDex.gen);
@@ -1739,12 +1765,14 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
17391765
const EspionageFormatsData = requireNoCache(dawnPath + 'dist/data/mods/gen9espionage/formats-data.js').FormatsData;
17401766
const RebalancedFormatsData = requireNoCache(dawnPath + 'dist/data/mods/gen9rebalanced/formats-data.js').FormatsData;
17411767
const GPTFormatsData = requireNoCache(dawnPath + 'dist/data/mods/gen9gpt/formats-data.js').FormatsData;
1768+
const ThirtyFivePokesFormatsData = requireNoCache(dawnPath + 'dist/data/mods/35_pokes/formats-data.js').FormatsData;
17421769
FormatsData = Object.assign(SanctifiedFormatsData, FormatsData);
17431770
FormatsData = Object.assign(UniversalFormatsData, FormatsData);
17441771
FormatsData = Object.assign(OmnifieldFormatsData, FormatsData);
17451772
FormatsData = Object.assign(EspionageFormatsData, FormatsData);
17461773
FormatsData = Object.assign(RebalancedFormatsData, FormatsData);
17471774
FormatsData = Object.assign(GPTFormatsData, FormatsData);
1775+
FormatsData = Object.assign(ThirtyFivePokesFormatsData, FormatsData);
17481776
const buf = 'exports.BattleFormatsData = ' + es3stringify(FormatsData) + ';';
17491777
fs.writeFileSync('play.pokemonshowdown.com/data/formats-data.js', buf);
17501778
}

play.pokemonshowdown.com/js/client-teambuilder.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
if (this.curTeam.format.startsWith('gen9rebalanced')) {
4040
this.curTeam.dex = Dex.mod('gen9rebalanced');
4141
}
42+
if (this.curTeam.format.startsWith('gen9nationaldex35pokes')) {
43+
this.curTeam.dex = Dex.mod('35_pokes');
44+
}
4245
// if (this.curTeam.format.includes('espionage')) {
4346
// this.curTeam.dex = Dex.mod('gen9espionage');
4447
// }
@@ -1276,7 +1279,8 @@
12761279
var isLetsGo = this.curTeam.format.includes('letsgo');
12771280
var isBDSP = this.curTeam.format.includes('bdsp');
12781281
var isRebalanced = this.curTeam.format.startsWith('gen9rebalanced');
1279-
var isNatDex = !isRebalanced && (this.curTeam.format.includes('nationaldex') || this.curTeam.format.includes('natdex'));
1282+
var is35Pokes = this.curTeam.format.includes('35pokes');
1283+
var isNatDex = !isRebalanced && !is35Pokes && (this.curTeam.format.includes('nationaldex') || this.curTeam.format.includes('natdex'));
12801284
var buf = '<li value="' + i + '">';
12811285
if (!set.species) {
12821286
if (this.deletedSet) {
@@ -1613,6 +1617,9 @@
16131617
if (this.curTeam.format.startsWith('gen9rebalanced')) {
16141618
this.curTeam.dex = Dex.mod('gen9rebalanced');
16151619
}
1620+
if (this.curTeam.format.startsWith('gen9nationaldex35pokes')) {
1621+
this.curTeam.dex = Dex.mod('35_pokes');
1622+
}
16161623
// if (this.curTeam.format.includes('espionage')) {
16171624
// this.curTeam.dex = Dex.mod('gen9espionage');
16181625
// }
@@ -2738,7 +2745,8 @@
27382745
var isLetsGo = this.curTeam.format.includes('letsgo');
27392746
var isBDSP = this.curTeam.format.includes('bdsp');
27402747
var isRebalanced = this.curTeam.format.startsWith('gen9rebalanced');
2741-
var isNatDex = !isRebalanced && (this.curTeam.format.includes('nationaldex') || this.curTeam.format.includes('natdex'));
2748+
var is35Pokes = this.curTeam.format.includes('35pokes');
2749+
var isNatDex = !isRebalanced && !is35Pokes && (this.curTeam.format.includes('nationaldex') || this.curTeam.format.includes('natdex'));
27422750
var isHackmons = this.curTeam.format.includes('hackmons') || this.curTeam.format.endsWith('bh');
27432751
var species = this.curTeam.dex.species.get(set.species);
27442752
if (!set) return;
@@ -2845,7 +2853,8 @@
28452853
var isLetsGo = this.curTeam.format.includes('letsgo');
28462854
var isBDSP = this.curTeam.format.includes('bdsp');
28472855
var isRebalanced = this.curTeam.format.startsWith('gen9rebalanced');
2848-
var isNatDex = !isRebalanced && (this.curTeam.format.includes('nationaldex') || this.curTeam.format.includes('natdex'));
2856+
var is35Pokes = this.curTeam.format.includes('35pokes');
2857+
var isNatDex = !isRebalanced && !is35Pokes && (this.curTeam.format.includes('nationaldex') || this.curTeam.format.includes('natdex'));
28492858

28502859
// level
28512860
var level = parseInt(this.$chart.find('input[name=level]').val(), 10);

play.pokemonshowdown.com/src/battle-dex-search.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ abstract class BattleTypedSearch<T extends SearchType> {
551551

552552
protected formatType: 'doubles' | 'bdsp' | 'bdspdoubles' | 'letsgo' | 'metronome' | 'natdex' | 'nfe' |
553553
'ssdlc1' | 'ssdlc1doubles' | 'predlc' | 'predlcdoubles' | 'predlcnatdex' | 'svdlc1' | 'svdlc1doubles' |
554-
'svdlc1natdex' | 'stadium' | 'lc' | 'sanctified' | 'worldscollide' | 'omnifield' | 'espionage' | 'rebalanced' | 'gpt' | null = null;
554+
'svdlc1natdex' | 'stadium' | 'lc' | 'sanctified' | 'worldscollide' | 'omnifield' | 'espionage' | 'rebalanced' | 'gpt' | 'nationaldex35pokes' | null = null;
555555

556556
/**
557557
* Cached copy of what the results list would be with only base filters
@@ -689,6 +689,9 @@ abstract class BattleTypedSearch<T extends SearchType> {
689689
if (original_format.includes('rebalanced')) {
690690
this.dex = Dex.mod('gen9rebalanced' as ID);
691691
}
692+
if (original_format.startsWith('gen9nationaldex35pokes')) {
693+
this.dex = Dex.mod('35_pokes' as ID);
694+
}
692695
if (original_format.includes('rebalanced')) {
693696
this.formatType = 'rebalanced';
694697
}
@@ -789,6 +792,7 @@ abstract class BattleTypedSearch<T extends SearchType> {
789792
if (this.formatType === 'worldscollide') table = table['gen9universal'];
790793
if (this.formatType === 'omnifield') table = table['omnifield'];
791794
if (this.formatType === 'rebalanced') table = table['gen9rebalanced'];
795+
if (this.formatType === 'nationaldex35pokes') table = table['gen9nationaldex35pokes'];
792796
if (this.formatType === 'gpt') table = table['gen9gpt'];
793797
if (speciesid in table.learnsets) return speciesid;
794798
const species = this.dex.species.get(speciesid);
@@ -853,6 +857,7 @@ abstract class BattleTypedSearch<T extends SearchType> {
853857
if (this.formatType === 'worldscollide') table = table['gen9universal'];
854858
if (this.formatType === 'omnifield') table = table['omnifield'];
855859
if (this.formatType === 'rebalanced') table = table['gen9rebalanced'];
860+
if (this.formatType === 'nationaldex35pokes') table = table['gen9nationaldex35pokes'];
856861
if (this.formatType === 'gpt') table = table['gen9gpt'];
857862
let learnset = table.learnsets[learnsetid];
858863
if (learnset && (moveid in learnset) && (!this.format.startsWith('tradebacks') ? learnset[moveid].includes(genChar) :
@@ -873,6 +878,7 @@ abstract class BattleTypedSearch<T extends SearchType> {
873878
const tableKey = this.formatType === 'doubles' ? `gen${gen}doubles` :
874879
this.formatType === 'sanctified' ? 'gen9sanctified' :
875880
this.formatType === 'rebalanced' ? 'gen9rebalanced' :
881+
this.formatType === 'nationaldex35pokes' ? '35_pokes' :
876882
this.formatType === 'gpt' ? 'gen9gpt' :
877883
this.formatType === 'espionage' ? 'gen9espionage' :
878884
this.formatType === 'worldscollide' ? 'gen9universal' :
@@ -1048,6 +1054,8 @@ class BattlePokemonSearch extends BattleTypedSearch<'pokemon'> {
10481054
table = table['gen9rebalanced'];
10491055
} else if (this.formatType === 'gpt') {
10501056
table = table['gen9gpt'];
1057+
} else if (this.formatType === 'nationaldex35pokes') {
1058+
table = table['35_pokes'];
10511059
}
10521060

10531061
if (!table.tierSet) {
@@ -1303,6 +1311,8 @@ class BattleItemSearch extends BattleTypedSearch<'item'> {
13031311
table = table['gen9rebalanced'];
13041312
} else if (this.formatType === 'gpt') {
13051313
table = table['gen9gpt'];
1314+
} else if (this.formatType === 'nationaldex35pokes') {
1315+
table = table['35_pokes'];
13061316
}
13071317
if (!table.itemSet) {
13081318
table.itemSet = table.items.map((r: any) => {

0 commit comments

Comments
 (0)