Skip to content

Commit

Permalink
Add SSB client support (#2245)
Browse files Browse the repository at this point in the history
* ssb support

* SSB

* teehee

* poop

* more tooltip things

* Fix tooltips

* ok support

* More tooltip updates

* last changes

* Fix build
  • Loading branch information
KrisXV committed May 4, 2024
1 parent 05ca742 commit 9434aed
Show file tree
Hide file tree
Showing 4 changed files with 334 additions and 49 deletions.
11 changes: 9 additions & 2 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 OTHER = [9.9, 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];
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];

// process.stdout.write("\n ");
for (const genIdent of [...GENS, ...DOUBLES, ...VGC, ...NFE, ...STADIUM, ...OTHER, ...NATDEX, ...LC]) {
Expand All @@ -339,6 +339,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
const isDoubles = (genIdent < 0);
const isVGC = ('' + genIdent).endsWith('.5');
const isGen9BH = genIdent === 9.9;
const isSSB = genIdent === 9.6;
const genNum = Math.floor(isDoubles ? -genIdent : genIdent);
const gen = (() => {
let genStr = 'gen' + genNum;
Expand All @@ -348,6 +349,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 (isSSB) genStr += 'ssb';
return genStr;
})();
// process.stdout.write("" + gen + (isDoubles ? " doubles" : "") + "... ");
Expand Down Expand Up @@ -543,6 +545,11 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
BattleTeambuilderTable['bh'].tiers = tiers;
BattleTeambuilderTable['bh'].overrideTier = overrideTier;
BattleTeambuilderTable['bh'].formatSlices = formatSlices;
} else if (isSSB) {
BattleTeambuilderTable['gen9ssb'] = {};
BattleTeambuilderTable['gen9ssb'].tiers = tiers;
BattleTeambuilderTable['gen9ssb'].overrideTier = overrideTier;
BattleTeambuilderTable['gen9ssb'].formatSlices = formatSlices;
} else if (gen === 'gen9') {
BattleTeambuilderTable.tiers = tiers;
BattleTeambuilderTable.items = items;
Expand Down Expand Up @@ -1148,7 +1155,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
// Mods
//

for (const mod of ['gen7letsgo', 'gen8bdsp']) {
for (const mod of ['gen7letsgo', 'gen8bdsp', 'gen9ssb']) {
const modDex = Dex.mod(mod);
const modData = modDex.data;
const parentDex = Dex.forGen(modDex.gen);
Expand Down
1 change: 1 addition & 0 deletions play.pokemonshowdown.com/src/battle-animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class BattleScene implements BattleSceneStub {
}
this.numericId = numericId;
this.tooltips = new BattleTooltips(battle);
if (this.battle.id.includes('superstaffbros')) this.tooltips.dex = Dex.mod('gen9ssb' as ID);
this.tooltips.listen($frame[0]);

this.preloadEffects();
Expand Down

0 comments on commit 9434aed

Please sign in to comment.