@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
package/config/formats.ts CHANGED
@@ -86,10 +86,7 @@ export const Formats: FormatList = [
86
86
 
87
87
  mod: 'gen8',
88
88
  ruleset: ['Standard', 'Dynamax Clause'],
89
- banlist: [
90
- 'Uber', 'AG', 'Arena Trap', 'Moody', 'Power Construct', 'Sand Veil', 'Shadow Tag', 'Snow Cloak',
91
- 'Bright Powder', 'King\'s Rock', 'Lax Incense', 'Baton Pass',
92
- ],
89
+ banlist: ['Uber', 'AG', 'Arena Trap', 'Moody', 'Power Construct', 'Sand Veil', 'Shadow Tag', 'Snow Cloak', 'King\'s Rock', 'Baton Pass'],
93
90
  },
94
91
  {
95
92
  name: "[Gen 8] OU (Blitz)",
@@ -167,8 +164,8 @@ export const Formats: FormatList = [
167
164
  mod: 'gen8',
168
165
  ruleset: ['Little Cup', 'Standard', 'Dynamax Clause'],
169
166
  banlist: [
170
- 'Corsola-Galar', 'Cutiefly', 'Drifloon', 'Gastly', 'Gothita', 'Rufflet', 'Scraggy', 'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Vulpix-Alola', 'Woobat', 'Zigzagoon-Base',
171
- 'Chlorophyll', 'Moody', 'Baton Pass', 'Sticky Web',
167
+ 'Corsola-Galar', 'Cutiefly', 'Drifloon', 'Gastly', 'Gothita', 'Rufflet', 'Scraggy', 'Scyther', 'Sneasel', 'Swirlix',
168
+ 'Tangela', 'Vullaby', 'Vulpix-Alola', 'Woobat', 'Zigzagoon-Base', 'Chlorophyll', 'Moody', 'Baton Pass', 'Sticky Web',
172
169
  ],
173
170
  },
174
171
  {
@@ -186,8 +183,8 @@ export const Formats: FormatList = [
186
183
  'Blaziken', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh',
187
184
  'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Mewtwo', 'Naganadel',
188
185
  'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram', 'Solgaleo', 'Urshifu-Base', 'Xerneas', 'Yveltal',
189
- 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base', 'Moody', 'Power Construct', 'Shadow Tag', 'Bright Powder',
190
- 'Damp Rock', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw', 'Smooth Rock', 'Terrain Extender', 'Acupressure', 'Baton Pass',
186
+ 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base', 'Moody', 'Power Construct', 'Shadow Tag', 'Damp Rock',
187
+ 'Focus Band', 'King\'s Rock', 'Quick Claw', 'Smooth Rock', 'Terrain Extender', 'Acupressure', 'Baton Pass',
191
188
  ],
192
189
  },
193
190
  {
@@ -235,8 +232,9 @@ export const Formats: FormatList = [
235
232
  mod: 'gen8',
236
233
  ruleset: ['[Gen 8] PU'],
237
234
  banlist: [
238
- 'PU', 'Arctovish', 'Aurorus', 'Basculin', 'Centiskorch', 'Drampa', 'Exeggutor-Alola', 'Gallade', 'Haunter', 'Magmortar', 'Magneton', 'Malamar',
239
- 'Omastar', 'Rotom-Frost', 'Turtonator', 'Vanilluxe', 'Vikavolt', 'Silvally-Dragon', 'Silvally-Ground', 'Sneasel', 'Damp Rock', 'Grassy Seed',
235
+ 'PU', 'Arctovish', 'Aurorus', 'Basculin', 'Centiskorch', 'Drampa', 'Exeggutor-Alola', 'Gallade', 'Haunter', 'Magmortar', 'Magneton',
236
+ 'Malamar', 'Ninjask', 'Omastar', 'Rotom-Frost', 'Turtonator', 'Vanilluxe', 'Vikavolt', 'Silvally-Dragon', 'Silvally-Ground', 'Sneasel',
237
+ 'Damp Rock', 'Grassy Seed',
240
238
  ],
241
239
  },
242
240
  {
@@ -252,7 +250,7 @@ export const Formats: FormatList = [
252
250
  // LC OU
253
251
  'Abra', 'Carvanha', 'Diglett-Base', 'Dwebble', 'Ferroseed', 'Foongus', 'Frillish', 'Grookey', 'Koffing',
254
252
  'Larvesta', 'Magby', 'Magnemite', 'Mareanie', 'Mienfoo', 'Mudbray', 'Natu', 'Onix', 'Pawniard',
255
- 'Ponyta-Base', 'Porygon', 'Slowpoke-Base', 'Staryu', 'Timburr', 'Trapinch', 'Tyrunt', 'Vullaby',
253
+ 'Ponyta-Base', 'Porygon', 'Slowpoke-Base', 'Staryu', 'Timburr', 'Trapinch', 'Tyrunt',
256
254
  // LC UUBL
257
255
  'Archen', 'Farfetch\u2019d-Galar', 'Scorbunny', 'Shellder', 'Wingull',
258
256
  ],
@@ -290,13 +288,24 @@ export const Formats: FormatList = [
290
288
  restricted: ['Restricted Legendary'],
291
289
  },
292
290
  {
293
- name: "[Gen 8] Single Battle Cup",
291
+ name: "[Gen 8] Battle Stadium Singles Series 13",
292
+
293
+ mod: 'gen8',
294
+ searchShow: false,
295
+ ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8'],
296
+ banlist: ['Eternatus-Eternamax'],
297
+ unbanlist: ['Mythical', 'Restricted Legendary'],
298
+ },
299
+ {
300
+ name: "[Gen 8] I Choose 'Chu!",
294
301
  threads: [
295
- `&bullet; <a href="https://www.pokemon.com/us/pokemon-news/register-now-for-the-single-battle-cup-competition/">Single Battle Cup</a>`,
302
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3705481/">I Choose 'Chu! Discussion</a>`,
296
303
  ],
297
304
 
298
305
  mod: 'gen8',
299
306
  ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8'],
307
+ banlist: ['All Pokemon', 'Raichu-Alola + Sing'],
308
+ unbanlist: ['Pichu', 'Pikachu', 'Raichu'],
300
309
  },
301
310
  {
302
311
  name: "[Gen 8] Custom Game",
@@ -383,6 +392,16 @@ export const Formats: FormatList = [
383
392
  ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer', 'Limit Two Restricted'],
384
393
  restricted: ['Restricted Legendary'],
385
394
  },
395
+ {
396
+ name: "[Gen 8] Battle Stadium Doubles Series 13",
397
+
398
+ mod: 'gen8',
399
+ gameType: 'doubles',
400
+ searchShow: false,
401
+ ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer'],
402
+ banlist: ['Eternatus-Eternamax'],
403
+ unbanlist: ['Mythical', 'Restricted Legendary'],
404
+ },
386
405
  {
387
406
  name: "[Gen 8] VGC 2021",
388
407
 
@@ -625,261 +644,35 @@ export const Formats: FormatList = [
625
644
  column: 2,
626
645
  },
627
646
  {
628
- name: "[Gen 8] Broken Record",
629
- desc: `Pok&eacute;mon can hold a TR to use that move in battle.`,
647
+ name: "[Gen 8] Re-Evolution",
648
+ desc: `Pok&eacute;mon gain the stat changes they would gain from evolving again.`,
630
649
  threads: [
631
- `&bullet; <a href="https://www.smogon.com/forums/threads/3701270/">Broken Record</a>`,
650
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3703643/">Re-Evolution</a>`,
632
651
  ],
633
652
 
634
653
  mod: 'gen8',
635
- ruleset: ['Standard', '!Sleep Clause Mod', 'Sleep Moves Clause', 'Dynamax Clause'],
654
+ ruleset: ['Standard OMs', 'Re-Evolution Mod', 'Evasion Abilities Clause', 'Sleep Clause Mod'],
636
655
  banlist: [
637
- 'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina', 'Giratina-Origin',
638
- 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna', 'Marshadow',
639
- 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Regieleki', 'Reshiram', 'Solgaleo',
640
- 'Spectrier', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base',
641
- 'Arena Trap', 'Magnet Pull', 'Moody', 'Power Construct', 'Shadow Tag', 'TR29 (Baton Pass)', 'TR82 (Stored Power)', 'Baton Pass',
656
+ 'Calyrex-Shadow', 'Darmanitan-Galar', 'Gyarados', 'Lunala', 'Milotic', 'Naganadel', 'Solgaleo', 'Slowking-Galar', 'Urshifu-Base',
657
+ 'Volcarona', 'Zacian-Crowned', 'Arena Trap', 'Moody', 'Shadow Tag', 'Bright Powder', 'King\'s Rock', 'Lax Incense', 'Baton Pass',
642
658
  ],
643
- onValidateSet(set) {
644
- if (!set.item) return;
645
- const item = this.dex.items.get(set.item);
646
- if (!/^tr\d\d/i.test(item.name)) return;
647
- const moveName = item.desc.split('move ')[1].split('.')[0];
648
- if (set.moves.map(this.toID).includes(this.toID(moveName))) {
649
- return [
650
- `${set.species} can't run ${item.name} (${moveName}) as its item because it already has that move in its moveset.`,
651
- ];
652
- }
653
- },
654
- onValidateTeam(team) {
655
- const trs = new Set<string>();
656
- for (const set of team) {
657
- if (!set.item) continue;
658
- const item = this.dex.items.get(set.item).name;
659
- if (!/^tr\d\d/i.test(item)) continue;
660
- if (trs.has(item)) {
661
- return [`Your team already has a Pok\u00e9mon with ${item}.`];
662
- }
663
- trs.add(item);
664
- }
665
- },
666
- onTakeItem(item) {
667
- return !/^tr\d\d/i.test(item.name);
668
- },
669
- onModifyMove(move) {
670
- if (move.id === 'knockoff') {
671
- move.onBasePower = function (basePower, source, target, m) {
672
- const item = target.getItem();
673
- if (!this.singleEvent('TakeItem', item, target.itemState, target, target, m, item)) return;
674
- // Very hardcode but I'd prefer to not make a mod for one damage calculation change
675
- if (item.id && !/^tr\d\d/i.test(item.id)) {
676
- return this.chainModify(1.5);
677
- }
678
- };
679
- }
680
- },
681
- onBegin() {
682
- for (const pokemon of this.getAllPokemon()) {
683
- const item = pokemon.getItem();
684
- if (/^tr\d\d/i.test(item.name)) {
685
- const move = this.dex.moves.get(item.desc.split('move ')[1].split('.')[0]);
686
- pokemon.moveSlots = (pokemon as any).baseMoveSlots = [
687
- ...pokemon.baseMoveSlots, {
688
- id: move.id,
689
- move: move.name,
690
- pp: move.pp * 8 / 5,
691
- maxpp: move.pp * 8 / 5,
692
- target: move.target,
693
- disabled: false,
694
- disabledSource: '',
695
- used: false,
696
- },
697
- ];
698
- }
699
- }
700
- },
701
659
  },
702
660
  {
703
- name: "[Gen 8] Inheritance",
704
- desc: `Pok&eacute;mon may use the ability and moves of another, as long as they forfeit their own learnset.`,
661
+ name: "[Gen 8] Category Swap",
662
+ desc: `All physical moves become special, and all special moves become physical.`,
705
663
  threads: [
706
- `&bullet; <a href="https://www.smogon.com/forums/threads/3656811/">Inheritance</a>`,
664
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3702709/">Category Swap</a>`,
707
665
  ],
708
666
 
709
667
  mod: 'gen8',
710
- // searchShow: false,
711
- ruleset: ['Standard', '!Sleep Clause Mod', 'Sleep Moves Clause', '2 Ability Clause', 'Dynamax Clause'],
668
+ ruleset: ['Standard OMs', 'Category Swap Mod', 'Sleep Clause Mod'],
712
669
  banlist: [
713
- 'Blacephalon', 'Blaziken', 'Butterfree', 'Calyrex-Ice', 'Calyrex-Shadow', 'Chansey', 'Combusken', 'Cresselia', 'Darmanitan-Galar', 'Dialga', 'Dracovish',
714
- 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
715
- 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Natu', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Regieleki',
716
- 'Regigigas', 'Reshiram', 'Sableye', 'Shedinja', 'Solgaleo', 'Spectrier', 'Tapu Koko', 'Toxtricity', 'Torkoal', 'Urshifu-Base', 'Xatu', 'Xerneas', 'Yveltal',
717
- 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zeraora', 'Zekrom', 'Arena Trap', 'Contrary', 'Drizzle', 'Huge Power', 'Imposter', 'Innards Out',
718
- 'Libero', 'Moody', 'Power Construct', 'Pure Power', 'Quick Draw', 'Shadow Tag', 'Sheer Force', 'Simple', 'Unaware', 'Unburden', 'Water Bubble', 'King\'s Rock',
719
- 'Quick Claw', 'Baton Pass', 'Bolt Beak', 'Fishious Rend', 'Shell Smash', 'Thousand Arrows',
670
+ 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus', 'Genesect', 'Giratina',
671
+ 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
672
+ 'Magearna', 'Mewtwo', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Nidoking', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram',
673
+ 'Solgaleo', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Arena Trap', 'Moody',
674
+ 'Power Construct', 'Shadow Tag', 'King\'s Rock', 'Baton Pass', 'Draco Meteor', 'Overheat',
720
675
  ],
721
- getEvoFamily(speciesid) {
722
- let species = Dex.species.get(speciesid);
723
- while (species.prevo) {
724
- species = Dex.species.get(species.prevo);
725
- }
726
- return species.id;
727
- },
728
- validateSet(set, teamHas) {
729
- const unreleased = (pokemon: Species) => pokemon.tier === "Unreleased" && pokemon.isNonstandard === "Unobtainable";
730
- if (!teamHas.abilityMap) {
731
- teamHas.abilityMap = Object.create(null);
732
- for (const pokemon of Dex.species.all()) {
733
- if (pokemon.isNonstandard || unreleased(pokemon)) continue;
734
- if (pokemon.requiredAbility || pokemon.requiredItem || pokemon.requiredMove) continue;
735
- if (this.ruleTable.isBannedSpecies(pokemon)) continue;
736
-
737
- for (const key of Object.values(pokemon.abilities)) {
738
- const abilityId = this.dex.toID(key);
739
- if (abilityId in teamHas.abilityMap) {
740
- teamHas.abilityMap[abilityId][pokemon.evos ? 'push' : 'unshift'](pokemon.id);
741
- } else {
742
- teamHas.abilityMap[abilityId] = [pokemon.id];
743
- }
744
- }
745
- }
746
- }
747
-
748
- const problem = this.validateForme(set);
749
- if (problem.length) return problem;
750
-
751
- const species = this.dex.species.get(set.species);
752
- if (!species.exists || species.num < 1) return [`The Pok\u00e9mon "${set.species}" does not exist.`];
753
- if (species.isNonstandard || unreleased(species)) {
754
- return [`${species.name} is not obtainable in Generation ${this.dex.gen}.`];
755
- }
756
-
757
- const name = set.name;
758
- if (this.ruleTable.isBannedSpecies(species)) {
759
- return this.validateSet(set, teamHas);
760
- }
761
-
762
- const ability = this.dex.abilities.get(set.ability);
763
- if (!ability.exists || ability.isNonstandard) return [`${name} needs to have a valid ability.`];
764
- const pokemonWithAbility = teamHas.abilityMap[ability.id];
765
- if (!pokemonWithAbility) return [`${ability.name} is not available on a legal Pok\u00e9mon.`];
766
-
767
- (this.format as any).debug = true;
768
-
769
- if (!teamHas.abilitySources) teamHas.abilitySources = Object.create(null);
770
- const validSources: string[] = teamHas.abilitySources[this.dex.toID(set.species)] = []; // Evolution families
771
-
772
- let canonicalSource = ''; // Specific for the basic implementation of Donor Clause (see onValidateTeam).
773
-
774
- for (const donor of pokemonWithAbility) {
775
- const donorSpecies = this.dex.species.get(donor);
776
- let format = this.format;
777
- if (!format.getEvoFamily) format = this.dex.formats.get('gen8inheritance');
778
- const evoFamily = format.getEvoFamily!(donorSpecies.id);
779
- if (validSources.includes(evoFamily)) continue;
780
-
781
- set.species = donorSpecies.name;
782
- set.name = donorSpecies.baseSpecies;
783
- const problems = this.validateSet(set, teamHas) || [];
784
- if (!problems.length) {
785
- validSources.push(evoFamily);
786
- canonicalSource = donorSpecies.name;
787
- }
788
- // Specific for the basic implementation of Donor Clause (see onValidateTeam).
789
- if (validSources.length > 1) break;
790
- }
791
- (this.format as any).debug = false;
792
-
793
- set.name = name;
794
- set.species = species.name;
795
- if (!validSources.length) {
796
- if (pokemonWithAbility.length > 1) return [`${name}'s set is illegal.`];
797
- return [`${name} has an illegal set with an ability from ${this.dex.species.get(pokemonWithAbility[0]).name}.`];
798
- }
799
-
800
- // Protocol: Include the data of the donor species in the `ability` data slot.
801
- // Afterwards, we are going to reset the name to what the user intended.
802
- set.ability = `${set.ability}0${canonicalSource}`;
803
- return null;
804
- },
805
- onValidateTeam(team, f, teamHas) {
806
- if (this.ruleTable.has('2abilityclause')) {
807
- const abilityTable = new Map<string, number>();
808
- const base: {[k: string]: string} = {
809
- airlock: 'cloudnine',
810
- battlearmor: 'shellarmor',
811
- clearbody: 'whitesmoke',
812
- dazzling: 'queenlymajesty',
813
- emergencyexit: 'wimpout',
814
- filter: 'solidrock',
815
- gooey: 'tanglinghair',
816
- insomnia: 'vitalspirit',
817
- ironbarbs: 'roughskin',
818
- libero: 'protean',
819
- minus: 'plus',
820
- moxie: 'chillingneigh',
821
- powerofalchemy: 'receiver',
822
- propellertail: 'stalwart',
823
- teravolt: 'moldbreaker',
824
- turboblaze: 'moldbreaker',
825
- };
826
- for (const set of team) {
827
- let ability = this.toID(set.ability.split('0')[0]);
828
- if (!ability) continue;
829
- if (ability in base) ability = base[ability] as ID;
830
- if ((abilityTable.get(ability) || 0) >= 2) {
831
- return [
832
- `You are limited to two of each ability by 2 Ability Clause.`,
833
- `(You have more than two ${this.dex.abilities.get(ability).name} variants)`,
834
- ];
835
- }
836
- abilityTable.set(ability, (abilityTable.get(ability) || 0) + 1);
837
- }
838
- }
839
-
840
- // Donor Clause
841
- const evoFamilyLists = [];
842
- for (const set of team) {
843
- const abilitySources = teamHas.abilitySources?.[this.dex.toID(set.species)];
844
- if (!abilitySources) continue;
845
- let format = this.format;
846
- if (!format.getEvoFamily) format = this.dex.formats.get('gen8inheritance');
847
- evoFamilyLists.push(abilitySources.map(format.getEvoFamily!));
848
- }
849
-
850
- // Checking actual full incompatibility would require expensive algebra.
851
- // Instead, we only check the trivial case of multiple Pokémon only legal for exactly one family. FIXME?
852
- const requiredFamilies = Object.create(null);
853
- for (const evoFamilies of evoFamilyLists) {
854
- if (evoFamilies.length !== 1) continue;
855
- const [familyId] = evoFamilies;
856
- if (!(familyId in requiredFamilies)) requiredFamilies[familyId] = 1;
857
- requiredFamilies[familyId]++;
858
- if (requiredFamilies[familyId] > 2) {
859
- return [
860
- `You are limited to up to two inheritances from each evolution family by the Donor Clause.`,
861
- `(You inherit more than twice from ${this.dex.species.get(familyId).name}).`,
862
- ];
863
- }
864
- }
865
- },
866
- onBegin() {
867
- for (const pokemon of this.getAllPokemon()) {
868
- if (pokemon.baseAbility.includes('0')) {
869
- const donor = pokemon.baseAbility.split('0')[1];
870
- pokemon.m.donor = this.toID(donor);
871
- pokemon.baseAbility = this.toID(pokemon.baseAbility.split('0')[0]);
872
- pokemon.ability = pokemon.baseAbility;
873
- }
874
- }
875
- },
876
- onSwitchIn(pokemon) {
877
- if (!pokemon.m.donor) return;
878
- const donorTemplate = this.dex.species.get(pokemon.m.donor);
879
- if (!donorTemplate.exists) return;
880
- // Place volatiles on the Pokémon to show the donor details.
881
- this.add('-start', pokemon, donorTemplate.name, '[silent]');
882
- },
883
676
  },
884
677
 
885
678
  // Other Metagames
@@ -916,16 +709,16 @@ export const Formats: FormatList = [
916
709
  ],
917
710
 
918
711
  mod: 'gen8',
919
- ruleset: ['Standard', '!Obtainable Abilities', '2 Ability Clause', 'Dynamax Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
712
+ ruleset: ['Standard OMs', '!Obtainable Abilities', '2 Ability Clause', 'Sleep Moves Clause'],
920
713
  banlist: [
921
- 'Archeops', 'Blacephalon', 'Buzzwole', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus', 'Gengar',
922
- 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Keldeo', 'Kommo-o', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White',
714
+ 'Archeops', 'Blacephalon', 'Buzzwole', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus',
715
+ 'Gengar', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Keldeo', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White',
923
716
  'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Noivern',
924
717
  'Palkia', 'Pheromosa', 'Rayquaza', 'Regigigas', 'Reshiram', 'Shedinja', 'Solgaleo', 'Spectrier', 'Urshifu', 'Urshifu-Rapid-Strike',
925
- 'Victini', 'Weavile', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta-Base', 'Zekrom', 'Zeraora', 'Zygarde-Base',
926
- 'Arena Trap', 'Comatose', 'Contrary', 'Fluffy', 'Fur Coat', 'Gorilla Tactics', 'Huge Power', 'Ice Scales', 'Illusion', 'Imposter',
927
- 'Innards Out', 'Intrepid Sword', 'Libero', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Protean',
928
- 'Pure Power', 'Shadow Tag', 'Simple', 'Stakeout', 'Speed Boost', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
718
+ 'Victini', 'Weavile', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta-Base', 'Zekrom', 'Zeraora', 'Zygarde-Base', 'Arena Trap',
719
+ 'Comatose', 'Contrary', 'Fluffy', 'Fur Coat', 'Gorilla Tactics', 'Huge Power', 'Ice Scales', 'Illusion', 'Imposter', 'Innards Out',
720
+ 'Intrepid Sword', 'Libero', 'Magic Bounce', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Protean',
721
+ 'Pure Power', 'Shadow Tag', 'Simple', 'Stakeout', 'Speed Boost', 'Unburden', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
929
722
  ],
930
723
  },
931
724
  {
@@ -937,7 +730,7 @@ export const Formats: FormatList = [
937
730
  ],
938
731
 
939
732
  mod: 'mixandmega',
940
- ruleset: ['Standard', 'Overflow Stat Mod', 'Dynamax Clause'],
733
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
941
734
  banlist: [
942
735
  'Calyrex-Shadow', 'Eternatus', 'Kyogre', 'Zacian',
943
736
  'Beedrillite', 'Blazikenite', 'Gengarite', 'Kangaskhanite', 'Mawilite', 'Medichamite', 'Pidgeotite',
@@ -1006,7 +799,7 @@ export const Formats: FormatList = [
1006
799
  ],
1007
800
 
1008
801
  mod: 'gen8',
1009
- ruleset: ['Standard', 'STABmons Move Legality', 'Dynamax Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
802
+ ruleset: ['Standard OMs', 'STABmons Move Legality', 'Sleep Moves Clause'],
1010
803
  banlist: [
1011
804
  'Aegislash', 'Blacephalon', 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus',
1012
805
  'Genesect', 'Garchomp', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus',
@@ -1030,7 +823,7 @@ export const Formats: FormatList = [
1030
823
  ],
1031
824
 
1032
825
  mod: 'gen8',
1033
- ruleset: ['Not Fully Evolved', 'Standard', 'Dynamax Clause'],
826
+ ruleset: ['Standard OMs', 'Not Fully Evolved', 'Sleep Clause Mod'],
1034
827
  banlist: [
1035
828
  'Chansey', 'Doublade', 'Golbat', 'Haunter', 'Kadabra', 'Magmar', 'Magneton', 'Mr. Mime-Galar', 'Pawniard', 'Pikachu',
1036
829
  'Porygon2', 'Rhydon', 'Scyther', 'Sneasel', 'Type: Null', 'Vulpix-Base', 'Arena Trap', 'Shadow Tag', 'Baton Pass',
@@ -1044,10 +837,10 @@ export const Formats: FormatList = [
1044
837
  ],
1045
838
 
1046
839
  mod: 'gen8',
1047
- ruleset: ['Standard', 'Dynamax Clause', 'Sleep Moves Clause'],
840
+ ruleset: ['Standard OMs', 'Sleep Moves Clause'],
1048
841
  banlist: [
1049
- 'Blissey', 'Calyrex-Shadow', 'Chansey', 'Crawdaunt', 'Dragapult', 'Eternatus', 'Hawlucha', 'Marowak-Alola', 'Melmetal',
1050
- 'Pikachu', 'Toxapex', 'Xerneas', 'Zacian', 'Zacian-Crowned', 'Uber > 1', 'AG ++ Uber > 1', 'Arena Trap', 'Huge Power',
842
+ 'Blissey', 'Calyrex-Shadow', 'Chansey', 'Crawdaunt', 'Dragapult', 'Eternatus', 'Hawlucha', 'Marowak-Alola', 'Melmetal', 'Nidoking',
843
+ 'Nidoqueen', 'Pikachu', 'Toxapex', 'Xerneas', 'Zacian', 'Zacian-Crowned', 'Uber > 1', 'AG ++ Uber > 1', 'Arena Trap', 'Huge Power',
1051
844
  'Moody', 'Pure Power', 'Shadow Tag', 'Swift Swim', 'Bright Powder', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw',
1052
845
  'Baton Pass',
1053
846
  ],
@@ -1125,6 +918,10 @@ export const Formats: FormatList = [
1125
918
  'Decorate', 'Final Gambit', 'Flatter', 'Floral Healing', 'Flower Shield', 'Follow Me', 'Heal Pulse', 'Rage Powder', 'Swagger',
1126
919
  ],
1127
920
  },
921
+
922
+ // Brilliant Diamond/Shining Pearl
923
+ ///////////////////////////////////////////////////////////////////
924
+
1128
925
  {
1129
926
  section: "BD/SP",
1130
927
  column: 2,
@@ -1150,10 +947,7 @@ export const Formats: FormatList = [
1150
947
 
1151
948
  mod: 'gen8bdsp',
1152
949
  ruleset: ['Standard'],
1153
- banlist: [
1154
- 'Uber', 'Arena Trap', 'Drizzle', 'Moody', 'Sand Veil', 'Shadow Tag', 'Snow Cloak',
1155
- 'Bright Powder', 'King\'s Rock', 'Lax Incense', 'Razor Fang', 'Baton Pass',
1156
- ],
950
+ banlist: ['Uber', 'Arena Trap', 'Drizzle', 'Moody', 'Sand Veil', 'Shadow Tag', 'Snow Cloak', 'King\'s Rock', 'Razor Fang', 'Baton Pass'],
1157
951
  },
1158
952
  {
1159
953
  name: "[Gen 8 BDSP] Ubers",
@@ -1162,6 +956,7 @@ export const Formats: FormatList = [
1162
956
  ],
1163
957
 
1164
958
  mod: 'gen8bdsp',
959
+ searchShow: false,
1165
960
  ruleset: ['Standard'],
1166
961
  banlist: ['AG', 'Baton Pass'],
1167
962
  },
@@ -1172,6 +967,7 @@ export const Formats: FormatList = [
1172
967
  ],
1173
968
 
1174
969
  mod: 'gen8bdsp',
970
+ searchShow: false,
1175
971
  ruleset: ['[Gen 8 BDSP] OU'],
1176
972
  banlist: ['OU', 'UUBL'],
1177
973
  },
@@ -1182,6 +978,7 @@ export const Formats: FormatList = [
1182
978
  ],
1183
979
 
1184
980
  mod: 'gen8bdsp',
981
+ searchShow: false,
1185
982
  ruleset: ['[Gen 8 BDSP] UU'],
1186
983
  banlist: ['UU', 'RUBL', 'Drought'],
1187
984
  },
@@ -1192,6 +989,7 @@ export const Formats: FormatList = [
1192
989
  ],
1193
990
 
1194
991
  mod: 'gen8bdsp',
992
+ searchShow: false,
1195
993
  ruleset: ['[Gen 8 BDSP] RU'],
1196
994
  banlist: ['RU', 'NUBL', 'Damp Rock', 'Heat Rock'],
1197
995
  },
@@ -1202,6 +1000,7 @@ export const Formats: FormatList = [
1202
1000
  ],
1203
1001
 
1204
1002
  mod: 'gen8bdsp',
1003
+ searchShow: false,
1205
1004
  ruleset: ['[Gen 8 BDSP] NU'],
1206
1005
  banlist: ['NU', 'PUBL'],
1207
1006
  },
@@ -1212,6 +1011,7 @@ export const Formats: FormatList = [
1212
1011
  ],
1213
1012
 
1214
1013
  mod: 'gen8bdsp',
1014
+ searchShow: false,
1215
1015
  ruleset: ['Little Cup', 'Standard'],
1216
1016
  banlist: ['Gligar', 'Meditite', 'Misdreavus', 'Munchlax', 'Murkrow', 'Scyther', 'Sneasel', 'Tangela', 'Vulpix', 'Yanma', 'Moody', 'Baton Pass', 'Sticky Web'],
1217
1017
  },
@@ -1222,6 +1022,7 @@ export const Formats: FormatList = [
1222
1022
  ],
1223
1023
 
1224
1024
  mod: 'gen8bdsp',
1025
+ searchShow: false,
1225
1026
  ruleset: ['[Gen 8 BDSP] OU', 'Same Type Clause'],
1226
1027
  },
1227
1028
  {
@@ -1234,16 +1035,6 @@ export const Formats: FormatList = [
1234
1035
  searchShow: false,
1235
1036
  ruleset: ['[Gen 8 BDSP] OU', '+CAP'],
1236
1037
  },
1237
- {
1238
- name: "[Gen 8 BDSP] 3v3 Singles",
1239
- threads: [
1240
- `&bullet; <a href="https://www.smogon.com/forums/threads/3695092/">BDSP 3v3 Singles</a>`,
1241
- ],
1242
-
1243
- mod: 'gen8bdsp',
1244
- searchShow: false,
1245
- ruleset: ['Flat Rules', 'Min Source Gen = 8'],
1246
- },
1247
1038
  {
1248
1039
  name: "[Gen 8 BDSP] Doubles OU",
1249
1040
  threads: [
@@ -1255,27 +1046,10 @@ export const Formats: FormatList = [
1255
1046
  ruleset: ['Standard Doubles'],
1256
1047
  banlist: ['DUber', 'Dark Void'],
1257
1048
  },
1258
- {
1259
- name: "[Gen 8 BDSP] Battle Festival Doubles",
1260
- threads: [
1261
- `&bullet; <a href="https://www.smogon.com/forums/threads/3694269/">Battle Festival Doubles</a>`,
1262
- ],
1263
1049
 
1264
- mod: 'gen8bdsp',
1265
- gameType: 'doubles',
1266
- ruleset: ['Flat Rules', 'Min Source Gen = 8'],
1267
- },
1268
- {
1269
- name: "[Gen 8 BDSP] Pure Hackmons",
1270
- desc: `Anything that can be hacked in-game and is usable in local battles is allowed.`,
1271
- threads: [
1272
- `&bullet; <a href="https://www.smogon.com/forums/threads/3693868/">Pure Hackmons</a>`,
1273
- ],
1050
+ // Challengeable OMs
1051
+ ///////////////////////////////////////////////////////////////////
1274
1052
 
1275
- mod: 'gen8bdsp',
1276
- searchShow: false,
1277
- ruleset: ['-Nonexistent', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Endless Battle Clause'],
1278
- },
1279
1053
  {
1280
1054
  section: "Challengeable OMs",
1281
1055
  column: 2,
@@ -1289,7 +1063,7 @@ export const Formats: FormatList = [
1289
1063
 
1290
1064
  mod: 'gen8',
1291
1065
  searchShow: false,
1292
- ruleset: ['Standard', 'Dynamax Clause', 'Camomons Mod'],
1066
+ ruleset: ['Standard OMs', 'Camomons Mod', 'Sleep Clause Mod'],
1293
1067
  banlist: [
1294
1068
  'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragonite', 'Eternatus', 'Genesect', 'Giratina', 'Giratina-Origin',
1295
1069
  'Groudon', 'Ho-Oh', 'Hydreigon', 'Kartana', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Marshadow',
@@ -1307,7 +1081,7 @@ export const Formats: FormatList = [
1307
1081
 
1308
1082
  mod: 'gen8',
1309
1083
  searchShow: false,
1310
- ruleset: ['Standard', 'Overflow Stat Mod', 'Dynamax Clause', '2 Ability Clause'],
1084
+ ruleset: ['Standard OMs', '2 Ability Clause', 'Sleep Clause Mod'],
1311
1085
  banlist: ['Corsola-Galar', 'Sneasel', 'Type: Null', 'Arena Trap', 'Ice Scales', 'Moody', 'King\'s Rock', 'Baton Pass'],
1312
1086
  restricted: ['Chansey', 'Lunala', 'Shedinja', 'Solgaleo', 'Gorilla Tactics', 'Huge Power', 'Pure Power', 'Shadow Tag'],
1313
1087
  onValidateTeam(team) {
@@ -1379,61 +1153,244 @@ export const Formats: FormatList = [
1379
1153
  return [`${species.name} cannot use ${item.name} because it is cross evolved into ${crossSpecies.name}.`];
1380
1154
  }
1381
1155
  }
1382
- const ability = this.dex.abilities.get(set.ability);
1383
- if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
1384
- set.species = crossSpecies.name;
1385
- }
1156
+ const ability = this.dex.abilities.get(set.ability);
1157
+ if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
1158
+ set.species = crossSpecies.name;
1159
+ }
1160
+
1161
+ // @ts-ignore
1162
+ set.sp = species;
1163
+ // @ts-ignore
1164
+ set.crossSpecies = crossSpecies;
1165
+ // @ts-ignore
1166
+ set.crossMovesLeft = 2;
1167
+ problems = this.validateSet(set, teamHas);
1168
+ set.name = crossSpecies.name;
1169
+ set.species = species.name;
1170
+ return problems;
1171
+ },
1172
+ onModifySpecies(species, target, source, effect) {
1173
+ if (!target) return; // chat
1174
+ if (effect && ['imposter', 'transform'].includes(effect.id)) return;
1175
+ if (target.set.name === target.set.species) return;
1176
+ const crossSpecies = this.dex.species.get(target.set.name);
1177
+ if (!crossSpecies.exists) return;
1178
+ if (species.battleOnly || !species.nfe) return;
1179
+ const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
1180
+ if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) return;
1181
+ const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
1182
+ if (!crossPrevoSpecies.prevo !== !species.prevo) return;
1183
+
1184
+ const mixedSpecies = this.dex.deepClone(species);
1185
+ mixedSpecies.weightkg =
1186
+ Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
1187
+ mixedSpecies.nfe = false;
1188
+ mixedSpecies.evos = [];
1189
+ mixedSpecies.eggGroups = crossSpecies.eggGroups;
1190
+ mixedSpecies.abilities = crossSpecies.abilities;
1191
+ mixedSpecies.bst = 0;
1192
+ let i: StatID;
1193
+ for (i in species.baseStats) {
1194
+ const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
1195
+ mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
1196
+ mixedSpecies.bst += mixedSpecies.baseStats[i];
1197
+ }
1198
+ if (crossSpecies.types[0] !== crossPrevoSpecies.types[0]) mixedSpecies.types[0] = crossSpecies.types[0];
1199
+ if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
1200
+ mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
1201
+ }
1202
+ if (mixedSpecies.types[0] === mixedSpecies.types[1]) mixedSpecies.types = [mixedSpecies.types[0]];
1203
+
1204
+ return mixedSpecies;
1205
+ },
1206
+ onBegin() {
1207
+ for (const pokemon of this.getAllPokemon()) {
1208
+ pokemon.baseSpecies = pokemon.species;
1209
+ }
1210
+ },
1211
+ },
1212
+ {
1213
+ name: "[Gen 8] Inheritance",
1214
+ desc: `Pok&eacute;mon may use the ability and moves of another, as long as they forfeit their own learnset.`,
1215
+ threads: [
1216
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3656811/">Inheritance</a>`,
1217
+ ],
1218
+
1219
+ mod: 'gen8',
1220
+ searchShow: false,
1221
+ ruleset: ['Standard OMs', '2 Ability Clause', 'Sleep Moves Clause'],
1222
+ banlist: [
1223
+ 'Blacephalon', 'Blaziken', 'Butterfree', 'Calyrex-Ice', 'Calyrex-Shadow', 'Chansey', 'Combusken', 'Cresselia', 'Darmanitan-Galar', 'Dialga',
1224
+ 'Dracovish', 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Lugia',
1225
+ 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Natu', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza',
1226
+ 'Regieleki', 'Regigigas', 'Reshiram', 'Sableye', 'Shedinja', 'Solgaleo', 'Spectrier', 'Tapu Koko', 'Toxtricity', 'Torkoal', 'Urshifu-Base',
1227
+ 'Xatu', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zeraora', 'Zekrom', 'Arena Trap', 'Contrary',
1228
+ 'Drizzle', 'Huge Power', 'Imposter', 'Innards Out', 'Libero', 'Moody', 'Power Construct', 'Pure Power', 'Quick Draw', 'Shadow Tag', 'Sheer Force',
1229
+ 'Simple', 'Unaware', 'Unburden', 'Water Bubble', 'King\'s Rock', 'Quick Claw', 'Baton Pass', 'Bolt Beak', 'Fishious Rend', 'Shell Smash',
1230
+ 'Thousand Arrows',
1231
+ ],
1232
+ getEvoFamily(speciesid) {
1233
+ let species = Dex.species.get(speciesid);
1234
+ while (species.prevo) {
1235
+ species = Dex.species.get(species.prevo);
1236
+ }
1237
+ return species.id;
1238
+ },
1239
+ validateSet(set, teamHas) {
1240
+ const unreleased = (pokemon: Species) => pokemon.tier === "Unreleased" && pokemon.isNonstandard === "Unobtainable";
1241
+ if (!teamHas.abilityMap) {
1242
+ teamHas.abilityMap = Object.create(null);
1243
+ for (const pokemon of Dex.species.all()) {
1244
+ if (pokemon.isNonstandard || unreleased(pokemon)) continue;
1245
+ if (pokemon.requiredAbility || pokemon.requiredItem || pokemon.requiredMove) continue;
1246
+ if (this.ruleTable.isBannedSpecies(pokemon)) continue;
1247
+
1248
+ for (const key of Object.values(pokemon.abilities)) {
1249
+ const abilityId = this.dex.toID(key);
1250
+ if (abilityId in teamHas.abilityMap) {
1251
+ teamHas.abilityMap[abilityId][pokemon.evos ? 'push' : 'unshift'](pokemon.id);
1252
+ } else {
1253
+ teamHas.abilityMap[abilityId] = [pokemon.id];
1254
+ }
1255
+ }
1256
+ }
1257
+ }
1258
+
1259
+ const problem = this.validateForme(set);
1260
+ if (problem.length) return problem;
1261
+
1262
+ const species = this.dex.species.get(set.species);
1263
+ if (!species.exists || species.num < 1) return [`The Pok\u00e9mon "${set.species}" does not exist.`];
1264
+ if (species.isNonstandard || unreleased(species)) {
1265
+ return [`${species.name} is not obtainable in Generation ${this.dex.gen}.`];
1266
+ }
1267
+
1268
+ const name = set.name;
1269
+ if (this.ruleTable.isBannedSpecies(species)) {
1270
+ return this.validateSet(set, teamHas);
1271
+ }
1272
+
1273
+ const ability = this.dex.abilities.get(set.ability);
1274
+ if (!ability.exists || ability.isNonstandard) return [`${name} needs to have a valid ability.`];
1275
+ const pokemonWithAbility = teamHas.abilityMap[ability.id];
1276
+ if (!pokemonWithAbility) return [`${ability.name} is not available on a legal Pok\u00e9mon.`];
1277
+
1278
+ (this.format as any).debug = true;
1279
+
1280
+ if (!teamHas.abilitySources) teamHas.abilitySources = Object.create(null);
1281
+ const validSources: string[] = teamHas.abilitySources[this.dex.toID(set.species)] = []; // Evolution families
1282
+
1283
+ let canonicalSource = ''; // Specific for the basic implementation of Donor Clause (see onValidateTeam).
1284
+
1285
+ for (const donor of pokemonWithAbility) {
1286
+ const donorSpecies = this.dex.species.get(donor);
1287
+ let format = this.format;
1288
+ if (!format.getEvoFamily) format = this.dex.formats.get('gen8inheritance');
1289
+ const evoFamily = format.getEvoFamily!(donorSpecies.id);
1290
+ if (validSources.includes(evoFamily)) continue;
1291
+
1292
+ set.species = donorSpecies.name;
1293
+ set.name = donorSpecies.baseSpecies;
1294
+ const problems = this.validateSet(set, teamHas) || [];
1295
+ if (!problems.length) {
1296
+ validSources.push(evoFamily);
1297
+ canonicalSource = donorSpecies.name;
1298
+ }
1299
+ // Specific for the basic implementation of Donor Clause (see onValidateTeam).
1300
+ if (validSources.length > 1) break;
1301
+ }
1302
+ (this.format as any).debug = false;
1386
1303
 
1387
- // @ts-ignore
1388
- set.sp = species;
1389
- // @ts-ignore
1390
- set.crossSpecies = crossSpecies;
1391
- // @ts-ignore
1392
- set.crossMovesLeft = 2;
1393
- problems = this.validateSet(set, teamHas);
1394
- set.name = crossSpecies.name;
1304
+ set.name = name;
1395
1305
  set.species = species.name;
1396
- return problems;
1397
- },
1398
- onModifySpecies(species, target, source, effect) {
1399
- if (!target) return; // chat
1400
- if (effect && ['imposter', 'transform'].includes(effect.id)) return;
1401
- if (target.set.name === target.set.species) return;
1402
- const crossSpecies = this.dex.species.get(target.set.name);
1403
- if (!crossSpecies.exists) return;
1404
- if (species.battleOnly || !species.nfe) return;
1405
- const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
1406
- if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) return;
1407
- const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
1408
- if (!crossPrevoSpecies.prevo !== !species.prevo) return;
1306
+ if (!validSources.length) {
1307
+ if (pokemonWithAbility.length > 1) return [`${name}'s set is illegal.`];
1308
+ return [`${name} has an illegal set with an ability from ${this.dex.species.get(pokemonWithAbility[0]).name}.`];
1309
+ }
1409
1310
 
1410
- const mixedSpecies = this.dex.deepClone(species);
1411
- mixedSpecies.weightkg =
1412
- Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
1413
- mixedSpecies.nfe = false;
1414
- mixedSpecies.evos = [];
1415
- mixedSpecies.eggGroups = crossSpecies.eggGroups;
1416
- mixedSpecies.abilities = crossSpecies.abilities;
1417
- mixedSpecies.bst = 0;
1418
- let i: StatID;
1419
- for (i in species.baseStats) {
1420
- const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
1421
- mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
1422
- mixedSpecies.bst += mixedSpecies.baseStats[i];
1311
+ // Protocol: Include the data of the donor species in the `ability` data slot.
1312
+ // Afterwards, we are going to reset the name to what the user intended.
1313
+ set.ability = `${set.ability}0${canonicalSource}`;
1314
+ return null;
1315
+ },
1316
+ onValidateTeam(team, f, teamHas) {
1317
+ if (this.ruleTable.has('2abilityclause')) {
1318
+ const abilityTable = new Map<string, number>();
1319
+ const base: {[k: string]: string} = {
1320
+ airlock: 'cloudnine',
1321
+ battlearmor: 'shellarmor',
1322
+ clearbody: 'whitesmoke',
1323
+ dazzling: 'queenlymajesty',
1324
+ emergencyexit: 'wimpout',
1325
+ filter: 'solidrock',
1326
+ gooey: 'tanglinghair',
1327
+ insomnia: 'vitalspirit',
1328
+ ironbarbs: 'roughskin',
1329
+ libero: 'protean',
1330
+ minus: 'plus',
1331
+ moxie: 'chillingneigh',
1332
+ powerofalchemy: 'receiver',
1333
+ propellertail: 'stalwart',
1334
+ teravolt: 'moldbreaker',
1335
+ turboblaze: 'moldbreaker',
1336
+ };
1337
+ for (const set of team) {
1338
+ let ability = this.toID(set.ability.split('0')[0]);
1339
+ if (!ability) continue;
1340
+ if (ability in base) ability = base[ability] as ID;
1341
+ if ((abilityTable.get(ability) || 0) >= 2) {
1342
+ return [
1343
+ `You are limited to two of each ability by 2 Ability Clause.`,
1344
+ `(You have more than two ${this.dex.abilities.get(ability).name} variants)`,
1345
+ ];
1346
+ }
1347
+ abilityTable.set(ability, (abilityTable.get(ability) || 0) + 1);
1348
+ }
1423
1349
  }
1424
- if (crossSpecies.types[0] !== crossPrevoSpecies.types[0]) mixedSpecies.types[0] = crossSpecies.types[0];
1425
- if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
1426
- mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
1350
+
1351
+ // Donor Clause
1352
+ const evoFamilyLists = [];
1353
+ for (const set of team) {
1354
+ const abilitySources = teamHas.abilitySources?.[this.dex.toID(set.species)];
1355
+ if (!abilitySources) continue;
1356
+ let format = this.format;
1357
+ if (!format.getEvoFamily) format = this.dex.formats.get('gen8inheritance');
1358
+ evoFamilyLists.push(abilitySources.map(format.getEvoFamily!));
1427
1359
  }
1428
- if (mixedSpecies.types[0] === mixedSpecies.types[1]) mixedSpecies.types = [mixedSpecies.types[0]];
1429
1360
 
1430
- return mixedSpecies;
1361
+ // Checking actual full incompatibility would require expensive algebra.
1362
+ // Instead, we only check the trivial case of multiple Pokémon only legal for exactly one family. FIXME?
1363
+ const requiredFamilies = Object.create(null);
1364
+ for (const evoFamilies of evoFamilyLists) {
1365
+ if (evoFamilies.length !== 1) continue;
1366
+ const [familyId] = evoFamilies;
1367
+ if (!(familyId in requiredFamilies)) requiredFamilies[familyId] = 1;
1368
+ requiredFamilies[familyId]++;
1369
+ if (requiredFamilies[familyId] > 2) {
1370
+ return [
1371
+ `You are limited to up to two inheritances from each evolution family by the Donor Clause.`,
1372
+ `(You inherit more than twice from ${this.dex.species.get(familyId).name}).`,
1373
+ ];
1374
+ }
1375
+ }
1431
1376
  },
1432
1377
  onBegin() {
1433
1378
  for (const pokemon of this.getAllPokemon()) {
1434
- pokemon.baseSpecies = pokemon.species;
1379
+ if (pokemon.baseAbility.includes('0')) {
1380
+ const donor = pokemon.baseAbility.split('0')[1];
1381
+ pokemon.m.donor = this.toID(donor);
1382
+ pokemon.baseAbility = this.toID(pokemon.baseAbility.split('0')[0]);
1383
+ pokemon.ability = pokemon.baseAbility;
1384
+ }
1435
1385
  }
1436
1386
  },
1387
+ onSwitchIn(pokemon) {
1388
+ if (!pokemon.m.donor) return;
1389
+ const donorTemplate = this.dex.species.get(pokemon.m.donor);
1390
+ if (!donorTemplate.exists) return;
1391
+ // Place volatiles on the Pokémon to show the donor details.
1392
+ this.add('-start', pokemon, donorTemplate.name, '[silent]');
1393
+ },
1437
1394
  },
1438
1395
  {
1439
1396
  name: "[Gen 8] Linked",
@@ -1444,7 +1401,7 @@ export const Formats: FormatList = [
1444
1401
 
1445
1402
  mod: 'linked',
1446
1403
  searchShow: false,
1447
- ruleset: ['Standard', 'Dynamax Clause'],
1404
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1448
1405
  banlist: [
1449
1406
  'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Cloyster', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
1450
1407
  'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
@@ -1477,7 +1434,7 @@ export const Formats: FormatList = [
1477
1434
 
1478
1435
  mod: 'gen8',
1479
1436
  searchShow: false,
1480
- ruleset: ['Standard', 'Dynamax Clause', '2 Ability Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
1437
+ ruleset: ['Standard OMs', '2 Ability Clause', 'Sleep Moves Clause'],
1481
1438
  banlist: [
1482
1439
  'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragonite', 'Eternatus',
1483
1440
  'Genesect', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White',
@@ -1667,7 +1624,7 @@ export const Formats: FormatList = [
1667
1624
 
1668
1625
  mod: 'gen8',
1669
1626
  searchShow: false,
1670
- ruleset: ['Standard', 'Dynamax Clause'],
1627
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1671
1628
  banlist: [
1672
1629
  'Blissey', 'Calyrex-Ice', 'Calyrex-Shadow', 'Chansey', 'Cloyster', 'Dialga', 'Eternatus', 'Genesect', 'Giratina',
1673
1630
  'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
@@ -1721,7 +1678,7 @@ export const Formats: FormatList = [
1721
1678
  ],
1722
1679
  mod: 'pokebilities',
1723
1680
  searchShow: false,
1724
- ruleset: ['Standard', 'Dynamax Clause'],
1681
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1725
1682
  banlist: [
1726
1683
  'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Conkeldurr', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dracozolt',
1727
1684
  'Eternatus', 'Excadrill', 'Genesect', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black',
@@ -1760,10 +1717,26 @@ export const Formats: FormatList = [
1760
1717
  .filter(ability => ability !== pokemon.ability);
1761
1718
  }
1762
1719
  },
1720
+ onBeforeSwitchIn(pokemon) {
1721
+ // Abilities that must be applied before both sides trigger onSwitchIn to correctly
1722
+ // handle switch-in ability-to-ability interactions, e.g. Intimidate counters
1723
+ const neededBeforeSwitchInIDs = [
1724
+ 'clearbody', 'competitive', 'contrary', 'defiant', 'fullmetalbody', 'hypercutter', 'innerfocus',
1725
+ 'mirrorarmor', 'oblivious', 'owntempo', 'rattled', 'scrappy', 'simple', 'whitesmoke',
1726
+ ];
1727
+ if (pokemon.m.innates) {
1728
+ for (const innate of pokemon.m.innates) {
1729
+ if (!neededBeforeSwitchInIDs.includes(innate)) continue;
1730
+ if (pokemon.hasAbility(innate)) continue;
1731
+ pokemon.addVolatile("ability:" + innate, pokemon);
1732
+ }
1733
+ }
1734
+ },
1763
1735
  onSwitchInPriority: 2,
1764
1736
  onSwitchIn(pokemon) {
1765
1737
  if (pokemon.m.innates) {
1766
1738
  for (const innate of pokemon.m.innates) {
1739
+ if (pokemon.hasAbility(innate)) continue;
1767
1740
  pokemon.addVolatile("ability:" + innate, pokemon);
1768
1741
  }
1769
1742
  }
@@ -1786,6 +1759,17 @@ export const Formats: FormatList = [
1786
1759
  pokemon.m.innates = undefined;
1787
1760
  },
1788
1761
  },
1762
+ {
1763
+ name: "[Gen 8] Pure Hackmons",
1764
+ desc: `Anything that can be hacked in-game and is usable in local battles is allowed.`,
1765
+ threads: [
1766
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3656851/">Pure Hackmons</a>`,
1767
+ ],
1768
+
1769
+ mod: 'gen8',
1770
+ searchShow: false,
1771
+ ruleset: ['-Nonexistent', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Endless Battle Clause'],
1772
+ },
1789
1773
  {
1790
1774
  name: "[Gen 8] Shared Power",
1791
1775
  desc: `Once a Pok&eacute;mon switches in, its ability is shared with the rest of the team.`,
@@ -1795,7 +1779,7 @@ export const Formats: FormatList = [
1795
1779
 
1796
1780
  mod: 'sharedpower',
1797
1781
  searchShow: false,
1798
- ruleset: ['Standard', 'Dynamax Clause'],
1782
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1799
1783
  banlist: [
1800
1784
  'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
1801
1785
  'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Lugia', 'Lunala', 'Magearna',
@@ -1859,7 +1843,7 @@ export const Formats: FormatList = [
1859
1843
  searchShow: false,
1860
1844
  challengeShow: false,
1861
1845
  tournamentShow: false,
1862
- ruleset: ['Standard', 'Dynamax Clause'],
1846
+ ruleset: ['Standard OMs', 'Sleep Clause Mod'],
1863
1847
  banlist: [
1864
1848
  'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus', 'Kyurem-Black', 'Kyurem-White', 'Giratina',
1865
1849
  'Giratina-Origin', 'Genesect', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Lugia', 'Lunala', 'Magearna', 'Marowak-Alola', 'Marshadow', 'Melmetal',
@@ -1966,7 +1950,7 @@ export const Formats: FormatList = [
1966
1950
 
1967
1951
  mod: 'gen8',
1968
1952
  searchShow: false,
1969
- ruleset: ['Standard', '!OHKO Clause', 'Picked Team Size = 6', 'Adjust Level = 100'],
1953
+ ruleset: ['Standard OMs', 'Sleep Clause Mod', '!OHKO Clause', 'Picked Team Size = 6', 'Adjust Level = 100'],
1970
1954
  banlist: [
1971
1955
  'Sandshrew-Alola', 'Shedinja', 'Infiltrator', 'Magic Guard', 'Choice Scarf',
1972
1956
  'Explosion', 'Final Gambit', 'Healing Wish', 'Lunar Dance', 'Magic Room', 'Memento', 'Misty Explosion', 'Self-Destruct',
@@ -2434,44 +2418,39 @@ export const Formats: FormatList = [
2434
2418
  column: 3,
2435
2419
  },
2436
2420
  {
2437
- name: "[Gen 2] Ubers",
2421
+ name: "[Gen 3] Ubers",
2438
2422
  threads: [
2439
- `&bullet; <a href="https://www.smogon.com/forums/posts/8286282/">GSC Ubers</a>`,
2423
+ `&bullet; <a href="https://www.smogon.com/forums/posts/8286280/">ADV Ubers</a>`,
2440
2424
  ],
2441
2425
 
2442
- mod: 'gen2',
2426
+ mod: 'gen3',
2443
2427
  // searchShow: false,
2444
- ruleset: ['Standard'],
2428
+ ruleset: ['Standard', 'Deoxys Camouflage Clause', 'One Baton Pass Clause'],
2429
+ banlist: ['Wobbuffet + Leftovers'],
2445
2430
  },
2446
2431
  {
2447
- name: "[Gen 3] 1v1",
2448
- desc: `Bring three Pok&eacute;mon to Team Preview and choose one to battle.`,
2432
+ name: "[Gen 5] RU",
2449
2433
  threads: [
2450
- `&bullet; <a href="https://www.smogon.com/forums/posts/8031456/">ADV 1v1</a>`,
2434
+ `&bullet; <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
2435
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3473124/">BW2 RU Viability Rankings</a>`,
2451
2436
  ],
2452
2437
 
2453
- mod: 'gen3',
2438
+ mod: 'gen5',
2454
2439
  // searchShow: false,
2455
- ruleset: [
2456
- 'Picked Team Size = 1', 'Max Team Size = 3',
2457
- '[Gen 3] OU', 'Accuracy Moves Clause', 'Sleep Moves Clause', 'Team Preview', '!Freeze Clause Mod',
2458
- ],
2459
- banlist: ['Clefable', 'Slaking', 'Snorlax', 'Suicune', 'Destiny Bond', 'Explosion', 'Ingrain', 'Perish Song', 'Self-Destruct', 'Bright Powder', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw'],
2460
- unbanlist: ['Mr. Mime', 'Wobbuffet', 'Wynaut', 'Sand Veil'],
2440
+ ruleset: ['[Gen 5] UU', 'Baton Pass Clause', '!Sleep Clause Mod', 'Sleep Moves Clause'],
2441
+ banlist: ['UU', 'RUBL', 'Shadow Tag', 'Shell Smash + Baton Pass'],
2442
+ unbanlist: ['Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
2461
2443
  },
2462
2444
  {
2463
- name: "[Gen 1] Stadium OU",
2445
+ name: "[Gen 7 Let's Go] UU",
2464
2446
  threads: [
2465
- `&bullet; <a href="https://www.smogon.com/forums/threads/3685877/">Stadium OU Viability Rankings</a>`,
2447
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3659882/">LGPE UU Metagame Discussion &amp; Resources</a>`,
2466
2448
  ],
2467
2449
 
2468
- mod: 'gen1stadium',
2450
+ mod: 'gen7letsgo',
2469
2451
  // searchShow: false,
2470
- ruleset: ['Standard', 'Team Preview'],
2471
- banlist: ['Uber',
2472
- 'Nidoking + Fury Attack + Thrash', 'Exeggutor + Poison Powder + Stomp', 'Exeggutor + Sleep Powder + Stomp',
2473
- 'Exeggutor + Stun Spore + Stomp', 'Jolteon + Focus Energy + Thunder Shock', 'Flareon + Focus Energy + Ember',
2474
- ],
2452
+ ruleset: ['[Gen 7 Let\'s Go] OU'],
2453
+ banlist: ['OU', 'UUBL'],
2475
2454
  },
2476
2455
 
2477
2456
  // Past Gens OU
@@ -2513,7 +2492,7 @@ export const Formats: FormatList = [
2513
2492
  ],
2514
2493
 
2515
2494
  mod: 'gen5',
2516
- ruleset: ['Standard', 'Evasion Abilities Clause', 'Sleep Moves Clause', 'Swagger Clause'],
2495
+ ruleset: ['Standard', 'Evasion Abilities Clause', 'Sleep Moves Clause', 'Swagger Clause', 'Gems Clause'],
2517
2496
  banlist: ['Uber', 'Arena Trap', 'Drizzle ++ Swift Swim', 'Drought ++ Chlorophyll', 'Sand Rush', 'Shadow Tag', 'King\'s Rock', 'Razor Fang', 'Soul Dew', 'Assist', 'Baton Pass'],
2518
2497
  },
2519
2498
  {
@@ -2548,7 +2527,7 @@ export const Formats: FormatList = [
2548
2527
 
2549
2528
  mod: 'gen2',
2550
2529
  ruleset: ['Standard'],
2551
- banlist: ['Uber'],
2530
+ banlist: ['Uber', 'Mean Look + Baton Pass', 'Spider Web + Baton Pass'],
2552
2531
  },
2553
2532
  {
2554
2533
  name: "[Gen 1] OU",
@@ -2590,7 +2569,7 @@ export const Formats: FormatList = [
2590
2569
  ],
2591
2570
 
2592
2571
  mod: 'gen7mixandmega',
2593
- ruleset: ['Standard', 'Mega Rayquaza Clause', 'Overflow Stat Mod'],
2572
+ ruleset: ['Standard OMs', 'Mega Rayquaza Clause', 'Sleep Clause Mod'],
2594
2573
  banlist: ['Shadow Tag', 'Gengarite', 'Baton Pass', 'Electrify'],
2595
2574
  restricted: [
2596
2575
  'Arceus', 'Deoxys', 'Dialga', 'Dragonite', 'Giratina', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem', 'Landorus-Therian', 'Lugia',
@@ -2807,7 +2786,7 @@ export const Formats: FormatList = [
2807
2786
  'Arceus', 'Darkrai', 'Deoxys-Base', 'Deoxys-Attack', 'Deoxys-Defense', 'Dialga', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kangaskhan-Mega',
2808
2787
  'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Lugia', 'Lunala', 'Marshadow', 'Mewtwo', 'Mimikyu', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane',
2809
2788
  'Palkia', 'Rayquaza', 'Reshiram', 'Salamence-Mega', 'Shaymin-Sky', 'Snorlax', 'Solgaleo', 'Tapu Koko', 'Xerneas', 'Yveltal', 'Zekrom',
2810
- 'Moody', 'Focus Sash', 'Perish Song', 'Detect + Fightinium Z',
2789
+ 'Moody', 'Focus Sash', 'Grass Whistle', 'Hypnosis', 'Perish Song', 'Sing', 'Detect + Fightinium Z',
2811
2790
  ],
2812
2791
  },
2813
2792
  {
@@ -3322,19 +3301,6 @@ export const Formats: FormatList = [
3322
3301
  ruleset: ['Standard', 'Evasion Abilities Clause', 'Swagger Clause', 'Sleep Clause Mod'],
3323
3302
  banlist: ['Uber', 'OU', 'UUBL', 'Arena Trap', 'Drought', 'Sand Stream', 'Snow Warning', 'Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
3324
3303
  },
3325
- {
3326
- name: "[Gen 5] RU",
3327
- threads: [
3328
- `&bullet; <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
3329
- `&bullet; <a href="https://www.smogon.com/forums/threads/3473124/">BW2 RU Viability Rankings</a>`,
3330
- ],
3331
-
3332
- mod: 'gen5',
3333
- searchShow: false,
3334
- ruleset: ['[Gen 5] UU', 'Baton Pass Clause', '!Sleep Clause Mod', 'Sleep Moves Clause'],
3335
- banlist: ['UU', 'RUBL', 'Shadow Tag', 'Shell Smash + Baton Pass'],
3336
- unbanlist: ['Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
3337
- },
3338
3304
  {
3339
3305
  name: "[Gen 5] NU",
3340
3306
  threads: [
@@ -3382,7 +3348,8 @@ export const Formats: FormatList = [
3382
3348
 
3383
3349
  mod: 'gen5',
3384
3350
  searchShow: false,
3385
- ruleset: ['[Gen 5] OU', 'Same Type Clause'],
3351
+ ruleset: ['[Gen 5] OU', 'Same Type Clause', '!Gems Clause'],
3352
+ banlist: ['Latios'],
3386
3353
  },
3387
3354
  {
3388
3355
  name: "[Gen 5] 1v1",
@@ -3410,6 +3377,7 @@ export const Formats: FormatList = [
3410
3377
  searchShow: false,
3411
3378
  ruleset: ['[Gen 5] PU'],
3412
3379
  banlist: ['PU', 'Articuno', 'Dragonair', 'Glalie', 'Machoke', 'Marowak', 'Omanyte', 'Regigigas', 'Trubbish', 'Whirlipede', 'Baton Pass'],
3380
+ unbanlist: ['Damp Rock'],
3413
3381
  },
3414
3382
  {
3415
3383
  name: "[Gen 5] GBU Singles",
@@ -3611,7 +3579,7 @@ export const Formats: FormatList = [
3611
3579
  ruleset: ['[Gen 4] PU'],
3612
3580
  banlist: [
3613
3581
  'Ampharos', 'Armaldo', 'Bellossom', 'Dragonair', 'Electabuzz', 'Gabite', 'Gastrodon', 'Glaceon', 'Glalie',
3614
- 'Golduck', 'Gorebyss', 'Hippopotas', 'Kadabra', 'Machoke', 'Magmar', 'Mantine', 'Marowak', 'Metang',
3582
+ 'Golduck', 'Gorebyss', 'Hippopotas', 'Kadabra', 'Lapras', 'Machoke', 'Magmar', 'Mantine', 'Marowak', 'Metang',
3615
3583
  'Misdreavus', 'Monferno', 'Mr. Mime', 'Muk', 'Murkrow', 'Pinsir', 'Politoed', 'Purugly', 'Quagsire',
3616
3584
  'Raichu', 'Rampardos', 'Rapidash', 'Regigigas', 'Relicanth', 'Rhydon', 'Scyther', 'Sneasel', 'Snover',
3617
3585
  'Solrock', 'Tangela', 'Torkoal', 'Victreebel', 'Xatu', 'Zangoose', 'Damp Rock',
@@ -3684,17 +3652,6 @@ export const Formats: FormatList = [
3684
3652
  section: "Past Generations",
3685
3653
  column: 5,
3686
3654
  },
3687
- {
3688
- name: "[Gen 3] Ubers",
3689
- threads: [
3690
- `&bullet; <a href="https://www.smogon.com/forums/posts/8286280/">ADV Ubers</a>`,
3691
- ],
3692
-
3693
- mod: 'gen3',
3694
- searchShow: false,
3695
- ruleset: ['Standard', 'Deoxys Camouflage Clause', 'One Baton Pass Clause'],
3696
- banlist: ['Wobbuffet + Leftovers'],
3697
- },
3698
3655
  {
3699
3656
  name: "[Gen 3] UU",
3700
3657
  threads: [
@@ -3718,6 +3675,25 @@ export const Formats: FormatList = [
3718
3675
  ruleset: ['Standard'],
3719
3676
  banlist: ['Uber', 'OU', 'UUBL', 'UU', 'Smeargle + Ingrain'],
3720
3677
  },
3678
+ {
3679
+ name: "[Gen 3] 1v1",
3680
+ desc: `Bring three Pok&eacute;mon to Team Preview and choose one to battle.`,
3681
+ threads: [
3682
+ `&bullet; <a href="https://www.smogon.com/forums/posts/8031456/">ADV 1v1</a>`,
3683
+ ],
3684
+
3685
+ mod: 'gen3',
3686
+ searchShow: false,
3687
+ ruleset: [
3688
+ 'Picked Team Size = 1', 'Max Team Size = 3',
3689
+ '[Gen 3] OU', 'Accuracy Moves Clause', 'Sleep Moves Clause', 'Team Preview', '!Freeze Clause Mod',
3690
+ ],
3691
+ banlist: [
3692
+ 'Clefable', 'Slaking', 'Snorlax', 'Suicune', 'Zapdos', 'Destiny Bond', 'Explosion', 'Ingrain', 'Perish Song',
3693
+ 'Self-Destruct', 'Bright Powder', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw',
3694
+ ],
3695
+ unbanlist: ['Mr. Mime', 'Wobbuffet', 'Wynaut', 'Sand Veil'],
3696
+ },
3721
3697
  {
3722
3698
  name: "[Gen 3] Doubles OU",
3723
3699
  threads: [
@@ -3749,6 +3725,16 @@ export const Formats: FormatList = [
3749
3725
  debug: true,
3750
3726
  ruleset: ['HP Percentage Mod', 'Cancel Mod', 'Max Team Size = 24', 'Max Move Count = 24', 'Max Level = 9999', 'Default Level = 100'],
3751
3727
  },
3728
+ {
3729
+ name: "[Gen 2] Ubers",
3730
+ threads: [
3731
+ `&bullet; <a href="https://www.smogon.com/forums/posts/8286282/">GSC Ubers</a>`,
3732
+ ],
3733
+
3734
+ mod: 'gen2',
3735
+ searchShow: false,
3736
+ ruleset: ['Standard'],
3737
+ },
3752
3738
  {
3753
3739
  name: "[Gen 2] UU",
3754
3740
  threads: [`&bullet; <a href="https://www.smogon.com/forums/threads/3576710/">GSC UU</a>`],
@@ -3757,6 +3743,7 @@ export const Formats: FormatList = [
3757
3743
  searchShow: false,
3758
3744
  ruleset: ['[Gen 2] OU'],
3759
3745
  banlist: ['OU', 'UUBL'],
3746
+ unbanlist: ['Mean Look + Baton Pass', 'Spider Web + Baton Pass'],
3760
3747
  },
3761
3748
  {
3762
3749
  name: "[Gen 2] NU",
@@ -3847,7 +3834,7 @@ export const Formats: FormatList = [
3847
3834
 
3848
3835
  mod: 'gen1',
3849
3836
  searchShow: false,
3850
- ruleset: ['[Gen 1] UU'],
3837
+ ruleset: ['[Gen 1] UU', '!APT Clause'],
3851
3838
  banlist: ['UU', 'NUBL'],
3852
3839
  },
3853
3840
  {
@@ -3873,6 +3860,20 @@ export const Formats: FormatList = [
3873
3860
  ],
3874
3861
  banlist: ['Uber'],
3875
3862
  },
3863
+ {
3864
+ name: "[Gen 1] Stadium OU",
3865
+ threads: [
3866
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3685877/">Stadium OU Viability Rankings</a>`,
3867
+ ],
3868
+
3869
+ mod: 'gen1stadium',
3870
+ searchShow: false,
3871
+ ruleset: ['Standard', 'Team Preview'],
3872
+ banlist: ['Uber',
3873
+ 'Nidoking + Fury Attack + Thrash', 'Exeggutor + Poison Powder + Stomp', 'Exeggutor + Sleep Powder + Stomp',
3874
+ 'Exeggutor + Stun Spore + Stomp', 'Jolteon + Focus Energy + Thunder Shock', 'Flareon + Focus Energy + Ember',
3875
+ ],
3876
+ },
3876
3877
  {
3877
3878
  name: "[Gen 1] Tradebacks OU",
3878
3879
  desc: `RBY OU with movepool additions from the Time Capsule.`,