@pkmn/sim 0.5.16 → 0.5.17
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 +32 -51
- package/build/config/formats.js.map +1 -1
- package/build/data/items.js +1 -3
- package/build/data/items.js.map +1 -1
- package/build/data/learnsets.js +2 -2
- package/build/data/learnsets.js.map +1 -1
- package/build/data/mods/gen1/formats-data.js +1 -1
- package/build/data/mods/gen1/formats-data.js.map +1 -1
- package/build/data/mods/gen1/moves.js +1 -4
- package/build/data/mods/gen1/moves.js.map +1 -1
- package/build/data/mods/gen3/moves.js +0 -7
- package/build/data/mods/gen3/moves.js.map +1 -1
- package/build/data/mods/gen3/scripts.js +2 -2
- package/build/data/mods/gen3/scripts.js.map +1 -1
- package/build/data/mods/gen4/moves.js +1 -1
- package/build/data/mods/gen4/moves.js.map +1 -1
- package/build/data/mods/gen4/rulesets.js +2 -1
- package/build/data/mods/gen4/rulesets.js.map +1 -1
- package/build/data/mods/gen5/rulesets.js +2 -1
- package/build/data/mods/gen5/rulesets.js.map +1 -1
- package/build/data/mods/gen7/formats-data.js +4 -4
- package/build/data/mods/gen7/formats-data.js.map +1 -1
- package/build/data/mods/gen7/rulesets.js +2 -1
- package/build/data/mods/gen7/rulesets.js.map +1 -1
- package/build/data/moves.js +55 -74
- package/build/data/moves.js.map +1 -1
- package/build/data/pokedex.js +2 -2
- package/build/data/pokedex.js.map +1 -1
- package/build/data/rulesets.js +3 -4
- package/build/data/rulesets.js.map +1 -1
- package/build/data/text/items.js +1 -0
- package/build/data/text/items.js.map +1 -1
- package/build/data/text/moves.js +5 -3
- package/build/data/text/moves.js.map +1 -1
- package/build/sim/battle-actions.js +9 -1
- package/build/sim/battle-actions.js.map +1 -1
- package/build/sim/battle.js +39 -1
- package/build/sim/battle.js.map +1 -1
- package/build/sim/dex-conditions.d.ts +1 -0
- package/build/sim/dex-conditions.js.map +1 -1
- package/build/sim/exported-global-types.d.ts +1 -0
- package/build/sim/global-types.d.ts +1 -0
- package/build/sim/team-validator.js +15 -4
- package/build/sim/team-validator.js.map +1 -1
- package/build/sim/tools/exhaustive-runner.d.ts +8 -0
- package/build/sim/tools/exhaustive-runner.js +18 -7
- package/build/sim/tools/exhaustive-runner.js.map +1 -1
- package/config/formats.ts +32 -51
- package/data/items.ts +1 -3
- package/data/learnsets.ts +2 -2
- package/data/mods/gen1/formats-data.ts +1 -1
- package/data/mods/gen1/moves.ts +1 -4
- package/data/mods/gen3/moves.ts +0 -7
- package/data/mods/gen3/scripts.ts +3 -3
- package/data/mods/gen4/moves.ts +1 -1
- package/data/mods/gen4/rulesets.ts +2 -1
- package/data/mods/gen5/rulesets.ts +2 -1
- package/data/mods/gen7/formats-data.ts +4 -4
- package/data/mods/gen7/rulesets.ts +2 -1
- package/data/moves.ts +55 -65
- package/data/pokedex.ts +2 -2
- package/data/rulesets.ts +3 -6
- package/data/text/items.ts +2 -0
- package/data/text/moves.ts +6 -3
- package/package.json +1 -1
- package/sim/battle-actions.ts +13 -1
- package/sim/battle.ts +38 -1
- package/sim/dex-conditions.ts +1 -0
- package/sim/exported-global-types.ts +3 -0
- package/sim/global-types.ts +3 -0
- package/sim/team-validator.ts +16 -4
- package/sim/tools/exhaustive-runner.ts +29 -11
package/build/config/formats.js
CHANGED
|
@@ -236,7 +236,7 @@ exports.Formats = [
|
|
|
236
236
|
'Larvesta', 'Magby', 'Magnemite', 'Mareanie', 'Mienfoo', 'Mudbray', 'Munchlax', 'Natu', 'Onix', 'Pawniard',
|
|
237
237
|
'Ponyta', 'Ponyta-Galar', 'Porygon', 'Slowpoke-Base', 'Staryu', 'Timburr', 'Trapinch', 'Tyrunt',
|
|
238
238
|
// LC UUBL
|
|
239
|
-
'Farfetch\u2019d-Galar', 'Scorbunny', 'Shellder', 'Wingull',
|
|
239
|
+
'Archen', 'Farfetch\u2019d-Galar', 'Scorbunny', 'Shellder', 'Wingull',
|
|
240
240
|
],
|
|
241
241
|
},
|
|
242
242
|
{
|
|
@@ -330,7 +330,7 @@ exports.Formats = [
|
|
|
330
330
|
gameType: 'doubles',
|
|
331
331
|
searchShow: false,
|
|
332
332
|
ruleset: ['Standard Doubles', 'Little Cup', 'Dynamax Clause', 'Swagger Clause', 'Sleep Clause Mod'],
|
|
333
|
-
banlist: ['Corsola-Galar', 'Cutiefly', 'Ponyta-Base', 'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Vulpix
|
|
333
|
+
banlist: ['Corsola-Galar', 'Cutiefly', 'Ponyta-Base', 'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Vulpix-Base', 'Ally Switch'],
|
|
334
334
|
},
|
|
335
335
|
{
|
|
336
336
|
name: "[Gen 8] VGC 2022",
|
|
@@ -596,17 +596,18 @@ exports.Formats = [
|
|
|
596
596
|
mod: 'pokebilities',
|
|
597
597
|
ruleset: ['[Gen 8] Pokebilities', '!Obtainable Abilities', 'AAA Restricted Abilities', '2 Ability Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
|
|
598
598
|
banlist: [
|
|
599
|
-
'Blacephalon', 'Buzzwole', 'Clefable', 'Dragapult', 'Dragonite', 'Kartana', 'Keldeo', 'Kyurem', 'Melmetal', 'Mienshao',
|
|
600
|
-
'
|
|
601
|
-
'
|
|
602
|
-
'
|
|
603
|
-
'
|
|
604
|
-
'
|
|
599
|
+
'Alakazam', 'Blacephalon', 'Buzzwole', 'Clefable', 'Dragapult', 'Dragonite', 'Gengar', 'Kartana', 'Keldeo', 'Kyurem', 'Melmetal', 'Mienshao',
|
|
600
|
+
'Noivern', 'Obstagoon', 'Perrserker', 'Rillaboom', 'Tapu Lele', 'Urshifu', 'Urshifu-Rapid-Strike', 'Victini', 'Weavile', 'Zamazenta-Crowned',
|
|
601
|
+
'Zapdos-Galar', 'Arena Trap', 'Moody', 'Shadow Tag', 'Wonder Guard', 'Chlorophyll + Desolate Land', 'Chlorophyll + Drought', 'Electric Surge + Surge Surfer',
|
|
602
|
+
'Regenerator + Emergency Exit', 'Regenerator + Multiscale', 'Regenerator + Shadow Shield', 'Regenerator + Wimp Out', 'Sand Rush + Sand Stream',
|
|
603
|
+
'Slush Rush + Snow Warning', 'Swift Swim + Drizzle', 'Swift Swim + Primordial Sea', 'Snow Cloak + Snow Warning', 'Sand Veil + Sand Stream',
|
|
604
|
+
'Regenerator > 2', 'Bright Powder', 'Lax Incense', 'Quick Claw',
|
|
605
605
|
],
|
|
606
606
|
restricted: [
|
|
607
607
|
'Comatose', 'Contrary', 'Fluffy', 'Fur Coat', 'Gorilla Tactics', 'Huge Power', 'Ice Scales', 'Illusion', 'Imposter', 'Innards Out',
|
|
608
|
-
'Intrepid Sword', 'Libero', 'Magnet Pull', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Prankster', 'Protean',
|
|
609
|
-
'
|
|
608
|
+
'Intrepid Sword', 'Libero', 'Magnet Pull', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Prankster', 'Protean', 'Pure Power',
|
|
609
|
+
'Quick Draw', 'Sand Veil', 'Serene Grace', 'Simple', 'Snow Cloak', 'Speed Boost', 'Stakeout', 'Stench', 'Tinted Lens', 'Triage',
|
|
610
|
+
'Unburden', 'Water Bubble',
|
|
610
611
|
],
|
|
611
612
|
},
|
|
612
613
|
// Other Metagames
|
|
@@ -631,25 +632,6 @@ exports.Formats = [
|
|
|
631
632
|
'Water Bubble', 'Wonder Guard', 'Comatose + Sleep Talk', 'Rusted Sword', 'Court Change', 'Bolt Beak', 'Double Iron Bash',
|
|
632
633
|
'Octolock', 'Shell Smash',
|
|
633
634
|
],
|
|
634
|
-
onChangeSet(set) {
|
|
635
|
-
const item = this.dex.toID(set.item);
|
|
636
|
-
if (set.species === 'Zacian' && item === 'rustedsword') {
|
|
637
|
-
set.species = 'Zacian-Crowned';
|
|
638
|
-
set.ability = 'Intrepid Sword';
|
|
639
|
-
const ironHead = set.moves.indexOf('ironhead');
|
|
640
|
-
if (ironHead >= 0) {
|
|
641
|
-
set.moves[ironHead] = 'behemothblade';
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
if (set.species === 'Zamazenta' && item === 'rustedshield') {
|
|
645
|
-
set.species = 'Zamazenta-Crowned';
|
|
646
|
-
set.ability = 'Dauntless Shield';
|
|
647
|
-
const ironHead = set.moves.indexOf('ironhead');
|
|
648
|
-
if (ironHead >= 0) {
|
|
649
|
-
set.moves[ironHead] = 'behemothbash';
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
},
|
|
653
635
|
},
|
|
654
636
|
{
|
|
655
637
|
name: "[Gen 8] Almost Any Ability",
|
|
@@ -670,15 +652,6 @@ exports.Formats = [
|
|
|
670
652
|
'Innards Out', 'Intrepid Sword', 'Libero', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Protean',
|
|
671
653
|
'Pure Power', 'Shadow Tag', 'Simple', 'Stakeout', 'Speed Boost', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
|
|
672
654
|
],
|
|
673
|
-
onValidateSet(set) {
|
|
674
|
-
// Temporary fix until battle-only is implemented properly
|
|
675
|
-
if (this.toID(set.species) === 'zamazentacrowned' && this.toID(set.ability) !== 'dauntlessshield') {
|
|
676
|
-
return [`Zamazenta-Crowned can only use Dauntless Shield because it is a battle-only forme.`];
|
|
677
|
-
}
|
|
678
|
-
if (this.toID(set.species) === 'zaciancrowned' && this.toID(set.ability) !== 'intrepidsword') {
|
|
679
|
-
return [`Zacian-Crowned can only use Intrepid Sword because it is a battle-only forme.`];
|
|
680
|
-
}
|
|
681
|
-
},
|
|
682
655
|
},
|
|
683
656
|
{
|
|
684
657
|
name: "[Gen 8] Mix and Mega",
|
|
@@ -850,9 +823,6 @@ exports.Formats = [
|
|
|
850
823
|
const stat = Dex.stats.ids()[target.side.team.indexOf(target.set)];
|
|
851
824
|
const newSpecies = this.dex.deepClone(species);
|
|
852
825
|
let godSpecies = this.dex.species.get(god.species);
|
|
853
|
-
if (godSpecies.forme === 'Crowned') {
|
|
854
|
-
godSpecies = this.dex.species.get(godSpecies.changesFrom || godSpecies.baseSpecies);
|
|
855
|
-
}
|
|
856
826
|
if (typeof godSpecies.battleOnly === 'string') {
|
|
857
827
|
godSpecies = this.dex.species.get(godSpecies.battleOnly);
|
|
858
828
|
}
|
|
@@ -1723,6 +1693,17 @@ exports.Formats = [
|
|
|
1723
1693
|
}
|
|
1724
1694
|
}
|
|
1725
1695
|
},
|
|
1696
|
+
onSwitchOut(pokemon) {
|
|
1697
|
+
for (const innate of Object.keys(pokemon.volatiles).filter(i => i.startsWith('ability:'))) {
|
|
1698
|
+
pokemon.removeVolatile(innate);
|
|
1699
|
+
}
|
|
1700
|
+
},
|
|
1701
|
+
onFaint(pokemon) {
|
|
1702
|
+
for (const innate of Object.keys(pokemon.volatiles).filter(i => i.startsWith('ability:'))) {
|
|
1703
|
+
const innateEffect = this.dex.conditions.get(innate);
|
|
1704
|
+
this.singleEvent('End', innateEffect, null, pokemon);
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1726
1707
|
onAfterMega(pokemon) {
|
|
1727
1708
|
for (const innate of Object.keys(pokemon.volatiles).filter(i => i.startsWith('ability:'))) {
|
|
1728
1709
|
pokemon.removeVolatile(innate);
|
|
@@ -2420,7 +2401,7 @@ exports.Formats = [
|
|
|
2420
2401
|
],
|
|
2421
2402
|
mod: 'gen3',
|
|
2422
2403
|
ruleset: ['Standard', 'One Boost Passer Clause'],
|
|
2423
|
-
banlist: ['Uber', 'Sand Veil', 'Soundproof', 'Assist', 'Baton Pass + Mean Look', 'Baton Pass + Spider Web', 'Smeargle + Ingrain'],
|
|
2404
|
+
banlist: ['Uber', 'Sand Veil', 'Soundproof', 'Assist', 'Baton Pass + Block', 'Baton Pass + Mean Look', 'Baton Pass + Spider Web', 'Smeargle + Ingrain'],
|
|
2424
2405
|
},
|
|
2425
2406
|
{
|
|
2426
2407
|
name: "[Gen 2] OU",
|
|
@@ -2917,8 +2898,8 @@ exports.Formats = [
|
|
|
2917
2898
|
searchShow: false,
|
|
2918
2899
|
ruleset: ['Standard', 'Swagger Clause', 'Same Type Clause'],
|
|
2919
2900
|
banlist: [
|
|
2920
|
-
'Aegislash', 'Altaria-Mega', 'Arceus', 'Blaziken', 'Darkrai', 'Deoxys-Base', 'Deoxys-Attack', '
|
|
2921
|
-
'Giratina', 'Giratina-Origin', 'Greninja', 'Groudon', 'Ho-Oh', 'Hoopa-Unbound', 'Kangaskhan-Mega', 'Kyogre', 'Kyurem-White',
|
|
2901
|
+
'Aegislash', 'Altaria-Mega', 'Arceus', 'Blaziken', 'Darkrai', 'Deoxys-Base', 'Deoxys-Attack', 'Deoxys-Speed', 'Dialga', 'Genesect',
|
|
2902
|
+
'Gengar-Mega', 'Giratina', 'Giratina-Origin', 'Greninja', 'Groudon', 'Ho-Oh', 'Hoopa-Unbound', 'Kangaskhan-Mega', 'Kyogre', 'Kyurem-White',
|
|
2922
2903
|
'Lucario-Mega', 'Lugia', 'Mawile-Mega', 'Medicham-Mega', 'Metagross-Mega', 'Mewtwo', 'Palkia', 'Rayquaza', 'Reshiram', 'Sableye-Mega',
|
|
2923
2904
|
'Salamence-Mega', 'Shaymin-Sky', 'Slowbro-Mega', 'Talonflame', 'Xerneas', 'Yveltal', 'Zekrom',
|
|
2924
2905
|
'Shadow Tag', 'Bright Powder', 'Damp Rock', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw', 'Razor Fang', 'Smooth Rock',
|
|
@@ -2941,8 +2922,8 @@ exports.Formats = [
|
|
|
2941
2922
|
banlist: [
|
|
2942
2923
|
'Arceus', 'Blaziken', 'Darkrai', 'Deoxys-Base', 'Deoxys-Attack', 'Deoxys-Defense', 'Dialga', 'Giratina',
|
|
2943
2924
|
'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kangaskhan-Mega', 'Kyogre', 'Kyurem-White', 'Lugia', 'Mewtwo',
|
|
2944
|
-
'Palkia', 'Rayquaza', 'Reshiram', 'Salamence-Mega', 'Shaymin-Sky', '
|
|
2945
|
-
'Focus Sash', 'Soul Dew', 'Grass Whistle', 'Hypnosis', 'Perish Song', 'Sing', 'Yawn',
|
|
2925
|
+
'Palkia', 'Rayquaza', 'Reshiram', 'Salamence-Mega', 'Shaymin-Sky', 'Snorlax', 'Xerneas', 'Yveltal',
|
|
2926
|
+
'Zekrom', 'Focus Sash', 'Soul Dew', 'Grass Whistle', 'Hypnosis', 'Perish Song', 'Sing', 'Yawn',
|
|
2946
2927
|
],
|
|
2947
2928
|
},
|
|
2948
2929
|
{
|
|
@@ -3378,11 +3359,11 @@ exports.Formats = [
|
|
|
3378
3359
|
searchShow: false,
|
|
3379
3360
|
ruleset: ['[Gen 4] PU'],
|
|
3380
3361
|
banlist: [
|
|
3381
|
-
'Ampharos', 'Armaldo', 'Bellossom', 'Dragonair', 'Gabite', 'Gastrodon', 'Glaceon', 'Glalie',
|
|
3382
|
-
'Gorebyss', 'Hippopotas', 'Kadabra', 'Machoke', 'Magmar', 'Mantine', 'Marowak', 'Metang',
|
|
3383
|
-
'Monferno', 'Mr. Mime', 'Muk', 'Murkrow', 'Pinsir', 'Politoed', 'Purugly', 'Quagsire',
|
|
3384
|
-
'Rampardos', 'Rapidash', 'Regigigas', 'Relicanth', 'Rhydon', 'Scyther', 'Sneasel', 'Snover',
|
|
3385
|
-
'Tangela', 'Torkoal', 'Victreebel', 'Xatu', 'Zangoose', 'Damp Rock',
|
|
3362
|
+
'Ampharos', 'Armaldo', 'Bellossom', 'Dragonair', 'Electabuzz', 'Gabite', 'Gastrodon', 'Glaceon', 'Glalie',
|
|
3363
|
+
'Golduck', 'Gorebyss', 'Hippopotas', 'Kadabra', 'Machoke', 'Magmar', 'Mantine', 'Marowak', 'Metang',
|
|
3364
|
+
'Misdreavus', 'Monferno', 'Mr. Mime', 'Muk', 'Murkrow', 'Pinsir', 'Politoed', 'Purugly', 'Quagsire',
|
|
3365
|
+
'Raichu', 'Rampardos', 'Rapidash', 'Regigigas', 'Relicanth', 'Rhydon', 'Scyther', 'Sneasel', 'Snover',
|
|
3366
|
+
'Solrock', 'Tangela', 'Torkoal', 'Victreebel', 'Xatu', 'Zangoose', 'Damp Rock',
|
|
3386
3367
|
],
|
|
3387
3368
|
},
|
|
3388
3369
|
{
|