@pkmn/sim 0.5.15 → 0.5.18

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.
Files changed (80) hide show
  1. package/build/config/formats.js +39 -57
  2. package/build/config/formats.js.map +1 -1
  3. package/build/data/formats-data.js +1 -1
  4. package/build/data/formats-data.js.map +1 -1
  5. package/build/data/items.js +1 -3
  6. package/build/data/items.js.map +1 -1
  7. package/build/data/learnsets.js +2 -2
  8. package/build/data/learnsets.js.map +1 -1
  9. package/build/data/mods/gen1/formats-data.js +1 -1
  10. package/build/data/mods/gen1/formats-data.js.map +1 -1
  11. package/build/data/mods/gen1/moves.js +1 -4
  12. package/build/data/mods/gen1/moves.js.map +1 -1
  13. package/build/data/mods/gen2/moves.js +0 -3
  14. package/build/data/mods/gen2/moves.js.map +1 -1
  15. package/build/data/mods/gen3/moves.js +0 -10
  16. package/build/data/mods/gen3/moves.js.map +1 -1
  17. package/build/data/mods/gen3/scripts.js +2 -2
  18. package/build/data/mods/gen3/scripts.js.map +1 -1
  19. package/build/data/mods/gen4/moves.js +4 -5
  20. package/build/data/mods/gen4/moves.js.map +1 -1
  21. package/build/data/mods/gen4/rulesets.js +2 -1
  22. package/build/data/mods/gen4/rulesets.js.map +1 -1
  23. package/build/data/mods/gen5/rulesets.js +2 -1
  24. package/build/data/mods/gen5/rulesets.js.map +1 -1
  25. package/build/data/mods/gen7/formats-data.js +4 -4
  26. package/build/data/mods/gen7/formats-data.js.map +1 -1
  27. package/build/data/mods/gen7/rulesets.js +2 -1
  28. package/build/data/mods/gen7/rulesets.js.map +1 -1
  29. package/build/data/moves.js +59 -79
  30. package/build/data/moves.js.map +1 -1
  31. package/build/data/pokedex.js +2 -2
  32. package/build/data/pokedex.js.map +1 -1
  33. package/build/data/rulesets.js +3 -4
  34. package/build/data/rulesets.js.map +1 -1
  35. package/build/data/text/items.js +1 -0
  36. package/build/data/text/items.js.map +1 -1
  37. package/build/data/text/moves.js +5 -3
  38. package/build/data/text/moves.js.map +1 -1
  39. package/build/sim/battle-actions.js +12 -4
  40. package/build/sim/battle-actions.js.map +1 -1
  41. package/build/sim/battle.js +43 -5
  42. package/build/sim/battle.js.map +1 -1
  43. package/build/sim/dex-conditions.d.ts +1 -0
  44. package/build/sim/dex-conditions.js.map +1 -1
  45. package/build/sim/dex-moves.d.ts +1 -1
  46. package/build/sim/exported-global-types.d.ts +1 -0
  47. package/build/sim/global-types.d.ts +1 -0
  48. package/build/sim/team-validator.js +15 -4
  49. package/build/sim/team-validator.js.map +1 -1
  50. package/build/sim/tools/exhaustive-runner.d.ts +9 -0
  51. package/build/sim/tools/exhaustive-runner.js +18 -7
  52. package/build/sim/tools/exhaustive-runner.js.map +1 -1
  53. package/config/formats.ts +39 -57
  54. package/data/formats-data.ts +1 -1
  55. package/data/items.ts +1 -3
  56. package/data/learnsets.ts +2 -2
  57. package/data/mods/gen1/formats-data.ts +1 -1
  58. package/data/mods/gen1/moves.ts +1 -4
  59. package/data/mods/gen2/moves.ts +0 -3
  60. package/data/mods/gen3/moves.ts +0 -10
  61. package/data/mods/gen3/scripts.ts +3 -3
  62. package/data/mods/gen4/moves.ts +3 -5
  63. package/data/mods/gen4/rulesets.ts +2 -1
  64. package/data/mods/gen5/rulesets.ts +2 -1
  65. package/data/mods/gen7/formats-data.ts +4 -4
  66. package/data/mods/gen7/rulesets.ts +2 -1
  67. package/data/moves.ts +59 -70
  68. package/data/pokedex.ts +2 -2
  69. package/data/rulesets.ts +3 -6
  70. package/data/text/items.ts +2 -0
  71. package/data/text/moves.ts +6 -3
  72. package/package.json +1 -1
  73. package/sim/battle-actions.ts +16 -5
  74. package/sim/battle.ts +42 -5
  75. package/sim/dex-conditions.ts +1 -0
  76. package/sim/dex-moves.ts +1 -1
  77. package/sim/exported-global-types.ts +3 -0
  78. package/sim/global-types.ts +3 -0
  79. package/sim/team-validator.ts +16 -4
  80. package/sim/tools/exhaustive-runner.ts +30 -11
