@pkmn/sim 0.5.21 → 0.5.24

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 (88) hide show
  1. package/LICENSE +1 -1
  2. package/build/config/formats.js +412 -419
  3. package/build/config/formats.js.map +1 -1
  4. package/build/data/abilities.js +1 -3
  5. package/build/data/abilities.js.map +1 -1
  6. package/build/data/aliases.js +4 -4
  7. package/build/data/aliases.js.map +1 -1
  8. package/build/data/conditions.js +5 -2
  9. package/build/data/conditions.js.map +1 -1
  10. package/build/data/formats-data.js +9 -10
  11. package/build/data/formats-data.js.map +1 -1
  12. package/build/data/mods/gen1/conditions.js +3 -0
  13. package/build/data/mods/gen1/conditions.js.map +1 -1
  14. package/build/data/mods/gen1/formats-data.js +1 -1
  15. package/build/data/mods/gen1/formats-data.js.map +1 -1
  16. package/build/data/mods/gen1/moves.js +5 -2
  17. package/build/data/mods/gen1/moves.js.map +1 -1
  18. package/build/data/mods/gen1/scripts.js +4 -2
  19. package/build/data/mods/gen1/scripts.js.map +1 -1
  20. package/build/data/mods/gen2/conditions.js +3 -0
  21. package/build/data/mods/gen2/conditions.js.map +1 -1
  22. package/build/data/mods/gen3/conditions.js +3 -0
  23. package/build/data/mods/gen3/conditions.js.map +1 -1
  24. package/build/data/mods/gen3/formats-data.js +3 -3
  25. package/build/data/mods/gen3/formats-data.js.map +1 -1
  26. package/build/data/mods/gen4/abilities.js +1 -1
  27. package/build/data/mods/gen4/abilities.js.map +1 -1
  28. package/build/data/mods/gen4/conditions.js +3 -0
  29. package/build/data/mods/gen4/conditions.js.map +1 -1
  30. package/build/data/mods/gen4/moves.js +9 -2
  31. package/build/data/mods/gen4/moves.js.map +1 -1
  32. package/build/data/mods/gen5/moves.js +4 -7
  33. package/build/data/mods/gen5/moves.js.map +1 -1
  34. package/build/data/mods/gen5/pokedex.js +24 -0
  35. package/build/data/mods/gen5/pokedex.js.map +1 -1
  36. package/build/data/mods/gen6/formats-data.js +64 -64
  37. package/build/data/mods/gen6/formats-data.js.map +1 -1
  38. package/build/data/mods/gen7/abilities.js +8 -0
  39. package/build/data/mods/gen7/abilities.js.map +1 -1
  40. package/build/data/mods/gen7/moves.js +2 -2
  41. package/build/data/mods/gen7/moves.js.map +1 -1
  42. package/build/data/moves.js +8 -3
  43. package/build/data/moves.js.map +1 -1
  44. package/build/data/pokedex.js +1 -1
  45. package/build/data/rulesets.js +270 -3
  46. package/build/data/rulesets.js.map +1 -1
  47. package/build/lib/utils.d.ts +4 -0
  48. package/build/lib/utils.js +20 -1
  49. package/build/lib/utils.js.map +1 -1
  50. package/build/sim/battle-stream.js +3 -0
  51. package/build/sim/battle-stream.js.map +1 -1
  52. package/build/sim/exported-global-types.d.ts +2 -0
  53. package/build/sim/global-types.d.ts +2 -0
  54. package/build/sim/pokemon.d.ts +1 -0
  55. package/build/sim/pokemon.js +9 -2
  56. package/build/sim/pokemon.js.map +1 -1
  57. package/build/sim/side.js +21 -0
  58. package/build/sim/side.js.map +1 -1
  59. package/config/formats.ts +407 -406
  60. package/data/abilities.ts +1 -3
  61. package/data/aliases.ts +4 -4
  62. package/data/conditions.ts +6 -2
  63. package/data/formats-data.ts +9 -10
  64. package/data/mods/gen1/conditions.ts +4 -0
  65. package/data/mods/gen1/formats-data.ts +1 -1
  66. package/data/mods/gen1/moves.ts +5 -1
  67. package/data/mods/gen1/scripts.ts +3 -2
  68. package/data/mods/gen2/conditions.ts +4 -0
  69. package/data/mods/gen3/conditions.ts +4 -0
  70. package/data/mods/gen3/formats-data.ts +3 -3
  71. package/data/mods/gen4/abilities.ts +1 -1
  72. package/data/mods/gen4/conditions.ts +4 -0
  73. package/data/mods/gen4/moves.ts +9 -2
  74. package/data/mods/gen5/moves.ts +4 -7
  75. package/data/mods/gen5/pokedex.ts +24 -0
  76. package/data/mods/gen6/formats-data.ts +64 -64
  77. package/data/mods/gen7/abilities.ts +8 -0
  78. package/data/mods/gen7/moves.ts +2 -2
  79. package/data/moves.ts +8 -3
  80. package/data/pokedex.ts +1 -1
  81. package/data/rulesets.ts +247 -3
  82. package/lib/utils.ts +16 -0
  83. package/package.json +2 -2
  84. package/sim/battle-stream.ts +3 -0
  85. package/sim/exported-global-types.ts +2 -0
  86. package/sim/global-types.ts +2 -0
  87. package/sim/pokemon.ts +9 -2
  88. package/sim/side.ts +20 -0
@@ -80,10 +80,7 @@ exports.Formats = [
80
80
  ],
81
81
  mod: 'gen8',
82
82
  ruleset: ['Standard', 'Dynamax Clause'],
83
- banlist: [
84
- 'Uber', 'AG', 'Arena Trap', 'Moody', 'Power Construct', 'Sand Veil', 'Shadow Tag', 'Snow Cloak',
85
- 'Bright Powder', 'King\'s Rock', 'Lax Incense', 'Baton Pass',
86
- ],
83
+ banlist: ['Uber', 'AG', 'Arena Trap', 'Moody', 'Power Construct', 'Sand Veil', 'Shadow Tag', 'Snow Cloak', 'King\'s Rock', 'Baton Pass'],
87
84
  },
