@pkmn/sim 0.5.7 → 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 (49) hide show
  1. package/build/config/formats.js +91 -45
  2. package/build/config/formats.js.map +1 -1
  3. package/build/data/formats-data.js +3 -3
  4. package/build/data/formats-data.js.map +1 -1
  5. package/build/data/items.js +2 -2
  6. package/build/data/items.js.map +1 -1
  7. package/build/data/learnsets.js +6 -5
  8. package/build/data/learnsets.js.map +1 -1
  9. package/build/data/mods/gen2/moves.js +13 -1
  10. package/build/data/mods/gen2/moves.js.map +1 -1
  11. package/build/data/mods/gen3/formats-data.js +2 -2
  12. package/build/data/mods/gen3/formats-data.js.map +1 -1
  13. package/build/data/mods/gen4/formats-data.js +4 -4
  14. package/build/data/mods/gen4/formats-data.js.map +1 -1
  15. package/build/data/mods/gen4/moves.js +7 -5
  16. package/build/data/mods/gen4/moves.js.map +1 -1
  17. package/build/data/mods/gen5/moves.js +6 -4
  18. package/build/data/mods/gen5/moves.js.map +1 -1
  19. package/build/data/mods/gen6/items.js +2 -2
  20. package/build/data/mods/gen6/items.js.map +1 -1
  21. package/build/data/mods/gen7/moves.js +3 -3
  22. package/build/data/mods/gen7/moves.js.map +1 -1
  23. package/build/data/mods/gen7/pokedex.js +4 -0
  24. package/build/data/mods/gen7/pokedex.js.map +1 -1
  25. package/build/data/moves.js +6 -5
  26. package/build/data/moves.js.map +1 -1
  27. package/build/data/pokedex.js +1 -1
  28. package/build/data/pokedex.js.map +1 -1
  29. package/build/data/rulesets.js +23 -0
  30. package/build/data/rulesets.js.map +1 -1
  31. package/build/sim/team-validator.js +11 -0
  32. package/build/sim/team-validator.js.map +1 -1
  33. package/config/formats.ts +88 -43
  34. package/data/formats-data.ts +3 -3
  35. package/data/items.ts +2 -2
  36. package/data/learnsets.ts +6 -5
  37. package/data/mods/gen2/moves.ts +13 -1
  38. package/data/mods/gen3/formats-data.ts +2 -2
  39. package/data/mods/gen4/formats-data.ts +4 -4
  40. package/data/mods/gen4/moves.ts +6 -4
  41. package/data/mods/gen5/moves.ts +6 -4
  42. package/data/mods/gen6/items.ts +2 -2
  43. package/data/mods/gen7/moves.ts +3 -3
  44. package/data/mods/gen7/pokedex.ts +4 -0
  45. package/data/moves.ts +6 -5
  46. package/data/pokedex.ts +1 -1
  47. package/data/rulesets.ts +21 -0
  48. package/package.json +2 -2
  49. package/sim/team-validator.ts +13 -0
@@ -333,6 +333,11 @@ exports.Formats = [
333
333
  },