@@ -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', 'Vulpix-Alola', 'Ally Switch'],
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",
@@ -579,11 +579,12 @@ exports.Formats = [
579
579
  ruleset: ['Standard', 'Crazyhouse Rule', 'Dynamax Clause', 'Sleep Moves Clause', 'Evasion Abilities Clause', '!Sleep Clause Mod'],
580
580
  banlist: [
581
581
  'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
582
- 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna',
583
- 'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram',
584
- 'Solgaleo', 'Spectrier', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned',
585
- 'Zekrom', 'Zygarde-Base', 'Arena Trap', 'Moody', 'Power Construct', 'Shadow Tag', 'Bright Powder', 'King\'s Rock', 'Lax Incense',
586
- 'Baton Pass', 'Explosion', 'Final Gambit', 'Misty Explosion', 'Self-Destruct',
582
+ 'Giratina-Origin', 'Groudon', 'Hawlucha', 'Ho-Oh', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia',
583
+ 'Lunala', 'Magearna', 'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa',
584
+ 'Rayquaza', 'Reshiram', 'Solgaleo', 'Spectrier', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta',
585
+ 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base', 'Arena Trap', 'Moody', 'Power Construct', 'Shadow Tag', 'Bright Powder',
586
+ 'King\'s Rock', 'Lax Incense', 'Baton Pass', 'Explosion', 'Final Gambit', 'Healing Wish', 'Lunar Dance', 'Memento',
587
+ 'Misty Explosion', 'Self-Destruct',
587
588
  ],
588
589
  },
