@pkmn/sim 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/config/formats.js +91 -45
- package/build/config/formats.js.map +1 -1
- package/build/data/formats-data.js +3 -3
- package/build/data/formats-data.js.map +1 -1
- package/build/data/items.js +2 -2
- package/build/data/items.js.map +1 -1
- package/build/data/learnsets.js +6 -5
- package/build/data/learnsets.js.map +1 -1
- package/build/data/mods/gen2/moves.js +13 -1
- package/build/data/mods/gen2/moves.js.map +1 -1
- package/build/data/mods/gen3/formats-data.js +2 -2
- package/build/data/mods/gen3/formats-data.js.map +1 -1
- package/build/data/mods/gen4/formats-data.js +4 -4
- package/build/data/mods/gen4/formats-data.js.map +1 -1
- package/build/data/mods/gen4/moves.js +7 -5
- package/build/data/mods/gen4/moves.js.map +1 -1
- package/build/data/mods/gen5/moves.js +6 -4
- package/build/data/mods/gen5/moves.js.map +1 -1
- package/build/data/mods/gen6/items.js +2 -2
- package/build/data/mods/gen6/items.js.map +1 -1
- package/build/data/mods/gen7/moves.js +3 -3
- package/build/data/mods/gen7/moves.js.map +1 -1
- package/build/data/mods/gen7/pokedex.js +4 -0
- package/build/data/mods/gen7/pokedex.js.map +1 -1
- package/build/data/moves.js +6 -5
- package/build/data/moves.js.map +1 -1
- package/build/data/pokedex.js +1 -1
- package/build/data/pokedex.js.map +1 -1
- package/build/data/rulesets.js +23 -0
- package/build/data/rulesets.js.map +1 -1
- package/build/sim/team-validator.js +11 -0
- package/build/sim/team-validator.js.map +1 -1
- package/config/formats.ts +88 -43
- package/data/formats-data.ts +3 -3
- package/data/items.ts +2 -2
- package/data/learnsets.ts +6 -5
- package/data/mods/gen2/moves.ts +13 -1
- package/data/mods/gen3/formats-data.ts +2 -2
- package/data/mods/gen4/formats-data.ts +4 -4
- package/data/mods/gen4/moves.ts +6 -4
- package/data/mods/gen5/moves.ts +6 -4
- package/data/mods/gen6/items.ts +2 -2
- package/data/mods/gen7/moves.ts +3 -3
- package/data/mods/gen7/pokedex.ts +4 -0
- package/data/moves.ts +6 -5
- package/data/pokedex.ts +1 -1
- package/data/rulesets.ts +21 -0
- package/package.json +2 -2
- package/sim/team-validator.ts +13 -0
package/data/formats-data.ts
CHANGED
|
@@ -4020,7 +4020,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
|
|
|
4020
4020
|
tier: "LC",
|
|
4021
4021
|
},
|
|
4022
4022
|
mienshao: {
|
|
4023
|
-
randomBattleMoves: ["closecombat", "fakeout", "knockoff", "poisonjab", "swordsdance", "uturn"],
|
|
4023
|
+
randomBattleMoves: ["closecombat", "fakeout", "knockoff", "poisonjab", "stoneedge", "swordsdance", "uturn"],
|
|
4024
4024
|
randomBattleLevel: 82,
|
|
4025
4025
|
randomDoubleBattleMoves: ["closecombat", "fakeout", "knockoff", "poisonjab", "protect", "uturn"],
|
|
4026
4026
|
randomDoubleBattleLevel: 84,
|
|
@@ -4599,7 +4599,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
|
|
|
4599
4599
|
randomBattleLevel: 82,
|
|
4600
4600
|
randomDoubleBattleMoves: ["breakingswipe", "dracometeor", "fireblast", "muddywater", "powerwhip", "protect", "sludgebomb", "thunderbolt"],
|
|
4601
4601
|
randomDoubleBattleLevel: 85,
|
|
4602
|
-
tier: "
|
|
4602
|
+
tier: "NUBL",
|
|
4603
4603
|
doublesTier: "(DUU)",
|
|
4604
4604
|
},
|
|
4605
4605
|
goodrahisui: {
|
|
@@ -5440,7 +5440,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
|
|
|
5440
5440
|
randomBattleLevel: 80,
|
|
5441
5441
|
randomDoubleBattleMoves: ["calmmind", "earthpower", "heatwave", "moonlight", "photongeyser", "protect"],
|
|
5442
5442
|
randomDoubleBattleLevel: 80,
|
|
5443
|
-
tier: "
|
|
5443
|
+
tier: "RUBL",
|
|
5444
5444
|
doublesTier: "DOU",
|
|
5445
5445
|
},
|
|
5446
5446
|
necrozmaduskmane: {
|
package/data/items.ts
CHANGED
|
@@ -2585,7 +2585,7 @@ export const Items: {[itemid: string]: ItemData} = {
|
|
|
2585
2585
|
type: "Dragon",
|
|
2586
2586
|
},
|
|
2587
2587
|
onDamagingHit(damage, target, source, move) {
|
|
2588
|
-
if (move.category === 'Physical' && source.hp && source.isActive) {
|
|
2588
|
+
if (move.category === 'Physical' && source.hp && source.isActive && !source.hasAbility('magicguard')) {
|
|
2589
2589
|
if (target.eatItem()) {
|
|
2590
2590
|
this.damage(source.baseMaxhp / (target.hasAbility('ripen') ? 4 : 8), source, target);
|
|
2591
2591
|
}
|
|
@@ -4643,7 +4643,7 @@ export const Items: {[itemid: string]: ItemData} = {
|
|
|
4643
4643
|
type: "Dark",
|
|
4644
4644
|
},
|
|
4645
4645
|
onDamagingHit(damage, target, source, move) {
|
|
4646
|
-
if (move.category === 'Special' && source.hp && source.isActive) {
|
|
4646
|
+
if (move.category === 'Special' && source.hp && source.isActive && !source.hasAbility('magicguard')) {
|
|
4647
4647
|
if (target.eatItem()) {
|
|
4648
4648
|
this.damage(source.baseMaxhp / (target.hasAbility('ripen') ? 4 : 8), source, target);
|
|
4649
4649
|
}
|
package/data/learnsets.ts
CHANGED
|
@@ -20168,12 +20168,12 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
20168
20168
|
expandingforce: ["8T"],
|
|
20169
20169
|
facade: ["8M"],
|
|
20170
20170
|
fly: ["8M"],
|
|
20171
|
-
freezingglare: ["8L45", "8S0"],
|
|
20171
|
+
freezingglare: ["8L45", "8S0", "8S1"],
|
|
20172
20172
|
futuresight: ["8M", "8L65"],
|
|
20173
20173
|
gigaimpact: ["8M"],
|
|
20174
20174
|
guardswap: ["8M"],
|
|
20175
20175
|
gust: ["8L1"],
|
|
20176
|
-
hurricane: ["8M", "8L55", "8S0"],
|
|
20176
|
+
hurricane: ["8M", "8L55", "8S0", "8S1"],
|
|
20177
20177
|
hyperbeam: ["8M"],
|
|
20178
20178
|
hypervoice: ["8M"],
|
|
20179
20179
|
hypnosis: ["8L15"],
|
|
@@ -20183,8 +20183,8 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
20183
20183
|
powerswap: ["8M"],
|
|
20184
20184
|
protect: ["8M"],
|
|
20185
20185
|
psychic: ["8M"],
|
|
20186
|
-
psychocut: ["8M", "8L35", "8S0"],
|
|
20187
|
-
psychoshift: ["8L1", "8S0"],
|
|
20186
|
+
psychocut: ["8M", "8L35", "8S0", "8S1"],
|
|
20187
|
+
psychoshift: ["8L1", "8S0", "8S1"],
|
|
20188
20188
|
psyshock: ["8M"],
|
|
20189
20189
|
recover: ["8L40"],
|
|
20190
20190
|
reflect: ["8M", "8L10"],
|
|
@@ -20205,6 +20205,7 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
20205
20205
|
},
|
|
20206
20206
|
eventData: [
|
|
20207
20207
|
{generation: 8, level: 70, moves: ["freezingglare", "hurricane", "psychocut", "psychoshift"]},
|
|
20208
|
+
{generation: 8, level: 70, shiny: true, moves: ["freezingglare", "hurricane", "psychocut", "psychoshift"], pokeball: "cherishball"},
|
|
20208
20209
|
],
|
|
20209
20210
|
eventOnly: true,
|
|
20210
20211
|
},
|
|
@@ -79487,7 +79488,6 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
79487
79488
|
ironhead: ["8M", "7T"],
|
|
79488
79489
|
irontail: ["8M", "7T", "4M"],
|
|
79489
79490
|
lavaplume: ["8L48", "7L50", "4L54"],
|
|
79490
|
-
leafstorm: ["8M"],
|
|
79491
79491
|
leechseed: ["8L1", "7L10", "4L13"],
|
|
79492
79492
|
lightscreen: ["8M", "7M", "4M"],
|
|
79493
79493
|
lowkick: ["8M", "7T", "4T"],
|
|
@@ -79514,6 +79514,7 @@ export const Learnsets: {[speciesid: string]: LearnsetData} = {
|
|
|
79514
79514
|
scorchingsands: ["8T"],
|
|
79515
79515
|
secretpower: ["7M", "4M"],
|
|
79516
79516
|
seedbomb: ["8M", "8L32", "7L23", "4T"],
|
|
79517
|
+
slackoff: ["8L1"],
|
|
79517
79518
|
sleeptalk: ["8M", "7M", "4M"],
|
|
79518
79519
|
snore: ["8M", "4T"],
|
|
79519
79520
|
solarbeam: ["8M", "7M", "4M"],
|
package/data/mods/gen2/moves.ts
CHANGED
|
@@ -307,11 +307,17 @@ export const Moves: {[k: string]: ModdedMoveData} = {
|
|
|
307
307
|
},
|
|
308
308
|
},
|
|
309
309
|
},
|
|
310
|
+
frustration: {
|
|
311
|
+
inherit: true,
|
|
312
|
+
basePowerCallback(pokemon) {
|
|
313
|
+
return Math.floor(((255 - pokemon.happiness) * 10) / 25) || null;
|
|
314
|
+
},
|
|
315
|
+
},
|
|
310
316
|
healbell: {
|
|
311
317
|
inherit: true,
|
|
312
318
|
onHit(target, source) {
|
|
313
319
|
this.add('-cureteam', source, '[from] move: Heal Bell');
|
|
314
|
-
for (const pokemon of
|
|
320
|
+
for (const pokemon of target.side.pokemon) {
|
|
315
321
|
pokemon.clearStatus();
|
|
316
322
|
}
|
|
317
323
|
},
|
|
@@ -674,6 +680,12 @@ export const Moves: {[k: string]: ModdedMoveData} = {
|
|
|
674
680
|
},
|
|
675
681
|
secondary: null,
|
|
676
682
|
},
|
|
683
|
+
return: {
|
|
684
|
+
inherit: true,
|
|
685
|
+
basePowerCallback(pokemon) {
|
|
686
|
+
return Math.floor((pokemon.happiness * 10) / 25) || null;
|
|
687
|
+
},
|
|
688
|
+
},
|
|
677
689
|
reversal: {
|
|
678
690
|
inherit: true,
|
|
679
691
|
noDamageVariance: true,
|
|
@@ -17,7 +17,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
|
|
|
17
17
|
},
|
|
18
18
|
charizard: {
|
|
19
19
|
randomBattleMoves: ["bellydrum", "dragondance", "earthquake", "fireblast", "hiddenpowerflying", "substitute"],
|
|
20
|
-
tier: "
|
|
20
|
+
tier: "OU",
|
|
21
21
|
},
|
|
22
22
|
squirtle: {
|
|
23
23
|
tier: "LC",
|
|
@@ -544,7 +544,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
|
|
|
544
544
|
},
|
|
545
545
|
porygon2: {
|
|
546
546
|
randomBattleMoves: ["icebeam", "recover", "return", "thunderbolt", "thunderwave", "toxic"],
|
|
547
|
-
tier: "
|
|
547
|
+
tier: "UUBL",
|
|
548
548
|
},
|
|
549
549
|
omanyte: {
|
|
550
550
|
tier: "LC",
|
|
@@ -164,7 +164,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
|
|
|
164
164
|
tier: "NFE",
|
|
165
165
|
},
|
|
166
166
|
vileplume: {
|
|
167
|
-
randomBattleMoves: ["energyball", "moonlight", "sleeppowder", "sludgebomb", "solarbeam", "sunnyday"],
|
|
167
|
+
randomBattleMoves: ["energyball", "hiddenpowerfire", "moonlight", "sleeppowder", "sludgebomb", "solarbeam", "sunnyday"],
|
|
168
168
|
tier: "NU",
|
|
169
169
|
},
|
|
170
170
|
bellossom: {
|
|
@@ -474,7 +474,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
|
|
|
474
474
|
tier: "LC",
|
|
475
475
|
},
|
|
476
476
|
starmie: {
|
|
477
|
-
randomBattleMoves: ["hydropump", "icebeam", "rapidspin", "recover", "surf", "thunderbolt"],
|
|
477
|
+
randomBattleMoves: ["hydropump", "icebeam", "psychic", "rapidspin", "recover", "surf", "thunderbolt"],
|
|
478
478
|
tier: "OU",
|
|
479
479
|
},
|
|
480
480
|
mimejr: {
|
|
@@ -987,7 +987,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
|
|
|
987
987
|
tier: "NFE",
|
|
988
988
|
},
|
|
989
989
|
blaziken: {
|
|
990
|
-
randomBattleMoves: ["agility", "fireblast", "flareblitz", "
|
|
990
|
+
randomBattleMoves: ["agility", "fireblast", "flareblitz", "stoneedge", "superpower", "thunderpunch", "vacuumwave"],
|
|
991
991
|
tier: "UU",
|
|
992
992
|
},
|
|
993
993
|
mudkip: {
|
|
@@ -1666,7 +1666,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
|
|
|
1666
1666
|
tier: "NU",
|
|
1667
1667
|
},
|
|
1668
1668
|
garchomp: {
|
|
1669
|
-
randomBattleMoves: ["dragonclaw", "earthquake", "
|
|
1669
|
+
randomBattleMoves: ["dragonclaw", "earthquake", "fireblast", "outrage", "stealthrock", "stoneedge", "substitute", "swordsdance"],
|
|
1670
1670
|
tier: "Uber",
|
|
1671
1671
|
},
|
|
1672
1672
|
riolu: {
|
package/data/mods/gen4/moves.ts
CHANGED
|
@@ -27,8 +27,9 @@ export const Moves: {[k: string]: ModdedMoveData} = {
|
|
|
27
27
|
inherit: true,
|
|
28
28
|
onHit(target, source) {
|
|
29
29
|
this.add('-cureteam', source, '[from] move: Aromatherapy');
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
|
|
31
|
+
for (const ally of allies) {
|
|
32
|
+
ally.clearStatus();
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
35
|
},
|
|
@@ -698,8 +699,9 @@ export const Moves: {[k: string]: ModdedMoveData} = {
|
|
|
698
699
|
inherit: true,
|
|
699
700
|
onHit(target, source) {
|
|
700
701
|
this.add('-activate', source, 'move: Heal Bell');
|
|
701
|
-
|
|
702
|
-
|
|
702
|
+
const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
|
|
703
|
+
for (const ally of allies) {
|
|
704
|
+
if (!ally.hasAbility('soundproof')) ally.cureStatus(true);
|
|
703
705
|
}
|
|
704
706
|
},
|
|
705
707
|
},
|
package/data/mods/gen5/moves.ts
CHANGED
|
@@ -19,8 +19,9 @@ export const Moves: {[k: string]: ModdedMoveData} = {
|
|
|
19
19
|
inherit: true,
|
|
20
20
|
onHit(target, source) {
|
|
21
21
|
this.add('-activate', source, 'move: Aromatherapy');
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
|
|
23
|
+
for (const ally of allies) {
|
|
24
|
+
ally.cureStatus();
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
27
|
},
|
|
@@ -352,8 +353,9 @@ export const Moves: {[k: string]: ModdedMoveData} = {
|
|
|
352
353
|
flags: {snatch: 1, sound: 1},
|
|
353
354
|
onHit(target, source) {
|
|
354
355
|
this.add('-activate', source, 'move: Heal Bell');
|
|
355
|
-
|
|
356
|
-
|
|
356
|
+
const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
|
|
357
|
+
for (const ally of allies) {
|
|
358
|
+
ally.cureStatus();
|
|
357
359
|
}
|
|
358
360
|
},
|
|
359
361
|
},
|
package/data/mods/gen6/items.ts
CHANGED
|
@@ -56,7 +56,7 @@ export const Items: {[k: string]: ModdedItemData} = {
|
|
|
56
56
|
jabocaberry: {
|
|
57
57
|
inherit: true,
|
|
58
58
|
onDamagingHit(damage, target, source, move) {
|
|
59
|
-
if (move.category === 'Physical') {
|
|
59
|
+
if (move.category === 'Physical' && !source.hasAbility('magicguard')) {
|
|
60
60
|
if (target.eatItem()) {
|
|
61
61
|
this.damage(source.baseMaxhp / 8, source, target, null, true);
|
|
62
62
|
}
|
|
@@ -128,7 +128,7 @@ export const Items: {[k: string]: ModdedItemData} = {
|
|
|
128
128
|
rowapberry: {
|
|
129
129
|
inherit: true,
|
|
130
130
|
onDamagingHit(damage, target, source, move) {
|
|
131
|
-
if (move.category === 'Special') {
|
|
131
|
+
if (move.category === 'Special' && !source.hasAbility('magicguard')) {
|
|
132
132
|
if (target.eatItem()) {
|
|
133
133
|
this.damage(source.baseMaxhp / 8, source, target, null, true);
|
|
134
134
|
}
|
package/data/mods/gen7/moves.ts
CHANGED
|
@@ -344,11 +344,11 @@ export const Moves: {[k: string]: ModdedMoveData} = {
|
|
|
344
344
|
},
|
|
345
345
|
healbell: {
|
|
346
346
|
inherit: true,
|
|
347
|
-
onHit(
|
|
347
|
+
onHit(target, source) {
|
|
348
348
|
this.add('-activate', source, 'move: Heal Bell');
|
|
349
|
-
const side = pokemon.side;
|
|
350
349
|
let success = false;
|
|
351
|
-
|
|
350
|
+
const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
|
|
351
|
+
for (const ally of allies) {
|
|
352
352
|
if (ally.hasAbility('soundproof')) continue;
|
|
353
353
|
if (ally.cureStatus()) success = true;
|
|
354
354
|
}
|
|
@@ -156,6 +156,10 @@ export const Pokedex: {[k: string]: ModdedSpeciesData} = {
|
|
|
156
156
|
inherit: true,
|
|
157
157
|
abilities: {0: "Misty Surge"},
|
|
158
158
|
},
|
|
159
|
+
pyroak: {
|
|
160
|
+
inherit: true,
|
|
161
|
+
abilities: {0: "Rock Head", 1: "Battle Armor", H: "White Smoke"},
|
|
162
|
+
},
|
|
159
163
|
voodoom: {
|
|
160
164
|
inherit: true,
|
|
161
165
|
baseStats: {hp: 90, atk: 85, def: 80, spa: 105, spd: 80, spe: 110},
|
package/data/moves.ts
CHANGED
|
@@ -500,10 +500,11 @@ export const Moves: {[moveid: string]: MoveData} = {
|
|
|
500
500
|
pp: 5,
|
|
501
501
|
priority: 0,
|
|
502
502
|
flags: {snatch: 1, distance: 1},
|
|
503
|
-
onHit(
|
|
503
|
+
onHit(target, source, move) {
|
|
504
504
|
this.add('-activate', source, 'move: Aromatherapy');
|
|
505
505
|
let success = false;
|
|
506
|
-
|
|
506
|
+
const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
|
|
507
|
+
for (const ally of allies) {
|
|
507
508
|
if (ally !== source && ((ally.hasAbility('sapsipper')) ||
|
|
508
509
|
(ally.volatiles['substitute'] && !move.infiltrates))) {
|
|
509
510
|
continue;
|
|
@@ -7710,11 +7711,11 @@ export const Moves: {[moveid: string]: MoveData} = {
|
|
|
7710
7711
|
pp: 5,
|
|
7711
7712
|
priority: 0,
|
|
7712
7713
|
flags: {snatch: 1, sound: 1, distance: 1, bypasssub: 1},
|
|
7713
|
-
onHit(
|
|
7714
|
+
onHit(target, source) {
|
|
7714
7715
|
this.add('-activate', source, 'move: Heal Bell');
|
|
7715
|
-
const side = pokemon.side;
|
|
7716
7716
|
let success = false;
|
|
7717
|
-
|
|
7717
|
+
const allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];
|
|
7718
|
+
for (const ally of allies) {
|
|
7718
7719
|
if (ally !== source && ally.hasAbility('soundproof')) continue;
|
|
7719
7720
|
if (ally.cureStatus()) success = true;
|
|
7720
7721
|
}
|
package/data/pokedex.ts
CHANGED
|
@@ -16530,7 +16530,7 @@ export const Pokedex: {[speciesid: string]: SpeciesData} = {
|
|
|
16530
16530
|
name: "Pyroak",
|
|
16531
16531
|
types: ["Fire", "Grass"],
|
|
16532
16532
|
baseStats: {hp: 120, atk: 70, def: 105, spa: 95, spd: 90, spe: 60},
|
|
16533
|
-
abilities: {0: "Rock Head", 1: "Battle Armor", H: "
|
|
16533
|
+
abilities: {0: "Rock Head", 1: "Battle Armor", H: "Contrary"},
|
|
16534
16534
|
heightm: 2.1,
|
|
16535
16535
|
weightkg: 168,
|
|
16536
16536
|
color: "Brown",
|
package/data/rulesets.ts
CHANGED
|
@@ -1219,6 +1219,27 @@ export const Rulesets: {[k: string]: FormatData} = {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
},
|
|
1221
1221
|
},
|
|
1222
|
+
camomonsmod: {
|
|
1223
|
+
effectType: 'Rule',
|
|
1224
|
+
name: 'Camomons Mod',
|
|
1225
|
+
desc: `Pokémon have their types set to match their first two moves.`,
|
|
1226
|
+
onBegin() {
|
|
1227
|
+
this.add('rule', 'Camomons Mod: Pok\u00e9mon have their types set to match their first two moves.');
|
|
1228
|
+
},
|
|
1229
|
+
onModifySpeciesPriority: 2,
|
|
1230
|
+
onModifySpecies(species, target, source, effect) {
|
|
1231
|
+
if (!target) return; // Chat command
|
|
1232
|
+
if (effect && ['imposter', 'transform'].includes(effect.id)) return;
|
|
1233
|
+
const types = [...new Set(target.baseMoveSlots.slice(0, 2).map(move => this.dex.moves.get(move.id).type))];
|
|
1234
|
+
return {...species, types: types};
|
|
1235
|
+
},
|
|
1236
|
+
onSwitchIn(pokemon) {
|
|
1237
|
+
this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
|
|
1238
|
+
},
|
|
1239
|
+
onAfterMega(pokemon) {
|
|
1240
|
+
this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
|
|
1241
|
+
},
|
|
1242
|
+
},
|
|
1222
1243
|
allowtradeback: {
|
|
1223
1244
|
effectType: 'ValidatorRule',
|
|
1224
1245
|
name: 'Allow Tradeback',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pkmn/sim",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "An automatically generated extraction of just the simulator portion of Pokémon Showdown",
|
|
5
5
|
"homepage": "https://psim.us",
|
|
6
6
|
"main": "build/sim/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@pkmn/streams": "^1.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"mocha": "^9.2.
|
|
34
|
+
"mocha": "^9.2.1"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"compile": "tsc -p .",
|
package/sim/team-validator.ts
CHANGED
|
@@ -1564,6 +1564,19 @@ export class TeamValidator {
|
|
|
1564
1564
|
|
|
1565
1565
|
setHas['ability:' + ability.id] = true;
|
|
1566
1566
|
|
|
1567
|
+
if (this.format.id === 'gen8pokebilities') {
|
|
1568
|
+
const species = dex.species.get(set.species);
|
|
1569
|
+
const unSeenAbilities = Object.keys(species.abilities)
|
|
1570
|
+
.filter(key => key !== 'S' && (key !== 'H' || !species.unreleasedHidden))
|
|
1571
|
+
.map(key => species.abilities[key as "0" | "1" | "H" | "S"]);
|
|
1572
|
+
|
|
1573
|
+
if (ability.id !== this.toID(species.abilities['S'])) {
|
|
1574
|
+
for (const abilityName of unSeenAbilities) {
|
|
1575
|
+
setHas['ability:' + toID(abilityName)] = true;
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1567
1580
|
let banReason = ruleTable.check('ability:' + ability.id);
|
|
1568
1581
|
if (banReason) {
|
|
1569
1582
|
return `${set.name}'s ability ${ability.name} is ${banReason}.`;
|