334
334
  {
335
335
  name: "[Gen 8] VGC 2022",
336
+ threads: [
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>`,
340
+ ],
336
341
  mod: 'gen8',
337
342
  gameType: 'doubles',
338
343
  ruleset: ['Flat Rules', '!! Adjust Level = 50', 'Min Source Gen = 8', 'VGC Timer', 'Limit Two Restricted'],
@@ -383,7 +388,7 @@ exports.Formats = [
383
388
  'HP Percentage Mod', 'Cancel Mod',
384
389
  ],
385
390
  banlist: [
386
- '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',
387
392
  'Grassy Surge', 'Huge Power', 'Ice Body', 'Iron Barbs', 'Libero', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Perish Body', 'Poison Heal',
388
393
  'Power Construct', 'Pressure', 'Protean', 'Pure Power', 'Rain Dish', 'Rough Skin', 'Sand Spit', 'Sand Stream', 'Snow Warning', 'Stamina',
389
394
  'Volt Absorb', 'Water Absorb', 'Wonder Guard', 'Abomasite', 'Aguav Berry', 'Assault Vest', 'Berry', 'Berry Juice', 'Berserk Gene',
@@ -438,11 +443,11 @@ exports.Formats = [
438
443
  ruleset: ['Standard NatDex', 'OHKO Clause', 'Evasion Moves Clause', 'Species Clause', 'Dynamax Clause', 'Sleep Clause Mod'],
439
444
  banlist: [
440
445
  'Alakazam-Mega', 'Arceus', 'Blastoise-Mega', 'Blaziken-Mega', 'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Darkrai',
441
- 'Darmanitan-Galar', 'Deoxys-Attack', 'Deoxys-Base', 'Deoxys-Speed', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus',
446
+ 'Darmanitan-Galar', 'Deoxys-Attack', 'Deoxys-Base', 'Deoxys-Speed', 'Dialga', 'Dracovish', 'Eternatus',
442
447
  'Genesect', 'Gengar-Mega', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kangaskhan-Mega', 'Kyogre', 'Kyurem-Black',
443
448
  'Kyurem-White', 'Landorus-Base', 'Lucario-Mega', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Metagross-Mega', 'Mewtwo',
444
449
  'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Necrozma-Ultra', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram',
445
- 'Salamence-Mega', 'Shaymin-Sky', 'Solgaleo', 'Spectrier', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian',
450
+ 'Salamence-Mega', 'Shaymin-Sky', 'Solgaleo', 'Spectrier', 'Tornadus-Therian', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian',
446
451
  'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base', 'Zygarde-Complete', 'Arena Trap', 'Moody',
447
452
  'Power Construct', 'Sand Veil', 'Shadow Tag', 'Snow Cloak', 'Bright Powder', 'King\'s Rock', 'Lax Incense', 'Razor Fang',
448
453
  'Quick Claw', 'Baton Pass',
@@ -467,17 +472,16 @@ exports.Formats = [
467
472
  'Drizzle', 'Drought',
468
473
  // Slowbronite is banned so it doesn't validate on Galarian Slowbro
469
474
  'Slowbronite',
470
- // NatDex suspect
471
- 'Tornadus-Therian',
475
+ // NDOU suspect
476
+ 'Dragapult',
472
477
  ],
473
478
  // Used to distinguish UU from below UU in the client
474
479
  restricted: [
475
- 'Aegislash', 'Alakazam-Base', 'Altaria-Mega', 'Amoonguss', 'Beedrill-Mega', 'Blaziken-Base', 'Breloom', 'Celesteela',
476
- 'Chandelure', 'Donphan', 'Dracozolt', 'Dragonite', 'Feraligatr', 'Gastrodon', 'Hatterene', 'Hippowdon', 'Infernape',
477
- 'Keldeo', 'Krookodile', 'Mamoswine', 'Mandibuzz', 'Manectric-Mega', 'Melmetal', 'Mienshao', 'Moltres-Base',
478
- 'Nidoking', 'Nidoqueen', 'Nihilego', 'Quagsire', 'Regieleki', 'Ribombee', 'Rotom-Heat', 'Rotom-Wash', 'Salamence',
479
- 'Scizor', 'Skarmory', 'Slowking-Base', 'Swampert-Base', 'Talonflame', 'Tangrowth', 'Tornadus-Base', 'Umbreon',
480
- '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',
481
485
  ],
482
486
  },
483
487
  {
@@ -596,17 +600,17 @@ exports.Formats = [
596
600
  // searchShow: false,
597
601
  ruleset: ['Standard', 'Dynamax Clause'],
598
602
  banlist: [
599
- 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus', 'Kyurem-Black', 'Kyurem-White',
600
- 'Giratina', 'Giratina-Origin', 'Genesect', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Lugia', 'Lunala', 'Magearna', 'Marowak-Alola',
601
- 'Marshadow', 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza',
602
- 'Reshiram', 'Solgaleo', 'Spectrier', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned',
603
- 'Zekrom', 'Zygarde-Base', 'Arena Trap', 'Moody', 'Neutralizing Gas', 'Power Construct', 'Shadow Tag', 'Baton Pass',
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',
604
608
  ],
605
609
  restricted: [
606
610
  'Baneful Bunker', 'Block', 'Copycat', 'Corrosive Gas', 'Detect', 'Destiny Bond', 'Disable', 'Encore', 'Fairy Lock', 'Hypnosis', 'Ingrain',
607
611
  'Instruct', 'Lovely Kiss', 'King\'s Shield', 'Mat Block', 'Mean Look', 'Memento', 'move:Metronome', 'Obstruct', 'Octolock', 'Nature Power',
608
612
  'Parting Shot', 'Psycho Shift', 'Protect', 'Roar', 'Sing', 'Skill Swap', 'Sleep Powder', 'Sleep Talk', 'Spiky Shield', 'Spore', 'Substitute',
609
- 'Teleport', 'Whirlwind', 'Wish', 'Yawn',
613
+ 'Switcheroo', 'Teleport', 'Trick', 'Whirlwind', 'Wish', 'Yawn',
610
614
  ],
611
615
  onValidateTeam(team, format, teamHas) {
612
616
  const problems = [];
@@ -635,8 +639,15 @@ exports.Formats = [
635
639
  }
636
640
  const irrevokablyRestricted = [
637
641
  'Assist', 'Copycat', 'Metronome', 'Mirror Move', 'Sleep Talk',
642
+ 'Recycle', 'Trace',
638
643
  'Skill Swap', // Self-propagates indefinitely
639
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.`];
649
+ }
650
+ }
640
651
  if (irrevokablyRestricted.includes(ability.name)) {
641
652
  return [`${ability.name} cannot safely function as a trademark.`];
642
653
  }
@@ -698,9 +709,9 @@ exports.Formats = [
698
709
  'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Cloyster', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
699
710
  'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna',
700
711
  'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram', 'Solgaleo',
701
- 'Spectrier', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base',
702
- 'Zygarde-Complete', 'Arena Trap', 'Chlorophyll', 'Moody', 'Power Construct', 'Sand Rush', 'Sand Veil', 'Shadow Tag', 'Slush Rush', 'Snow Cloak',
703
- 'Surge Surfer', 'Swift Swim', 'Unburden', 'Bright Powder', 'King\'s Rock', 'Lax Incense', 'Baton Pass',
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',
704
715
  ],
