Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
scheibo committed May 5, 2024
1 parent 786532a commit 7d6031e
Show file tree
Hide file tree
Showing 40 changed files with 339 additions and 316 deletions.
8 changes: 4 additions & 4 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pkmn/client",
"version": "0.6.24",
"version": "0.6.25",
"description": "Client battle engine for Pokémon Showdown",
"repository": "github:pkmn/ps",
"license": "MIT",
Expand All @@ -15,11 +15,11 @@
"build"
],
"dependencies": {
"@pkmn/data": "^0.9.3",
"@pkmn/protocol": "^0.6.24"
"@pkmn/data": "^0.9.4",
"@pkmn/protocol": "^0.6.25"
},
"devDependencies": {
"@pkmn/dex": "^0.9.3"
"@pkmn/dex": "^0.9.4"
},
"scripts": {
"lint": "eslint --cache src --ext ts",
Expand Down
10 changes: 5 additions & 5 deletions data/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pkmn/data",
"version": "0.9.3",
"version": "0.9.4",
"description": "A forked implementation of the Pokémon Showdown client's data layer",
"repository": "github:pkmn/ps",
"license": "MIT",
Expand All @@ -16,12 +16,12 @@
"build"
],
"dependencies": {
"@pkmn/dex-types": "^0.9.3"
"@pkmn/dex-types": "^0.9.4"
},
"devDependencies": {
"@pkmn/dex": "^0.9.3",
"@pkmn/mods": "^0.9.3",
"@pkmn/sim": "^0.9.3",
"@pkmn/dex": "^0.9.4",
"@pkmn/mods": "^0.9.4",
"@pkmn/sim": "^0.9.4",
"@smogon/calc": "^0.9.0"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions dex/data/aliases.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"monorandom": "[Gen 8] Monotype Random Battle",
"bf": "[Gen 7] Battle Factory",
"bssf": "[Gen 8] BSS Factory",
"ssb": "[Gen 8] Super Staff Bros 4",
"ssb4": "[Gen 8] Super Staff Bros 4",
"ssb": "[Gen 9] Super Staff Bros Ultimate",
"ssbu": "[Gen 9] Super Staff Bros Ultimate",
"lgrandom": "[Gen 7] Let's Go Random Battle",
"gen6bf": "[Gen 6] Battle Factory",
"gen7mono": "[Gen 7] Monotype",
Expand Down
100 changes: 50 additions & 50 deletions dex/data/formats-data.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dex/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pkmn/dex",
"version": "0.9.3",
"version": "0.9.4",
"description": "A unification of Pokémon Showdown's client's and server's data layers",
"repository": "github:pkmn/ps",
"license": "MIT",
Expand All @@ -16,7 +16,7 @@
"build"
],
"dependencies": {
"@pkmn/dex-types": "^0.9.3"
"@pkmn/dex-types": "^0.9.4"
},
"scripts": {
"lint": "eslint --cache *.ts",
Expand Down
2 changes: 1 addition & 1 deletion dex/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pkmn/dex-types",
"version": "0.9.3",
"version": "0.9.4",
"types": "index.d.ts",
"description": "Common Pokémon Showdown Dex types shared by @pkmn/dex and @pkmn/sim",
"repository": "github:pkmn/ps",
Expand Down
2 changes: 1 addition & 1 deletion img/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pkmn/img",
"version": "0.2.26",
"version": "0.2.27",
"description": "Logic for displaying Pokémon Showdown's sprite/icon resources",
"repository": "github:pkmn/ps",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion img/src/data/data.json

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions integration/build-client
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,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]) {
Expand All @@ -320,6 +320,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 @@ -329,6 +330,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 @@ -525,6 +527,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 @@ -1132,7 +1139,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
14 changes: 7 additions & 7 deletions integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
"dependencies": {
"@pkmn/client": "file:../client",
"@pkmn/data": "file:../data",
"@pkmn/eslint-config": "^7.2.0",
"@pkmn/eslint-config": "^7.3.1",
"@pkmn/img": "file:../img",
"@pkmn/protocol": "file:../protocol",
"@pkmn/randoms": "file:../randoms",
"@pkmn/sets": "file:../sets",
"@pkmn/sim": "file:../sim",
"@pkmn/view": "file:../view",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"cssnano": "^6.1.2",
"eslint": "^8.57.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"cssnano": "^7.0.1",
"eslint": "<=8",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jest": "^28.5.0",
"jest": "^29.7.0",
"minimist": "^1.2.8",
"parcel": "^2.12.0",
"source-map-support": "^0.5.21",
"typescript": "^5.4.3"
"typescript": "^5.4.5"
},
"alias": {
"process": false,
Expand Down
8 changes: 4 additions & 4 deletions mods/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pkmn/mods",
"version": "0.9.3",
"version": "0.9.4",
"description": "Support for non-standard mods to @pkmn/sim and @pkmn/dex",
"repository": "github:pkmn/ps",
"author": "Guangcong Luo <guangcongluo@gmail.com> (http://guangcongluo.com)",
Expand Down Expand Up @@ -114,11 +114,11 @@
"build"
],
"dependencies": {
"@pkmn/dex-types": "^0.9.3"
"@pkmn/dex-types": "^0.9.4"
},
"devDependencies": {
"@pkmn/dex": "^0.9.3",
"@pkmn/sim": "^0.9.3"
"@pkmn/dex": "^0.9.4",
"@pkmn/sim": "^0.9.4"
},
"scripts": {
"lint": "eslint --cache src --ext ts",
Expand Down
2 changes: 1 addition & 1 deletion mods/src/gen8bdsp/formats-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
doublesTier: "DUber",
},
celebi: {
tier: "UUBL",
tier: "OU",
doublesTier: "DOU",
},
treecko: {
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
"repository": "github:pkmn/ps",
"license": "MIT",
"dependencies": {
"@pkmn/eslint-config": "^7.2.0",
"@pkmn/eslint-config": "^7.3.1",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.2",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@types/node": "^20.12.8",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"esbuild": "^0.20.2",
"eslint": "^8.57.0",
"eslint": "<=8",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jest": "^28.5.0",
"jest": "^29.7.0",
"json-stringify-pretty-compact": "3.0.0",
"minimist": "^1.2.8",
"subpkg": "^4.1.0",
"terser": "^5.30.1",
"terser": "^5.31.0",
"ts-jest": "^29.1.2",
"tsup": "^8.0.2",
"typescript": "^5.4.3"
"typescript": "^5.4.5"
},
"subPackages": [
"types",
Expand Down
6 changes: 3 additions & 3 deletions protocol/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pkmn/protocol",
"version": "0.6.24",
"version": "0.6.25",
"description": "Parsing logic for Pokémon Showdown's PROTOCOL and SIM-PROTOCOL",
"repository": "github:pkmn/ps",
"license": "MIT",
Expand Down Expand Up @@ -40,8 +40,8 @@
"@pkmn/types": "^4.0.0"
},
"devDependencies": {
"@pkmn/dex": "^0.9.3",
"@pkmn/data": "^0.9.3"
"@pkmn/dex": "^0.9.4",
"@pkmn/data": "^0.9.4"
},
"scripts": {
"lint": "eslint --cache src --ext ts",
Expand Down
3 changes: 2 additions & 1 deletion protocol/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ export namespace Protocol {
*/
'|faint|': readonly ['faint', PokemonIdent];
'|message|': readonly ['message', Message];
'|custom|': readonly ['custom', BattleMinorArgName, PokemonIdent, string];
}

export type BattleMajorArgName = keyof BattleMajorArgs;
Expand Down Expand Up @@ -1880,7 +1881,7 @@ export const Protocol = new class {
'|tournament|disqualify|': 1, '|tournament|battlestart|': 1, '|tournament|battleend|': 1,
'|tournament|end|': 1, '|tournament|scouting|': 1, '|tournament|autostart|': 1,
'|tournament|autodq|': 1, '|player|': 1, '|teamsize|': 1, '|gametype|': 1, '|gen|': 1,
'|tier|': 1, '|rated|': 1, '|seed|': 1, '|rule|': 1, '|teampreview|': 1,
'|tier|': 1, '|rated|': 1, '|seed|': 1, '|rule|': 1, '|teampreview|': 1, '|custom|': 1,
'|clearpoke|': 1, '|poke|': 1, '|start|': 1, '|done|': 1, '|request|': 1, '|inactive|': 1,
'|inactiveoff|': 1, '|upkeep|': 1, '|turn|': 1, '|win|': 1, '|tie|': 1, '|move|': 1,
'|switch|': 1, '|drag|': 1, '|detailschange|': 1, '|replace|': 1, '|swap|': 1, '|cant|': 1,
Expand Down
4 changes: 4 additions & 0 deletions protocol/src/verifier/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@ class Handler implements Required<Protocol.Handler<boolean>> {
return args.length === 2 && gen >= 1 && gen <= 9;
}

'|custom|'() {
return true; // ignore
}

'|tier|'(args: Args['|tier|']) {
return args.length === 2 && verifyName(args[1]);
}
Expand Down
4 changes: 2 additions & 2 deletions randoms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pkmn/randoms",
"version": "0.9.3",
"version": "0.9.4",
"description": "Random team generation logic for Pokémon Showdown's Random Battle formats",
"repository": "github:pkmn/ps",
"license": "MIT",
Expand All @@ -15,7 +15,7 @@
"build"
],
"dependencies": {
"@pkmn/sim": "^0.9.3"
"@pkmn/sim": "^0.9.4"
},
"scripts": {
"lint": "eslint --cache src --ext ts",
Expand Down
2 changes: 1 addition & 1 deletion randoms/src/gen2.ts

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion randoms/src/gen3.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion randoms/src/gen4.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions randoms/src/gen5.ts

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions randoms/src/gen6.ts

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions randoms/src/gen7.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion randoms/src/gen8.ts

Large diffs are not rendered by default.

25 changes: 12 additions & 13 deletions randoms/src/gen9.ts

Large diffs are not rendered by default.

Loading

0 comments on commit 7d6031e

Please sign in to comment.