Skip to content

Commit 62f19e6

Browse files
committed
1 parent 7dca9bb commit 62f19e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+648
-290
lines changed

client/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
"build"
1616
],
1717
"dependencies": {
18-
"@pkmn/data": "^0.9.26",
18+
"@pkmn/data": "^0.9.27",
1919
"@pkmn/protocol": "^0.6.30"
2020
},
2121
"devDependencies": {
22-
"@pkmn/dex": "^0.9.26"
22+
"@pkmn/dex": "^0.9.27"
2323
},
2424
"scripts": {
2525
"lint": "eslint --cache src",

data/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pkmn/data",
3-
"version": "0.9.26",
3+
"version": "0.9.27",
44
"description": "A forked implementation of the Pokémon Showdown client's data layer",
55
"repository": "github:pkmn/ps",
66
"license": "MIT",
@@ -16,12 +16,12 @@
1616
"build"
1717
],
1818
"dependencies": {
19-
"@pkmn/dex-types": "^0.9.26"
19+
"@pkmn/dex-types": "^0.9.27"
2020
},
2121
"devDependencies": {
22-
"@pkmn/dex": "^0.9.26",
23-
"@pkmn/mods": "^0.9.26",
24-
"@pkmn/sim": "^0.9.26",
22+
"@pkmn/dex": "^0.9.27",
23+
"@pkmn/mods": "^0.9.27",
24+
"@pkmn/sim": "^0.9.27",
2525
"@smogon/calc": "^0.10.0"
2626
},
2727
"scripts": {

dex/data/aliases.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
"gen6ag": "[Gen 6] Anything Goes",
9090
"crossevo": "[Gen 9] Cross Evolution",
9191
"mayhem": "[Gen 9] Random Battle Mayhem",
92-
"omotm": "[Gen 9] Twisted Dimension",
93-
"lcotm": "[Gen 9] Mix and Mega Doubles",
92+
"omotm": "[Gen 9] Nature Swap",
93+
"lcotm": "[Gen 9] Camomons",
9494
"fabio": "Ampharos-Mega",
9595
"maero": "Aerodactyl-Mega",
9696
"megabunny": "Lopunny-Mega",

dex/data/formats-data.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@
875875
"alakazam": {"tier": "UU"},
876876
"machop": {"tier": "LC"},
877877
"machoke": {"tier": "NU"},
878-
"machamp": {"tier": "OU"},
878+
"machamp": {"tier": "Uber"},
879879
"bellsprout": {"tier": "LC"},
880880
"weepinbell": {"tier": "NFE"},
881881
"victreebel": {"tier": "NU"},
@@ -1804,7 +1804,7 @@
18041804
"gabite": {"tier": "NFE"},
18051805
"garchomp": {"tier": "OU", "doublesTier": "DOU"},
18061806
"riolu": {"tier": "PUBL", "doublesTier": "LC"},
1807-
"lucario": {"tier": "(OU)", "doublesTier": "DOU"},
1807+
"lucario": {"tier": "OU", "doublesTier": "DOU"},
18081808
"hippopotas": {"tier": "LC"},
18091809
"hippowdon": {"tier": "OU", "doublesTier": "DUU"},
18101810
"skorupi": {"tier": "LC"},
@@ -6501,7 +6501,7 @@
65016501
"alakazam": {
65026502
"isNonstandard": "Past",
65036503
"tier": "Illegal",
6504-
"natDexTier": "RU"
6504+
"natDexTier": "RUBL"
65056505
},
65066506
"alakazammega": {
65076507
"isNonstandard": "Past",
@@ -7073,7 +7073,7 @@
70737073
"sableyemega": {
70747074
"isNonstandard": "Past",
70757075
"tier": "Illegal",
7076-
"natDexTier": "RU"
7076+
"natDexTier": "RUBL"
70777077
},
70787078
"mawile": {"isNonstandard": "Past", "tier": "Illegal", "natDexTier": "RU"},
70797079
"mawilemega": {
@@ -8354,7 +8354,7 @@
83548354
"blacephalon": {
83558355
"isNonstandard": "Past",
83568356
"tier": "Illegal",
8357-
"natDexTier": "RU"
8357+
"natDexTier": "RUBL"
83588358
},
83598359
"zeraora": {"isNonstandard": "Past", "tier": "Illegal", "natDexTier": "UU"},
83608360
"meltan": {"isNonstandard": "Past", "tier": "Illegal", "natDexTier": "RU"},
@@ -8572,7 +8572,7 @@
85728572
"dondozo": {"tier": "OU", "doublesTier": "(DUU)", "natDexTier": "UUBL"},
85738573
"veluza": {"tier": "ZU", "doublesTier": "(DUU)", "natDexTier": "RU"},
85748574
"finizen": {"tier": "LC"},
8575-
"palafin": {"tier": "(OU)", "doublesTier": "(DUU)", "natDexTier": "Uber"},
8575+
"palafin": {"tier": "Uber", "doublesTier": "(DUU)", "natDexTier": "Uber"},
85768576
"smoliv": {"tier": "LC"},
85778577
"dolliv": {"tier": "NFE"},
85788578
"arboliva": {"tier": "ZU", "doublesTier": "(DUU)", "natDexTier": "RU"},
@@ -8607,7 +8607,7 @@
86078607
"klawf": {"tier": "ZU", "doublesTier": "(DUU)", "natDexTier": "RU"},
86088608
"nacli": {"tier": "LC"},
86098609
"naclstack": {"tier": "NFE"},
8610-
"garganacl": {"tier": "OU", "doublesTier": "DUU", "natDexTier": "UU"},
8610+
"garganacl": {"tier": "OU", "doublesTier": "DUU", "natDexTier": "UUBL"},
86118611
"glimmet": {"tier": "LC"},
86128612
"glimmora": {"tier": "OU", "doublesTier": "DOU", "natDexTier": "OU"},
86138613
"shroodle": {"tier": "LC"},
@@ -8650,7 +8650,7 @@
86508650
"tinkaton": {"tier": "UU", "doublesTier": "(DUU)", "natDexTier": "RU"},
86518651
"charcadet": {"tier": "LC"},
86528652
"armarouge": {"tier": "RU", "doublesTier": "DUU", "natDexTier": "RU"},
8653-
"ceruledge": {"tier": "UUBL", "doublesTier": "(DUU)", "natDexTier": "UU"},
8653+
"ceruledge": {"tier": "UUBL", "doublesTier": "(DUU)", "natDexTier": "UUBL"},
86548654
"toedscool": {"tier": "LC"},
86558655
"toedscruel": {"tier": "ZU", "doublesTier": "(DUU)", "natDexTier": "RU"},
86568656
"kingambit": {"tier": "OU", "doublesTier": "DOU", "natDexTier": "OU"},

dex/data/moves.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,10 @@
16811681
"flags": {"metronome": 1},
16821682
"condition": {"onResidualOrder": 10, "onResidualSubOrder": 2}
16831683
},
1684+
"assist": {
1685+
"inherit": true,
1686+
"desc": "A random move among those known by the user's party members is selected for use. Does not select Assist, Chatter, Copycat, Counter, Covet, Destiny Bond, Detect, Endure, Feint, Focus Punch, Follow Me, Helping Hand, Me First, Metronome, Mimic, Mirror Coat, Mirror Move, Protect, Sketch, Sleep Talk, Snatch, Struggle, Switcheroo, Thief, or Trick."
1687+
},
16841688
"beatup": {
16851689
"inherit": true,
16861690
"basePower": 10,
@@ -1745,6 +1749,10 @@
17451749
"flags": {"metronome": 1},
17461750
"desc": "The user's type changes to match the original type of one of its known moves besides this move and Curse, at random, but not either of its current types. Fails if the user cannot change its type, or if this move would only be able to select one of the user's current types."
17471751
},
1752+
"copycat": {
1753+
"inherit": true,
1754+
"desc": "The user uses the last move used by any Pokemon, including itself. Fails if no move has been used, or if the last move used was Assist, Chatter, Copycat, Counter, Covet, Destiny Bond, Detect, Endure, Feint, Focus Punch, Follow Me, Helping Hand, Me First, Metronome, Mimic, Mirror Coat, Mirror Move, Protect, Sketch, Sleep Talk, Snatch, Struggle, Switcheroo, Thief, or Trick."
1755+
},
17481756
"cottonspore": {"inherit": true, "accuracy": 85},
17491757
"covet": {
17501758
"inherit": true,
@@ -2405,10 +2413,6 @@
24052413
"inherit": true,
24062414
"desc": "Hits two to five times. Has a 3/8 chance to hit two or three times, and a 1/8 chance to hit four or five times. If one of the hits breaks the target's substitute, it will take damage for the remaining hits. If the user has the Skill Link Ability, this move will always hit five times. If the target has a Focus Sash and had full HP when this move started, it will not be knocked out regardless of the number of hits."
24072415
},
2408-
"assist": {
2409-
"inherit": true,
2410-
"desc": "A random move among those known by the user's party members is selected for use. Does not select Assist, Chatter, Copycat, Counter, Covet, Destiny Bond, Detect, Endure, Feint, Focus Punch, Follow Me, Helping Hand, Me First, Metronome, Mimic, Mirror Coat, Mirror Move, Protect, Sketch, Sleep Talk, Snatch, Struggle, Switcheroo, Thief, or Trick."
2411-
},
24122416
"assurance": {
24132417
"inherit": true,
24142418
"desc": "Power doubles if the target has already taken damage this turn."
@@ -2451,10 +2455,6 @@
24512455
"desc": "The user's type changes to match a type that resists or is immune to the type of the last move used against the user, if it was successful against the user, but not either of its current types. The determined type of the move is used rather than the original type. Fails if the last move used against the user was not successful, if the user has the Multitype Ability, or if this move would only be able to select one of the user's current types.",
24522456
"shortDesc": "User's type changes to resist last move against it."
24532457
},
2454-
"copycat": {
2455-
"inherit": true,
2456-
"desc": "The user uses the last move used by any Pokemon, including itself. Fails if no move has been used, or if the last move used was Assist, Chatter, Copycat, Counter, Covet, Destiny Bond, Detect, Endure, Feint, Focus Punch, Follow Me, Helping Hand, Me First, Metronome, Mimic, Mirror Coat, Mirror Move, Protect, Sketch, Sleep Talk, Snatch, Struggle, Switcheroo, Thief, or Trick."
2457-
},
24582458
"counter": {
24592459
"inherit": true,
24602460
"desc": "Deals damage to the last opposing Pokemon to hit the user with a physical attack this turn equal to twice the HP lost by the user from that attack. If that opposing Pokemon's position is no longer in use and there is another opposing Pokemon on the field, the damage is done to it instead. Only the last hit of a multi-hit attack is counted. Fails if the user was not hit by an opposing Pokemon's physical attack this turn, or if the user did not lose HP from the attack."

dex/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pkmn/dex",
3-
"version": "0.9.26",
3+
"version": "0.9.27",
44
"description": "A unification of Pokémon Showdown's client's and server's data layers",
55
"repository": "github:pkmn/ps",
66
"license": "MIT",
@@ -16,7 +16,7 @@
1616
"build"
1717
],
1818
"dependencies": {
19-
"@pkmn/dex-types": "^0.9.26"
19+
"@pkmn/dex-types": "^0.9.27"
2020
},
2121
"scripts": {
2222
"lint": "eslint --cache *.ts",

dex/types/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pkmn/dex-types",
3-
"version": "0.9.26",
3+
"version": "0.9.27",
44
"types": "index.d.ts",
55
"description": "Common Pokémon Showdown Dex types shared by @pkmn/dex and @pkmn/sim",
66
"repository": "github:pkmn/ps",

integration/src/test/client.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Runner {
6565
async runGame(output) {
6666
const streams = sim.BattleStreams.getPlayerStreams(new sim.BattleStreams.BattleStream());
6767

68-
const spec = {formatid: this.format, seed: this.prng.seed};
68+
const spec = {formatid: this.format, seed: this.prng.getSeed()};
6969
const p1spec = {name: 'Bot 1', ...this.p1options};
7070
const p2spec = {name: 'Bot 2', ...this.p2options};
7171

@@ -137,10 +137,10 @@ class Runner {
137137
// NOTE: advances this.prng's seed by 4.
138138
newSeed() {
139139
return [
140-
Math.floor(this.prng.next() * 0x10000),
141-
Math.floor(this.prng.next() * 0x10000),
142-
Math.floor(this.prng.next() * 0x10000),
143-
Math.floor(this.prng.next() * 0x10000),
140+
Math.floor(this.prng.random() * 0x10000),
141+
Math.floor(this.prng.random() * 0x10000),
142+
Math.floor(this.prng.random() * 0x10000),
143+
Math.floor(this.prng.random() * 0x10000),
144144
];
145145
}
146146
}

integration/src/test/sim.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class MultiRandomRunner {
5151
games = [];
5252
}
5353

54-
const seed = this.prng.seed;
54+
const seed = this.prng.getSeed();
5555
const game = new Runner(this.gens, Object.assign({format}, this.options)).run().catch(err => {
5656
failures++;
5757
console.error(
@@ -126,7 +126,7 @@ class Runner {
126126
const gen = this.gens.get(+format[3]);
127127
const formatid =
128128
format.slice(0, 4) + (format.includes('doubles') ? 'doublescustomgame' : 'customgame');
129-
const spec = {formatid, seed: this.prng.seed};
129+
const spec = {formatid, seed: this.prng.getSeed()};
130130

131131
const teamSeed1 = this.newSeed();
132132
const teamSeed2 = this.newSeed();
@@ -160,6 +160,7 @@ class Runner {
160160

161161
const psStart = psStreams.omniscient.write(start);
162162
const pkmnStart = pkmnStreams.omniscient.write(start);
163+
163164
const streams = new AsyncIterableStreams(psStreams.omniscient, pkmnStreams.omniscient);
164165
const verifier = new Verifier(gen, true);
165166

@@ -184,10 +185,10 @@ class Runner {
184185
// NOTE: advances this.prng's seed by 4.
185186
newSeed() {
186187
return [
187-
Math.floor(this.prng.next() * 0x10000),
188-
Math.floor(this.prng.next() * 0x10000),
189-
Math.floor(this.prng.next() * 0x10000),
190-
Math.floor(this.prng.next() * 0x10000),
188+
Math.floor(this.prng.random() * 0x10000),
189+
Math.floor(this.prng.random() * 0x10000),
190+
Math.floor(this.prng.random() * 0x10000),
191+
Math.floor(this.prng.random() * 0x10000),
191192
];
192193
}
193194
}

mods/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pkmn/mods",
3-
"version": "0.9.26",
3+
"version": "0.9.27",
44
"description": "Support for non-standard mods to @pkmn/sim and @pkmn/dex",
55
"repository": "github:pkmn/ps",
66
"author": "Guangcong Luo <[email protected]> (http://guangcongluo.com)",
@@ -114,11 +114,11 @@
114114
"build"
115115
],
116116
"dependencies": {
117-
"@pkmn/dex-types": "^0.9.26"
117+
"@pkmn/dex-types": "^0.9.27"
118118
},
119119
"devDependencies": {
120-
"@pkmn/dex": "^0.9.26",
121-
"@pkmn/sim": "^0.9.26"
120+
"@pkmn/dex": "^0.9.27",
121+
"@pkmn/sim": "^0.9.27"
122122
},
123123
"scripts": {
124124
"lint": "eslint --cache src",

mods/src/gen8bdsp/formats-data.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
535535
doublesTier: "DUU",
536536
},
537537
tauros: {
538-
tier: "NUBL",
538+
tier: "RU",
539539
doublesTier: "DUU",
540540
},
541541
magikarp: {
@@ -561,7 +561,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
561561
doublesTier: "DUU",
562562
},
563563
jolteon: {
564-
tier: "RU",
564+
tier: "NU",
565565
doublesTier: "DUU",
566566
},
567567
flareon: {
@@ -800,7 +800,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
800800
tier: "NFE",
801801
},
802802
honchkrow: {
803-
tier: "RU",
803+
tier: "NU",
804804
doublesTier: "DUU",
805805
},
806806
misdreavus: {
@@ -848,7 +848,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
848848
tier: "LC",
849849
},
850850
granbull: {
851-
tier: "RU",
851+
tier: "NU",
852852
doublesTier: "DUU",
853853
},
854854
qwilfish: {
@@ -988,7 +988,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
988988
tier: "NFE",
989989
},
990990
sceptile: {
991-
tier: "NUBL",
991+
tier: "RU",
992992
doublesTier: "DUU",
993993
},
994994
torchic: {
@@ -1171,7 +1171,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
11711171
tier: "NFE",
11721172
},
11731173
aggron: {
1174-
tier: "RU",
1174+
tier: "NU",
11751175
doublesTier: "DUU",
11761176
},
11771177
meditite: {
@@ -1243,7 +1243,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
12431243
doublesTier: "DUU",
12441244
},
12451245
torkoal: {
1246-
tier: "RU",
1246+
tier: "NU",
12471247
doublesTier: "DOU",
12481248
},
12491249
spoink: {
@@ -1271,7 +1271,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
12711271
tier: "LC",
12721272
},
12731273
cacturne: {
1274-
tier: "RU",
1274+
tier: "NU",
12751275
doublesTier: "DUU",
12761276
},
12771277
swablu: {
@@ -1315,7 +1315,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
13151315
tier: "LC",
13161316
},
13171317
claydol: {
1318-
tier: "RU",
1318+
tier: "NU",
13191319
doublesTier: "DUU",
13201320
},
13211321
lileep: {
@@ -1376,7 +1376,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
13761376
doublesTier: "DUU",
13771377
},
13781378
absol: {
1379-
tier: "NUBL",
1379+
tier: "RU",
13801380
doublesTier: "DUU",
13811381
},
13821382
snorunt: {
@@ -1748,7 +1748,7 @@ export const FormatsData: ModdedSpeciesFormatsDataTable = {
17481748
doublesTier: "DUU",
17491749
},
17501750
mesprit: {
1751-
tier: "NUBL",
1751+
tier: "RU",
17521752
doublesTier: "DUU",
17531753
},
17541754
azelf: {

mods/src/gen9dlc1/abilities.ts

+9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ export const Abilities: ModdedAbilityDataTable = {
1111
},
1212
protosynthesis: {
1313
inherit: true,
14+
onWeatherChange(pokemon) {
15+
// Protosynthesis is not affected by Utility Umbrella
16+
if (this.field.isWeather('sunnyday')) {
17+
pokemon.addVolatile('protosynthesis');
18+
} else if (!pokemon.volatiles['protosynthesis']?.fromBooster && this.field.weather !== 'sunnyday') {
19+
// Protosynthesis will not deactivite if Sun is suppressed, hence the direct ID check (isWeather respects supression)
20+
pokemon.removeVolatile('protosynthesis');
21+
}
22+
},
1423
condition: {
1524
noCopy: true,
1625
onStart(pokemon, source, effect) {

0 commit comments

Comments
 (0)