705
716
  restricted: [
706
717
  'Baneful Bunker', 'Bounce', 'Protect', 'Detect', 'Dig', 'Dive', 'Fly', 'King\'s Shield', 'Nature\'s Madness', 'Night Shade',
@@ -860,17 +871,17 @@ exports.Formats = [
860
871
  mod: 'gen8',
861
872
  ruleset: ['Standard', 'STABmons Move Legality', 'Dynamax Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
862
873
  banlist: [
863
- 'Aegislash', 'Blacephalon', 'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite',
864
- 'Eternatus', 'Genesect', 'Garchomp', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black',
865
- 'Kyurem-White', 'Landorus', 'Landorus-Therian', 'Lugia', 'Lunala', 'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings',
866
- 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Porygon-Z', 'Rayquaza', 'Reshiram', 'Silvally', 'Solgaleo', 'Spectrier', 'Tapu Bulu',
867
- 'Tapu Koko', 'Thundurus-Base', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned',
868
- 'Zapdos-Galar', 'Zekrom', 'Zygarde-Base', 'Arena Trap', 'Magnet Pull', 'Moody', 'Power Construct', 'Shadow Tag', 'King\'s Rock',
869
- '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',
870
880
  ],
871
881
  restricted: [
872
882
  'Acupressure', 'Astral Barrage', 'Belly Drum', 'Bolt Beak', 'Clangorous Soul', 'Double Iron Bash', 'Electrify', 'Extreme Speed', 'Fishious Rend',
873
- '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',
874
885
  ],
875
886
  },
876
887
  {
@@ -1106,7 +1117,7 @@ exports.Formats = [
1106
1117
  ],
1107
1118
  mod: 'gen8',
1108
1119
  searchShow: false,
1109
- 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'],
1120
+ ruleset: ['Standard', 'Dynamax Clause', 'Camomons Mod'],
1110
1121
  banlist: [
1111
1122
  'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragonite', 'Eternatus', 'Genesect', 'Giratina', 'Giratina-Origin',
1112
1123
  'Groudon', 'Ho-Oh', 'Hydreigon', 'Kartana', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Latias', 'Latios', 'Lugia',
@@ -1114,21 +1125,6 @@ exports.Formats = [
1114
1125
  'Reuniclus', 'Shedinja', 'Slowking-Galar', 'Solgaleo', 'Spectrier', 'Tornadus-Therian', 'Volcarona', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned',
1115
1126
  'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zeraora', 'Zygarde-Base', 'Arena Trap', 'Moody', 'Power Construct', 'Shadow Tag', 'Baton Pass',
1116
1127
  ],
1117
- onModifySpeciesPriority: 2,
1118
- onModifySpecies(species, target, source, effect) {
1119
- if (!target)
1120
- return; // Chat command
1121
- if (effect && ['imposter', 'transform'].includes(effect.id))
1122
- return;
1123
- const types = [...new Set(target.baseMoveSlots.slice(0, 2).map(move => this.dex.moves.get(move.id).type))];
1124
- return { ...species, types: types };
1125
- },
1126
- onSwitchIn(pokemon) {
1127
- this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
1128
- },
1129
- onAfterMega(pokemon) {
1130
- this.add('-start', pokemon, 'typechange', (pokemon.illusion || pokemon).getTypes(true).join('/'), '[silent]');
1131
- },
1132
1128
  },
1133
1129
  {
1134
1130
  name: "[Gen 8] Inheritance",
@@ -1599,6 +1595,21 @@ exports.Formats = [
1599
1595
  // Shadow Tag/Arena Trap
1600
1596
  'Diglett-Base', 'Dugtrio-Base', 'Gothita', 'Gothitelle', 'Gothorita', 'Trapinch', 'Wobbuffet', 'Wynaut',
1601
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
+ },
1602
1613
  onBegin() {
1603
1614
  for (const pokemon of this.getAllPokemon()) {
1604
1615
  if (pokemon.ability === this.toID(pokemon.species.abilities['S'])) {
@@ -1830,6 +1841,41 @@ exports.Formats = [
1830
1841
  searchShow: false,
1831
1842
  ruleset: ['[Gen 8] Random Battle', 'Dynamax Clause'],
1832
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
+ },
1833
1879
  {
1834
1880
  name: "[Gen 8] BSS Factory",
1835
1881
  desc: `Randomized 3v3 Singles featuring Pok&eacute;mon and movesets popular in Battle Stadium Singles.`,
@@ -3286,7 +3332,7 @@ exports.Formats = [
3286
3332
  '[Gen 2] OU', 'Accuracy Moves Clause', 'Sleep Moves Clause', 'Team Preview',
3287
3333
  ],
3288
3334
  banlist: [
3289
- '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',
3290
3336
  'Attract', 'Destiny Bond', 'Explosion', 'Perish Song', 'Present', 'Self-Destruct', 'Swagger',
3291
3337
  ],
3292
3338
  },