@pkmn/sim 0.5.5 → 0.5.8

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 (71) hide show
  1. package/build/config/formats.js +325 -254
  2. package/build/config/formats.js.map +1 -1
  3. package/build/data/aliases.js +4 -4
  4. package/build/data/aliases.js.map +1 -1
  5. package/build/data/formats-data.js +130 -17
  6. package/build/data/formats-data.js.map +1 -1
  7. package/build/data/items.js +2 -2
  8. package/build/data/items.js.map +1 -1
  9. package/build/data/learnsets.js +6 -5
  10. package/build/data/learnsets.js.map +1 -1
  11. package/build/data/mods/gen2/moves.js +13 -1
  12. package/build/data/mods/gen2/moves.js.map +1 -1
  13. package/build/data/mods/gen3/formats-data.js +3 -3
  14. package/build/data/mods/gen3/formats-data.js.map +1 -1
  15. package/build/data/mods/gen4/formats-data.js +4 -4
  16. package/build/data/mods/gen4/formats-data.js.map +1 -1
  17. package/build/data/mods/gen4/moves.js +7 -5
  18. package/build/data/mods/gen4/moves.js.map +1 -1
  19. package/build/data/mods/gen5/formats-data.js +1 -1
  20. package/build/data/mods/gen5/formats-data.js.map +1 -1
  21. package/build/data/mods/gen5/moves.js +6 -4
  22. package/build/data/mods/gen5/moves.js.map +1 -1
  23. package/build/data/mods/gen6/formats-data.js +3 -2
  24. package/build/data/mods/gen6/formats-data.js.map +1 -1
  25. package/build/data/mods/gen6/items.js +2 -2
  26. package/build/data/mods/gen6/items.js.map +1 -1
  27. package/build/data/mods/gen7/formats-data.js +2 -1
  28. package/build/data/mods/gen7/formats-data.js.map +1 -1
  29. package/build/data/mods/gen7/moves.js +3 -3
  30. package/build/data/mods/gen7/moves.js.map +1 -1
  31. package/build/data/mods/gen7/pokedex.js +4 -0
  32. package/build/data/mods/gen7/pokedex.js.map +1 -1
  33. package/build/data/moves.js +6 -5
  34. package/build/data/moves.js.map +1 -1
  35. package/build/data/pokedex.js +480 -11
  36. package/build/data/pokedex.js.map +1 -1
  37. package/build/data/rulesets.js +26 -1
  38. package/build/data/rulesets.js.map +1 -1
  39. package/build/sim/battle.js +23 -22
  40. package/build/sim/battle.js.map +1 -1
  41. package/build/sim/dex-species.js +5 -2
  42. package/build/sim/dex-species.js.map +1 -1
  43. package/build/sim/exported-global-types.d.ts +1 -0
  44. package/build/sim/global-types.d.ts +1 -0
  45. package/build/sim/team-validator.js +11 -0
  46. package/build/sim/team-validator.js.map +1 -1
  47. package/config/formats.ts +327 -257
  48. package/data/aliases.ts +4 -4
  49. package/data/formats-data.ts +130 -17
  50. package/data/items.ts +2 -2
  51. package/data/learnsets.ts +6 -5
  52. package/data/mods/gen2/moves.ts +13 -1
  53. package/data/mods/gen3/formats-data.ts +3 -3
  54. package/data/mods/gen4/formats-data.ts +4 -4
  55. package/data/mods/gen4/moves.ts +6 -4
  56. package/data/mods/gen5/formats-data.ts +1 -1
  57. package/data/mods/gen5/moves.ts +6 -4
  58. package/data/mods/gen6/formats-data.ts +3 -2
  59. package/data/mods/gen6/items.ts +2 -2
  60. package/data/mods/gen7/formats-data.ts +2 -1
  61. package/data/mods/gen7/moves.ts +3 -3
  62. package/data/mods/gen7/pokedex.ts +4 -0
  63. package/data/moves.ts +6 -5
  64. package/data/pokedex.ts +480 -11
  65. package/data/rulesets.ts +23 -1
  66. package/package.json +2 -2
  67. package/sim/battle.ts +24 -23
  68. package/sim/dex-species.ts +5 -2
  69. package/sim/exported-global-types.ts +1 -0
  70. package/sim/global-types.ts +1 -0
  71. package/sim/team-validator.ts +13 -0
@@ -264,13 +264,6 @@ exports.Formats = [
264
264
  {
265
265
  name: "[Gen 8] Battle Stadium Singles",
266
266
  mod: 'gen8',
267
- ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'Limit One Restricted'],
268
- restricted: ['Restricted Legendary'],
269
- },
270
- {
271
- name: "[Gen 8] Battle Stadium Singles Series 12",
272
- mod: 'gen8',
273
- searchShow: false,
274
267
  ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'Limit Two Restricted'],
275
268
  restricted: ['Restricted Legendary'],
276
269
  },
@@ -340,25 +333,18 @@ exports.Formats = [
340
333
  },
341
334
  {
342
335
  name: "[Gen 8] VGC 2022",
343
- mod: 'gen8',
344
- gameType: 'doubles',
345
- ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer', 'Limit Two Restricted'],
346
- restricted: ['Restricted Legendary'],
347
- },
348
- {
349
- name: "[Gen 8] VGC 2021 Series 11",
350
336
  threads: [
351
- `&bullet; <a href="https://www.smogon.com/forums/threads/3677186/">VGC 2021 Series 11 Metagame Discussion</a>`,
352
- `&bullet; <a href="https://www.smogon.com/forums/threads/3693427/">VGC 2021 Series 11 Sample Teams</a>`,
353
- `&bullet; <a href="https://www.smogon.com/forums/threads/3693284/">VGC 2021 Series 11 Viability Rankings</a>`,
337
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3677186/">VGC 2022 Metagame Discussion</a>`,
338
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3695848/">VGC 2022 Sample Teams</a>`,
339
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3696395/">VGC 2022 Viability Rankings</a>`,
354
340
  ],
355
341
  mod: 'gen8',
356
342
  gameType: 'doubles',
357
- ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer', 'Limit One Restricted'],
343
+ ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer', 'Limit Two Restricted'],
358
344
  restricted: ['Restricted Legendary'],
359
345
  },