589
590
  {
@@ -595,17 +596,18 @@ exports.Formats = [
595
596
  mod: 'pokebilities',
596
597
  ruleset: ['[Gen 8] Pokebilities', '!Obtainable Abilities', 'AAA Restricted Abilities', '2 Ability Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
597
598
  banlist: [
598
- 'Blacephalon', 'Buzzwole', 'Clefable', 'Dragapult', 'Dragonite', 'Kartana', 'Melmetal', 'Noivern', 'Pangoro', 'Perrserker', 'Rillaboom',
599
- 'Tapu Lele', 'Urshifu', 'Urshifu-Rapid-Strike', 'Victini', 'Zamazenta-Crowned', 'Arena Trap', 'Moody', 'Shadow Tag', 'Wonder Guard',
600
- 'Chlorophyll + Desolate Land', 'Chlorophyll + Drought', 'Regenerator + Emergency Exit', 'Regenerator + Multiscale', 'Regenerator + Shadow Shield',
601
- 'Regenerator + Wimp Out', 'Sand Rush + Sand Stream', 'Slush Rush + Snow Warning', 'Swift Swim + Drizzle', 'Swift Swim + Primordial Sea',
602
- 'Regenerator > 2',
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',
603
605
  ],
604
- unbanlist: ['Dracozolt'],
605
606
  restricted: [
606
607
  'Comatose', 'Contrary', 'Fluffy', 'Fur Coat', 'Gorilla Tactics', 'Huge Power', 'Ice Scales', 'Illusion', 'Imposter', 'Innards Out',
607
- 'Intrepid Sword', 'Libero', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Prankster', 'Protean', 'Pure Power', 'Simple', 'Stakeout',
608
- 'Speed Boost', 'Tinted Lens', 'Water Bubble',
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',
609
611
  ],
610
612
  },
611
613
  // Other Metagames
@@ -630,25 +632,6 @@ exports.Formats = [
630
632
  'Water Bubble', 'Wonder Guard', 'Comatose + Sleep Talk', 'Rusted Sword', 'Court Change', 'Bolt Beak', 'Double Iron Bash',
631
633
  'Octolock', 'Shell Smash',
632
634
  ],
633
- onChangeSet(set) {
634
- const item = this.dex.toID(set.item);
635
- if (set.species === 'Zacian' && item === 'rustedsword') {
636
- set.species = 'Zacian-Crowned';
637
- set.ability = 'Intrepid Sword';
638
- const ironHead = set.moves.indexOf('ironhead');
639
- if (ironHead >= 0) {
640
- set.moves[ironHead] = 'behemothblade';
641
- }
642
- }
643
- if (set.species === 'Zamazenta' && item === 'rustedshield') {
644
- set.species = 'Zamazenta-Crowned';
645
- set.ability = 'Dauntless Shield';
646
- const ironHead = set.moves.indexOf('ironhead');
647
- if (ironHead >= 0) {
648
- set.moves[ironHead] = 'behemothbash';
649
- }
650
- }
651
- },
652
635
  },
653
636
  {
654
637
  name: "[Gen 8] Almost Any Ability",
@@ -669,15 +652,6 @@ exports.Formats = [
669
652
  'Innards Out', 'Intrepid Sword', 'Libero', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Protean',
670
653
  'Pure Power', 'Shadow Tag', 'Simple', 'Stakeout', 'Speed Boost', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
671
654
  ],
672
- onValidateSet(set) {
673
- // Temporary fix until battle-only is implemented properly
674
- if (this.toID(set.species) === 'zamazentacrowned' && this.toID(set.ability) !== 'dauntlessshield') {
675
- return [`Zamazenta-Crowned can only use Dauntless Shield because it is a battle-only forme.`];
676
- }
677
- if (this.toID(set.species) === 'zaciancrowned' && this.toID(set.ability) !== 'intrepidsword') {
678
- return [`Zacian-Crowned can only use Intrepid Sword because it is a battle-only forme.`];
679
- }
680
- },
681
655
  },
682
656
  {
683
657
  name: "[Gen 8] Mix and Mega",
@@ -849,9 +823,6 @@ exports.Formats = [
849
823
  const stat = Dex.stats.ids()[target.side.team.indexOf(target.set)];
850
824
  const newSpecies = this.dex.deepClone(species);
851
825
  let godSpecies = this.dex.species.get(god.species);
852
- if (godSpecies.forme === 'Crowned') {
853
- godSpecies = this.dex.species.get(godSpecies.changesFrom || godSpecies.baseSpecies);
854
- }
855
826
  if (typeof godSpecies.battleOnly === 'string') {
856
827
  godSpecies = this.dex.species.get(godSpecies.battleOnly);
857
828
  }
@@ -1722,6 +1693,17 @@ exports.Formats = [
1722
1693
  }
1723
1694
  }
1724
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
+ },
1725
1707
  onAfterMega(pokemon) {
1726
1708
  for (const innate of Object.keys(pokemon.volatiles).filter(i => i.startsWith('ability:'))) {
1727
1709
  pokemon.removeVolatile(innate);
@@ -2419,7 +2401,7 @@ exports.Formats = [
2419
2401
  ],
2420
2402
  mod: 'gen3',
2421
2403
  ruleset: ['Standard', 'One Boost Passer Clause'],
2422
- 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'],
2423
2405
  },
2424
2406
  {
2425
2407
  name: "[Gen 2] OU",
@@ -2558,7 +2540,7 @@ exports.Formats = [
2558
2540
  name: "[Gen 6] Pure Hackmons",
2559
2541
  desc: `Anything that can be hacked in-game and is usable in local battles is allowed.`,
2560
2542
  threads: [
2561
- `&bullet; <a href="https://www.smogon.com/forums/posts/8111004/">ORAS Pure Hackmons</a>`,
2543
+ `&bullet; <a href="https://www.smogon.com/forums/posts/9029427/">ORAS Pure Hackmons</a>`,
2562
2544
  ],
2563
2545
  mod: 'gen6',
2564
2546
  ruleset: ['-Nonexistent', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Endless Battle Clause', 'EV limit = 510'],
@@ -2916,8 +2898,8 @@ exports.Formats = [
2916
2898
  searchShow: false,
2917
2899
  ruleset: ['Standard', 'Swagger Clause', 'Same Type Clause'],
2918
2900
  banlist: [
2919
- 'Aegislash', 'Altaria-Mega', 'Arceus', 'Blaziken', 'Darkrai', 'Deoxys-Base', 'Deoxys-Attack', 'Dialga', 'Genesect', 'Gengar-Mega',
2920
- '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',
2921
2903
  'Lucario-Mega', 'Lugia', 'Mawile-Mega', 'Medicham-Mega', 'Metagross-Mega', 'Mewtwo', 'Palkia', 'Rayquaza', 'Reshiram', 'Sableye-Mega',
2922
2904
  'Salamence-Mega', 'Shaymin-Sky', 'Slowbro-Mega', 'Talonflame', 'Xerneas', 'Yveltal', 'Zekrom',
2923
2905
  'Shadow Tag', 'Bright Powder', 'Damp Rock', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw', 'Razor Fang', 'Smooth Rock',
@@ -2940,8 +2922,8 @@ exports.Formats = [
2940
2922
  banlist: [
2941
2923
  'Arceus', 'Blaziken', 'Darkrai', 'Deoxys-Base', 'Deoxys-Attack', 'Deoxys-Defense', 'Dialga', 'Giratina',
2942
2924
  'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kangaskhan-Mega', 'Kyogre', 'Kyurem-White', 'Lugia', 'Mewtwo',
2943
- 'Palkia', 'Rayquaza', 'Reshiram', 'Salamence-Mega', 'Shaymin-Sky', 'Xerneas', 'Yveltal', 'Zekrom',
2944
- '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',
2945
2927
  ],
2946
2928
  },
2947
2929
  {
@@ -3377,11 +3359,11 @@ exports.Formats = [
3377
3359
  searchShow: false,
3378
3360
  ruleset: ['[Gen 4] PU'],
3379
3361
  banlist: [
3380
- 'Ampharos', 'Armaldo', 'Bellossom', 'Dragonair', 'Gabite', 'Gastrodon', 'Glaceon', 'Glalie', 'Golduck',
3381
- 'Gorebyss', 'Hippopotas', 'Kadabra', 'Machoke', 'Magmar', 'Mantine', 'Marowak', 'Metang', 'Misdreavus',
3382
- 'Monferno', 'Mr. Mime', 'Muk', 'Murkrow', 'Pinsir', 'Politoed', 'Purugly', 'Quagsire', 'Raichu',
3383
- 'Rampardos', 'Rapidash', 'Regigigas', 'Relicanth', 'Rhydon', 'Scyther', 'Sneasel', 'Snover', 'Solrock',
3384
- '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',
3385
3367
  ],
3386
3368
  },
3387
3369
  {