@pkmn/sim 0.5.28 → 0.6.2

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 (53) hide show
  1. package/README.md +3 -2
  2. package/build/config/formats.js +72 -105
  3. package/build/config/formats.js.map +1 -1
  4. package/build/data/abilities.js +4 -0
  5. package/build/data/abilities.js.map +1 -1
  6. package/build/data/aliases.js +2 -2
  7. package/build/data/aliases.js.map +1 -1
  8. package/build/data/formats-data.js +111 -115
  9. package/build/data/formats-data.js.map +1 -1
  10. package/build/data/items.js +7 -1
  11. package/build/data/items.js.map +1 -1
  12. package/build/data/learnsets.js +3 -2
  13. package/build/data/learnsets.js.map +1 -1
  14. package/build/data/mods/gen1/moves.js +0 -10
  15. package/build/data/mods/gen1/moves.js.map +1 -1
  16. package/build/data/mods/gen1/scripts.js +15 -14
  17. package/build/data/mods/gen1/scripts.js.map +1 -1
  18. package/build/data/mods/gen2/formats-data.js +2 -2
  19. package/build/data/mods/gen2/formats-data.js.map +1 -1
  20. package/build/data/mods/gen2/moves.js +0 -1
  21. package/build/data/mods/gen2/moves.js.map +1 -1
  22. package/build/data/moves.js +44 -25
  23. package/build/data/moves.js.map +1 -1
  24. package/build/data/pokedex.js +1 -1
  25. package/build/sim/dex-conditions.d.ts +1 -0
  26. package/build/sim/dex-conditions.js.map +1 -1
  27. package/build/sim/dex.js +2 -2
  28. package/build/sim/dex.js.map +1 -1
  29. package/build/sim/field.js +1 -0
  30. package/build/sim/field.js.map +1 -1
  31. package/build/sim/pokemon.js +2 -10
  32. package/build/sim/pokemon.js.map +1 -1
  33. package/build/sim/team-validator.d.ts +2 -2
  34. package/build/sim/team-validator.js +19 -14
  35. package/build/sim/team-validator.js.map +1 -1
  36. package/config/formats.ts +75 -110
  37. package/data/abilities.ts +4 -0
  38. package/data/aliases.ts +2 -2
  39. package/data/formats-data.ts +111 -115
  40. package/data/items.ts +7 -1
  41. package/data/learnsets.ts +3 -2
  42. package/data/mods/gen1/moves.ts +0 -10
  43. package/data/mods/gen1/scripts.ts +14 -14
  44. package/data/mods/gen2/formats-data.ts +2 -2
  45. package/data/mods/gen2/moves.ts +0 -1
  46. package/data/moves.ts +43 -23
  47. package/data/pokedex.ts +1 -1
  48. package/package.json +3 -3
  49. package/sim/dex-conditions.ts +1 -0
  50. package/sim/dex.ts +1 -1
  51. package/sim/field.ts +1 -0
  52. package/sim/pokemon.ts +1 -8
  53. package/sim/team-validator.ts +27 -15