88
85
  {
89
86
  name: "[Gen 8] OU (Blitz)",
@@ -154,8 +151,8 @@ exports.Formats = [
154
151
  mod: 'gen8',
155
152
  ruleset: ['Little Cup', 'Standard', 'Dynamax Clause'],
156
153
  banlist: [
157
- 'Corsola-Galar', 'Cutiefly', 'Drifloon', 'Gastly', 'Gothita', 'Rufflet', 'Scraggy', 'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Vulpix-Alola', 'Woobat', 'Zigzagoon-Base',
158
- 'Chlorophyll', 'Moody', 'Baton Pass', 'Sticky Web',
154
+ 'Corsola-Galar', 'Cutiefly', 'Drifloon', 'Gastly', 'Gothita', 'Rufflet', 'Scraggy', 'Scyther', 'Sneasel', 'Swirlix',
155
+ 'Tangela', 'Vullaby', 'Vulpix-Alola', 'Woobat', 'Zigzagoon-Base', 'Chlorophyll', 'Moody', 'Baton Pass', 'Sticky Web',
159
156
  ],
160
157
  },
161
158
  {
@@ -172,8 +169,8 @@ exports.Formats = [
172
169
  'Blaziken', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh',
173
170
  'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Mewtwo', 'Naganadel',
174
171
  'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram', 'Solgaleo', 'Urshifu-Base', 'Xerneas', 'Yveltal',
175
- 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base', 'Moody', 'Power Construct', 'Shadow Tag', 'Bright Powder',
176
- 'Damp Rock', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw', 'Smooth Rock', 'Terrain Extender', 'Acupressure', 'Baton Pass',
172
+ 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base', 'Moody', 'Power Construct', 'Shadow Tag', 'Damp Rock',
173
+ 'Focus Band', 'King\'s Rock', 'Quick Claw', 'Smooth Rock', 'Terrain Extender', 'Acupressure', 'Baton Pass',
177
174
  ],
178
175
  },
179
176
  {
@@ -218,8 +215,9 @@ exports.Formats = [
218
215
  mod: 'gen8',
219
216
  ruleset: ['[Gen 8] PU'],
220
217
  banlist: [
221
- 'PU', 'Arctovish', 'Aurorus', 'Basculin', 'Centiskorch', 'Drampa', 'Exeggutor-Alola', 'Gallade', 'Haunter', 'Magmortar', 'Magneton', 'Malamar',
222
- 'Omastar', 'Rotom-Frost', 'Turtonator', 'Vanilluxe', 'Vikavolt', 'Silvally-Dragon', 'Silvally-Ground', 'Sneasel', 'Damp Rock', 'Grassy Seed',
218
+ 'PU', 'Arctovish', 'Aurorus', 'Basculin', 'Centiskorch', 'Drampa', 'Exeggutor-Alola', 'Gallade', 'Haunter', 'Magmortar', 'Magneton',
219
+ 'Malamar', 'Ninjask', 'Omastar', 'Rotom-Frost', 'Turtonator', 'Vanilluxe', 'Vikavolt', 'Silvally-Dragon', 'Silvally-Ground', 'Sneasel',
220
+ 'Damp Rock', 'Grassy Seed',
223
221
  ],
224
222
  },
225
223
  {
@@ -234,7 +232,7 @@ exports.Formats = [
234
232
  // LC OU
235
233
  'Abra', 'Carvanha', 'Diglett-Base', 'Dwebble', 'Ferroseed', 'Foongus', 'Frillish', 'Grookey', 'Koffing',
236
234
  'Larvesta', 'Magby', 'Magnemite', 'Mareanie', 'Mienfoo', 'Mudbray', 'Natu', 'Onix', 'Pawniard',
237
- 'Ponyta-Base', 'Porygon', 'Slowpoke-Base', 'Staryu', 'Timburr', 'Trapinch', 'Tyrunt', 'Vullaby',
235
+ 'Ponyta-Base', 'Porygon', 'Slowpoke-Base', 'Staryu', 'Timburr', 'Trapinch', 'Tyrunt',
238
236
  // LC UUBL
239
237
  'Archen', 'Farfetch\u2019d-Galar', 'Scorbunny', 'Shellder', 'Wingull',
240
238
  ],
@@ -269,12 +267,22 @@ exports.Formats = [
269
267
  restricted: ['Restricted Legendary'],
270
268
  },
271
269
  {
272
- name: "[Gen 8] Single Battle Cup",
270
+ name: "[Gen 8] Battle Stadium Singles Series 13",
271
+ mod: 'gen8',
272
+ searchShow: false,
273
+ ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8'],
274
+ banlist: ['Eternatus-Eternamax'],
275
+ unbanlist: ['Mythical', 'Restricted Legendary'],
276
+ },
277
+ {
278
+ name: "[Gen 8] I Choose 'Chu!",
273
279
  threads: [
274
- `&bullet; <a href="https://www.pokemon.com/us/pokemon-news/register-now-for-the-single-battle-cup-competition/">Single Battle Cup</a>`,
280
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3705481/">I Choose 'Chu! Discussion</a>`,
275
281
  ],
276
282
  mod: 'gen8',
277
283
  ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8'],
284
+ banlist: ['All Pokemon', 'Raichu-Alola + Sing'],
285
+ unbanlist: ['Pichu', 'Pikachu', 'Raichu'],
278
286
  },
279
287
  {
280
288
  name: "[Gen 8] Custom Game",
@@ -352,6 +360,15 @@ exports.Formats = [
352
360
  ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer', 'Limit Two Restricted'],
353
361
  restricted: ['Restricted Legendary'],
354
362
  },
363
+ {
364
+ name: "[Gen 8] Battle Stadium Doubles Series 13",
365
+ mod: 'gen8',
366
+ gameType: 'doubles',
367
+ searchShow: false,
368
+ ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer'],
369
+ banlist: ['Eternatus-Eternamax'],
370
+ unbanlist: ['Mythical', 'Restricted Legendary'],
371
+ },
355
372
  {
356
373
  name: "[Gen 8] VGC 2021",
357
374
  mod: 'gen8',
@@ -578,271 +595,33 @@ exports.Formats = [
578
595
  column: 2,
579
596
  },
580
597
  {
581
- name: "[Gen 8] Broken Record",
582
- desc: `Pok&eacute;mon can hold a TR to use that move in battle.`,
598
+ name: "[Gen 8] Re-Evolution",
599
+ desc: `Pok&eacute;mon gain the stat changes they would gain from evolving again.`,
583
600
  threads: [
584
- `&bullet; <a href="https://www.smogon.com/forums/threads/3701270/">Broken Record</a>`,
601
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3703643/">Re-Evolution</a>`,
585
602
  ],
586
603
  mod: 'gen8',
587
- ruleset: ['Standard', '!Sleep Clause Mod', 'Sleep Moves Clause', 'Dynamax Clause'],
604
+ ruleset: ['Standard OMs', 'Re-Evolution Mod', 'Evasion Abilities Clause', 'Sleep Clause Mod'],
588
605
  banlist: [
589
- 'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina', 'Giratina-Origin',
590
- 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna', 'Marshadow',
591
- 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Regieleki', 'Reshiram', 'Solgaleo',
592
- 'Spectrier', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base',
593
- 'Arena Trap', 'Magnet Pull', 'Moody', 'Power Construct', 'Shadow Tag', 'TR29 (Baton Pass)', 'TR82 (Stored Power)', 'Baton Pass',
606
+ 'Calyrex-Shadow', 'Darmanitan-Galar', 'Gyarados', 'Lunala', 'Milotic', 'Naganadel', 'Solgaleo', 'Slowking-Galar', 'Urshifu-Base',
607
+ 'Volcarona', 'Zacian-Crowned', 'Arena Trap', 'Moody', 'Shadow Tag', 'Bright Powder', 'King\'s Rock', 'Lax Incense', 'Baton Pass',
594
608
  ],
595
- onValidateSet(set) {
596
- if (!set.item)
597
- return;
598
- const item = this.dex.items.get(set.item);
599
- if (!/^tr\d\d/i.test(item.name))
600
- return;
601
- const moveName = item.desc.split('move ')[1].split('.')[0];
602
- if (set.moves.map(this.toID).includes(this.toID(moveName))) {
603
- return [
604
- `${set.species} can't run ${item.name} (${moveName}) as its item because it already has that move in its moveset.`,
605
- ];
606
- }
607
- },
608
- onValidateTeam(team) {
609
- const trs = new Set();
610
- for (const set of team) {
611
- if (!set.item)
612
- continue;
613
- const item = this.dex.items.get(set.item).name;
614
- if (!/^tr\d\d/i.test(item))
615
- continue;
616
- if (trs.has(item)) {
617
- return [`Your team already has a Pok\u00e9mon with ${item}.`];
618
- }
619
- trs.add(item);
620
- }
621
- },
622
- onTakeItem(item) {
623
- return !/^tr\d\d/i.test(item.name);
624
- },
625
- onModifyMove(move) {
626
- if (move.id === 'knockoff') {
627
- move.onBasePower = function (basePower, source, target, m) {
628
- const item = target.getItem();
629
- if (!this.singleEvent('TakeItem', item, target.itemState, target, target, m, item))
630
- return;
631
- // Very hardcode but I'd prefer to not make a mod for one damage calculation change
632
- if (item.id && !/^tr\d\d/i.test(item.id)) {
633
- return this.chainModify(1.5);
634
- }
635
- };
636
- }
637
- },
638
- onBegin() {
639
- for (const pokemon of this.getAllPokemon()) {
640
- const item = pokemon.getItem();
641
- if (/^tr\d\d/i.test(item.name)) {
642
- const move = this.dex.moves.get(item.desc.split('move ')[1].split('.')[0]);
643
- pokemon.moveSlots = pokemon.baseMoveSlots = [
644
- ...pokemon.baseMoveSlots, {
645
- id: move.id,
646
- move: move.name,
647
- pp: move.pp * 8 / 5,
648
- maxpp: move.pp * 8 / 5,
649
- target: move.target,
650
- disabled: false,
651
- disabledSource: '',
652
- used: false,
653
- },
654
- ];
655
- }
656
- }
657
- },
658
609
  },
659
610
  {
660
- name: "[Gen 8] Inheritance",
661
- desc: `Pok&eacute;mon may use the ability and moves of another, as long as they forfeit their own learnset.`,
611
+ name: "[Gen 8] Category Swap",
612
+ desc: `All physical moves become special, and all special moves become physical.`,
662
613
  threads: [
663
- `&bullet; <a href="https://www.smogon.com/forums/threads/3656811/">Inheritance</a>`,
614
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3702709/">Category Swap</a>`,
664
615
  ],
665
616
  mod: 'gen8',
666
- // searchShow: false,
667
- ruleset: ['Standard', '!Sleep Clause Mod', 'Sleep Moves Clause', '2 Ability Clause', 'Dynamax Clause'],
617
+ ruleset: ['Standard OMs', 'Category Swap Mod', 'Sleep Clause Mod'],
668
618
  banlist: [
669
- 'Blacephalon', 'Blaziken', 'Butterfree', 'Calyrex-Ice', 'Calyrex-Shadow', 'Chansey', 'Combusken', 'Cresselia', 'Darmanitan-Galar', 'Dialga', 'Dracovish',
670
- 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
671
- 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Natu', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Regieleki',
672
- 'Regigigas', 'Reshiram', 'Sableye', 'Shedinja', 'Solgaleo', 'Spectrier', 'Tapu Koko', 'Toxtricity', 'Torkoal', 'Urshifu-Base', 'Xatu', 'Xerneas', 'Yveltal',
673
- 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zeraora', 'Zekrom', 'Arena Trap', 'Contrary', 'Drizzle', 'Huge Power', 'Imposter', 'Innards Out',
674
- 'Libero', 'Moody', 'Power Construct', 'Pure Power', 'Quick Draw', 'Shadow Tag', 'Sheer Force', 'Simple', 'Unaware', 'Unburden', 'Water Bubble', 'King\'s Rock',
675
- 'Quick Claw', 'Baton Pass', 'Bolt Beak', 'Fishious Rend', 'Shell Smash', 'Thousand Arrows',
619
+ 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus', 'Genesect', 'Giratina',
620
+ 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
621
+ 'Magearna', 'Mewtwo', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Nidoking', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram',
622
+ 'Solgaleo', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Arena Trap', 'Moody',
623
+ 'Power Construct', 'Shadow Tag', 'King\'s Rock', 'Baton Pass', 'Draco Meteor', 'Overheat',
676
624
  ],
677
- getEvoFamily(speciesid) {
678
- let species = Dex.species.get(speciesid);
679
- while (species.prevo) {
680
- species = Dex.species.get(species.prevo);
681
- }
682
- return species.id;
683
- },
684
- validateSet(set, teamHas) {
685
- const unreleased = (pokemon) => pokemon.tier === "Unreleased" && pokemon.isNonstandard === "Unobtainable";
686
- if (!teamHas.abilityMap) {
687
- teamHas.abilityMap = Object.create(null);
688
- for (const pokemon of Dex.species.all()) {
689
- if (pokemon.isNonstandard || unreleased(pokemon))
690
- continue;
691
- if (pokemon.requiredAbility || pokemon.requiredItem || pokemon.requiredMove)
692
- continue;
693
- if (this.ruleTable.isBannedSpecies(pokemon))
694
- continue;
695
- for (const key of Object.values(pokemon.abilities)) {
696
- const abilityId = this.dex.toID(key);
697
- if (abilityId in teamHas.abilityMap) {
698
- teamHas.abilityMap[abilityId][pokemon.evos ? 'push' : 'unshift'](pokemon.id);
699
- }
700
- else {
701
- teamHas.abilityMap[abilityId] = [pokemon.id];
702
- }
703
- }
704
- }
705
- }
706
- const problem = this.validateForme(set);
707
- if (problem.length)
708
- return problem;
709
- const species = this.dex.species.get(set.species);
710
- if (!species.exists || species.num < 1)
711
- return [`The Pok\u00e9mon "${set.species}" does not exist.`];
712
- if (species.isNonstandard || unreleased(species)) {
713
- return [`${species.name} is not obtainable in Generation ${this.dex.gen}.`];
714
- }
715
- const name = set.name;
716
- if (this.ruleTable.isBannedSpecies(species)) {
717
- return this.validateSet(set, teamHas);
718
- }
719
- const ability = this.dex.abilities.get(set.ability);
720
- if (!ability.exists || ability.isNonstandard)
721
- return [`${name} needs to have a valid ability.`];
722
- const pokemonWithAbility = teamHas.abilityMap[ability.id];
723
- if (!pokemonWithAbility)
724
- return [`${ability.name} is not available on a legal Pok\u00e9mon.`];
725
- this.format.debug = true;
726
- if (!teamHas.abilitySources)
727
- teamHas.abilitySources = Object.create(null);
728
- const validSources = teamHas.abilitySources[this.dex.toID(set.species)] = []; // Evolution families
729
- let canonicalSource = ''; // Specific for the basic implementation of Donor Clause (see onValidateTeam).
730
- for (const donor of pokemonWithAbility) {
731
- const donorSpecies = this.dex.species.get(donor);
732
- let format = this.format;
733
- if (!format.getEvoFamily)
734
- format = this.dex.formats.get('gen8inheritance');
735
- const evoFamily = format.getEvoFamily(donorSpecies.id);
736
- if (validSources.includes(evoFamily))
737
- continue;
738
- set.species = donorSpecies.name;
739
- set.name = donorSpecies.baseSpecies;
740
- const problems = this.validateSet(set, teamHas) || [];
741
- if (!problems.length) {
742
- validSources.push(evoFamily);
743
- canonicalSource = donorSpecies.name;
744
- }
745
- // Specific for the basic implementation of Donor Clause (see onValidateTeam).
746
- if (validSources.length > 1)
747
- break;
748
- }
749
- this.format.debug = false;
750
- set.name = name;
751
- set.species = species.name;
752
- if (!validSources.length) {
753
- if (pokemonWithAbility.length > 1)
754
- return [`${name}'s set is illegal.`];
755
- return [`${name} has an illegal set with an ability from ${this.dex.species.get(pokemonWithAbility[0]).name}.`];
756
- }
757
- // Protocol: Include the data of the donor species in the `ability` data slot.
758
- // Afterwards, we are going to reset the name to what the user intended.
759
- set.ability = `${set.ability}0${canonicalSource}`;
760
- return null;
761
- },
762
- onValidateTeam(team, f, teamHas) {
763
- if (this.ruleTable.has('2abilityclause')) {
764
- const abilityTable = new Map();
765
- const base = {
766
- airlock: 'cloudnine',
767
- battlearmor: 'shellarmor',
768
- clearbody: 'whitesmoke',
769
- dazzling: 'queenlymajesty',
770
- emergencyexit: 'wimpout',
771
- filter: 'solidrock',
772
- gooey: 'tanglinghair',
773
- insomnia: 'vitalspirit',
774
- ironbarbs: 'roughskin',
775
- libero: 'protean',
776
- minus: 'plus',
777
- moxie: 'chillingneigh',
778
- powerofalchemy: 'receiver',
779
- propellertail: 'stalwart',
780
- teravolt: 'moldbreaker',
781
- turboblaze: 'moldbreaker',
782
- };
783
- for (const set of team) {
784
- let ability = this.toID(set.ability.split('0')[0]);
785
- if (!ability)
786
- continue;
787
- if (ability in base)
788
- ability = base[ability];
789
- if ((abilityTable.get(ability) || 0) >= 2) {
790
- return [
791
- `You are limited to two of each ability by 2 Ability Clause.`,
792
- `(You have more than two ${this.dex.abilities.get(ability).name} variants)`,
793
- ];
794
- }
795
- abilityTable.set(ability, (abilityTable.get(ability) || 0) + 1);
796
- }
797
- }
798
- // Donor Clause
799
- const evoFamilyLists = [];
800
- for (const set of team) {
801
- const abilitySources = teamHas.abilitySources?.[this.dex.toID(set.species)];
802
- if (!abilitySources)
803
- continue;
804
- let format = this.format;
805
- if (!format.getEvoFamily)
806
- format = this.dex.formats.get('gen8inheritance');
807
- evoFamilyLists.push(abilitySources.map(format.getEvoFamily));
808
- }
809
- // Checking actual full incompatibility would require expensive algebra.
810
- // Instead, we only check the trivial case of multiple Pokémon only legal for exactly one family. FIXME?
811
- const requiredFamilies = Object.create(null);
812
- for (const evoFamilies of evoFamilyLists) {
813
- if (evoFamilies.length !== 1)
814
- continue;
815
- const [familyId] = evoFamilies;
816
- if (!(familyId in requiredFamilies))
817
- requiredFamilies[familyId] = 1;
818
- requiredFamilies[familyId]++;
819
- if (requiredFamilies[familyId] > 2) {
820
- return [
821
- `You are limited to up to two inheritances from each evolution family by the Donor Clause.`,
822
- `(You inherit more than twice from ${this.dex.species.get(familyId).name}).`,
823
- ];
824
- }
825
- }
826
- },
827
- onBegin() {
828
- for (const pokemon of this.getAllPokemon()) {
829
- if (pokemon.baseAbility.includes('0')) {
830
- const donor = pokemon.baseAbility.split('0')[1];
831
- pokemon.m.donor = this.toID(donor);
832
- pokemon.baseAbility = this.toID(pokemon.baseAbility.split('0')[0]);
833
- pokemon.ability = pokemon.baseAbility;
834
- }
835
- }
836
- },
837
- onSwitchIn(pokemon) {
838
- if (!pokemon.m.donor)
839
- return;
840
- const donorTemplate = this.dex.species.get(pokemon.m.donor);
841
- if (!donorTemplate.exists)
842
- return;
843
- // Place volatiles on the Pokémon to show the donor details.
844
- this.add('-start', pokemon, donorTemplate.name, '[silent]');
845
- },
846
625
  },
847
626
  // Other Metagames
848
627
  ///////////////////////////////////////////////////////////////////
@@ -875,16 +654,16 @@ exports.Formats = [
875
654
  `&bullet; <a href="https://www.smogon.com/forums/threads/3682690/">AAA Resources</a>`,
876
655
  ],
877
656
  mod: 'gen8',
878
- ruleset: ['Standard', '!Obtainable Abilities', '2 Ability Clause', 'Dynamax Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
657
+ ruleset: ['Standard OMs', '!Obtainable Abilities', '2 Ability Clause', 'Sleep Moves Clause'],
879
658
  banlist: [
880
- 'Archeops', 'Blacephalon', 'Buzzwole', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus', 'Gengar',
881
- 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Keldeo', 'Kommo-o', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White',
659
+ 'Archeops', 'Blacephalon', 'Buzzwole', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus',
660
+ 'Gengar', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Keldeo', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White',
882
661
  'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Noivern',
883
662
  'Palkia', 'Pheromosa', 'Rayquaza', 'Regigigas', 'Reshiram', 'Shedinja', 'Solgaleo', 'Spectrier', 'Urshifu', 'Urshifu-Rapid-Strike',
884
- 'Victini', 'Weavile', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta-Base', 'Zekrom', 'Zeraora', 'Zygarde-Base',
885
- 'Arena Trap', 'Comatose', 'Contrary', 'Fluffy', 'Fur Coat', 'Gorilla Tactics', 'Huge Power', 'Ice Scales', 'Illusion', 'Imposter',
886
- 'Innards Out', 'Intrepid Sword', 'Libero', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Protean',
887
- 'Pure Power', 'Shadow Tag', 'Simple', 'Stakeout', 'Speed Boost', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
663
+ 'Victini', 'Weavile', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta-Base', 'Zekrom', 'Zeraora', 'Zygarde-Base', 'Arena Trap',
664
+ 'Comatose', 'Contrary', 'Fluffy', 'Fur Coat', 'Gorilla Tactics', 'Huge Power', 'Ice Scales', 'Illusion', 'Imposter', 'Innards Out',
665
+ 'Intrepid Sword', 'Libero', 'Magic Bounce', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Protean',
666
+ 'Pure Power', 'Shadow Tag', 'Simple', 'Stakeout', 'Speed Boost', 'Unburden', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
888
667
  ],
889
668
  },
890
669
  {
@@ -895,7 +674,7 @@ exports.Formats = [
895
674
  `&bullet; <a href="https://www.smogon.com/forums/threads/3659028/">M&amp;M Resources</a>`,
896
675
  ],
897
676
  mod: 'mixandmega',
898
- ruleset: ['Standard', 'Overflow Stat Mod', 'Dynamax Clause'],
677
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
899
678
  banlist: [
900
679
  'Calyrex-Shadow', 'Eternatus', 'Kyogre', 'Zacian',
901
680
  'Beedrillite', 'Blazikenite', 'Gengarite', 'Kangaskhanite', 'Mawilite', 'Medichamite', 'Pidgeotite',
@@ -965,7 +744,7 @@ exports.Formats = [
965
744
  `&bullet; <a href="https://www.smogon.com/forums/threads/3695169/">STABmons Resources</a>`,
966
745
  ],
967
746
  mod: 'gen8',
968
- ruleset: ['Standard', 'STABmons Move Legality', 'Dynamax Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
747
+ ruleset: ['Standard OMs', 'STABmons Move Legality', 'Sleep Moves Clause'],
969
748
  banlist: [
970
749
  'Aegislash', 'Blacephalon', 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus',
971
750
  'Genesect', 'Garchomp', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus',
@@ -988,7 +767,7 @@ exports.Formats = [
988
767
  `&bullet; <a href="https://www.smogon.com/forums/threads/3672463/">NFE Resources</a>`,
989
768
  ],
990
769
  mod: 'gen8',
991
- ruleset: ['Not Fully Evolved', 'Standard', 'Dynamax Clause'],
770
+ ruleset: ['Standard OMs', 'Not Fully Evolved', 'Sleep Clause Mod'],
992
771
  banlist: [
993
772
  'Chansey', 'Doublade', 'Golbat', 'Haunter', 'Kadabra', 'Magmar', 'Magneton', 'Mr. Mime-Galar', 'Pawniard', 'Pikachu',
994
773
  'Porygon2', 'Rhydon', 'Scyther', 'Sneasel', 'Type: Null', 'Vulpix-Base', 'Arena Trap', 'Shadow Tag', 'Baton Pass',
@@ -1001,10 +780,10 @@ exports.Formats = [
1001
780
  `&bullet; <a href="https://www.smogon.com/forums/threads/3660461/">Godly Gift</a>`,
1002
781
  ],
1003
782
  mod: 'gen8',
1004
- ruleset: ['Standard', 'Dynamax Clause', 'Sleep Moves Clause'],
783
+ ruleset: ['Standard OMs', 'Sleep Moves Clause'],
1005
784
  banlist: [
1006
- 'Blissey', 'Calyrex-Shadow', 'Chansey', 'Crawdaunt', 'Dragapult', 'Eternatus', 'Hawlucha', 'Marowak-Alola', 'Melmetal',
1007
- 'Pikachu', 'Toxapex', 'Xerneas', 'Zacian', 'Zacian-Crowned', 'Uber > 1', 'AG ++ Uber > 1', 'Arena Trap', 'Huge Power',
785
+ 'Blissey', 'Calyrex-Shadow', 'Chansey', 'Crawdaunt', 'Dragapult', 'Eternatus', 'Hawlucha', 'Marowak-Alola', 'Melmetal', 'Nidoking',
786
+ 'Nidoqueen', 'Pikachu', 'Toxapex', 'Xerneas', 'Zacian', 'Zacian-Crowned', 'Uber > 1', 'AG ++ Uber > 1', 'Arena Trap', 'Huge Power',
1008
787
  'Moody', 'Pure Power', 'Shadow Tag', 'Swift Swim', 'Bright Powder', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw',
1009
788
  'Baton Pass',
1010
789
  ],
@@ -1084,6 +863,8 @@ exports.Formats = [
1084
863
  'Decorate', 'Final Gambit', 'Flatter', 'Floral Healing', 'Flower Shield', 'Follow Me', 'Heal Pulse', 'Rage Powder', 'Swagger',
1085
864
  ],
1086
865
  },
866
+ // Brilliant Diamond/Shining Pearl
867
+ ///////////////////////////////////////////////////////////////////
1087
868
  {
1088
869
  section: "BD/SP",
1089
870
  column: 2,
@@ -1107,10 +888,7 @@ exports.Formats = [
1107
888
  ],
1108
889
  mod: 'gen8bdsp',
1109
890
  ruleset: ['Standard'],
1110
- banlist: [
1111
- 'Uber', 'Arena Trap', 'Drizzle', 'Moody', 'Sand Veil', 'Shadow Tag', 'Snow Cloak',
1112
- 'Bright Powder', 'King\'s Rock', 'Lax Incense', 'Razor Fang', 'Baton Pass',
1113
- ],
891
+ banlist: ['Uber', 'Arena Trap', 'Drizzle', 'Moody', 'Sand Veil', 'Shadow Tag', 'Snow Cloak', 'King\'s Rock', 'Razor Fang', 'Baton Pass'],
1114
892
  },
1115
893
  {
1116
894
  name: "[Gen 8 BDSP] Ubers",
@@ -1118,6 +896,7 @@ exports.Formats = [
1118
896
  `&bullet; <a href="https://www.smogon.com/forums/threads/3694036/">BDSP Ubers Discussion &amp; Resources</a>`,
1119
897
  ],
1120
898
  mod: 'gen8bdsp',
899
+ searchShow: false,
1121
900
  ruleset: ['Standard'],
1122
901
  banlist: ['AG', 'Baton Pass'],
1123
902
  },
@@ -1127,6 +906,7 @@ exports.Formats = [
1127
906
  `&bullet; <a href="https://www.smogon.com/forums/threads/3694307/">BDSP UU</a>`,
1128
907
  ],
1129
908
  mod: 'gen8bdsp',
909
+ searchShow: false,
1130
910
  ruleset: ['[Gen 8 BDSP] OU'],
1131
911
  banlist: ['OU', 'UUBL'],
1132
912
  },
@@ -1136,6 +916,7 @@ exports.Formats = [
1136
916
  `&bullet; <a href="https://www.smogon.com/forums/threads/3695563/">BDSP RU</a>`,
1137
917
  ],
1138
918
  mod: 'gen8bdsp',
919
+ searchShow: false,
1139
920
  ruleset: ['[Gen 8 BDSP] UU'],
1140
921
  banlist: ['UU', 'RUBL', 'Drought'],
1141
922
  },
@@ -1145,6 +926,7 @@ exports.Formats = [
1145
926
  `&bullet; <a href="https://www.smogon.com/forums/threads/3697080/">BDSP NU</a>`,
1146
927
  ],
1147
928
  mod: 'gen8bdsp',
929
+ searchShow: false,
1148
930
  ruleset: ['[Gen 8 BDSP] RU'],
1149
931
  banlist: ['RU', 'NUBL', 'Damp Rock', 'Heat Rock'],
1150
932
  },
@@ -1154,6 +936,7 @@ exports.Formats = [
1154
936
  `&bullet; <a href="https://www.smogon.com/forums/threads/3700009/">BDSP PU</a>`,
1155
937
  ],
1156
938
  mod: 'gen8bdsp',
939
+ searchShow: false,
1157
940
  ruleset: ['[Gen 8 BDSP] NU'],
1158
941
  banlist: ['NU', 'PUBL'],
1159
942
  },
@@ -1163,6 +946,7 @@ exports.Formats = [
1163
946
  `&bullet; <a href="https://www.smogon.com/forums/threads/3696004/">BDSP LC</a>`,
1164
947
  ],
1165
948
  mod: 'gen8bdsp',
949
+ searchShow: false,
1166
950
  ruleset: ['Little Cup', 'Standard'],
1167
951
  banlist: ['Gligar', 'Meditite', 'Misdreavus', 'Munchlax', 'Murkrow', 'Scyther', 'Sneasel', 'Tangela', 'Vulpix', 'Yanma', 'Moody', 'Baton Pass', 'Sticky Web'],
1168
952
  },
@@ -1172,6 +956,7 @@ exports.Formats = [
1172
956
  `&bullet; <a href="https://www.smogon.com/forums/threads/3694267/">BDSP Monotype</a>`,
1173
957
  ],
1174
958
  mod: 'gen8bdsp',
959
+ searchShow: false,
1175
960
  ruleset: ['[Gen 8 BDSP] OU', 'Same Type Clause'],
1176
961
  },
1177
962
  {
@@ -1183,15 +968,6 @@ exports.Formats = [
1183
968
  searchShow: false,
1184
969
  ruleset: ['[Gen 8 BDSP] OU', '+CAP'],
1185
970
  },
1186
- {
1187
- name: "[Gen 8 BDSP] 3v3 Singles",
1188
- threads: [
1189
- `&bullet; <a href="https://www.smogon.com/forums/threads/3695092/">BDSP 3v3 Singles</a>`,
1190
- ],
1191
- mod: 'gen8bdsp',
1192
- searchShow: false,
1193
- ruleset: ['Flat Rules', 'Min Source Gen = 8'],
1194
- },
1195
971
  {
1196
972
  name: "[Gen 8 BDSP] Doubles OU",
1197
973
  threads: [
@@ -1202,25 +978,8 @@ exports.Formats = [
1202
978
  ruleset: ['Standard Doubles'],
1203
979
  banlist: ['DUber', 'Dark Void'],
1204
980
  },
1205
- {
1206
- name: "[Gen 8 BDSP] Battle Festival Doubles",
1207
- threads: [
1208
- `&bullet; <a href="https://www.smogon.com/forums/threads/3694269/">Battle Festival Doubles</a>`,
1209
- ],
1210
- mod: 'gen8bdsp',
1211
- gameType: 'doubles',
1212
- ruleset: ['Flat Rules', 'Min Source Gen = 8'],
1213
- },
1214
- {
1215
- name: "[Gen 8 BDSP] Pure Hackmons",
1216
- desc: `Anything that can be hacked in-game and is usable in local battles is allowed.`,
1217
- threads: [
1218
- `&bullet; <a href="https://www.smogon.com/forums/threads/3693868/">Pure Hackmons</a>`,
1219
- ],
1220
- mod: 'gen8bdsp',
1221
- searchShow: false,
1222
- ruleset: ['-Nonexistent', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Endless Battle Clause'],
1223
- },
981
+ // Challengeable OMs
982
+ ///////////////////////////////////////////////////////////////////
1224
983
  {
1225
984
  section: "Challengeable OMs",
1226
985
  column: 2,
@@ -1233,7 +992,7 @@ exports.Formats = [
1233
992
  ],
1234
993
  mod: 'gen8',
1235
994
  searchShow: false,
1236
- ruleset: ['Standard', 'Dynamax Clause', 'Camomons Mod'],
995
+ ruleset: ['Standard OMs', 'Camomons Mod', 'Sleep Clause Mod'],
1237
996
  banlist: [
1238
997
  'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragonite', 'Eternatus', 'Genesect', 'Giratina', 'Giratina-Origin',
1239
998
  'Groudon', 'Ho-Oh', 'Hydreigon', 'Kartana', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Marshadow',
@@ -1250,7 +1009,7 @@ exports.Formats = [
1250
1009
  ],
1251
1010
  mod: 'gen8',
1252
1011
  searchShow: false,
1253
- ruleset: ['Standard', 'Overflow Stat Mod', 'Dynamax Clause', '2 Ability Clause'],
1012
+ ruleset: ['Standard OMs', '2 Ability Clause', 'Sleep Clause Mod'],
1254
1013
  banlist: ['Corsola-Galar', 'Sneasel', 'Type: Null', 'Arena Trap', 'Ice Scales', 'Moody', 'King\'s Rock', 'Baton Pass'],
1255
1014
  restricted: ['Chansey', 'Lunala', 'Shedinja', 'Solgaleo', 'Gorilla Tactics', 'Huge Power', 'Pure Power', 'Shadow Tag'],
1256
1015
  onValidateTeam(team) {
@@ -1334,63 +1093,252 @@ exports.Formats = [
1334
1093
  if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
1335
1094
  set.species = crossSpecies.name;
1336
1095
  }
1337
- // @ts-ignore
1338
- set.sp = species;
1339
- // @ts-ignore
1340
- set.crossSpecies = crossSpecies;
1341
- // @ts-ignore
1342
- set.crossMovesLeft = 2;
1343
- problems = this.validateSet(set, teamHas);
1344
- set.name = crossSpecies.name;
1096
+ // @ts-ignore
1097
+ set.sp = species;
1098
+ // @ts-ignore
1099
+ set.crossSpecies = crossSpecies;
1100
+ // @ts-ignore
1101
+ set.crossMovesLeft = 2;
1102
+ problems = this.validateSet(set, teamHas);
1103
+ set.name = crossSpecies.name;
1104
+ set.species = species.name;
1105
+ return problems;
1106
+ },
1107
+ onModifySpecies(species, target, source, effect) {
1108
+ if (!target)
1109
+ return; // chat
1110
+ if (effect && ['imposter', 'transform'].includes(effect.id))
1111
+ return;
1112
+ if (target.set.name === target.set.species)
1113
+ return;
1114
+ const crossSpecies = this.dex.species.get(target.set.name);
1115
+ if (!crossSpecies.exists)
1116
+ return;
1117
+ if (species.battleOnly || !species.nfe)
1118
+ return;
1119
+ const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
1120
+ if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo)
1121
+ return;
1122
+ const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
1123
+ if (!crossPrevoSpecies.prevo !== !species.prevo)
1124
+ return;
1125
+ const mixedSpecies = this.dex.deepClone(species);
1126
+ mixedSpecies.weightkg =
1127
+ Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
1128
+ mixedSpecies.nfe = false;
1129
+ mixedSpecies.evos = [];
1130
+ mixedSpecies.eggGroups = crossSpecies.eggGroups;
1131
+ mixedSpecies.abilities = crossSpecies.abilities;
1132
+ mixedSpecies.bst = 0;
1133
+ let i;
1134
+ for (i in species.baseStats) {
1135
+ const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
1136
+ mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
1137
+ mixedSpecies.bst += mixedSpecies.baseStats[i];
1138
+ }
1139
+ if (crossSpecies.types[0] !== crossPrevoSpecies.types[0])
1140
+ mixedSpecies.types[0] = crossSpecies.types[0];
1141
+ if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
1142
+ mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
1143
+ }
1144
+ if (mixedSpecies.types[0] === mixedSpecies.types[1])
1145
+ mixedSpecies.types = [mixedSpecies.types[0]];
1146
+ return mixedSpecies;
1147
+ },
1148
+ onBegin() {
1149
+ for (const pokemon of this.getAllPokemon()) {
1150
+ pokemon.baseSpecies = pokemon.species;
1151
+ }
1152
+ },
1153
+ },
1154
+ {
1155
+ name: "[Gen 8] Inheritance",
1156
+ desc: `Pok&eacute;mon may use the ability and moves of another, as long as they forfeit their own learnset.`,
1157
+ threads: [
1158
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3656811/">Inheritance</a>`,
1159
+ ],
1160
+ mod: 'gen8',
1161
+ searchShow: false,
1162
+ ruleset: ['Standard OMs', '2 Ability Clause', 'Sleep Moves Clause'],
1163
+ banlist: [
1164
+ 'Blacephalon', 'Blaziken', 'Butterfree', 'Calyrex-Ice', 'Calyrex-Shadow', 'Chansey', 'Combusken', 'Cresselia', 'Darmanitan-Galar', 'Dialga',
1165
+ 'Dracovish', 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Lugia',
1166
+ 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Natu', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza',
1167
+ 'Regieleki', 'Regigigas', 'Reshiram', 'Sableye', 'Shedinja', 'Solgaleo', 'Spectrier', 'Tapu Koko', 'Toxtricity', 'Torkoal', 'Urshifu-Base',
1168
+ 'Xatu', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zeraora', 'Zekrom', 'Arena Trap', 'Contrary',
1169
+ 'Drizzle', 'Huge Power', 'Imposter', 'Innards Out', 'Libero', 'Moody', 'Power Construct', 'Pure Power', 'Quick Draw', 'Shadow Tag', 'Sheer Force',
1170
+ 'Simple', 'Unaware', 'Unburden', 'Water Bubble', 'King\'s Rock', 'Quick Claw', 'Baton Pass', 'Bolt Beak', 'Fishious Rend', 'Shell Smash',
1171
+ 'Thousand Arrows',
1172
+ ],
1173
+ getEvoFamily(speciesid) {
1174
+ let species = Dex.species.get(speciesid);
1175
+ while (species.prevo) {
1176
+ species = Dex.species.get(species.prevo);
1177
+ }
1178
+ return species.id;
1179
+ },
1180
+ validateSet(set, teamHas) {
1181
+ const unreleased = (pokemon) => pokemon.tier === "Unreleased" && pokemon.isNonstandard === "Unobtainable";
1182
+ if (!teamHas.abilityMap) {
1183
+ teamHas.abilityMap = Object.create(null);
1184
+ for (const pokemon of Dex.species.all()) {
1185
+ if (pokemon.isNonstandard || unreleased(pokemon))
1186
+ continue;
1187
+ if (pokemon.requiredAbility || pokemon.requiredItem || pokemon.requiredMove)
1188
+ continue;
1189
+ if (this.ruleTable.isBannedSpecies(pokemon))
1190
+ continue;
1191
+ for (const key of Object.values(pokemon.abilities)) {
1192
+ const abilityId = this.dex.toID(key);
1193
+ if (abilityId in teamHas.abilityMap) {
1194
+ teamHas.abilityMap[abilityId][pokemon.evos ? 'push' : 'unshift'](pokemon.id);
1195
+ }
1196
+ else {
1197
+ teamHas.abilityMap[abilityId] = [pokemon.id];
1198
+ }
1199
+ }
1200
+ }
1201
+ }
1202
+ const problem = this.validateForme(set);
1203
+ if (problem.length)
1204
+ return problem;
1205
+ const species = this.dex.species.get(set.species);
1206
+ if (!species.exists || species.num < 1)
1207
+ return [`The Pok\u00e9mon "${set.species}" does not exist.`];
1208
+ if (species.isNonstandard || unreleased(species)) {
1209
+ return [`${species.name} is not obtainable in Generation ${this.dex.gen}.`];
1210
+ }
1211
+ const name = set.name;
1212
+ if (this.ruleTable.isBannedSpecies(species)) {
1213
+ return this.validateSet(set, teamHas);
1214
+ }
1215
+ const ability = this.dex.abilities.get(set.ability);
1216
+ if (!ability.exists || ability.isNonstandard)
1217
+ return [`${name} needs to have a valid ability.`];
1218
+ const pokemonWithAbility = teamHas.abilityMap[ability.id];
1219
+ if (!pokemonWithAbility)
1220
+ return [`${ability.name} is not available on a legal Pok\u00e9mon.`];
1221
+ this.format.debug = true;
1222
+ if (!teamHas.abilitySources)
1223
+ teamHas.abilitySources = Object.create(null);
1224
+ const validSources = teamHas.abilitySources[this.dex.toID(set.species)] = []; // Evolution families
1225
+ let canonicalSource = ''; // Specific for the basic implementation of Donor Clause (see onValidateTeam).
1226
+ for (const donor of pokemonWithAbility) {
1227
+ const donorSpecies = this.dex.species.get(donor);
1228
+ let format = this.format;
1229
+ if (!format.getEvoFamily)
1230
+ format = this.dex.formats.get('gen8inheritance');
1231
+ const evoFamily = format.getEvoFamily(donorSpecies.id);
1232
+ if (validSources.includes(evoFamily))
1233
+ continue;
1234
+ set.species = donorSpecies.name;
1235
+ set.name = donorSpecies.baseSpecies;
1236
+ const problems = this.validateSet(set, teamHas) || [];
1237
+ if (!problems.length) {
1238
+ validSources.push(evoFamily);
1239
+ canonicalSource = donorSpecies.name;
1240
+ }
1241
+ // Specific for the basic implementation of Donor Clause (see onValidateTeam).
1242
+ if (validSources.length > 1)
1243
+ break;
1244
+ }
1245
+ this.format.debug = false;
1246
+ set.name = name;
1345
1247
  set.species = species.name;
1346
- return problems;
1248
+ if (!validSources.length) {
1249
+ if (pokemonWithAbility.length > 1)
1250
+ return [`${name}'s set is illegal.`];
1251
+ return [`${name} has an illegal set with an ability from ${this.dex.species.get(pokemonWithAbility[0]).name}.`];
1252
+ }
1253
+ // Protocol: Include the data of the donor species in the `ability` data slot.
1254
+ // Afterwards, we are going to reset the name to what the user intended.
1255
+ set.ability = `${set.ability}0${canonicalSource}`;
1256
+ return null;
1347
1257
  },
1348
- onModifySpecies(species, target, source, effect) {
1349
- if (!target)
1350
- return; // chat
1351
- if (effect && ['imposter', 'transform'].includes(effect.id))
1352
- return;
1353
- if (target.set.name === target.set.species)
1354
- return;
1355
- const crossSpecies = this.dex.species.get(target.set.name);
1356
- if (!crossSpecies.exists)
1357
- return;
1358
- if (species.battleOnly || !species.nfe)
1359
- return;
1360
- const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
1361
- if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo)
1362
- return;
1363
- const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
1364
- if (!crossPrevoSpecies.prevo !== !species.prevo)
1365
- return;
1366
- const mixedSpecies = this.dex.deepClone(species);
1367
- mixedSpecies.weightkg =
1368
- Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
1369
- mixedSpecies.nfe = false;
1370
- mixedSpecies.evos = [];
1371
- mixedSpecies.eggGroups = crossSpecies.eggGroups;
1372
- mixedSpecies.abilities = crossSpecies.abilities;
1373
- mixedSpecies.bst = 0;
1374
- let i;
1375
- for (i in species.baseStats) {
1376
- const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
1377
- mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
1378
- mixedSpecies.bst += mixedSpecies.baseStats[i];
1258
+ onValidateTeam(team, f, teamHas) {
1259
+ if (this.ruleTable.has('2abilityclause')) {
1260
+ const abilityTable = new Map();
1261
+ const base = {
1262
+ airlock: 'cloudnine',
1263
+ battlearmor: 'shellarmor',
1264
+ clearbody: 'whitesmoke',
1265
+ dazzling: 'queenlymajesty',
1266
+ emergencyexit: 'wimpout',
1267
+ filter: 'solidrock',
1268
+ gooey: 'tanglinghair',
1269
+ insomnia: 'vitalspirit',
1270
+ ironbarbs: 'roughskin',
1271
+ libero: 'protean',
1272
+ minus: 'plus',
1273
+ moxie: 'chillingneigh',
1274
+ powerofalchemy: 'receiver',
1275
+ propellertail: 'stalwart',
1276
+ teravolt: 'moldbreaker',
1277
+ turboblaze: 'moldbreaker',
1278
+ };
1279
+ for (const set of team) {
1280
+ let ability = this.toID(set.ability.split('0')[0]);
1281
+ if (!ability)
1282
+ continue;
1283
+ if (ability in base)
1284
+ ability = base[ability];
1285
+ if ((abilityTable.get(ability) || 0) >= 2) {
1286
+ return [
1287
+ `You are limited to two of each ability by 2 Ability Clause.`,
1288
+ `(You have more than two ${this.dex.abilities.get(ability).name} variants)`,
1289
+ ];
1290
+ }
1291
+ abilityTable.set(ability, (abilityTable.get(ability) || 0) + 1);
1292
+ }
1379
1293
  }
1380
- if (crossSpecies.types[0] !== crossPrevoSpecies.types[0])
1381
- mixedSpecies.types[0] = crossSpecies.types[0];
1382
- if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
1383
- mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
1294
+ // Donor Clause
1295
+ const evoFamilyLists = [];
1296
+ for (const set of team) {
1297
+ const abilitySources = teamHas.abilitySources?.[this.dex.toID(set.species)];
1298
+ if (!abilitySources)
1299
+ continue;
1300
+ let format = this.format;
1301
+ if (!format.getEvoFamily)
1302
+ format = this.dex.formats.get('gen8inheritance');
1303
+ evoFamilyLists.push(abilitySources.map(format.getEvoFamily));
1304
+ }
1305
+ // Checking actual full incompatibility would require expensive algebra.
1306
+ // Instead, we only check the trivial case of multiple Pokémon only legal for exactly one family. FIXME?
1307
+ const requiredFamilies = Object.create(null);
1308
+ for (const evoFamilies of evoFamilyLists) {
1309
+ if (evoFamilies.length !== 1)
1310
+ continue;
1311
+ const [familyId] = evoFamilies;
1312
+ if (!(familyId in requiredFamilies))
1313
+ requiredFamilies[familyId] = 1;
1314
+ requiredFamilies[familyId]++;
1315
+ if (requiredFamilies[familyId] > 2) {
1316
+ return [
1317
+ `You are limited to up to two inheritances from each evolution family by the Donor Clause.`,
1318
+ `(You inherit more than twice from ${this.dex.species.get(familyId).name}).`,
1319
+ ];
1320
+ }
1384
1321
  }
1385
- if (mixedSpecies.types[0] === mixedSpecies.types[1])
1386
- mixedSpecies.types = [mixedSpecies.types[0]];
1387
- return mixedSpecies;
1388
1322
  },
1389
1323
  onBegin() {
1390
1324
  for (const pokemon of this.getAllPokemon()) {
1391
- pokemon.baseSpecies = pokemon.species;
1325
+ if (pokemon.baseAbility.includes('0')) {
1326
+ const donor = pokemon.baseAbility.split('0')[1];
1327
+ pokemon.m.donor = this.toID(donor);
1328
+ pokemon.baseAbility = this.toID(pokemon.baseAbility.split('0')[0]);
1329
+ pokemon.ability = pokemon.baseAbility;
1330
+ }
1392
1331
  }
1393
1332
  },
1333
+ onSwitchIn(pokemon) {
1334
+ if (!pokemon.m.donor)
1335
+ return;
1336
+ const donorTemplate = this.dex.species.get(pokemon.m.donor);
1337
+ if (!donorTemplate.exists)
1338
+ return;
1339
+ // Place volatiles on the Pokémon to show the donor details.
1340
+ this.add('-start', pokemon, donorTemplate.name, '[silent]');
1341
+ },
1394
1342
  },
1395
1343
  {
1396
1344
  name: "[Gen 8] Linked",
@@ -1400,7 +1348,7 @@ exports.Formats = [
1400
1348
  ],
1401
1349
  mod: 'linked',
1402
1350
  searchShow: false,
1403
- ruleset: ['Standard', 'Dynamax Clause'],
1351
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1404
1352
  banlist: [
1405
1353
  'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Cloyster', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
1406
1354
  'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
@@ -1432,7 +1380,7 @@ exports.Formats = [
1432
1380
  ],
1433
1381
  mod: 'gen8',
1434
1382
  searchShow: false,
1435
- ruleset: ['Standard', 'Dynamax Clause', '2 Ability Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
1383
+ ruleset: ['Standard OMs', '2 Ability Clause', 'Sleep Moves Clause'],
1436
1384
  banlist: [
1437
1385
  'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragonite', 'Eternatus',
1438
1386
  'Genesect', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White',
@@ -1637,7 +1585,7 @@ exports.Formats = [
1637
1585
  ],
1638
1586
  mod: 'gen8',
1639
1587
  searchShow: false,
1640
- ruleset: ['Standard', 'Dynamax Clause'],
1588
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1641
1589
  banlist: [
1642
1590
  'Blissey', 'Calyrex-Ice', 'Calyrex-Shadow', 'Chansey', 'Cloyster', 'Dialga', 'Eternatus', 'Genesect', 'Giratina',
1643
1591
  'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
@@ -1692,7 +1640,7 @@ exports.Formats = [
1692
1640
  ],
1693
1641
  mod: 'pokebilities',
1694
1642
  searchShow: false,
1695
- ruleset: ['Standard', 'Dynamax Clause'],
1643
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1696
1644
  banlist: [
1697
1645
  'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Conkeldurr', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dracozolt',
1698
1646
  'Eternatus', 'Excadrill', 'Genesect', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black',
@@ -1731,10 +1679,29 @@ exports.Formats = [
1731
1679
  .filter(ability => ability !== pokemon.ability);
1732
1680
  }
1733
1681
  },
1682
+ onBeforeSwitchIn(pokemon) {
1683
+ // Abilities that must be applied before both sides trigger onSwitchIn to correctly
1684
+ // handle switch-in ability-to-ability interactions, e.g. Intimidate counters
1685
+ const neededBeforeSwitchInIDs = [
1686
+ 'clearbody', 'competitive', 'contrary', 'defiant', 'fullmetalbody', 'hypercutter', 'innerfocus',
1687
+ 'mirrorarmor', 'oblivious', 'owntempo', 'rattled', 'scrappy', 'simple', 'whitesmoke',
1688
+ ];
1689
+ if (pokemon.m.innates) {
1690
+ for (const innate of pokemon.m.innates) {
1691
+ if (!neededBeforeSwitchInIDs.includes(innate))
1692
+ continue;
1693
+ if (pokemon.hasAbility(innate))
1694
+ continue;
1695
+ pokemon.addVolatile("ability:" + innate, pokemon);
1696
+ }
1697
+ }
1698
+ },
1734
1699
  onSwitchInPriority: 2,
1735
1700
  onSwitchIn(pokemon) {
1736
1701
  if (pokemon.m.innates) {
1737
1702
  for (const innate of pokemon.m.innates) {
1703
+ if (pokemon.hasAbility(innate))
1704
+ continue;
1738
1705
  pokemon.addVolatile("ability:" + innate, pokemon);
1739
1706
  }
1740
1707
  }
@@ -1757,6 +1724,16 @@ exports.Formats = [
1757
1724
  pokemon.m.innates = undefined;
1758
1725
  },
1759
1726
  },
1727
+ {
1728
+ name: "[Gen 8] Pure Hackmons",
1729
+ desc: `Anything that can be hacked in-game and is usable in local battles is allowed.`,
1730
+ threads: [
1731
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3656851/">Pure Hackmons</a>`,
1732
+ ],
1733
+ mod: 'gen8',
1734
+ searchShow: false,
1735
+ ruleset: ['-Nonexistent', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Endless Battle Clause'],
1736
+ },
1760
1737
  {
1761
1738
  name: "[Gen 8] Shared Power",
1762
1739
  desc: `Once a Pok&eacute;mon switches in, its ability is shared with the rest of the team.`,
@@ -1765,7 +1742,7 @@ exports.Formats = [
1765
1742
  ],
1766
1743
  mod: 'sharedpower',
1767
1744
  searchShow: false,
1768
- ruleset: ['Standard', 'Dynamax Clause'],
1745
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1769
1746
  banlist: [
1770
1747
  'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
1771
1748
  'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Lugia', 'Lunala', 'Magearna',
@@ -1832,7 +1809,7 @@ exports.Formats = [
1832
1809
  searchShow: false,
1833
1810
  challengeShow: false,
1834
1811
  tournamentShow: false,
1835
- ruleset: ['Standard', 'Dynamax Clause'],
1812
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1836
1813
  banlist: [
1837
1814
  'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus', 'Kyurem-Black', 'Kyurem-White', 'Giratina',
1838
1815
  'Giratina-Origin', 'Genesect', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Lugia', 'Lunala', 'Magearna', 'Marowak-Alola', 'Marshadow', 'Melmetal',
@@ -1939,7 +1916,7 @@ exports.Formats = [
1939
1916
  ],
1940
1917
  mod: 'gen8',
1941
1918
  searchShow: false,
1942
- ruleset: ['Standard', '!OHKO Clause', 'Picked Team Size = 6', 'Adjust Level = 100'],
1919
+ ruleset: ['Standard OMs', 'Sleep Clause Mod', '!OHKO Clause', 'Picked Team Size = 6', 'Adjust Level = 100'],
1943
1920
  banlist: [
1944
1921
  'Sandshrew-Alola', 'Shedinja', 'Infiltrator', 'Magic Guard', 'Choice Scarf',
1945
1922
  'Explosion', 'Final Gambit', 'Healing Wish', 'Lunar Dance', 'Magic Room', 'Memento', 'Misty Explosion', 'Self-Destruct',
@@ -2373,41 +2350,36 @@ exports.Formats = [
2373
2350
  column: 3,
2374
2351
  },
2375
2352
  {
2376
- name: "[Gen 2] Ubers",
2353
+ name: "[Gen 3] Ubers",
2377
2354
  threads: [
2378
- `&bullet; <a href="https://www.smogon.com/forums/posts/8286282/">GSC Ubers</a>`,
2355
+ `&bullet; <a href="https://www.smogon.com/forums/posts/8286280/">ADV Ubers</a>`,
2379
2356
  ],
2380
- mod: 'gen2',
2357
+ mod: 'gen3',
2381
2358
  // searchShow: false,
2382
- ruleset: ['Standard'],
2359
+ ruleset: ['Standard', 'Deoxys Camouflage Clause', 'One Baton Pass Clause'],
2360
+ banlist: ['Wobbuffet + Leftovers'],
2383
2361
  },
2384
2362
  {
2385
- name: "[Gen 3] 1v1",
2386
- desc: `Bring three Pok&eacute;mon to Team Preview and choose one to battle.`,
2363
+ name: "[Gen 5] RU",
2387
2364
  threads: [
2388
- `&bullet; <a href="https://www.smogon.com/forums/posts/8031456/">ADV 1v1</a>`,
2365
+ `&bullet; <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
2366
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3473124/">BW2 RU Viability Rankings</a>`,
2389
2367
  ],
2390
- mod: 'gen3',
2368
+ mod: 'gen5',
2391
2369
  // searchShow: false,
2392
- ruleset: [
2393
- 'Picked Team Size = 1', 'Max Team Size = 3',
2394
- '[Gen 3] OU', 'Accuracy Moves Clause', 'Sleep Moves Clause', 'Team Preview', '!Freeze Clause Mod',
2395
- ],
2396
- banlist: ['Clefable', 'Slaking', 'Snorlax', 'Suicune', 'Destiny Bond', 'Explosion', 'Ingrain', 'Perish Song', 'Self-Destruct', 'Bright Powder', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw'],
2397
- unbanlist: ['Mr. Mime', 'Wobbuffet', 'Wynaut', 'Sand Veil'],
2370
+ ruleset: ['[Gen 5] UU', 'Baton Pass Clause', '!Sleep Clause Mod', 'Sleep Moves Clause'],
2371
+ banlist: ['UU', 'RUBL', 'Shadow Tag', 'Shell Smash + Baton Pass'],
2372
+ unbanlist: ['Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
2398
2373
  },
2399
2374
  {
2400
- name: "[Gen 1] Stadium OU",
2375
+ name: "[Gen 7 Let's Go] UU",
2401
2376
  threads: [
2402
- `&bullet; <a href="https://www.smogon.com/forums/threads/3685877/">Stadium OU Viability Rankings</a>`,
2377
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3659882/">LGPE UU Metagame Discussion &amp; Resources</a>`,
2403
2378
  ],
2404
- mod: 'gen1stadium',
2379
+ mod: 'gen7letsgo',
2405
2380
  // searchShow: false,
2406
- ruleset: ['Standard', 'Team Preview'],
2407
- banlist: ['Uber',
2408
- 'Nidoking + Fury Attack + Thrash', 'Exeggutor + Poison Powder + Stomp', 'Exeggutor + Sleep Powder + Stomp',
2409
- 'Exeggutor + Stun Spore + Stomp', 'Jolteon + Focus Energy + Thunder Shock', 'Flareon + Focus Energy + Ember',
2410
- ],
2381
+ ruleset: ['[Gen 7 Let\'s Go] OU'],
2382
+ banlist: ['OU', 'UUBL'],
2411
2383
  },
2412
2384
  // Past Gens OU
2413
2385
  ///////////////////////////////////////////////////////////////////
@@ -2444,7 +2416,7 @@ exports.Formats = [
2444
2416
  `&bullet; <a href="https://www.smogon.com/forums/threads/3668699/">BW2 OU Viability Rankings</a>`,
2445
2417
  ],
2446
2418
  mod: 'gen5',
2447
- ruleset: ['Standard', 'Evasion Abilities Clause', 'Sleep Moves Clause', 'Swagger Clause'],
2419
+ ruleset: ['Standard', 'Evasion Abilities Clause', 'Sleep Moves Clause', 'Swagger Clause', 'Gems Clause'],
2448
2420
  banlist: ['Uber', 'Arena Trap', 'Drizzle ++ Swift Swim', 'Drought ++ Chlorophyll', 'Sand Rush', 'Shadow Tag', 'King\'s Rock', 'Razor Fang', 'Soul Dew', 'Assist', 'Baton Pass'],
2449
2421
  },
2450
2422
  {
@@ -2476,7 +2448,7 @@ exports.Formats = [
2476
2448
  ],
2477
2449
  mod: 'gen2',
2478
2450
  ruleset: ['Standard'],
2479
- banlist: ['Uber'],
2451
+ banlist: ['Uber', 'Mean Look + Baton Pass', 'Spider Web + Baton Pass'],
2480
2452
  },
2481
2453
  {
2482
2454
  name: "[Gen 1] OU",
@@ -2514,7 +2486,7 @@ exports.Formats = [
2514
2486
  `&bullet; <a href="https://www.smogon.com/forums/posts/8778656/">USM Mix and Mega</a>`,
2515
2487
  ],
2516
2488
  mod: 'gen7mixandmega',
2517
- ruleset: ['Standard', 'Mega Rayquaza Clause', 'Overflow Stat Mod'],
2489
+ ruleset: ['Standard OMs', 'Mega Rayquaza Clause', 'Sleep Clause Mod'],
2518
2490
  banlist: ['Shadow Tag', 'Gengarite', 'Baton Pass', 'Electrify'],
2519
2491
  restricted: [
2520
2492
  'Arceus', 'Deoxys', 'Dialga', 'Dragonite', 'Giratina', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem', 'Landorus-Therian', 'Lugia',
@@ -2721,7 +2693,7 @@ exports.Formats = [
2721
2693
  'Arceus', 'Darkrai', 'Deoxys-Base', 'Deoxys-Attack', 'Deoxys-Defense', 'Dialga', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kangaskhan-Mega',
2722
2694
  'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Lugia', 'Lunala', 'Marshadow', 'Mewtwo', 'Mimikyu', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane',
2723
2695
  'Palkia', 'Rayquaza', 'Reshiram', 'Salamence-Mega', 'Shaymin-Sky', 'Snorlax', 'Solgaleo', 'Tapu Koko', 'Xerneas', 'Yveltal', 'Zekrom',
2724
- 'Moody', 'Focus Sash', 'Perish Song', 'Detect + Fightinium Z',
2696
+ 'Moody', 'Focus Sash', 'Grass Whistle', 'Hypnosis', 'Perish Song', 'Sing', 'Detect + Fightinium Z',
2725
2697
  ],
2726
2698
  },
2727
2699
  {
@@ -3192,18 +3164,6 @@ exports.Formats = [
3192
3164
  ruleset: ['Standard', 'Evasion Abilities Clause', 'Swagger Clause', 'Sleep Clause Mod'],
3193
3165
  banlist: ['Uber', 'OU', 'UUBL', 'Arena Trap', 'Drought', 'Sand Stream', 'Snow Warning', 'Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
3194
3166
  },
3195
- {
3196
- name: "[Gen 5] RU",
3197
- threads: [
3198
- `&bullet; <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
3199
- `&bullet; <a href="https://www.smogon.com/forums/threads/3473124/">BW2 RU Viability Rankings</a>`,
3200
- ],
3201
- mod: 'gen5',
3202
- searchShow: false,
3203
- ruleset: ['[Gen 5] UU', 'Baton Pass Clause', '!Sleep Clause Mod', 'Sleep Moves Clause'],
3204
- banlist: ['UU', 'RUBL', 'Shadow Tag', 'Shell Smash + Baton Pass'],
3205
- unbanlist: ['Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
3206
- },
3207
3167
  {
3208
3168
  name: "[Gen 5] NU",
3209
3169
  threads: [
@@ -3247,7 +3207,8 @@ exports.Formats = [
3247
3207
  ],
3248
3208
  mod: 'gen5',
3249
3209
  searchShow: false,
3250
- ruleset: ['[Gen 5] OU', 'Same Type Clause'],
3210
+ ruleset: ['[Gen 5] OU', 'Same Type Clause', '!Gems Clause'],
3211
+ banlist: ['Latios'],
3251
3212
  },
3252
3213
  {
3253
3214
  name: "[Gen 5] 1v1",
@@ -3273,6 +3234,7 @@ exports.Formats = [
3273
3234
  searchShow: false,
3274
3235
  ruleset: ['[Gen 5] PU'],
3275
3236
  banlist: ['PU', 'Articuno', 'Dragonair', 'Glalie', 'Machoke', 'Marowak', 'Omanyte', 'Regigigas', 'Trubbish', 'Whirlipede', 'Baton Pass'],
3237
+ unbanlist: ['Damp Rock'],
3276
3238
  },
3277
3239
  {
3278
3240
  name: "[Gen 5] GBU Singles",
@@ -3454,7 +3416,7 @@ exports.Formats = [
3454
3416
  ruleset: ['[Gen 4] PU'],
3455
3417
  banlist: [
3456
3418
  'Ampharos', 'Armaldo', 'Bellossom', 'Dragonair', 'Electabuzz', 'Gabite', 'Gastrodon', 'Glaceon', 'Glalie',
3457
- 'Golduck', 'Gorebyss', 'Hippopotas', 'Kadabra', 'Machoke', 'Magmar', 'Mantine', 'Marowak', 'Metang',
3419
+ 'Golduck', 'Gorebyss', 'Hippopotas', 'Kadabra', 'Lapras', 'Machoke', 'Magmar', 'Mantine', 'Marowak', 'Metang',
3458
3420
  'Misdreavus', 'Monferno', 'Mr. Mime', 'Muk', 'Murkrow', 'Pinsir', 'Politoed', 'Purugly', 'Quagsire',
3459
3421
  'Raichu', 'Rampardos', 'Rapidash', 'Regigigas', 'Relicanth', 'Rhydon', 'Scyther', 'Sneasel', 'Snover',
3460
3422
  'Solrock', 'Tangela', 'Torkoal', 'Victreebel', 'Xatu', 'Zangoose', 'Damp Rock',
@@ -3518,16 +3480,6 @@ exports.Formats = [
3518
3480
  section: "Past Generations",
3519
3481
  column: 5,
3520
3482
  },
3521
- {
3522
- name: "[Gen 3] Ubers",
3523
- threads: [
3524
- `&bullet; <a href="https://www.smogon.com/forums/posts/8286280/">ADV Ubers</a>`,
3525
- ],
3526
- mod: 'gen3',
3527
- searchShow: false,
3528
- ruleset: ['Standard', 'Deoxys Camouflage Clause', 'One Baton Pass Clause'],
3529
- banlist: ['Wobbuffet + Leftovers'],
3530
- },
3531
3483
  {
3532
3484
  name: "[Gen 3] UU",
3533
3485
  threads: [
@@ -3549,6 +3501,24 @@ exports.Formats = [
3549
3501
  ruleset: ['Standard'],
3550
3502
  banlist: ['Uber', 'OU', 'UUBL', 'UU', 'Smeargle + Ingrain'],
3551
3503
  },
3504
+ {
3505
+ name: "[Gen 3] 1v1",
3506
+ desc: `Bring three Pok&eacute;mon to Team Preview and choose one to battle.`,
3507
+ threads: [
3508
+ `&bullet; <a href="https://www.smogon.com/forums/posts/8031456/">ADV 1v1</a>`,
3509
+ ],
3510
+ mod: 'gen3',
3511
+ searchShow: false,
3512
+ ruleset: [
3513
+ 'Picked Team Size = 1', 'Max Team Size = 3',
3514
+ '[Gen 3] OU', 'Accuracy Moves Clause', 'Sleep Moves Clause', 'Team Preview', '!Freeze Clause Mod',
3515
+ ],
3516
+ banlist: [
3517
+ 'Clefable', 'Slaking', 'Snorlax', 'Suicune', 'Zapdos', 'Destiny Bond', 'Explosion', 'Ingrain', 'Perish Song',
3518
+ 'Self-Destruct', 'Bright Powder', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw',
3519
+ ],
3520
+ unbanlist: ['Mr. Mime', 'Wobbuffet', 'Wynaut', 'Sand Veil'],
3521
+ },
3552
3522
  {
3553
3523
  name: "[Gen 3] Doubles OU",
3554
3524
  threads: [
@@ -3577,6 +3547,15 @@ exports.Formats = [
3577
3547
  debug: true,
3578
3548
  ruleset: ['HP Percentage Mod', 'Cancel Mod', 'Max Team Size = 24', 'Max Move Count = 24', 'Max Level = 9999', 'Default Level = 100'],
3579
3549
  },
3550
+ {
3551
+ name: "[Gen 2] Ubers",
3552
+ threads: [
3553
+ `&bullet; <a href="https://www.smogon.com/forums/posts/8286282/">GSC Ubers</a>`,
3554
+ ],
3555
+ mod: 'gen2',
3556
+ searchShow: false,
3557
+ ruleset: ['Standard'],
3558
+ },
3580
3559
  {
3581
3560
  name: "[Gen 2] UU",
3582
3561
  threads: [`&bullet; <a href="https://www.smogon.com/forums/threads/3576710/">GSC UU</a>`],
@@ -3584,6 +3563,7 @@ exports.Formats = [
3584
3563
  searchShow: false,
3585
3564
  ruleset: ['[Gen 2] OU'],
3586
3565
  banlist: ['OU', 'UUBL'],
3566
+ unbanlist: ['Mean Look + Baton Pass', 'Spider Web + Baton Pass'],
3587
3567
  },
3588
3568
  {
3589
3569
  name: "[Gen 2] NU",
@@ -3666,7 +3646,7 @@ exports.Formats = [
3666
3646
  ],
3667
3647
  mod: 'gen1',
3668
3648
  searchShow: false,
3669
- ruleset: ['[Gen 1] UU'],
3649
+ ruleset: ['[Gen 1] UU', '!APT Clause'],
3670
3650
  banlist: ['UU', 'NUBL'],
3671
3651
  },
3672
3652
  {
@@ -3690,6 +3670,19 @@ exports.Formats = [
3690
3670
  ],
3691
3671
  banlist: ['Uber'],
3692
3672
  },
3673
+ {
3674
+ name: "[Gen 1] Stadium OU",
3675
+ threads: [
3676
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3685877/">Stadium OU Viability Rankings</a>`,
3677
+ ],
3678
+ mod: 'gen1stadium',
3679
+ searchShow: false,
3680
+ ruleset: ['Standard', 'Team Preview'],
3681
+ banlist: ['Uber',
3682
+ 'Nidoking + Fury Attack + Thrash', 'Exeggutor + Poison Powder + Stomp', 'Exeggutor + Sleep Powder + Stomp',
3683
+ 'Exeggutor + Stun Spore + Stomp', 'Jolteon + Focus Energy + Thunder Shock', 'Flareon + Focus Energy + Ember',
3684
+ ],
3685
+ },
3693
3686
  {
3694
3687
  name: "[Gen 1] Tradebacks OU",
3695
3688
  desc: `RBY OU with movepool additions from the Time Capsule.`,