360
346
  {
361
- name: "[Gen 8] VGC 2021 Series 9",
347
+ name: "[Gen 8] VGC 2021",
362
348
  mod: 'gen8',
363
349
  gameType: 'doubles',
364
350
  searchShow: false,
@@ -402,7 +388,7 @@ exports.Formats = [
402
388
  'HP Percentage Mod', 'Cancel Mod',
403
389
  ],
404
390
  banlist: [
405
- 'Pokestar Spirit', 'Shedinja + Sturdy', 'Battle Bond', 'Cheek Pouch', 'Cursed Body', 'Dry Skin', 'Fluffy', 'Fur Coat', 'Gorilla Tactics',
391
+ 'Pokestar Spirit', 'Shedinja + Sturdy', 'Battle Bond', 'Cheek Pouch', 'Cursed Body', 'Dry Skin', 'Fur Coat', 'Gorilla Tactics',
406
392
  'Grassy Surge', 'Huge Power', 'Ice Body', 'Iron Barbs', 'Libero', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Perish Body', 'Poison Heal',
407
393
  'Power Construct', 'Pressure', 'Protean', 'Pure Power', 'Rain Dish', 'Rough Skin', 'Sand Spit', 'Sand Stream', 'Snow Warning', 'Stamina',
408
394
  'Volt Absorb', 'Water Absorb', 'Wonder Guard', 'Abomasite', 'Aguav Berry', 'Assault Vest', 'Berry', 'Berry Juice', 'Berserk Gene',
@@ -457,7 +443,7 @@ exports.Formats = [
457
443
  ruleset: ['Standard NatDex', 'OHKO Clause', 'Evasion Moves Clause', 'Species Clause', 'Dynamax Clause', 'Sleep Clause Mod'],
458
444
  banlist: [
459
445
  'Alakazam-Mega', 'Arceus', 'Blastoise-Mega', 'Blaziken-Mega', 'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Darkrai',
460
- 'Darmanitan-Galar', 'Deoxys-Attack', 'Deoxys-Base', 'Deoxys-Speed', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus',
446
+ 'Darmanitan-Galar', 'Deoxys-Attack', 'Deoxys-Base', 'Deoxys-Speed', 'Dialga', 'Dracovish', 'Eternatus',
461
447
  'Genesect', 'Gengar-Mega', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kangaskhan-Mega', 'Kyogre', 'Kyurem-Black',
462
448
  'Kyurem-White', 'Landorus-Base', 'Lucario-Mega', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Metagross-Mega', 'Mewtwo',
463
449
  'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Necrozma-Ultra', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram',
@@ -486,15 +472,16 @@ exports.Formats = [
486
472
  'Drizzle', 'Drought',
487
473
  // Slowbronite is banned so it doesn't validate on Galarian Slowbro
488
474
  'Slowbronite',
475
+ // NDOU suspect
476
+ 'Dragapult',
489
477
  ],
490
478
  // Used to distinguish UU from below UU in the client
491
479
  restricted: [
492
- 'Aegislash', 'Alakazam-Base', 'Altaria-Mega', 'Amoonguss', 'Beedrill-Mega', 'Blaziken-Base', 'Breloom', 'Celesteela',
493
- 'Chandelure', 'Donphan', 'Dracozolt', 'Dragonite', 'Feraligatr', 'Gastrodon', 'Hatterene', 'Hippowdon', 'Infernape',
494
- 'Keldeo', 'Krookodile', 'Mamoswine', 'Mandibuzz', 'Manectric-Mega', 'Melmetal', 'Mienshao', 'Moltres-Base',
495
- 'Nidoking', 'Nidoqueen', 'Nihilego', 'Quagsire', 'Regieleki', 'Ribombee', 'Rotom-Heat', 'Rotom-Wash', 'Salamence',
496
- 'Scizor', 'Skarmory', 'Slowking-Base', 'Swampert-Base', 'Talonflame', 'Tangrowth', 'Tornadus-Base', 'Umbreon',
497
- 'Urshifu-Rapid-Strike',
480
+ 'Aegislash', 'Alakazam-Base', 'Altaria-Mega', 'Amoonguss', 'Azumarill', 'Beedrill-Mega', 'Blaziken-Base', 'Breloom', 'Celesteela',
481
+ 'Chandelure', 'Donphan', 'Dracozolt', 'Dragonite', 'Feraligatr', 'Gastrodon', 'Hatterene', 'Hippowdon', 'Infernape', 'Keldeo',
482
+ 'Krookodile', 'Mamoswine', 'Mandibuzz', 'Manectric-Mega', 'Melmetal', 'Mienshao', 'Moltres-Base', 'Nidoking', 'Nidoqueen', 'Nihilego',
483
+ 'Quagsire', 'Regieleki', 'Ribombee', 'Rotom-Heat', 'Rotom-Wash', 'Salamence', 'Scizor', 'Skarmory', 'Slowking-Base', 'Swampert-Base',
484
+ 'Talonflame', 'Tangrowth', 'Tornadus-Base', 'Umbreon', 'Urshifu-Rapid-Strike',
498
485
  ],
499
486
  },
500
487
  {
@@ -604,81 +591,141 @@ exports.Formats = [
604
591
  column: 2,
605
592
  },
606
593
  {
607
- name: "[Gen 8] Pokebilities",
608
- desc: `Pok&eacute;mon have all of their released abilities simultaneously.`,
594
+ name: "[Gen 8] Trademarked",
595
+ desc: `Sacrifice your Pok&eacute;mon's ability for a status move that activates on switch-in.`,
609
596
  threads: [
610
- `&bullet; <a href="https://www.smogon.com/forums/threads/3679692/">Pok&eacute;bilities</a>`,
597
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3656980/">Trademarked</a>`,
611
598
  ],
612
- mod: 'pokebilities',
599
+ mod: 'gen8',
600
+ // searchShow: false,
613
601
  ruleset: ['Standard', 'Dynamax Clause'],
614
602
  banlist: [
615
- 'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Conkeldurr', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dracozolt',
616
- 'Eternatus', 'Excadrill', 'Genesect', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black',
617
- 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings',
618
- 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Porygon-Z', 'Rayquaza', 'Reshiram', 'Solgaleo', 'Spectrier', 'Urshifu-Base',
619
- 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta-Base', 'Zekrom', 'Zygarde-Base', 'Power Construct',
620
- 'Baton Pass', 'King\'s Rock',
621
- // Moody users
622
- 'Glalie', 'Octillery', 'Remoraid', 'Snorunt',
623
- // Shadow Tag/Arena Trap
624
- 'Diglett-Base', 'Dugtrio-Base', 'Gothita', 'Gothitelle', 'Gothorita', 'Trapinch', 'Wobbuffet', 'Wynaut',
603
+ 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus', 'Kyurem-Black', 'Kyurem-White', 'Giratina',
604
+ 'Giratina-Origin', 'Genesect', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Lugia', 'Lunala', 'Magearna', 'Marowak-Alola', 'Marshadow', 'Melmetal',
605
+ 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram', 'Solgaleo', 'Spectrier',
606
+ 'Urshifu-Base', 'Victini', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base',
607
+ 'Arena Trap', 'Moody', 'Neutralizing Gas', 'Power Construct', 'Shadow Tag', 'Baton Pass',
625
608
  ],
626
- onBegin() {
627
- for (const pokemon of this.getAllPokemon()) {
628
- if (pokemon.ability === this.toID(pokemon.species.abilities['S'])) {
629
- continue;
609
+ restricted: [
610
+ 'Baneful Bunker', 'Block', 'Copycat', 'Corrosive Gas', 'Detect', 'Destiny Bond', 'Disable', 'Encore', 'Fairy Lock', 'Hypnosis', 'Ingrain',
611
+ 'Instruct', 'Lovely Kiss', 'King\'s Shield', 'Mat Block', 'Mean Look', 'Memento', 'move:Metronome', 'Obstruct', 'Octolock', 'Nature Power',
612
+ 'Parting Shot', 'Psycho Shift', 'Protect', 'Roar', 'Sing', 'Skill Swap', 'Sleep Powder', 'Sleep Talk', 'Spiky Shield', 'Spore', 'Substitute',
613
+ 'Switcheroo', 'Teleport', 'Trick', 'Whirlwind', 'Wish', 'Yawn',
614
+ ],
615
+ onValidateTeam(team, format, teamHas) {
616
+ const problems = [];
617
+ for (const trademark in teamHas.trademarks) {
618
+ if (teamHas.trademarks[trademark] > 1) {
619
+ problems.push(`You are limited to 1 of each Trademark.`, `(You have ${teamHas.trademarks[trademark]} Pok\u00e9mon with ${trademark} as a Trademark.)`);
630
620
  }
631
- pokemon.m.innates = Object.keys(pokemon.species.abilities)
632
- .filter(key => key !== 'S' && (key !== 'H' || !pokemon.species.unreleasedHidden))
633
- .map(key => this.toID(pokemon.species.abilities[key]))
634
- .filter(ability => ability !== pokemon.ability);
635
621
  }
622
+ return problems;
636
623
  },
637
- onSwitchInPriority: 2,
638
- onSwitchIn(pokemon) {
639
- if (pokemon.m.innates) {
640
- for (const innate of pokemon.m.innates) {
641
- pokemon.addVolatile("ability:" + innate, pokemon);
624
+ validateSet(set, teamHas) {
625
+ const dex = this.dex;
626
+ const ability = dex.moves.get(set.ability);
627
+ if (!ability.exists) { // Not even a real move
628
+ return this.validateSet(set, teamHas);
629
+ }
630
+ // Absolute trademark bans
631
+ if (ability.category !== 'Status') {
632
+ return [`${ability.name} is not a status move, and cannot be used as a trademark.`];
633
+ }
634
+ if (ability.forceSwitch || ability.selfSwitch) {
635
+ return [
636
+ `Force-switching and self-switching moves are banned from being used as trademarks.`,
637
+ `(${ability.name} is a ${ability.forceSwitch ? 'force' : 'self'}-switching move.)`,
638
+ ];
639
+ }
640
+ const irrevokablyRestricted = [
641
+ 'Assist', 'Copycat', 'Metronome', 'Mirror Move', 'Sleep Talk',
642
+ 'Recycle', 'Trace',
643
+ 'Skill Swap', // Self-propagates indefinitely
644
+ ];
645
+ for (const m of set.moves) {
646
+ const move = dex.moves.get(m);
647
+ if (irrevokablyRestricted.includes(move.name)) {
648
+ return [`${move.name} is banned from Trademark, irrespective of custom rules, because it can cause endless turns.`];
642
649
  }
643
650
  }
644
- },
645
- onAfterMega(pokemon) {
646
- for (const innate of Object.keys(pokemon.volatiles).filter(i => i.startsWith('ability:'))) {
647
- pokemon.removeVolatile(innate);
651
+ if (irrevokablyRestricted.includes(ability.name)) {
652
+ return [`${ability.name} cannot safely function as a trademark.`];
648
653
  }
649
- pokemon.m.innates = undefined;
654
+ // Contingent trademark bans
655
+ if (this.ruleTable.isRestricted(`move:${ability.id}`)) {
656
+ return [`${ability.name} is restricted from being used as a trademark.`];
657
+ }
658
+ if (set.moves.map(this.toID).includes(ability.id)) {
659
+ return [`${set.name} may not use ${ability.name} as both a trademark and one of its moves simultaneously.`];
660
+ }
661
+ const customRules = this.format.customRules || [];
662
+ if (!customRules.includes('!obtainableabilities'))
663
+ customRules.push('!obtainableabilities');
664
+ const TeamValidator = require('../sim/team-validator').TeamValidator;
665
+ const validator = new TeamValidator(dex.formats.get(`${this.format.id}@@@${customRules.join(',')}`));
666
+ const moves = set.moves;
667
+ set.moves = [ability.id];
668
+ set.ability = dex.species.get(set.species).abilities['0'];
669
+ let problems = validator.validateSet(set, {}) || [];
670
+ if (problems.length)
671
+ return problems;
672
+ set.moves = moves;
673
+ set.ability = dex.species.get(set.species).abilities['0'];
674
+ problems = problems.concat(validator.validateSet(set, teamHas) || []);
675
+ set.ability = ability.id;
676
+ if (!teamHas.trademarks)
677
+ teamHas.trademarks = {};
678
+ teamHas.trademarks[ability.name] = (teamHas.trademarks[ability.name] || 0) + 1;
679
+ return problems.length ? problems : null;
680
+ },
681
+ pokemon: {
682
+ getAbility() {
683
+ const move = this.battle.dex.moves.get(this.battle.toID(this.ability));
684
+ if (!move.exists)
685
+ return Object.getPrototypeOf(this).getAbility.call(this);
686
+ return {
687
+ id: move.id,
688
+ name: move.name,
689
+ onStart(pokemon) {
690
+ this.add('-activate', pokemon, 'ability: ' + move.name);
691
+ this.actions.useMove(move, pokemon);
692
+ },
693
+ toString() {
694
+ return "";
695
+ },
696
+ };
697
+ },
650
698
  },
651
699
  },
652
700
  {
653
- name: "[Gen 8] Camomons",
654
- desc: `Pok&eacute;mon change type to match their first two moves.`,
701
+ name: "[Gen 8] Linked",
702
+ desc: `The first two moves in a Pok&eacute;mon's moveset are used simultaneously.`,
655
703
  threads: [
656
- `&bullet; <a href="https://www.smogon.com/forums/threads/3656413/">Camomons</a>`,
704
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3660421/">Linked</a>`,
657
705
  ],
658
- mod: 'gen8',
659
- // searchShow: false,
660
- ruleset: ['Obtainable', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Evasion Moves Clause', 'Team Preview', 'HP Percentage Mod', 'Cancel Mod', 'Dynamax Clause', 'Sleep Clause Mod', 'Endless Battle Clause'],
706
+ mod: 'linked',
707
+ ruleset: ['Standard', 'Dynamax Clause'],
661
708
  banlist: [
662
- 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragonite', 'Eternatus', 'Genesect', 'Giratina', 'Giratina-Origin',
663
- 'Groudon', 'Ho-Oh', 'Hydreigon', 'Kartana', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Latias', 'Latios', 'Lugia',
664
- 'Lunala', 'Marshadow', 'Mew', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram',
665
- 'Reuniclus', 'Shedinja', 'Slowking-Galar', 'Solgaleo', 'Spectrier', 'Tornadus-Therian', 'Volcarona', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned',
666
- 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zeraora', 'Zygarde-Base', 'Arena Trap', 'Moody', 'Power Construct', 'Shadow Tag', 'Baton Pass',
709
+ 'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Cloyster', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
710
+ 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna',
711
+ 'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram', 'Solgaleo',
712
+ 'Spectrier', 'Urshifu-Base', 'Volcarona', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom',
713
+ 'Zygarde-Base', 'Zygarde-Complete', 'Arena Trap', 'Chlorophyll', 'Moody', 'Power Construct', 'Sand Rush', 'Sand Veil', 'Shadow Tag', 'Slush Rush',
714
+ 'Snow Cloak', 'Speed Boost', 'Surge Surfer', 'Swift Swim', 'Unburden', 'Bright Powder', 'King\'s Rock', 'Lax Incense', 'Baton Pass',
667
715
  ],
668
- onModifySpeciesPriority: 2,
669
- onModifySpecies(species, target, source, effect) {
670
- if (!target)
671
- return; // Chat command
672
- if (effect && ['imposter', 'transform'].includes(effect.id))
673
- return;
674
- const types = [...new Set(target.baseMoveSlots.slice(0, 2).map(move => this.dex.moves.get(move.id).type))];
675
- return { ...species, types: types };
676
- },
677
- onSwitchIn(pokemon) {
678
- this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
679
- },
680
- onAfterMega(pokemon) {
681
- this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
716
+ restricted: [
717
+ 'Baneful Bunker', 'Bounce', 'Protect', 'Detect', 'Dig', 'Dive', 'Fly', 'King\'s Shield', 'Nature\'s Madness', 'Night Shade',
718
+ 'Obstruct', 'Phantom Force', 'Seismic Toss', 'Shadow Force', 'Sky Drop', 'Spiky Shield', 'Super Fang', 'Trick Room',
719
+ ],
720
+ onValidateSet(set) {
721
+ const problems = [];
722
+ for (const [i, moveid] of set.moves.entries()) {
723
+ const move = this.dex.moves.get(moveid);
724
+ if ([0, 1].includes(i) && this.ruleTable.isRestricted(`move:${move.id}`)) {
725
+ problems.push(`${set.name || set.species}'s move ${move.name} cannot be linked.`);
726
+ }
727
+ }
728
+ return problems;
682
729
  },
683
730
  },
684
731
  // Other Metagames
@@ -738,8 +785,8 @@ exports.Formats = [
738
785
  'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Noivern', 'Palkia', 'Pheromosa', 'Rayquaza', 'Regigigas', 'Reshiram', 'Shedinja',
739
786
  'Solgaleo', 'Spectrier', 'Urshifu-Base', 'Urshifu-Rapid-Strike', 'Victini', 'Weavile', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta-Base', 'Zekrom',
740
787
  'Zeraora', 'Zygarde-Base', 'Arena Trap', 'Comatose', 'Contrary', 'Fluffy', 'Fur Coat', 'Gorilla Tactics', 'Huge Power', 'Ice Scales', 'Illusion', 'Imposter',
741
- 'Innards Out', 'Intrepid Sword', 'Libero', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Power Construct', 'Protean', 'Pure Power',
742
- 'Shadow Tag', 'Simple', 'Stakeout', 'Speed Boost', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
788
+ 'Innards Out', 'Intrepid Sword', 'Libero', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Protean', 'Pure Power', 'Shadow Tag',
789
+ 'Simple', 'Stakeout', 'Speed Boost', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
743
790
  ],
744
791
  onValidateSet(set) {
745
792
  // Temporary fix until battle-only is implemented properly
@@ -824,17 +871,17 @@ exports.Formats = [
824
871
  mod: 'gen8',
825
872
  ruleset: ['Standard', 'STABmons Move Legality', 'Dynamax Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
826
873
  banlist: [
827
- 'Aegislash', 'Blacephalon', 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite',
828
- 'Eternatus', 'Genesect', 'Garchomp', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black',
829
- 'Kyurem-White', 'Landorus', 'Landorus-Therian', 'Lugia', 'Lunala', 'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings',
830
- 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Porygon-Z', 'Rayquaza', 'Reshiram', 'Silvally', 'Solgaleo', 'Spectrier', 'Tapu Bulu',
831
- 'Tapu Koko', 'Thundurus-Base', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned',
832
- 'Zapdos-Galar', 'Zekrom', 'Zygarde-Base', 'Arena Trap', 'Magnet Pull', 'Moody', 'Power Construct', 'Shadow Tag', 'King\'s Rock',
833
- 'Baton Pass',
874
+ 'Aegislash', 'Blacephalon', 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus',
875
+ 'Genesect', 'Garchomp', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus',
876
+ 'Landorus-Therian', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia',
877
+ 'Pheromosa', 'Porygon-Z', 'Rayquaza', 'Reshiram', 'Silvally', 'Solgaleo', 'Spectrier', 'Tapu Bulu', 'Tapu Koko', 'Tapu Lele', 'Thundurus-Base',
878
+ 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zapdos-Galar', 'Zekrom', 'Zygarde-Base',
879
+ 'Arena Trap', 'Magnet Pull', 'Moody', 'Power Construct', 'Shadow Tag', 'King\'s Rock', 'Baton Pass',
834
880
  ],
835
881
  restricted: [
836
882
  'Acupressure', 'Astral Barrage', 'Belly Drum', 'Bolt Beak', 'Clangorous Soul', 'Double Iron Bash', 'Electrify', 'Extreme Speed', 'Fishious Rend',
837
- 'Geomancy', 'Glacial Lance', 'Oblivion Wing', 'Precipice Blades', 'Shell Smash', 'Shift Gear', 'Thousand Arrows', 'V-create', 'Wicked Blow',
883
+ 'Geomancy', 'Glacial Lance', 'Oblivion Wing', 'Precipice Blades', 'Shell Smash', 'Shift Gear', 'Thousand Arrows', 'Thunderous Kick', 'V-create',
884
+ 'Wicked Blow',
838
885
  ],
839
886
  },
840
887
  {
@@ -862,7 +909,7 @@ exports.Formats = [
862
909
  banlist: [
863
910
  'Blissey', 'Calyrex-Shadow', 'Chansey', 'Dragapult', 'Hawlucha', 'Marowak-Alola', 'Melmetal', 'Pikachu', 'Toxapex',
864
911
  'Xerneas', 'Zacian', 'Zacian-Crowned', 'Uber > 1', 'AG ++ Uber > 1', 'Arena Trap', 'Huge Power', 'Moody', 'Pure Power',
865
- 'Shadow Tag', 'Baton Pass',
912
+ 'Shadow Tag', 'Swift Swim', 'Bright Powder', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw', 'Baton Pass',
866
913
  ],
867
914
  onValidateTeam(team) {
868
915
  const gods = new Set();
@@ -979,7 +1026,17 @@ exports.Formats = [
979
1026
  ],
980
1027
  mod: 'gen8bdsp',
981
1028
  ruleset: ['[Gen 8 BDSP] UU'],
982
- banlist: ['UU', 'RUBL'],
1029
+ banlist: ['UU', 'RUBL', 'Drought'],
1030
+ },
1031
+ {
1032
+ name: "[Gen 8 BDSP] NU",
1033
+ threads: [
1034
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3697080/">BDSP NU</a>`,
1035
+ ],
1036
+ mod: 'gen8bdsp',
1037
+ searchShow: false,
1038
+ ruleset: ['[Gen 8 BDSP] RU'],
1039
+ banlist: ['RU', 'NUBL'],
983
1040
  },
984
1041
  {
985
1042
  name: "[Gen 8 BDSP] LC",
@@ -988,7 +1045,7 @@ exports.Formats = [
988
1045
  ],
989
1046
  mod: 'gen8bdsp',
990
1047
  ruleset: ['Little Cup', 'Standard'],
991
- banlist: ['Gligar', 'Meditite', 'Misdreavus', 'Murkrow', 'Scyther', 'Sneasel', 'Tangela', 'Vulpix', 'Yanma', 'Baton Pass'],
1048
+ banlist: ['Gligar', 'Meditite', 'Misdreavus', 'Murkrow', 'Scyther', 'Sneasel', 'Tangela', 'Vulpix', 'Yanma', 'Moody', 'Baton Pass'],
992
1049
  },
993
1050
  {
994
1051
  name: "[Gen 8 BDSP] Monotype",
@@ -1052,6 +1109,23 @@ exports.Formats = [
1052
1109
  section: "Challengeable OMs",
1053
1110
  column: 2,
1054
1111
  },
1112
+ {
1113
+ name: "[Gen 8] Camomons",
1114
+ desc: `Pok&eacute;mon change type to match their first two moves.`,
1115
+ threads: [
1116
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3656413/">Camomons</a>`,
1117
+ ],
1118
+ mod: 'gen8',
1119
+ searchShow: false,
1120
+ ruleset: ['Standard', 'Dynamax Clause', 'Camomons Mod'],
1121
+ banlist: [
1122
+ 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragonite', 'Eternatus', 'Genesect', 'Giratina', 'Giratina-Origin',
1123
+ 'Groudon', 'Ho-Oh', 'Hydreigon', 'Kartana', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Latias', 'Latios', 'Lugia',
1124
+ 'Lunala', 'Marshadow', 'Mew', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram',
1125
+ 'Reuniclus', 'Shedinja', 'Slowking-Galar', 'Solgaleo', 'Spectrier', 'Tornadus-Therian', 'Volcarona', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned',
1126
+ 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zeraora', 'Zygarde-Base', 'Arena Trap', 'Moody', 'Power Construct', 'Shadow Tag', 'Baton Pass',
1127
+ ],
1128
+ },
1055
1129
  {
1056
1130
  name: "[Gen 8] Inheritance",
1057
1131
  desc: `Pok&eacute;mon may use the ability and moves of another, as long as they forfeit their own learnset.`,
@@ -1500,6 +1574,68 @@ exports.Formats = [
1500
1574
  },
1501
1575
  },
1502
1576
  },
1577
+ {
1578
+ name: "[Gen 8] Pokebilities",
1579
+ desc: `Pok&eacute;mon have all of their released abilities simultaneously.`,
1580
+ threads: [
1581
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3679692/">Pok&eacute;bilities</a>`,
1582
+ ],
1583
+ mod: 'pokebilities',
1584
+ searchShow: false,
1585
+ ruleset: ['Standard', 'Dynamax Clause'],
1586
+ banlist: [
1587
+ 'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Conkeldurr', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dracozolt',
1588
+ 'Eternatus', 'Excadrill', 'Genesect', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black',
1589
+ 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings',
1590
+ 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Porygon-Z', 'Rayquaza', 'Reshiram', 'Solgaleo', 'Spectrier', 'Urshifu-Base',
1591
+ 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta-Base', 'Zekrom', 'Zygarde-Base', 'Power Construct',
1592
+ 'Baton Pass', 'King\'s Rock',
1593
+ // Moody users
1594
+ 'Glalie', 'Octillery', 'Remoraid', 'Snorunt',
1595
+ // Shadow Tag/Arena Trap
1596
+ 'Diglett-Base', 'Dugtrio-Base', 'Gothita', 'Gothitelle', 'Gothorita', 'Trapinch', 'Wobbuffet', 'Wynaut',
1597
+ ],
1598
+ onValidateSet(set) {
1599
+ const species = this.dex.species.get(set.species);
1600
+ const unSeenAbilities = Object.keys(species.abilities)
1601
+ .filter(key => key !== 'S' && (key !== 'H' || !species.unreleasedHidden))
1602
+ .map(key => species.abilities[key])
1603
+ .filter(ability => ability !== set.ability);
1604
+ if (unSeenAbilities.length && this.toID(set.ability) !== this.toID(species.abilities['S'])) {
1605
+ for (const abilityName of unSeenAbilities) {
1606
+ const banReason = this.ruleTable.check('ability:' + this.toID(abilityName));
1607
+ if (banReason) {
1608
+ return [`${set.name}'s ability ${abilityName} is ${banReason}.`];
1609
+ }
1610
+ }
1611
+ }
1612
+ },
1613
+ onBegin() {
1614
+ for (const pokemon of this.getAllPokemon()) {
1615
+ if (pokemon.ability === this.toID(pokemon.species.abilities['S'])) {
1616
+ continue;
1617
+ }
1618
+ pokemon.m.innates = Object.keys(pokemon.species.abilities)
1619
+ .filter(key => key !== 'S' && (key !== 'H' || !pokemon.species.unreleasedHidden))
1620
+ .map(key => this.toID(pokemon.species.abilities[key]))
1621
+ .filter(ability => ability !== pokemon.ability);
1622
+ }
1623
+ },
1624
+ onSwitchInPriority: 2,
1625
+ onSwitchIn(pokemon) {
1626
+ if (pokemon.m.innates) {
1627
+ for (const innate of pokemon.m.innates) {
1628
+ pokemon.addVolatile("ability:" + innate, pokemon);
1629
+ }
1630
+ }
1631
+ },
1632
+ onAfterMega(pokemon) {
1633
+ for (const innate of Object.keys(pokemon.volatiles).filter(i => i.startsWith('ability:'))) {
1634
+ pokemon.removeVolatile(innate);
1635
+ }
1636
+ pokemon.m.innates = undefined;
1637
+ },
1638
+ },
1503
1639
  {
1504
1640
  name: "[Gen 8] Shared Power",
1505
1641
  desc: `Once a Pok&eacute;mon switches in, its ability is shared with the rest of the team.`,
@@ -1686,106 +1822,6 @@ exports.Formats = [
1686
1822
  },
1687
1823
  },
1688
1824
  },
1689
- {
1690
- name: "[Gen 8] Trademarked",
1691
- desc: `Sacrifice your Pok&eacute;mon's ability for a status move that activates on switch-in.`,
1692
- threads: [
1693
- `&bullet; <a href="https://www.smogon.com/forums/threads/3656980/">Trademarked</a>`,
1694
- ],
1695
- mod: 'gen8',
1696
- searchShow: false,
1697
- ruleset: ['Standard', 'Dynamax Clause'],
1698
- banlist: [
1699
- 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus', 'Kyurem-Black', 'Kyurem-White',
1700
- 'Giratina', 'Giratina-Origin', 'Genesect', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Lugia', 'Lunala', 'Magearna', 'Marshadow',
1701
- 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram',
1702
- 'Solgaleo', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base',
1703
- 'Arena Trap', 'Moody', 'Power Construct', 'Shadow Tag', 'Baton Pass',
1704
- ],
1705
- restricted: [
1706
- 'Baneful Bunker', 'Block', 'Copycat', 'Corrosive Gas', 'Detect', 'Destiny Bond', 'Disable', 'Encore', 'Fairy Lock', 'Hypnosis', 'Ingrain',
1707
- 'Instruct', 'Lovely Kiss', 'King\'s Shield', 'Mat Block', 'Mean Look', 'move:Metronome', 'Obstruct', 'Octolock', 'Nature Power', 'Parting Shot',
1708
- 'Psycho Shift', 'Protect', 'Roar', 'Sing', 'Skill Swap', 'Sleep Powder', 'Sleep Talk', 'Spiky Shield', 'Spore', 'Substitute', 'Teleport',
1709
- 'Whirlwind', 'Wish', 'Yawn',
1710
- ],
1711
- onValidateTeam(team, format, teamHas) {
1712
- const problems = [];
1713
- for (const trademark in teamHas.trademarks) {
1714
- if (teamHas.trademarks[trademark] > 1) {
1715
- problems.push(`You are limited to 1 of each Trademark.`, `(You have ${teamHas.trademarks[trademark]} Pok\u00e9mon with ${trademark} as a Trademark.)`);
1716
- }
1717
- }
1718
- return problems;
1719
- },
1720
- validateSet(set, teamHas) {
1721
- const dex = this.dex;
1722
- const ability = dex.moves.get(set.ability);
1723
- if (!ability.exists) { // Not even a real move
1724
- return this.validateSet(set, teamHas);
1725
- }
1726
- // Absolute trademark bans
1727
- if (ability.category !== 'Status') {
1728
- return [`${ability.name} is not a status move, and cannot be used as a trademark.`];
1729
- }
1730
- if (ability.forceSwitch || ability.selfSwitch) {
1731
- return [
1732
- `Force-switching and self-switching moves are banned from being used as trademarks.`,
1733
- `(${ability.name} is a ${ability.forceSwitch ? 'force' : 'self'}-switching move.)`,
1734
- ];
1735
- }
1736
- const irrevokablyRestricted = [
1737
- 'Assist', 'Copycat', 'Metronome', 'Mirror Move', 'Sleep Talk',
1738
- 'Skill Swap', // Self-propagates indefinitely
1739
- ];
1740
- if (irrevokablyRestricted.includes(ability.name)) {
1741
- return [`${ability.name} cannot safely function as a trademark.`];
1742
- }
1743
- // Contingent trademark bans
1744
- if (this.ruleTable.isRestricted(`move:${ability.id}`)) {
1745
- return [`${ability.name} is restricted from being used as a trademark.`];
1746
- }
1747
- if (set.moves.map(this.toID).includes(ability.id)) {
1748
- return [`${set.name} may not use ${ability.name} as both a trademark and one of its moves simultaneously.`];
1749
- }
1750
- const customRules = this.format.customRules || [];
1751
- if (!customRules.includes('!obtainableabilities'))
1752
- customRules.push('!obtainableabilities');
1753
- const TeamValidator = require('../sim/team-validator').TeamValidator;
1754
- const validator = new TeamValidator(dex.formats.get(`${this.format.id}@@@${customRules.join(',')}`));
1755
- const moves = set.moves;
1756
- set.moves = [ability.id];
1757
- set.ability = dex.species.get(set.species).abilities['0'];
1758
- let problems = validator.validateSet(set, {}) || [];
1759
- if (problems.length)
1760
- return problems;
1761
- set.moves = moves;
1762
- set.ability = dex.species.get(set.species).abilities['0'];
1763
- problems = problems.concat(validator.validateSet(set, teamHas) || []);
1764
- set.ability = ability.id;
1765
- if (!teamHas.trademarks)
1766
- teamHas.trademarks = {};
1767
- teamHas.trademarks[ability.name] = (teamHas.trademarks[ability.name] || 0) + 1;
1768
- return problems.length ? problems : null;
1769
- },
1770
- pokemon: {
1771
- getAbility() {
1772
- const move = this.battle.dex.moves.get(this.battle.toID(this.ability));
1773
- if (!move.exists)
1774
- return Object.getPrototypeOf(this).getAbility.call(this);
1775
- return {
1776
- id: move.id,
1777
- name: move.name,
1778
- onStart(pokemon) {
1779
- this.add('-activate', pokemon, 'ability: ' + move.name);
1780
- this.actions.useMove(move, pokemon);
1781
- },
1782
- toString() {
1783
- return "";
1784
- },
1785
- };
1786
- },
1787
- },
1788
- },
1789
1825
  // Randomized Metas
1790
1826
  ///////////////////////////////////////////////////////////////////
1791
1827
  {
@@ -1805,6 +1841,41 @@ exports.Formats = [
1805
1841
  searchShow: false,
1806
1842
  ruleset: ['[Gen 8] Random Battle', 'Dynamax Clause'],
1807
1843
  },
1844
+ {
1845
+ name: "[Gen 8] Random Battle Mayhem",
1846
+ desc: `[Gen 8] Random Battle (No Dmax) with Team Preview and elements of Camomons, Inverse, Scalemons, and Shared Power.`,
1847
+ mod: 'sharedpower',
1848
+ team: 'random',
1849
+ searchShow: false,
1850
+ ruleset: ['[Gen 8] Random Battle', 'Team Preview', 'Dynamax Clause', 'Camomons Mod', 'Inverse Mod', 'Scalemons Mod'],
1851
+ onBeforeSwitchIn(pokemon) {
1852
+ let format = this.format;
1853
+ if (!format.getSharedPower)
1854
+ format = this.dex.formats.get('gen8sharedpower');
1855
+ for (const ability of format.getSharedPower(pokemon)) {
1856
+ const effect = 'ability:' + ability;
1857
+ pokemon.volatiles[effect] = { id: this.toID(effect), target: pokemon };
1858
+ if (!pokemon.m.abils)
1859
+ pokemon.m.abils = [];
1860
+ if (!pokemon.m.abils.includes(effect))
1861
+ pokemon.m.abils.push(effect);
1862
+ }
1863
+ },
1864
+ onSwitchInPriority: 2,
1865
+ onSwitchIn(pokemon) {
1866
+ let format = this.format;
1867
+ if (!format.getSharedPower)
1868
+ format = this.dex.formats.get('gen8sharedpower');
1869
+ for (const ability of format.getSharedPower(pokemon)) {
1870
+ if (ability === 'noability') {
1871
+ this.hint(`Mirror Armor and Trace break in Shared Power formats that don't use Shared Power as a base, so they get removed from non-base users.`);
1872
+ }
1873
+ const effect = 'ability:' + ability;
1874
+ delete pokemon.volatiles[effect];
1875
+ pokemon.addVolatile(effect);
1876
+ }
1877
+ },
1878
+ },
1808
1879
  {
1809
1880
  name: "[Gen 8] BSS Factory",
1810
1881
  desc: `Randomized 3v3 Singles featuring Pok&eacute;mon and movesets popular in Battle Stadium Singles.`,
@@ -2061,37 +2132,36 @@ exports.Formats = [
2061
2132
  column: 3,
2062
2133
  },
2063
2134
  {
2064
- name: "[Gen 2] UU",
2065
- threads: [`&bullet; <a href="https://www.smogon.com/forums/threads/3576710/">GSC UU</a>`],
2066
- mod: 'gen2',
2135
+ name: "[Gen 3] UU",
2136
+ threads: [
2137
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3585923/">ADV UU Metagame Discussion</a>`,
2138
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3548578/">ADV UU Viability Rankings</a>`,
2139
+ ],
2140
+ mod: 'gen3',
2067
2141
  // searchShow: false,
2068
- ruleset: ['[Gen 2] OU'],
2069
- banlist: ['OU', 'UUBL'],
2142
+ ruleset: ['Standard', 'NFE Clause'],
2143
+ banlist: ['Uber', 'OU', 'UUBL', 'Smeargle + Ingrain', 'Baton Pass'],
2144
+ unbanlist: ['Scyther', 'Sand Veil'],
2070
2145
  },
2071
2146
  {
2072
- name: "[Gen 5] NU",
2147
+ name: "[Gen 1] NU",
2073
2148
  threads: [
2074
- `&bullet; <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
2075
- `&bullet; <a href="https://www.smogon.com/forums/threads/3484121/">BW2 NU Viability Rankings</a>`,
2149
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3668913/">RBY NU Viability Rankings</a>`,
2076
2150
  ],
2077
- mod: 'gen5',
2151
+ mod: 'gen1',
2078
2152
  // searchShow: false,
2079
- ruleset: ['[Gen 5] RU', '!Sleep Moves Clause', 'Sleep Clause Mod'],
2080
- banlist: ['RU', 'NUBL', 'Assist', 'Copycat'],
2153
+ ruleset: ['[Gen 1] UU'],
2154
+ banlist: ['UU', 'NUBL'],
2081
2155
  },
2082
2156
  {
2083
- name: "[Gen 5] LC",
2157
+ name: "[Gen 4] Ubers",
2084
2158
  threads: [
2085
- `&bullet; <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
2086
- `&bullet; <a href="https://www.smogon.com/forums/threads/3485860/">BW2 LC Viability Rankings</a>`,
2159
+ `&bullet; <a href="https://www.smogon.com/forums/posts/8286279/">DPP Ubers</a>`,
2087
2160
  ],
2088
- mod: 'gen5',
2161
+ mod: 'gen4',
2089
2162
  // searchShow: false,
2090
- ruleset: ['Standard', 'Little Cup', 'Sleep Moves Clause'],
2091
- banlist: [
2092
- 'Gligar', 'Meditite', 'Misdreavus', 'Murkrow', 'Scraggy', 'Scyther', 'Sneasel', 'Tangela', 'Vulpix', 'Yanma',
2093
- 'Sand Rush', 'Sand Veil', 'Berry Juice', 'Soul Dew', 'Baton Pass', 'Dragon Rage', 'Sonic Boom', 'Swagger',
2094
- ],
2163
+ ruleset: ['Standard'],
2164
+ banlist: ['AG'],
2095
2165
  },
2096
2166
  // Past Gens OU
2097
2167
  ///////////////////////////////////////////////////////////////////
@@ -2140,7 +2210,7 @@ exports.Formats = [
2140
2210
  ],
2141
2211
  mod: 'gen4',
2142
2212
  ruleset: ['Standard'],
2143
- banlist: ['AG', 'Uber', 'Arena Trap', 'Sand Veil', 'Swinub + Snow Cloak', 'Piloswine + Snow Cloak', 'Mamoswine + Snow Cloak', 'Soul Dew', 'Baton Pass'],
2213
+ banlist: ['AG', 'Uber', 'Arena Trap', 'Sand Veil', 'Swinub + Snow Cloak', 'Piloswine + Snow Cloak', 'Mamoswine + Snow Cloak', 'Soul Dew', 'Baton Pass', 'Swagger'],
2144
2214
  },
2145
2215
  {
2146
2216
  name: "[Gen 3] OU",
@@ -2885,6 +2955,17 @@ exports.Formats = [
2885
2955
  banlist: ['UU', 'RUBL', 'Shadow Tag', 'Shell Smash + Baton Pass'],
2886
2956
  unbanlist: ['Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
2887
2957
  },
2958
+ {
2959
+ name: "[Gen 5] NU",
2960
+ threads: [
2961
+ `&bullet; <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
2962
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3484121/">BW2 NU Viability Rankings</a>`,
2963
+ ],
2964
+ mod: 'gen5',
2965
+ searchShow: false,
2966
+ ruleset: ['[Gen 5] RU', '!Sleep Moves Clause', 'Sleep Clause Mod'],
2967
+ banlist: ['RU', 'NUBL', 'Assist', 'Copycat'],
2968
+ },
2888
2969
  {
2889
2970
  name: "[Gen 5] PU",
2890
2971
  threads: [
@@ -2895,6 +2976,20 @@ exports.Formats = [
2895
2976
  ruleset: ['[Gen 5] NU', 'Sleep Moves Clause'],
2896
2977
  banlist: ['NU', 'PUBL'],
2897
2978
  },
2979
+ {
2980
+ name: "[Gen 5] LC",
2981
+ threads: [
2982
+ `&bullet; <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
2983
+ `&bullet; <a href="https://www.smogon.com/forums/threads/3485860/">BW2 LC Viability Rankings</a>`,
2984
+ ],
2985
+ mod: 'gen5',
2986
+ searchShow: false,
2987
+ ruleset: ['Standard', 'Little Cup', 'Sleep Moves Clause'],
2988
+ banlist: [
2989
+ 'Gligar', 'Meditite', 'Misdreavus', 'Murkrow', 'Scraggy', 'Scyther', 'Sneasel', 'Tangela', 'Vulpix', 'Yanma',
2990
+ 'Sand Rush', 'Sand Veil', 'Berry Juice', 'Soul Dew', 'Baton Pass', 'Dragon Rage', 'Sonic Boom', 'Swagger',
2991
+ ],
2992
+ },
2898
2993
  {
2899
2994
  name: "[Gen 5] Monotype",
2900
2995
  desc: `All the Pok&eacute;mon on a team must share a type.`,
@@ -3005,16 +3100,6 @@ exports.Formats = [
3005
3100
  section: "DPP Singles",
3006
3101
  column: 5,
3007
3102
  },
3008
- {
3009
- name: "[Gen 4] Ubers",
3010
- threads: [
3011
- `&bullet; <a href="https://www.smogon.com/forums/posts/8286279/">DPP Ubers</a>`,
3012
- ],
3013
- mod: 'gen4',
3014
- searchShow: false,
3015
- ruleset: ['Standard'],
3016
- banlist: ['AG'],
3017
- },
3018
3103
  {
3019
3104
  name: "[Gen 4] UU",
3020
3105
  threads: [
@@ -3025,7 +3110,7 @@ exports.Formats = [
3025
3110
  searchShow: false,
3026
3111
  ruleset: ['[Gen 4] OU'],
3027
3112
  banlist: ['OU', 'UUBL'],
3028
- unbanlist: ['Arena Trap'],
3113
+ unbanlist: ['Arena Trap', 'Swagger'],
3029
3114
  },
3030
3115
  {
3031
3116
  name: "[Gen 4] NU",
@@ -3082,7 +3167,7 @@ exports.Formats = [
3082
3167
  '[Gen 4] OU', 'Accuracy Moves Clause', 'Sleep Moves Clause', 'Team Preview',
3083
3168
  ],
3084
3169
  banlist: ['Latias', 'Machamp', 'Porygon-Z', 'Shaymin', 'Snorlax', 'Togekiss', 'Focus Sash', 'Destiny Bond', 'Explosion', 'Perish Song', 'Self-Destruct'],
3085
- unbanlist: ['Wobbuffet', 'Wynaut', 'Sand Veil'],
3170
+ unbanlist: ['Wobbuffet', 'Wynaut', 'Sand Veil', 'Swagger'],
3086
3171
  },
3087
3172
  {
3088
3173
  name: "[Gen 4] Anything Goes",
@@ -3113,7 +3198,7 @@ exports.Formats = [
3113
3198
  searchShow: false,
3114
3199
  ruleset: ['[Gen 4] OU'],
3115
3200
  banlist: ['Explosion'],
3116
- unbanlist: ['Garchomp', 'Latias', 'Latios', 'Manaphy', 'Mew', 'Salamence', 'Wobbuffet', 'Wynaut'],
3201
+ unbanlist: ['Garchomp', 'Latias', 'Latios', 'Manaphy', 'Mew', 'Salamence', 'Wobbuffet', 'Wynaut', 'Swagger'],
3117
3202
  },
3118
3203
  {
3119
3204
  name: "[Gen 4] VGC 2010",
@@ -3158,18 +3243,6 @@ exports.Formats = [
3158
3243
  ruleset: ['Standard', 'Deoxys Camouflage Clause', 'One Baton Pass Clause'],
3159
3244
  banlist: ['Wobbuffet + Leftovers'],
3160
3245
  },
3161
- {
3162
- name: "[Gen 3] UU",
3163
- threads: [
3164
- `&bullet; <a href="https://www.smogon.com/forums/threads/3585923/">ADV UU Metagame Discussion</a>`,
3165
- `&bullet; <a href="https://www.smogon.com/forums/threads/3548578/">ADV UU Viability Rankings</a>`,
3166
- ],
3167
- mod: 'gen3',
3168
- searchShow: false,
3169
- ruleset: ['Standard', 'NFE Clause'],
3170
- banlist: ['Uber', 'OU', 'UUBL', 'Smeargle + Ingrain', 'Baton Pass'],
3171
- unbanlist: ['Scyther', 'Sand Veil'],
3172
- },
3173
3246
  {
3174
3247
  name: "[Gen 3] NU",
3175
3248
  threads: [
@@ -3233,6 +3306,14 @@ exports.Formats = [
3233
3306
  searchShow: false,
3234
3307
  ruleset: ['Standard'],
3235
3308
  },
3309
+ {
3310
+ name: "[Gen 2] UU",
3311
+ threads: [`&bullet; <a href="https://www.smogon.com/forums/threads/3576710/">GSC UU</a>`],
3312
+ mod: 'gen2',
3313
+ searchShow: false,
3314
+ ruleset: ['[Gen 2] OU'],
3315
+ banlist: ['OU', 'UUBL'],
3316
+ },
3236
3317
  {
3237
3318
  name: "[Gen 2] NU",
3238
3319
  threads: [`&bullet; <a href="https://www.smogon.com/forums/threads/3642565/">GSC NU</a>`],
@@ -3251,7 +3332,7 @@ exports.Formats = [
3251
3332
  '[Gen 2] OU', 'Accuracy Moves Clause', 'Sleep Moves Clause', 'Team Preview',
3252
3333
  ],
3253
3334
  banlist: [
3254
- 'Clefable', 'Snorlax', 'Zapdos', 'Berserk Gene', 'Bright Powder', 'Focus Band', 'King\'s Rock', 'Quick Claw',
3335
+ 'Alakazam', 'Clefable', 'Snorlax', 'Zapdos', 'Berserk Gene', 'Bright Powder', 'Focus Band', 'King\'s Rock', 'Quick Claw',
3255
3336
  'Attract', 'Destiny Bond', 'Explosion', 'Perish Song', 'Present', 'Self-Destruct', 'Swagger',
3256
3337
  ],
3257
3338
  },
@@ -3307,16 +3388,6 @@ exports.Formats = [
3307
3388
  ruleset: ['[Gen 1] OU'],
3308
3389
  banlist: ['OU', 'UUBL'],
3309
3390
  },
3310
- {
3311
- name: "[Gen 1] NU",
3312
- threads: [
3313
- `&bullet; <a href="https://www.smogon.com/forums/threads/3668913/">RBY NU Viability Rankings</a>`,
3314
- ],
3315
- mod: 'gen1',
3316
- searchShow: false,
3317
- ruleset: ['[Gen 1] UU'],
3318
- banlist: ['UU', 'NUBL'],
3319
- },
3320
3391
  {
3321
3392
  name: "[Gen 1] Japanese OU",
3322
3393
  desc: `Generation 1 with Japanese battle mechanics.`,