package/README.md CHANGED
@@ -94,8 +94,9 @@ Pokémon Showdown's `sim/` directory has been modified in the following ways:
94
94
  with Pokémon Showdown, but after that only the canconical `genN` mods are supported (no Stadium,
95
95
  Let's Go, or pet mods). However, the [`@pkmn/mods`](../mods) package provides the information
96
96
  required for additional formats, and support for Other Metagames can be acheived with the modified
97
- `Dex#mod` method. The `Dex#mod` method will `throw` if an unsupported mod is requested. A
98
- `Dex#modid` method has also been added which returns the current mod applied to the `Dex`.
97
+ `Dex#mod` method. The `Dex#mod` and `Dex.forGen` methods will `throw` if an unsupported mod/gen is
98
+ requested. A `Dex#modid` method has also been added which returns the current mod applied to the
99
+ `Dex`.
99
100
  - **random battles are not supported by the `@pkmn/sim` package**. All team generation logic and
100
101
  data has been removed from the package and are instead to be provided by the
101
102
  [`@pkmn/randoms`](../randoms) package which exports a generator factory that can be configured
@@ -263,26 +263,16 @@ exports.Formats = [
263
263
  {
264
264
  name: "[Gen 8] Battle Stadium Singles",
265
265
  mod: 'gen8',
266
- ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8'],
267
- banlist: ['Eternatus-Eternamax'],
268
- unbanlist: ['Mythical', 'Restricted Legendary'],
266
+ ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer', 'Limit Two Restricted'],
267
+ restricted: ['Restricted Legendary'],
269
268
  },
270
269
  {
271
- name: "[Gen 8] Champion League",
272
- threads: [
273
- `&bullet; <a href="https://www.smogon.com/forums/threads/3707533/">Champion League Discussion</a>`,
274
- ],
270
+ name: "[Gen 8] Battle Stadium Singles Series 13",
275
271
  mod: 'gen8',
272
+ searchShow: false,
276
273
  ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8'],
277
- banlist: ['All Pokemon'],
278
- unbanlist: [
279
- 'Venusaur', 'Charizard', 'Blastoise', 'Sandslash-Base', 'Ninetales-Base', 'Arcanine', 'Alakazam', 'Tentacruel', 'Magneton', 'Cloyster',
280
- 'Exeggutor-Base', 'Rhydon', 'Gyarados', 'Lapras', 'Vaporeon', 'Jolteon', 'Flareon', 'Aerodactyl', 'Dragonite', 'Heracross', 'Skarmory',
281
- 'Tyranitar', 'Ludicolo', 'Gardevoir', 'Aggron', 'Wailord', 'Altaria', 'Whiscash', 'Claydol', 'Cradily', 'Armaldo', 'Milotic', 'Salamence',
282
- 'Metagross', 'Roserade', 'Gastrodon', 'Spiritomb', 'Garchomp', 'Lucario', 'Rhyperior', 'Togekiss', 'Seismitoad', 'Archeops',
283
- 'Vanilluxe', 'Escavalier', 'Haxorus', 'Accelgor', 'Druddigon', 'Bouffalant', 'Hydreigon', 'Volcarona', 'Aegislash', 'Tyrantrum',
284
- 'Aurorus', 'Hawlucha', 'Carbink', 'Goodra', 'Gourgeist', 'Rillaboom', 'Cinderace', 'Inteleon', 'Mr. Rime', 'Dragapult',
285
- ],
274
+ banlist: ['Eternatus-Eternamax'],
275
+ unbanlist: ['Mythical', 'Restricted Legendary'],
286
276
  },
287
277
  {
288
278
  name: "[Gen 8] Custom Game",
@@ -363,6 +353,7 @@ exports.Formats = [
363
353
  {
364
354
  name: "[Gen 8] Battle Stadium Doubles Series 13",
365
355
  mod: 'gen8',
356
+ searchShow: false,
366
357
  gameType: 'doubles',
367
358
  ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer'],
368
359
  banlist: ['Eternatus-Eternamax'],
@@ -598,37 +589,13 @@ exports.Formats = [
598
589
  column: 2,
599
590
  },
600
591
  {
601
- name: "[Gen 8] Revelationmons",
602
- desc: `The moves in the first slot(s) of a Pok&eacute;mon's set have their types changed to match the Pok&eacute;mon's type(s).`,
603
- threads: [
604
- `&bullet; <a href="https://www.smogon.com/forums/threads/3692297/">Revelationmons</a>`,
605
- ],
606
- mod: 'gen8',
607
- ruleset: ['Standard OMs', 'Revelationmons Mod', 'Sleep Moves Clause'],
608
- banlist: [
609
- 'Blacephalon', 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragonite', 'Dragapult', 'Eternatus',
610
- 'Genesect', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kingdra', 'Kommo-o', 'Kyogre', 'Kyurem-Black', 'Kyurem-White',
611
- 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane',
612
- 'Noivern', 'Palkia', 'Pheromosa', 'Polteageist', 'Rayquaza', 'Reshiram', 'Solgaleo', 'Spectrier', 'Thundurus-Therian', 'Urshifu-Base',
613
- 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base', 'Arena Trap', 'Magnet Pull',
614
- 'Moody', 'Power Construct', 'Shadow Tag', 'King\'s Rock', 'Baton Pass',
615
- ],
616
- restricted: ['Bolt Beak', 'Close Combat', 'U-turn', 'Volt Switch'],
617
- },
618
- {
619
- name: "[Gen 8] Tag Team Singles",
620
- desc: `Bring four Pok&eacute;mon to Team Preview and choose two to battle in a singles battle.`,
592
+ name: "[Gen 8] Pure Hackmons",
593
+ desc: `Anything directly hackable onto a set (EVs, IVs, forme, ability, item, and move) and is usable in local battles is allowed.`,
621
594
  threads: [
622
- `&bullet; <a href="https://www.smogon.com/forums/threads/3705415/">Tag Team Singles</a>`,
595
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3656851/">Pure Hackmons</a>`,
623
596
  ],
624
597
  mod: 'gen8',
625
- ruleset: ['Picked Team Size = 2', 'Max Team Size = 4', 'Standard OMs', 'Sleep Moves Clause', 'Evasion Abilities Clause'],
626
- banlist: [
627
- 'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Dialga', 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black',
628
- 'Kyurem-White', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia',
629
- 'Rayquaza', 'Reshiram', 'Solgaleo', 'Spectrier', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned',
630
- 'Zekrom', 'Moody', 'Power Construct', 'Bright Powder', 'Focus Sash', 'King\'s Rock', 'Lax Incense', 'Final Gambit',
631
- ],
598
+ ruleset: ['-Nonexistent', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Endless Battle Clause'],
632
599
  },
633
600
  // Other Metagames
634
601
  ///////////////////////////////////////////////////////////////////
@@ -638,7 +605,7 @@ exports.Formats = [
638
605
  },
639
606
  {
640
607
  name: "[Gen 8] Balanced Hackmons",
641
- desc: `Anything that can be hacked in-game and is usable in local battles is allowed.`,
608
+ desc: `Anything directly hackable onto a set (EVs, IVs, forme, ability, item, and move) and is usable in local battles is allowed.`,
642
609
  threads: [
643
610
  `&bullet; <a href="https://www.smogon.com/forums/threads/3656408/">Balanced Hackmons</a>`,
644
611
  `&bullet; <a href="https://www.smogon.com/forums/threads/3659817/">BH Resources</a>`,
@@ -1842,16 +1809,6 @@ exports.Formats = [
1842
1809
  pokemon.m.innates = undefined;
1843
1810
  },
1844
1811
  },
1845
- {
1846
- name: "[Gen 8] Pure Hackmons",
1847
- desc: `Anything that can be hacked in-game and is usable in local battles is allowed.`,
1848
- threads: [
1849
- `&bullet; <a href="https://www.smogon.com/forums/threads/3656851/">Pure Hackmons</a>`,
1850
- ],
1851
- mod: 'gen8',
1852
- searchShow: false,
1853
- ruleset: ['-Nonexistent', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Endless Battle Clause'],
1854
- },
1855
1812
  {
1856
1813
  name: "[Gen 8] Shared Power",
1857
1814
  desc: `Once a Pok&eacute;mon switches in, its ability is shared with the rest of the team.`,
@@ -1916,6 +1873,22 @@ exports.Formats = [
1916
1873
  }
1917
1874
  },
1918
1875
  },
1876
+ {
1877
+ name: "[Gen 8] Tag Team Singles",
1878
+ desc: `Bring four Pok&eacute;mon to Team Preview and choose two to battle in a singles battle.`,
1879
+ threads: [
1880
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3705415/">Tag Team Singles</a>`,
1881
+ ],
1882
+ mod: 'gen8',
1883
+ searchShow: false,
1884
+ ruleset: ['Picked Team Size = 2', 'Max Team Size = 4', 'Standard OMs', 'Sleep Moves Clause', 'Evasion Abilities Clause'],
1885
+ banlist: [
1886
+ 'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Dialga', 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black',
1887
+ 'Kyurem-White', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia',
1888
+ 'Rayquaza', 'Reshiram', 'Solgaleo', 'Spectrier', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned',
1889
+ 'Zekrom', 'Moody', 'Power Construct', 'Bright Powder', 'Focus Sash', 'King\'s Rock', 'Lax Incense', 'Final Gambit',
1890
+ ],
1891
+ },
1919
1892
  {
1920
1893
  name: "[Gen 8] Trademarked",
1921
1894
  desc: `Sacrifice your Pok&eacute;mon's ability for a status move that activates on switch-in.`,
@@ -2488,31 +2461,36 @@ exports.Formats = [
2488
2461
  column: 3,
2489
2462
  },
2490
2463
  {
2491
- name: "[Gen 5] Ubers",
2464
+ name: "[Gen 6] Ubers",
2492
2465
  threads: [
2493
- `&bullet; <a href="https://www.smogon.com/forums/posts/8286278/">BW2 Ubers</a>`,
2466
+ `&bullet; <a href="https://www.smogon.com/forums/posts/8286277/">ORAS Ubers</a>`,
2494
2467
  ],
2495
- mod: 'gen5',
2468
+ mod: 'gen6',
2496
2469
  // searchShow: false,
2497
- ruleset: ['Standard', 'Sleep Clause Mod'],
2470
+ ruleset: ['Standard', 'Swagger Clause', 'Mega Rayquaza Clause'],
2498
2471
  },
2499
2472
  {
2500
- name: "[Gen 7] PU",
2473
+ name: "[Gen 3] Doubles OU",
2501
2474
  threads: [
2502
- `&bullet; <a href="https://www.smogon.com/forums/threads/3611496/">USM PU Sample Teams</a>`,
2503
- `&bullet; <a href="https://www.smogon.com/forums/threads/3614892/">USM PU Viability Rankings</a>`,
2475
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3666831/">ADV Doubles OU</a>`,
2504
2476
  ],
2505
- mod: 'gen7',
2477
+ mod: 'gen3',
2506
2478
  // searchShow: false,
2507
- ruleset: ['[Gen 7] NU'],
2508
- banlist: ['NU', 'PUBL'],
2479
+ gameType: 'doubles',
2480
+ ruleset: ['Standard', '!Sleep Clause Mod', '!Switch Priority Clause Mod'],
2481
+ banlist: ['Uber'],
2482
+ unbanlist: ['Deoxys-Speed', 'Wobbuffet', 'Wynaut'],
2509
2483
  },
2510
2484
  {
2511
- name: "[Gen 2] UUBL",
2512
- threads: [`&bullet; <a href="https://www.smogon.com/forums/threads/3662389/">GSC UUBL</a>`],
2513
- mod: 'gen2',
2514
- ruleset: ['[Gen 2] OU'],
2515
- banlist: ['OU'],
2485
+ name: "[Gen 3] UU",
2486
+ threads: [
2487
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3585923/">ADV UU Metagame Discussion</a>`,
2488
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3548578/">ADV UU Viability Rankings</a>`,
2489
+ ],
2490
+ mod: 'gen3',
2491
+ // searchShow: false,
2492
+ ruleset: ['Standard'],
2493
+ banlist: ['Uber', 'OU', 'UUBL', 'Smeargle + Ingrain', 'Arena Trap', 'Baton Pass', 'Swagger'],
2516
2494
  },
2517
2495
  // Past Gens OU
2518
2496
  ///////////////////////////////////////////////////////////////////
@@ -2601,7 +2579,7 @@ exports.Formats = [
2601
2579
  },
2602
2580
  {
2603
2581
  name: "[Gen 7] Balanced Hackmons",
2604
- desc: `Anything that can be hacked in-game and is usable in local battles is allowed.`,
2582
+ desc: `Anything directly hackable onto a set (EVs, IVs, forme, ability, item, and move) and is usable in local battles is allowed.`,
2605
2583
  threads: [
2606
2584
  `&bullet; <a href="https://www.smogon.com/forums/posts/8407209/">USM Balanced Hackmons</a>`,
2607
2585
  ],
@@ -2765,6 +2743,17 @@ exports.Formats = [
2765
2743
  ruleset: ['[Gen 7] RU'],
2766
2744
  banlist: ['RU', 'NUBL', 'Drought'],
2767
2745
  },
2746
+ {
2747
+ name: "[Gen 7] PU",
2748
+ threads: [
2749
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3611496/">USM PU Sample Teams</a>`,
2750
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3614892/">USM PU Viability Rankings</a>`,
2751
+ ],
2752
+ mod: 'gen7',
2753
+ searchShow: false,
2754
+ ruleset: ['[Gen 7] NU'],
2755
+ banlist: ['NU', 'PUBL'],
2756
+ },
2768
2757
  {
2769
2758
  name: "[Gen 7] LC",
2770
2759
  threads: [
@@ -3003,15 +2992,6 @@ exports.Formats = [
3003
2992
  section: "OR/AS Singles",
3004
2993
  column: 4,
3005
2994
  },
3006
- {
3007
- name: "[Gen 6] Ubers",
3008
- threads: [
3009
- `&bullet; <a href="https://www.smogon.com/forums/posts/8286277/">ORAS Ubers</a>`,
3010
- ],
3011
- mod: 'gen6',
3012
- searchShow: false,
3013
- ruleset: ['Standard', 'Swagger Clause', 'Mega Rayquaza Clause'],
3014
- },
3015
2995
  {
3016
2996
  name: "[Gen 6] UU",
3017
2997
  threads: [
@@ -3265,6 +3245,15 @@ exports.Formats = [
3265
3245
  section: "B2/W2 Singles",
3266
3246
  column: 4,
3267
3247
  },
3248
+ {
3249
+ name: "[Gen 5] Ubers",
3250
+ threads: [
3251
+ `&bullet; <a href="https://www.smogon.com/forums/posts/8286278/">BW2 Ubers</a>`,
3252
+ ],
3253
+ mod: 'gen5',
3254
+ searchShow: false,
3255
+ ruleset: ['Standard', 'Sleep Clause Mod'],
3256
+ },
3268
3257
  {
3269
3258
  name: "[Gen 5] UU",
3270
3259
  threads: [
@@ -3614,17 +3603,6 @@ exports.Formats = [
3614
3603
  ruleset: ['Standard', 'Deoxys Camouflage Clause', 'One Baton Pass Clause'],
3615
3604
  banlist: ['Wobbuffet + Leftovers'],
3616
3605
  },
3617
- {
3618
- name: "[Gen 3] UU",
3619
- threads: [
3620
- `&bullet; <a href="https://www.smogon.com/forums/threads/3585923/">ADV UU Metagame Discussion</a>`,
3621
- `&bullet; <a href="https://www.smogon.com/forums/threads/3548578/">ADV UU Viability Rankings</a>`,
3622
- ],
3623
- mod: 'gen3',
3624
- searchShow: false,
3625
- ruleset: ['Standard'],
3626
- banlist: ['Uber', 'OU', 'UUBL', 'Smeargle + Ingrain', 'Arena Trap', 'Baton Pass', 'Swagger'],
3627
- },
3628
3606
  {
3629
3607
  name: "[Gen 3] NU",
3630
3608
  threads: [
@@ -3653,18 +3631,6 @@ exports.Formats = [
3653
3631
  ],
3654
3632
  unbanlist: ['Mr. Mime', 'Wobbuffet', 'Wynaut', 'Sand Veil', 'Soundproof'],
3655
3633
  },
3656
- {
3657
- name: "[Gen 3] Doubles OU",
3658
- threads: [
3659
- `&bullet; <a href="https://www.smogon.com/forums/threads/3666831/">ADV Doubles OU</a>`,
3660
- ],
3661
- mod: 'gen3',
3662
- searchShow: false,
3663
- gameType: 'doubles',
3664
- ruleset: ['Standard', '!Sleep Clause Mod', '!Switch Priority Clause Mod'],
3665
- banlist: ['Uber'],
3666
- unbanlist: ['Deoxys-Speed', 'Wobbuffet', 'Wynaut'],
3667
- },
3668
3634
  {
3669
3635
  name: "[Gen 3] Custom Game",
3670
3636
  mod: 'gen3',
@@ -3696,7 +3662,7 @@ exports.Formats = [
3696
3662
  mod: 'gen2',
3697
3663
  searchShow: false,
3698
3664
  ruleset: ['[Gen 2] OU'],
3699
- banlist: ['OU', 'UUBL'],
3665
+ banlist: ['OU', 'UUBL', 'Agility + Baton Pass'],
3700
3666
  unbanlist: ['Mean Look + Baton Pass', 'Spider Web + Baton Pass'],
3701
3667
  },
3702
3668
  {
@@ -3706,6 +3672,7 @@ exports.Formats = [
3706
3672
  searchShow: false,
3707
3673
  ruleset: ['[Gen 2] UU'],
3708
3674
  banlist: ['UU', 'NUBL'],
3675
+ unbanlist: ['Agility + Baton Pass'],
3709
3676
  },
3710
3677
  {
3711
3678
  name: "[Gen 2] 1v1",
@@ -3776,7 +3743,7 @@ exports.Formats = [
3776
3743
  {
3777
3744
  name: "[Gen 1] NU",
3778
3745
  threads: [
3779
- `&bullet; <a href="https://www.smogon.com/forums/threads/3668913/">RBY NU Viability Rankings</a>`,
3746
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3679758/">RBY NU Metagame Discussion &amp; Resources</a>`,
3780
3747
  ],
3781
3748
  mod: 'gen1',
3782
3749
  searchShow: false,