@pkmn/sim 0.5.11 → 0.5.14
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.
- package/README.md +5 -0
- package/build/config/formats.js +356 -288
- package/build/config/formats.js.map +1 -1
- package/build/data/abilities.js +9 -9
- package/build/data/abilities.js.map +1 -1
- package/build/data/aliases.js +2 -0
- package/build/data/aliases.js.map +1 -1
- package/build/data/conditions.js +8 -12
- package/build/data/conditions.js.map +1 -1
- package/build/data/formats-data.js +33 -32
- package/build/data/formats-data.js.map +1 -1
- package/build/data/items.js +1 -1
- package/build/data/items.js.map +1 -1
- package/build/data/mods/gen1/formats-data.js +38 -36
- package/build/data/mods/gen1/formats-data.js.map +1 -1
- package/build/data/mods/gen1/moves.js +2 -4
- package/build/data/mods/gen1/moves.js.map +1 -1
- package/build/data/mods/gen3/formats-data.js +1 -1
- package/build/data/mods/gen3/formats-data.js.map +1 -1
- package/build/data/mods/gen6/formats-data.js +3 -3
- package/build/data/mods/gen6/formats-data.js.map +1 -1
- package/build/data/moves.js +34 -19
- package/build/data/moves.js.map +1 -1
- package/build/data/pokedex.js +2 -2
- package/build/data/pokedex.js.map +1 -1
- package/build/data/rulesets.js +1 -1
- package/build/data/rulesets.js.map +1 -1
- package/build/data/text/moves.js +1 -0
- package/build/data/text/moves.js.map +1 -1
- package/build/sim/battle.js +13 -11
- package/build/sim/battle.js.map +1 -1
- package/build/sim/dex-conditions.js +11 -3
- package/build/sim/dex-conditions.js.map +1 -1
- package/build/sim/dex-data.js +1 -0
- package/build/sim/dex-data.js.map +1 -1
- package/build/sim/dex-formats.js +1 -0
- package/build/sim/dex-formats.js.map +1 -1
- package/build/sim/dex-items.js +1 -0
- package/build/sim/dex-items.js.map +1 -1
- package/build/sim/dex-moves.js +1 -0
- package/build/sim/dex-moves.js.map +1 -1
- package/build/sim/dex-species.js +1 -0
- package/build/sim/dex-species.js.map +1 -1
- package/build/sim/team-validator.js +1 -1
- package/build/sim/team-validator.js.map +1 -1
- package/config/formats.ts +343 -272
- package/data/abilities.ts +9 -9
- package/data/aliases.ts +2 -0
- package/data/conditions.ts +8 -10
- package/data/formats-data.ts +33 -32
- package/data/items.ts +1 -1
- package/data/mods/gen1/formats-data.ts +38 -36
- package/data/mods/gen1/moves.ts +2 -4
- package/data/mods/gen3/formats-data.ts +1 -1
- package/data/mods/gen6/formats-data.ts +3 -3
- package/data/moves.ts +33 -19
- package/data/pokedex.ts +2 -2
- package/data/rulesets.ts +1 -1
- package/data/text/moves.ts +2 -0
- package/package.json +2 -2
- package/sim/battle.ts +4 -1
- package/sim/dex-conditions.ts +10 -3
- package/sim/dex-data.ts +1 -0
- package/sim/dex-formats.ts +1 -0
- package/sim/dex-items.ts +1 -0
- package/sim/dex-moves.ts +1 -0
- package/sim/dex-species.ts +1 -0
- package/sim/team-validator.ts +1 -1
package/build/config/formats.js
CHANGED
|
@@ -173,7 +173,7 @@ exports.Formats = [
|
|
|
173
173
|
'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Mewtwo', 'Naganadel',
|
|
174
174
|
'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram', 'Solgaleo', 'Urshifu-Base', 'Xerneas', 'Yveltal',
|
|
175
175
|
'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base', 'Moody', 'Power Construct', 'Shadow Tag', 'Bright Powder',
|
|
176
|
-
'Damp Rock', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw', 'Smooth Rock', 'Terrain Extender', 'Baton Pass',
|
|
176
|
+
'Damp Rock', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw', 'Smooth Rock', 'Terrain Extender', 'Acupressure', 'Baton Pass',
|
|
177
177
|
],
|
|
178
178
|
},
|
|
179
179
|
{
|
|
@@ -217,7 +217,7 @@ exports.Formats = [
|
|
|
217
217
|
mod: 'gen8',
|
|
218
218
|
ruleset: ['[Gen 8] PU'],
|
|
219
219
|
banlist: [
|
|
220
|
-
'PU', 'Arctovish', 'Aurorus', 'Centiskorch', 'Drampa', 'Exeggutor-Alola', 'Gallade', 'Haunter', 'Magmortar', 'Magneton', 'Omastar',
|
|
220
|
+
'PU', 'Arctovish', 'Aurorus', 'Basculin', 'Centiskorch', 'Drampa', 'Exeggutor-Alola', 'Gallade', 'Haunter', 'Magmortar', 'Magneton', 'Omastar',
|
|
221
221
|
'Rotom-Frost', 'Turtonator', 'Vanilluxe', 'Vikavolt', 'Silvally-Dragon', 'Silvally-Ground', 'Sneasel', 'Damp Rock', 'Grassy Seed',
|
|
222
222
|
],
|
|
223
223
|
},
|
|
@@ -231,9 +231,9 @@ exports.Formats = [
|
|
|
231
231
|
ruleset: ['[Gen 8] LC'],
|
|
232
232
|
banlist: [
|
|
233
233
|
// LC OU
|
|
234
|
-
'Abra', 'Carvanha', '
|
|
235
|
-
'
|
|
236
|
-
'Ponyta', 'Ponyta-Galar', 'Porygon', 'Slowpoke-Base', 'Staryu', 'Timburr', 'Trapinch', 'Tyrunt',
|
|
234
|
+
'Abra', 'Carvanha', 'Diglett-Base', 'Dwebble', 'Ferroseed', 'Foongus', 'Frillish', 'Grookey', 'Koffing',
|
|
235
|
+
'Larvesta', 'Magby', 'Magnemite', 'Mareanie', 'Mienfoo', 'Mudbray', 'Munchlax', 'Natu', 'Onix', 'Pawniard',
|
|
236
|
+
'Ponyta', 'Ponyta-Galar', 'Porygon', 'Slowpoke-Base', 'Staryu', 'Timburr', 'Trapinch', 'Tyrunt',
|
|
237
237
|
// LC UUBL
|
|
238
238
|
'Farfetch\u2019d-Galar', 'Scorbunny', 'Shellder', 'Wingull',
|
|
239
239
|
],
|
|
@@ -329,7 +329,7 @@ exports.Formats = [
|
|
|
329
329
|
gameType: 'doubles',
|
|
330
330
|
searchShow: false,
|
|
331
331
|
ruleset: ['Standard Doubles', 'Little Cup', 'Dynamax Clause', 'Swagger Clause', 'Sleep Clause Mod'],
|
|
332
|
-
banlist: ['Corsola-Galar', 'Cutiefly', 'Ponyta-Base', 'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Vulpix', 'Vulpix-Alola'],
|
|
332
|
+
banlist: ['Corsola-Galar', 'Cutiefly', 'Ponyta-Base', 'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Vulpix', 'Vulpix-Alola', 'Ally Switch'],
|
|
333
333
|
},
|
|
334
334
|
{
|
|
335
335
|
name: "[Gen 8] VGC 2022",
|
|
@@ -372,8 +372,8 @@ exports.Formats = [
|
|
|
372
372
|
banlist: [
|
|
373
373
|
'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Jirachi', 'Kyogre',
|
|
374
374
|
'Kyurem-White', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia',
|
|
375
|
-
'Rayquaza', 'Reshiram', 'Solgaleo', '
|
|
376
|
-
'Zekrom', 'Power Construct', 'Focus Sash', 'Ally Switch', 'Final Gambit', 'Perish Song', 'Swagger',
|
|
375
|
+
'Rayquaza', 'Reshiram', 'Solgaleo', 'Tornadus-Base', 'Urshifu-Base', 'Urshifu-Rapid-Strike', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned',
|
|
376
|
+
'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Moody', 'Power Construct', 'Focus Sash', 'Ally Switch', 'Final Gambit', 'Perish Song', 'Swagger',
|
|
377
377
|
],
|
|
378
378
|
},
|
|
379
379
|
{
|
|
@@ -589,218 +589,41 @@ exports.Formats = [
|
|
|
589
589
|
column: 2,
|
|
590
590
|
},
|
|
591
591
|
{
|
|
592
|
-
name: "[Gen 8]
|
|
593
|
-
desc: `
|
|
592
|
+
name: "[Gen 8] Sketchmons",
|
|
593
|
+
desc: `Every Pokémon gets a new move once.`,
|
|
594
594
|
threads: [
|
|
595
|
-
`• <a href="https://www.smogon.com/forums/threads/
|
|
595
|
+
`• <a href="https://www.smogon.com/forums/threads/3680298/">Sketchmons</a>`,
|
|
596
596
|
],
|
|
597
|
-
mod: '
|
|
598
|
-
|
|
599
|
-
ruleset: ['Standard', 'Dynamax Clause'],
|
|
597
|
+
mod: 'gen8',
|
|
598
|
+
ruleset: ['Standard', 'Sketchmons Move Legality', 'Dynamax Clause'],
|
|
600
599
|
banlist: [
|
|
601
|
-
'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
|
|
602
|
-
'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', '
|
|
603
|
-
'Marshadow', '
|
|
604
|
-
'
|
|
605
|
-
'
|
|
606
|
-
'
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
'
|
|
610
|
-
'
|
|
611
|
-
'
|
|
600
|
+
'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus', 'Genesect', 'Giratina',
|
|
601
|
+
'Giratina-Origin', 'Groudon', 'Hawlucha', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
|
|
602
|
+
'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Porygon-Z', 'Pheromosa', 'Rayquaza', 'Regieleki',
|
|
603
|
+
'Reshiram', 'Rillaboom', 'Shedinja', 'Solgaleo', 'Spectrier', 'Swoobat', 'Tapu Bulu', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned',
|
|
604
|
+
'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zeraora', 'Zygarde-Base', 'Arena Trap', 'Magnet Pull', 'Moody', 'Power Construct', 'Sand Rush',
|
|
605
|
+
'Shadow Tag', 'King\'s Rock', 'Baton Pass',
|
|
606
|
+
],
|
|
607
|
+
restricted: [
|
|
608
|
+
'Acupressure', 'Astral Barrage', 'Belly Drum', 'Bolt Beak', 'Clangorous Soul', 'Double Iron Bash', 'Electrify', 'Extreme Speed', 'Fishious Rend',
|
|
609
|
+
'Geomancy', 'Glacial Lance', 'Lovely Kiss', 'No Retreat', 'Oblivion Wing', 'Octolock', 'Quiver Dance', 'Secret Sword', 'Shell Smash', 'Shift Gear',
|
|
610
|
+
'Sleep Powder', 'Spore', 'Thousand Arrows', 'Transform', 'V-create', 'Wicked Blow',
|
|
612
611
|
],
|
|
613
|
-
getSharedPower(pokemon) {
|
|
614
|
-
const sharedPower = new Set();
|
|
615
|
-
for (const ally of pokemon.side.pokemon) {
|
|
616
|
-
if (ally.previouslySwitchedIn > 0) {
|
|
617
|
-
if (pokemon.battle.dex.currentMod !== 'sharedpower' && ['trace', 'mirrorarmor'].includes(ally.baseAbility)) {
|
|
618
|
-
sharedPower.add('noability');
|
|
619
|
-
continue;
|
|
620
|
-
}
|
|
621
|
-
sharedPower.add(ally.baseAbility);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
sharedPower.delete(pokemon.baseAbility);
|
|
625
|
-
return sharedPower;
|
|
626
|
-
},
|
|
627
|
-
onBeforeSwitchIn(pokemon) {
|
|
628
|
-
let format = this.format;
|
|
629
|
-
if (!format.getSharedPower)
|
|
630
|
-
format = this.dex.formats.get('gen8sharedpower');
|
|
631
|
-
for (const ability of format.getSharedPower(pokemon)) {
|
|
632
|
-
const effect = 'ability:' + ability;
|
|
633
|
-
pokemon.volatiles[effect] = { id: this.toID(effect), target: pokemon };
|
|
634
|
-
if (!pokemon.m.abils)
|
|
635
|
-
pokemon.m.abils = [];
|
|
636
|
-
if (!pokemon.m.abils.includes(effect))
|
|
637
|
-
pokemon.m.abils.push(effect);
|
|
638
|
-
}
|
|
639
|
-
},
|
|
640
|
-
onSwitchInPriority: 2,
|
|
641
|
-
onSwitchIn(pokemon) {
|
|
642
|
-
let format = this.format;
|
|
643
|
-
if (!format.getSharedPower)
|
|
644
|
-
format = this.dex.formats.get('gen8sharedpower');
|
|
645
|
-
for (const ability of format.getSharedPower(pokemon)) {
|
|
646
|
-
if (ability === 'noability') {
|
|
647
|
-
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.`);
|
|
648
|
-
}
|
|
649
|
-
const effect = 'ability:' + ability;
|
|
650
|
-
delete pokemon.volatiles[effect];
|
|
651
|
-
pokemon.addVolatile(effect);
|
|
652
|
-
}
|
|
653
|
-
},
|
|
654
612
|
},
|
|
655
613
|
{
|
|
656
|
-
name: "[Gen 8]
|
|
657
|
-
desc: `
|
|
614
|
+
name: "[Gen 8] Flipped",
|
|
615
|
+
desc: `Pokémon have their base stats flipped.`,
|
|
658
616
|
threads: [
|
|
659
|
-
`• <a href="https://www.smogon.com/forums/threads/
|
|
617
|
+
`• <a href="https://www.smogon.com/forums/threads/3662020/">Flipped</a>`,
|
|
660
618
|
],
|
|
661
619
|
mod: 'gen8',
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
const name = set.name;
|
|
670
|
-
if (names.has(this.dex.toID(name))) {
|
|
671
|
-
return [
|
|
672
|
-
`Your Pok\u00e9mon must have different nicknames.`,
|
|
673
|
-
`(You have more than one Pok\u00e9mon named '${name}')`,
|
|
674
|
-
];
|
|
675
|
-
}
|
|
676
|
-
names.add(this.dex.toID(name));
|
|
677
|
-
}
|
|
678
|
-
if (!names.size) {
|
|
679
|
-
return [
|
|
680
|
-
`${this.format.name} works using nicknames; your team has 0 nicknamed Pok\u00e9mon.`,
|
|
681
|
-
`(If this was intentional, add a nickname to one Pok\u00e9mon that isn't the name of a Pok\u00e9mon species.)`,
|
|
682
|
-
];
|
|
683
|
-
}
|
|
684
|
-
},
|
|
685
|
-
checkCanLearn(move, species, lsetData, set) {
|
|
686
|
-
// @ts-ignore
|
|
687
|
-
if (!set.sp?.exists || !set.crossSpecies?.exists) {
|
|
688
|
-
return this.checkCanLearn(move, species, lsetData, set);
|
|
689
|
-
}
|
|
690
|
-
// @ts-ignore
|
|
691
|
-
const problem = this.checkCanLearn(move, set.sp);
|
|
692
|
-
if (!problem)
|
|
693
|
-
return null;
|
|
694
|
-
// @ts-ignore
|
|
695
|
-
if (!set.crossMovesLeft)
|
|
696
|
-
return problem;
|
|
697
|
-
// @ts-ignore
|
|
698
|
-
if (this.checkCanLearn(move, set.crossSpecies))
|
|
699
|
-
return problem;
|
|
700
|
-
// @ts-ignore
|
|
701
|
-
set.crossMovesLeft--;
|
|
702
|
-
return null;
|
|
703
|
-
},
|
|
704
|
-
validateSet(set, teamHas) {
|
|
705
|
-
const crossSpecies = this.dex.species.get(set.name);
|
|
706
|
-
let problems = this.dex.formats.get('Pokemon').onChangeSet?.call(this, set, this.format) || null;
|
|
707
|
-
if (Array.isArray(problems) && problems.length)
|
|
708
|
-
return problems;
|
|
709
|
-
const crossNonstandard = (!this.ruleTable.has('standardnatdex') && crossSpecies.isNonstandard === 'Past') ||
|
|
710
|
-
crossSpecies.isNonstandard === 'Future';
|
|
711
|
-
const crossIsCap = !this.ruleTable.has('+pokemontag:cap') && crossSpecies.isNonstandard === 'CAP';
|
|
712
|
-
if (!crossSpecies.exists || crossNonstandard || crossIsCap)
|
|
713
|
-
return this.validateSet(set, teamHas);
|
|
714
|
-
const species = this.dex.species.get(set.species);
|
|
715
|
-
const check = this.checkSpecies(set, species, species, {});
|
|
716
|
-
if (check)
|
|
717
|
-
return [check];
|
|
718
|
-
const nonstandard = !this.ruleTable.has('standardnatdex') && species.isNonstandard === 'Past';
|
|
719
|
-
const isCap = !this.ruleTable.has('+pokemontag:cap') && species.isNonstandard === 'CAP';
|
|
720
|
-
if (!species.exists || nonstandard || isCap || species === crossSpecies)
|
|
721
|
-
return this.validateSet(set, teamHas);
|
|
722
|
-
if (!species.nfe)
|
|
723
|
-
return [`${species.name} cannot cross evolve because it doesn't evolve.`];
|
|
724
|
-
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
725
|
-
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) {
|
|
726
|
-
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it isn't an evolution.`];
|
|
727
|
-
}
|
|
728
|
-
if (this.ruleTable.isRestrictedSpecies(crossSpecies)) {
|
|
729
|
-
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it is banned.`];
|
|
730
|
-
}
|
|
731
|
-
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
732
|
-
if (!crossPrevoSpecies.prevo !== !species.prevo) {
|
|
733
|
-
return [
|
|
734
|
-
`${species.name} cannot cross evolve into ${crossSpecies.name} because they are not consecutive evolution stages.`,
|
|
735
|
-
];
|
|
736
|
-
}
|
|
737
|
-
const item = this.dex.items.get(set.item);
|
|
738
|
-
if (item.itemUser?.length) {
|
|
739
|
-
if (!item.itemUser.includes(crossSpecies.name) || crossSpecies.name !== species.name) {
|
|
740
|
-
return [`${species.name} cannot use ${item.name} because it is cross evolved into ${crossSpecies.name}.`];
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
const ability = this.dex.abilities.get(set.ability);
|
|
744
|
-
if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
|
|
745
|
-
set.species = crossSpecies.name;
|
|
746
|
-
}
|
|
747
|
-
// @ts-ignore
|
|
748
|
-
set.sp = species;
|
|
749
|
-
// @ts-ignore
|
|
750
|
-
set.crossSpecies = crossSpecies;
|
|
751
|
-
// @ts-ignore
|
|
752
|
-
set.crossMovesLeft = 2;
|
|
753
|
-
problems = this.validateSet(set, teamHas);
|
|
754
|
-
set.name = crossSpecies.name;
|
|
755
|
-
set.species = species.name;
|
|
756
|
-
return problems;
|
|
757
|
-
},
|
|
758
|
-
onModifySpecies(species, target, source, effect) {
|
|
759
|
-
if (!target)
|
|
760
|
-
return; // chat
|
|
761
|
-
if (effect && ['imposter', 'transform'].includes(effect.id))
|
|
762
|
-
return;
|
|
763
|
-
if (target.set.name === target.set.species)
|
|
764
|
-
return;
|
|
765
|
-
const crossSpecies = this.dex.species.get(target.set.name);
|
|
766
|
-
if (!crossSpecies.exists)
|
|
767
|
-
return;
|
|
768
|
-
if (species.battleOnly || !species.nfe)
|
|
769
|
-
return;
|
|
770
|
-
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
771
|
-
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo)
|
|
772
|
-
return;
|
|
773
|
-
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
774
|
-
if (!crossPrevoSpecies.prevo !== !species.prevo)
|
|
775
|
-
return;
|
|
776
|
-
const mixedSpecies = this.dex.deepClone(species);
|
|
777
|
-
mixedSpecies.weightkg =
|
|
778
|
-
Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
|
|
779
|
-
mixedSpecies.nfe = false;
|
|
780
|
-
mixedSpecies.evos = [];
|
|
781
|
-
mixedSpecies.eggGroups = crossSpecies.eggGroups;
|
|
782
|
-
mixedSpecies.abilities = crossSpecies.abilities;
|
|
783
|
-
mixedSpecies.bst = 0;
|
|
784
|
-
let i;
|
|
785
|
-
for (i in species.baseStats) {
|
|
786
|
-
const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
|
|
787
|
-
mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
|
|
788
|
-
mixedSpecies.bst += mixedSpecies.baseStats[i];
|
|
789
|
-
}
|
|
790
|
-
if (crossSpecies.types[0] !== crossPrevoSpecies.types[0])
|
|
791
|
-
mixedSpecies.types[0] = crossSpecies.types[0];
|
|
792
|
-
if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
|
|
793
|
-
mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
|
|
794
|
-
}
|
|
795
|
-
if (mixedSpecies.types[0] === mixedSpecies.types[1])
|
|
796
|
-
mixedSpecies.types = [mixedSpecies.types[0]];
|
|
797
|
-
return mixedSpecies;
|
|
798
|
-
},
|
|
799
|
-
onBegin() {
|
|
800
|
-
for (const pokemon of this.getAllPokemon()) {
|
|
801
|
-
pokemon.baseSpecies = pokemon.species;
|
|
802
|
-
}
|
|
803
|
-
},
|
|
620
|
+
ruleset: ['Standard', 'Flipped Mod', 'Dynamax Clause'],
|
|
621
|
+
banlist: [
|
|
622
|
+
'Azumarill', 'Blissey', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre',
|
|
623
|
+
'Kyurem-Black', 'Kyurem-White', 'Lugia', 'Lunala', 'Marshadow', 'Melmetal', 'Mewtwo', 'Necrozma-Dawn Wings', 'Necrozma-Dusk Mane', 'Palkia',
|
|
624
|
+
'Rayquaza', 'Reshiram', 'Solgaleo', 'Steelix', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom',
|
|
625
|
+
'Zygarde-Base', 'Arena Trap', 'Moody', 'Power Construct', 'Psychic Surge', 'Shadow Tag', 'Baton Pass', 'Psychic Terrain', 'Shell Smash',
|
|
626
|
+
],
|
|
804
627
|
},
|
|
805
628
|
// Other Metagames
|
|
806
629
|
///////////////////////////////////////////////////////////////////
|
|
@@ -852,15 +675,16 @@ exports.Formats = [
|
|
|
852
675
|
`• <a href="https://www.smogon.com/forums/threads/3682690/">AAA Resources</a>`,
|
|
853
676
|
],
|
|
854
677
|
mod: 'gen8',
|
|
855
|
-
ruleset: ['
|
|
678
|
+
ruleset: ['Standard', '!Obtainable Abilities', '2 Ability Clause', 'Dynamax Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
|
|
856
679
|
banlist: [
|
|
857
|
-
'Archeops', 'Blacephalon', 'Buzzwole', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus',
|
|
858
|
-
'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Keldeo', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White',
|
|
859
|
-
'
|
|
860
|
-
'
|
|
861
|
-
'
|
|
862
|
-
'
|
|
863
|
-
'
|
|
680
|
+
'Archeops', 'Blacephalon', 'Buzzwole', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus',
|
|
681
|
+
'Gengar', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Keldeo', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White',
|
|
682
|
+
'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Noivern',
|
|
683
|
+
'Palkia', 'Pheromosa', 'Rayquaza', 'Regigigas', 'Reshiram', 'Shedinja', 'Solgaleo', 'Spectrier', 'Urshifu', 'Urshifu-Rapid-Strike',
|
|
684
|
+
'Victini', 'Weavile', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta-Base', 'Zekrom', 'Zeraora', 'Zygarde-Base',
|
|
685
|
+
'Arena Trap', 'Comatose', 'Contrary', 'Fluffy', 'Fur Coat', 'Gorilla Tactics', 'Huge Power', 'Ice Scales', 'Illusion', 'Imposter',
|
|
686
|
+
'Innards Out', 'Intrepid Sword', 'Libero', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Protean',
|
|
687
|
+
'Pure Power', 'Shadow Tag', 'Simple', 'Stakeout', 'Speed Boost', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
|
|
864
688
|
],
|
|
865
689
|
onValidateSet(set) {
|
|
866
690
|
// Temporary fix until battle-only is implemented properly
|
|
@@ -880,15 +704,15 @@ exports.Formats = [
|
|
|
880
704
|
`• <a href="https://www.smogon.com/forums/threads/3659028/">M&M Resources</a>`,
|
|
881
705
|
],
|
|
882
706
|
mod: 'mixandmega',
|
|
883
|
-
ruleset: ['
|
|
707
|
+
ruleset: ['Standard', 'Overflow Stat Mod', 'Dynamax Clause'],
|
|
884
708
|
banlist: [
|
|
885
709
|
'Calyrex-Shadow', 'Eternatus', 'Kyogre', 'Zacian',
|
|
886
710
|
'Beedrillite', 'Blazikenite', 'Gengarite', 'Kangaskhanite', 'Mawilite', 'Medichamite', 'Pidgeotite',
|
|
887
711
|
'Moody', 'Shadow Tag', 'Baton Pass', 'Electrify',
|
|
888
712
|
],
|
|
889
713
|
restricted: [
|
|
890
|
-
'Calyrex-Ice', 'Dialga', 'Gengar', 'Giratina', 'Groudon', 'Ho-Oh', 'Kyurem-Black', 'Kyurem-White',
|
|
891
|
-
'
|
|
714
|
+
'Calyrex-Ice', 'Dialga', 'Gengar', 'Giratina', 'Groudon', 'Ho-Oh', 'Kyurem-Black', 'Kyurem-White', 'Lugia',
|
|
715
|
+
'Lunala', 'Marshadow', 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane',
|
|
892
716
|
'Palkia', 'Pheromosa', 'Rayquaza', 'Regigigas', 'Reshiram', 'Urshifu', 'Urshifu-Rapid-Strike', 'Xerneas',
|
|
893
717
|
'Yveltal', 'Zekrom', 'Zygarde-Complete',
|
|
894
718
|
],
|
|
@@ -898,9 +722,16 @@ exports.Formats = [
|
|
|
898
722
|
const item = this.dex.items.get(set.item);
|
|
899
723
|
if (!item.megaStone)
|
|
900
724
|
continue;
|
|
725
|
+
const natdex = this.ruleTable.has('standardnatdex');
|
|
726
|
+
if (natdex && item.id !== 'ultranecroziumz')
|
|
727
|
+
continue;
|
|
901
728
|
const species = this.dex.species.get(set.species);
|
|
902
|
-
if (species.isNonstandard)
|
|
729
|
+
if (species.isNonstandard && !this.ruleTable.has(`+${this.toID(species.isNonstandard)}`)) {
|
|
903
730
|
return [`${species.baseSpecies} does not exist in gen 8.`];
|
|
731
|
+
}
|
|
732
|
+
if (natdex && species.name.startsWith('Necrozma-') && item.id === 'ultranecroziumz') {
|
|
733
|
+
continue;
|
|
734
|
+
}
|
|
904
735
|
if (this.ruleTable.isRestrictedSpecies(species) || this.toID(set.ability) === 'powerconstruct') {
|
|
905
736
|
return [`${species.name} is not allowed to hold ${item.name}.`];
|
|
906
737
|
}
|
|
@@ -968,8 +799,8 @@ exports.Formats = [
|
|
|
968
799
|
mod: 'gen8',
|
|
969
800
|
ruleset: ['Not Fully Evolved', 'Standard', 'Dynamax Clause'],
|
|
970
801
|
banlist: [
|
|
971
|
-
'Chansey', 'Doublade', 'Haunter', 'Kadabra', 'Magneton', 'Mr. Mime-Galar', 'Pawniard', 'Pikachu',
|
|
972
|
-
'Rhydon', 'Scyther', 'Sneasel', 'Type: Null', 'Vulpix-Base', 'Arena Trap', 'Shadow Tag', 'Baton Pass',
|
|
802
|
+
'Chansey', 'Doublade', 'Golbat', 'Haunter', 'Kadabra', 'Magmar', 'Magneton', 'Mr. Mime-Galar', 'Pawniard', 'Pikachu',
|
|
803
|
+
'Porygon2', 'Rhydon', 'Scyther', 'Sneasel', 'Type: Null', 'Vulpix-Base', 'Arena Trap', 'Shadow Tag', 'Baton Pass',
|
|
973
804
|
],
|
|
974
805
|
},
|
|
975
806
|
{
|
|
@@ -992,8 +823,21 @@ exports.Formats = [
|
|
|
992
823
|
let species = this.dex.species.get(set.species);
|
|
993
824
|
if (typeof species.battleOnly === 'string')
|
|
994
825
|
species = this.dex.species.get(species.battleOnly);
|
|
995
|
-
if (
|
|
996
|
-
|
|
826
|
+
if (set.item && this.dex.items.get(set.item).megaStone) {
|
|
827
|
+
const item = this.dex.items.get(set.item);
|
|
828
|
+
if (item.megaEvolves === species.baseSpecies) {
|
|
829
|
+
species = this.dex.species.get(item.megaStone);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
if (this.ruleTable.has('standardnatdex')) {
|
|
833
|
+
const format = this.dex.formats.getRuleTable(this.dex.formats.get('gen8nationaldex'));
|
|
834
|
+
if (format.isBannedSpecies(species))
|
|
835
|
+
gods.add(species.name);
|
|
836
|
+
}
|
|
837
|
+
else {
|
|
838
|
+
if (['ag', 'uber'].includes(this.toID(species.tier)) || this.toID(set.ability) === 'powerconstruct') {
|
|
839
|
+
gods.add(species.name);
|
|
840
|
+
}
|
|
997
841
|
}
|
|
998
842
|
}
|
|
999
843
|
if (gods.size > 1) {
|
|
@@ -1006,7 +850,8 @@ exports.Formats = [
|
|
|
1006
850
|
return;
|
|
1007
851
|
const god = target.side.team.find(set => {
|
|
1008
852
|
let godSpecies = this.dex.species.get(set.species);
|
|
1009
|
-
const
|
|
853
|
+
const isNatDex = this.format.ruleTable?.has('standardnatdex');
|
|
854
|
+
const validator = this.dex.formats.getRuleTable(this.dex.formats.get(`gen${isNatDex && this.gen < 8 ? 8 : this.gen}${isNatDex ? 'nationaldex' : 'ou'}`));
|
|
1010
855
|
if (this.toID(set.ability) === 'powerconstruct') {
|
|
1011
856
|
return true;
|
|
1012
857
|
}
|
|
@@ -1024,6 +869,9 @@ exports.Formats = [
|
|
|
1024
869
|
if (godSpecies.forme === 'Crowned') {
|
|
1025
870
|
godSpecies = this.dex.species.get(godSpecies.changesFrom || godSpecies.baseSpecies);
|
|
1026
871
|
}
|
|
872
|
+
if (typeof godSpecies.battleOnly === 'string') {
|
|
873
|
+
godSpecies = this.dex.species.get(godSpecies.battleOnly);
|
|
874
|
+
}
|
|
1027
875
|
newSpecies.bst -= newSpecies.baseStats[stat];
|
|
1028
876
|
newSpecies.baseStats[stat] = godSpecies.baseStats[stat];
|
|
1029
877
|
newSpecies.bst += newSpecies.baseStats[stat];
|
|
@@ -1112,6 +960,15 @@ exports.Formats = [
|
|
|
1112
960
|
ruleset: ['[Gen 8 BDSP] RU'],
|
|
1113
961
|
banlist: ['RU', 'NUBL', 'Damp Rock', 'Heat Rock'],
|
|
1114
962
|
},
|
|
963
|
+
{
|
|
964
|
+
name: "[Gen 8 BDSP] PU",
|
|
965
|
+
threads: [
|
|
966
|
+
`• <a href="https://www.smogon.com/forums/threads/3700009/">BDSP PU</a>`,
|
|
967
|
+
],
|
|
968
|
+
mod: 'gen8bdsp',
|
|
969
|
+
ruleset: ['[Gen 8 BDSP] NU'],
|
|
970
|
+
banlist: ['NU', 'PUBL'],
|
|
971
|
+
},
|
|
1115
972
|
{
|
|
1116
973
|
name: "[Gen 8 BDSP] LC",
|
|
1117
974
|
threads: [
|
|
@@ -1127,11 +984,7 @@ exports.Formats = [
|
|
|
1127
984
|
`• <a href="https://www.smogon.com/forums/threads/3694267/">BDSP Monotype</a>`,
|
|
1128
985
|
],
|
|
1129
986
|
mod: 'gen8bdsp',
|
|
1130
|
-
ruleset: ['
|
|
1131
|
-
banlist: [
|
|
1132
|
-
'Dialga', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Lugia', 'Mewtwo', 'Palkia', 'Rayquaza',
|
|
1133
|
-
'Arena Trap', 'Moody', 'Shadow Tag', 'Damp Rock', 'King\'s Rock', 'Razor Fang', 'Baton Pass',
|
|
1134
|
-
],
|
|
987
|
+
ruleset: ['[Gen 8 BDSP] OU', 'Same Type Clause'],
|
|
1135
988
|
},
|
|
1136
989
|
{
|
|
1137
990
|
name: "[Gen 8 BDSP] CAP",
|
|
@@ -1148,6 +1001,7 @@ exports.Formats = [
|
|
|
1148
1001
|
`• <a href="https://www.smogon.com/forums/threads/3695092/">BDSP 3v3 Singles</a>`,
|
|
1149
1002
|
],
|
|
1150
1003
|
mod: 'gen8bdsp',
|
|
1004
|
+
searchShow: false,
|
|
1151
1005
|
ruleset: ['Flat Rules', 'Min Source Gen = 8'],
|
|
1152
1006
|
},
|
|
1153
1007
|
{
|
|
@@ -1158,7 +1012,7 @@ exports.Formats = [
|
|
|
1158
1012
|
mod: 'gen8bdsp',
|
|
1159
1013
|
gameType: 'doubles',
|
|
1160
1014
|
ruleset: ['Standard Doubles'],
|
|
1161
|
-
banlist: ['DUber'],
|
|
1015
|
+
banlist: ['DUber', 'Dark Void'],
|
|
1162
1016
|
},
|
|
1163
1017
|
{
|
|
1164
1018
|
name: "[Gen 8 BDSP] Battle Festival Doubles",
|
|
@@ -1200,6 +1054,156 @@ exports.Formats = [
|
|
|
1200
1054
|
'Zygarde-Base', 'Arena Trap', 'Moody', 'Power Construct', 'Shadow Tag', 'Baton Pass', 'Calm Mind',
|
|
1201
1055
|
],
|
|
1202
1056
|
},
|
|
1057
|
+
{
|
|
1058
|
+
name: "[Gen 8] Cross Evolution",
|
|
1059
|
+
desc: `Give a Pokémon a Pokémon name of the next evolution stage as a nickname to inherit stat changes, typing, abilities, and up to 2 moves from the next stage Pokémon.`,
|
|
1060
|
+
threads: [
|
|
1061
|
+
`• <a href="https://www.smogon.com/forums/threads/3657562/">Cross Evolution</a>`,
|
|
1062
|
+
],
|
|
1063
|
+
mod: 'gen8',
|
|
1064
|
+
searchShow: false,
|
|
1065
|
+
ruleset: ['Standard', 'Overflow Stat Mod', 'Dynamax Clause', '2 Ability Clause'],
|
|
1066
|
+
banlist: ['Corsola-Galar', 'Sneasel', 'Type: Null', 'Arena Trap', 'Ice Scales', 'Moody', 'King\'s Rock', 'Baton Pass'],
|
|
1067
|
+
restricted: ['Chansey', 'Lunala', 'Shedinja', 'Solgaleo', 'Gorilla Tactics', 'Huge Power', 'Pure Power', 'Shadow Tag'],
|
|
1068
|
+
onValidateTeam(team) {
|
|
1069
|
+
const names = new Set();
|
|
1070
|
+
for (const set of team) {
|
|
1071
|
+
const name = set.name;
|
|
1072
|
+
if (names.has(this.dex.toID(name))) {
|
|
1073
|
+
return [
|
|
1074
|
+
`Your Pok\u00e9mon must have different nicknames.`,
|
|
1075
|
+
`(You have more than one Pok\u00e9mon named '${name}')`,
|
|
1076
|
+
];
|
|
1077
|
+
}
|
|
1078
|
+
names.add(this.dex.toID(name));
|
|
1079
|
+
}
|
|
1080
|
+
if (!names.size) {
|
|
1081
|
+
return [
|
|
1082
|
+
`${this.format.name} works using nicknames; your team has 0 nicknamed Pok\u00e9mon.`,
|
|
1083
|
+
`(If this was intentional, add a nickname to one Pok\u00e9mon that isn't the name of a Pok\u00e9mon species.)`,
|
|
1084
|
+
];
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
checkCanLearn(move, species, lsetData, set) {
|
|
1088
|
+
// @ts-ignore
|
|
1089
|
+
if (!set.sp?.exists || !set.crossSpecies?.exists) {
|
|
1090
|
+
return this.checkCanLearn(move, species, lsetData, set);
|
|
1091
|
+
}
|
|
1092
|
+
// @ts-ignore
|
|
1093
|
+
const problem = this.checkCanLearn(move, set.sp);
|
|
1094
|
+
if (!problem)
|
|
1095
|
+
return null;
|
|
1096
|
+
// @ts-ignore
|
|
1097
|
+
if (!set.crossMovesLeft)
|
|
1098
|
+
return problem;
|
|
1099
|
+
// @ts-ignore
|
|
1100
|
+
if (this.checkCanLearn(move, set.crossSpecies))
|
|
1101
|
+
return problem;
|
|
1102
|
+
// @ts-ignore
|
|
1103
|
+
set.crossMovesLeft--;
|
|
1104
|
+
return null;
|
|
1105
|
+
},
|
|
1106
|
+
validateSet(set, teamHas) {
|
|
1107
|
+
const crossSpecies = this.dex.species.get(set.name);
|
|
1108
|
+
let problems = this.dex.formats.get('Pokemon').onChangeSet?.call(this, set, this.format) || null;
|
|
1109
|
+
if (Array.isArray(problems) && problems.length)
|
|
1110
|
+
return problems;
|
|
1111
|
+
const crossNonstandard = (!this.ruleTable.has('standardnatdex') && crossSpecies.isNonstandard === 'Past') ||
|
|
1112
|
+
crossSpecies.isNonstandard === 'Future';
|
|
1113
|
+
const crossIsCap = !this.ruleTable.has('+pokemontag:cap') && crossSpecies.isNonstandard === 'CAP';
|
|
1114
|
+
if (!crossSpecies.exists || crossNonstandard || crossIsCap)
|
|
1115
|
+
return this.validateSet(set, teamHas);
|
|
1116
|
+
const species = this.dex.species.get(set.species);
|
|
1117
|
+
const check = this.checkSpecies(set, species, species, {});
|
|
1118
|
+
if (check)
|
|
1119
|
+
return [check];
|
|
1120
|
+
const nonstandard = !this.ruleTable.has('standardnatdex') && species.isNonstandard === 'Past';
|
|
1121
|
+
const isCap = !this.ruleTable.has('+pokemontag:cap') && species.isNonstandard === 'CAP';
|
|
1122
|
+
if (!species.exists || nonstandard || isCap || species === crossSpecies)
|
|
1123
|
+
return this.validateSet(set, teamHas);
|
|
1124
|
+
if (!species.nfe)
|
|
1125
|
+
return [`${species.name} cannot cross evolve because it doesn't evolve.`];
|
|
1126
|
+
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
1127
|
+
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) {
|
|
1128
|
+
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it isn't an evolution.`];
|
|
1129
|
+
}
|
|
1130
|
+
if (this.ruleTable.isRestrictedSpecies(crossSpecies)) {
|
|
1131
|
+
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it is banned.`];
|
|
1132
|
+
}
|
|
1133
|
+
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
1134
|
+
if (!crossPrevoSpecies.prevo !== !species.prevo) {
|
|
1135
|
+
return [
|
|
1136
|
+
`${species.name} cannot cross evolve into ${crossSpecies.name} because they are not consecutive evolution stages.`,
|
|
1137
|
+
];
|
|
1138
|
+
}
|
|
1139
|
+
const item = this.dex.items.get(set.item);
|
|
1140
|
+
if (item.itemUser?.length) {
|
|
1141
|
+
if (!item.itemUser.includes(crossSpecies.name) || crossSpecies.name !== species.name) {
|
|
1142
|
+
return [`${species.name} cannot use ${item.name} because it is cross evolved into ${crossSpecies.name}.`];
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
const ability = this.dex.abilities.get(set.ability);
|
|
1146
|
+
if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
|
|
1147
|
+
set.species = crossSpecies.name;
|
|
1148
|
+
}
|
|
1149
|
+
// @ts-ignore
|
|
1150
|
+
set.sp = species;
|
|
1151
|
+
// @ts-ignore
|
|
1152
|
+
set.crossSpecies = crossSpecies;
|
|
1153
|
+
// @ts-ignore
|
|
1154
|
+
set.crossMovesLeft = 2;
|
|
1155
|
+
problems = this.validateSet(set, teamHas);
|
|
1156
|
+
set.name = crossSpecies.name;
|
|
1157
|
+
set.species = species.name;
|
|
1158
|
+
return problems;
|
|
1159
|
+
},
|
|
1160
|
+
onModifySpecies(species, target, source, effect) {
|
|
1161
|
+
if (!target)
|
|
1162
|
+
return; // chat
|
|
1163
|
+
if (effect && ['imposter', 'transform'].includes(effect.id))
|
|
1164
|
+
return;
|
|
1165
|
+
if (target.set.name === target.set.species)
|
|
1166
|
+
return;
|
|
1167
|
+
const crossSpecies = this.dex.species.get(target.set.name);
|
|
1168
|
+
if (!crossSpecies.exists)
|
|
1169
|
+
return;
|
|
1170
|
+
if (species.battleOnly || !species.nfe)
|
|
1171
|
+
return;
|
|
1172
|
+
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
1173
|
+
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo)
|
|
1174
|
+
return;
|
|
1175
|
+
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
1176
|
+
if (!crossPrevoSpecies.prevo !== !species.prevo)
|
|
1177
|
+
return;
|
|
1178
|
+
const mixedSpecies = this.dex.deepClone(species);
|
|
1179
|
+
mixedSpecies.weightkg =
|
|
1180
|
+
Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
|
|
1181
|
+
mixedSpecies.nfe = false;
|
|
1182
|
+
mixedSpecies.evos = [];
|
|
1183
|
+
mixedSpecies.eggGroups = crossSpecies.eggGroups;
|
|
1184
|
+
mixedSpecies.abilities = crossSpecies.abilities;
|
|
1185
|
+
mixedSpecies.bst = 0;
|
|
1186
|
+
let i;
|
|
1187
|
+
for (i in species.baseStats) {
|
|
1188
|
+
const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
|
|
1189
|
+
mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
|
|
1190
|
+
mixedSpecies.bst += mixedSpecies.baseStats[i];
|
|
1191
|
+
}
|
|
1192
|
+
if (crossSpecies.types[0] !== crossPrevoSpecies.types[0])
|
|
1193
|
+
mixedSpecies.types[0] = crossSpecies.types[0];
|
|
1194
|
+
if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
|
|
1195
|
+
mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
|
|
1196
|
+
}
|
|
1197
|
+
if (mixedSpecies.types[0] === mixedSpecies.types[1])
|
|
1198
|
+
mixedSpecies.types = [mixedSpecies.types[0]];
|
|
1199
|
+
return mixedSpecies;
|
|
1200
|
+
},
|
|
1201
|
+
onBegin() {
|
|
1202
|
+
for (const pokemon of this.getAllPokemon()) {
|
|
1203
|
+
pokemon.baseSpecies = pokemon.species;
|
|
1204
|
+
}
|
|
1205
|
+
},
|
|
1206
|
+
},
|
|
1203
1207
|
{
|
|
1204
1208
|
name: "[Gen 8] Inheritance",
|
|
1205
1209
|
desc: `Pokémon may use the ability and moves of another, as long as they forfeit their own learnset.`,
|
|
@@ -1742,6 +1746,70 @@ exports.Formats = [
|
|
|
1742
1746
|
pokemon.m.innates = undefined;
|
|
1743
1747
|
},
|
|
1744
1748
|
},
|
|
1749
|
+
{
|
|
1750
|
+
name: "[Gen 8] Shared Power",
|
|
1751
|
+
desc: `Once a Pokémon switches in, its ability is shared with the rest of the team.`,
|
|
1752
|
+
threads: [
|
|
1753
|
+
`• <a href="https://www.smogon.com/forums/threads/3660877/">Shared Power</a>`,
|
|
1754
|
+
],
|
|
1755
|
+
mod: 'sharedpower',
|
|
1756
|
+
searchShow: false,
|
|
1757
|
+
ruleset: ['Standard', 'Dynamax Clause'],
|
|
1758
|
+
banlist: [
|
|
1759
|
+
'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
|
|
1760
|
+
'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Lugia', 'Lunala', 'Magearna',
|
|
1761
|
+
'Marshadow', 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia',
|
|
1762
|
+
'Pheromosa', 'Rayquaza', 'Reshiram', 'Shedinja', 'Solgaleo', 'Urshifu-Base', 'Urshifu-Rapid-Strike',
|
|
1763
|
+
'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom',
|
|
1764
|
+
'Arena Trap', 'Contrary', 'Drizzle ++ Swift Swim', 'Drought ++ Chlorophyll', 'Electric Surge ++ Surge Surfer',
|
|
1765
|
+
'Fur Coat', 'Guts', 'Harvest', 'Huge Power', 'Imposter', 'Innards Out', 'Libero', 'Magic Bounce', 'Magic Guard',
|
|
1766
|
+
'Magnet Pull', 'Mold Breaker', 'Moody', 'Neutralizing Gas', 'Power Construct', 'Queenly Majesty', 'Quick Draw',
|
|
1767
|
+
'Regenerator', 'Sand Rush', 'Sand Veil', 'Shadow Tag', 'Simple', 'Snow Cloak', 'Snow Warning ++ Slush Rush',
|
|
1768
|
+
'Speed Boost', 'Stakeout', 'Steelworker ++ Steely Spirit', 'Stench', 'Tinted Lens', 'Triage', 'Unaware',
|
|
1769
|
+
'Unburden', 'Water Bubble', 'King\'s Rock', 'Baton Pass',
|
|
1770
|
+
],
|
|
1771
|
+
getSharedPower(pokemon) {
|
|
1772
|
+
const sharedPower = new Set();
|
|
1773
|
+
for (const ally of pokemon.side.pokemon) {
|
|
1774
|
+
if (ally.previouslySwitchedIn > 0) {
|
|
1775
|
+
if (pokemon.battle.dex.currentMod !== 'sharedpower' && ['trace', 'mirrorarmor'].includes(ally.baseAbility)) {
|
|
1776
|
+
sharedPower.add('noability');
|
|
1777
|
+
continue;
|
|
1778
|
+
}
|
|
1779
|
+
sharedPower.add(ally.baseAbility);
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
sharedPower.delete(pokemon.baseAbility);
|
|
1783
|
+
return sharedPower;
|
|
1784
|
+
},
|
|
1785
|
+
onBeforeSwitchIn(pokemon) {
|
|
1786
|
+
let format = this.format;
|
|
1787
|
+
if (!format.getSharedPower)
|
|
1788
|
+
format = this.dex.formats.get('gen8sharedpower');
|
|
1789
|
+
for (const ability of format.getSharedPower(pokemon)) {
|
|
1790
|
+
const effect = 'ability:' + ability;
|
|
1791
|
+
pokemon.volatiles[effect] = { id: this.toID(effect), target: pokemon };
|
|
1792
|
+
if (!pokemon.m.abils)
|
|
1793
|
+
pokemon.m.abils = [];
|
|
1794
|
+
if (!pokemon.m.abils.includes(effect))
|
|
1795
|
+
pokemon.m.abils.push(effect);
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
onSwitchInPriority: 2,
|
|
1799
|
+
onSwitchIn(pokemon) {
|
|
1800
|
+
let format = this.format;
|
|
1801
|
+
if (!format.getSharedPower)
|
|
1802
|
+
format = this.dex.formats.get('gen8sharedpower');
|
|
1803
|
+
for (const ability of format.getSharedPower(pokemon)) {
|
|
1804
|
+
if (ability === 'noability') {
|
|
1805
|
+
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.`);
|
|
1806
|
+
}
|
|
1807
|
+
const effect = 'ability:' + ability;
|
|
1808
|
+
delete pokemon.volatiles[effect];
|
|
1809
|
+
pokemon.addVolatile(effect);
|
|
1810
|
+
}
|
|
1811
|
+
},
|
|
1812
|
+
},
|
|
1745
1813
|
{
|
|
1746
1814
|
name: "[Gen 8] Trademarked",
|
|
1747
1815
|
desc: `Sacrifice your Pokémon's ability for a status move that activates on switch-in.`,
|
|
@@ -2283,42 +2351,37 @@ exports.Formats = [
|
|
|
2283
2351
|
column: 3,
|
|
2284
2352
|
},
|
|
2285
2353
|
{
|
|
2286
|
-
name: "[Gen
|
|
2354
|
+
name: "[Gen 5] UU",
|
|
2287
2355
|
threads: [
|
|
2288
|
-
`• <a href="https://www.smogon.com/forums/threads/
|
|
2289
|
-
`• <a href="https://www.smogon.com/forums/
|
|
2356
|
+
`• <a href="https://www.smogon.com/forums/threads/3474024/">BW2 UU Viability Rankings</a>`,
|
|
2357
|
+
`• <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
|
|
2290
2358
|
],
|
|
2291
|
-
mod: '
|
|
2359
|
+
mod: 'gen5',
|
|
2292
2360
|
// searchShow: false,
|
|
2293
|
-
ruleset: ['
|
|
2294
|
-
banlist: ['OU', 'UUBL'],
|
|
2295
|
-
unbanlist: ['Arena Trap', 'Swagger'],
|
|
2361
|
+
ruleset: ['Standard', 'Evasion Abilities Clause', 'Swagger Clause', 'Sleep Clause Mod'],
|
|
2362
|
+
banlist: ['Uber', 'OU', 'UUBL', 'Arena Trap', 'Drought', 'Sand Stream', 'Snow Warning', 'Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
|
|
2296
2363
|
},
|
|
2297
2364
|
{
|
|
2298
|
-
name: "[Gen
|
|
2365
|
+
name: "[Gen 5] NU",
|
|
2299
2366
|
threads: [
|
|
2300
|
-
`• <a href="https://www.smogon.com/
|
|
2301
|
-
`• <a href="https://www.smogon.com/forums/threads/
|
|
2302
|
-
`• <a href="https://www.smogon.com/forums/threads/3621440/">USM LC Viability Rankings</a>`,
|
|
2367
|
+
`• <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
|
|
2368
|
+
`• <a href="https://www.smogon.com/forums/threads/3484121/">BW2 NU Viability Rankings</a>`,
|
|
2303
2369
|
],
|
|
2304
|
-
mod: '
|
|
2370
|
+
mod: 'gen5',
|
|
2305
2371
|
// searchShow: false,
|
|
2306
|
-
ruleset: ['
|
|
2307
|
-
banlist: [
|
|
2308
|
-
'Aipom', 'Cutiefly', 'Drifloon', 'Gligar', 'Gothita', 'Meditite', 'Misdreavus', 'Murkrow', 'Porygon',
|
|
2309
|
-
'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Trapinch', 'Vulpix-Base', 'Wingull', 'Yanma',
|
|
2310
|
-
'Eevium Z', 'Baton Pass', 'Dragon Rage', 'Sonic Boom', 'Sticky Web',
|
|
2311
|
-
],
|
|
2372
|
+
ruleset: ['[Gen 5] RU', '!Sleep Moves Clause', 'Sleep Clause Mod'],
|
|
2373
|
+
banlist: ['RU', 'NUBL', 'Assist', 'Copycat'],
|
|
2312
2374
|
},
|
|
2313
2375
|
{
|
|
2314
|
-
name: "[Gen
|
|
2376
|
+
name: "[Gen 6] PU",
|
|
2315
2377
|
threads: [
|
|
2316
|
-
`• <a href="https://www.smogon.com/
|
|
2378
|
+
`• <a href="https://www.smogon.com/dex/xy/tags/pu/">ORAS PU Banlist</a>`,
|
|
2379
|
+
`• <a href="https://www.smogon.com/forums/threads/3528743/">ORAS PU Viability Rankings</a>`,
|
|
2317
2380
|
],
|
|
2318
|
-
mod: '
|
|
2381
|
+
mod: 'gen6',
|
|
2319
2382
|
// searchShow: false,
|
|
2320
|
-
ruleset: ['[Gen
|
|
2321
|
-
banlist: ['NU', 'PUBL'],
|
|
2383
|
+
ruleset: ['[Gen 6] NU'],
|
|
2384
|
+
banlist: ['NU', 'PUBL', 'Chatter'],
|
|
2322
2385
|
},
|
|
2323
2386
|
// Past Gens OU
|
|
2324
2387
|
///////////////////////////////////////////////////////////////////
|
|
@@ -2377,7 +2440,7 @@ exports.Formats = [
|
|
|
2377
2440
|
],
|
|
2378
2441
|
mod: 'gen3',
|
|
2379
2442
|
ruleset: ['Standard', 'One Boost Passer Clause'],
|
|
2380
|
-
banlist: ['Uber', 'Sand Veil', 'Assist', 'Baton Pass + Mean Look', 'Baton Pass + Spider Web', 'Smeargle + Ingrain'],
|
|
2443
|
+
banlist: ['Uber', 'Sand Veil', 'Soundproof', 'Assist', 'Baton Pass + Mean Look', 'Baton Pass + Spider Web', 'Smeargle + Ingrain'],
|
|
2381
2444
|
},
|
|
2382
2445
|
{
|
|
2383
2446
|
name: "[Gen 2] OU",
|
|
@@ -2591,6 +2654,22 @@ exports.Formats = [
|
|
|
2591
2654
|
ruleset: ['[Gen 7] NU'],
|
|
2592
2655
|
banlist: ['NU', 'PUBL'],
|
|
2593
2656
|
},
|
|
2657
|
+
{
|
|
2658
|
+
name: "[Gen 7] LC",
|
|
2659
|
+
threads: [
|
|
2660
|
+
`• <a href="https://www.smogon.com/dex/sm/formats/lc/">USM LC Banlist</a>`,
|
|
2661
|
+
`• <a href="https://www.smogon.com/forums/threads/3639319/">USM LC Sample Teams</a>`,
|
|
2662
|
+
`• <a href="https://www.smogon.com/forums/threads/3621440/">USM LC Viability Rankings</a>`,
|
|
2663
|
+
],
|
|
2664
|
+
mod: 'gen7',
|
|
2665
|
+
searchShow: false,
|
|
2666
|
+
ruleset: ['Little Cup', 'Standard', 'Swagger Clause'],
|
|
2667
|
+
banlist: [
|
|
2668
|
+
'Aipom', 'Cutiefly', 'Drifloon', 'Gligar', 'Gothita', 'Meditite', 'Misdreavus', 'Murkrow', 'Porygon',
|
|
2669
|
+
'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Trapinch', 'Vulpix-Base', 'Wingull', 'Yanma',
|
|
2670
|
+
'Eevium Z', 'Baton Pass', 'Dragon Rage', 'Sonic Boom', 'Sticky Web',
|
|
2671
|
+
],
|
|
2672
|
+
},
|
|
2594
2673
|
{
|
|
2595
2674
|
name: "[Gen 7] Monotype",
|
|
2596
2675
|
desc: `All the Pokémon on a team must share a type.`,
|
|
@@ -2855,17 +2934,6 @@ exports.Formats = [
|
|
|
2855
2934
|
ruleset: ['[Gen 6] RU'],
|
|
2856
2935
|
banlist: ['RU', 'NUBL'],
|
|
2857
2936
|
},
|
|
2858
|
-
{
|
|
2859
|
-
name: "[Gen 6] PU",
|
|
2860
|
-
threads: [
|
|
2861
|
-
`• <a href="https://www.smogon.com/dex/xy/tags/pu/">ORAS PU Banlist</a>`,
|
|
2862
|
-
`• <a href="https://www.smogon.com/forums/threads/3528743/">ORAS PU Viability Rankings</a>`,
|
|
2863
|
-
],
|
|
2864
|
-
mod: 'gen6',
|
|
2865
|
-
searchShow: false,
|
|
2866
|
-
ruleset: ['[Gen 6] NU'],
|
|
2867
|
-
banlist: ['NU', 'PUBL', 'Chatter'],
|
|
2868
|
-
},
|
|
2869
2937
|
{
|
|
2870
2938
|
name: "[Gen 6] LC",
|
|
2871
2939
|
threads: [
|
|
@@ -3074,17 +3142,6 @@ exports.Formats = [
|
|
|
3074
3142
|
searchShow: false,
|
|
3075
3143
|
ruleset: ['Standard', 'Sleep Clause Mod'],
|
|
3076
3144
|
},
|
|
3077
|
-
{
|
|
3078
|
-
name: "[Gen 5] UU",
|
|
3079
|
-
threads: [
|
|
3080
|
-
`• <a href="https://www.smogon.com/forums/threads/3474024/">BW2 UU Viability Rankings</a>`,
|
|
3081
|
-
`• <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
|
|
3082
|
-
],
|
|
3083
|
-
mod: 'gen5',
|
|
3084
|
-
searchShow: false,
|
|
3085
|
-
ruleset: ['Standard', 'Evasion Abilities Clause', 'Swagger Clause', 'Sleep Clause Mod'],
|
|
3086
|
-
banlist: ['Uber', 'OU', 'UUBL', 'Arena Trap', 'Drought', 'Sand Stream', 'Snow Warning', 'Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
|
|
3087
|
-
},
|
|
3088
3145
|
{
|
|
3089
3146
|
name: "[Gen 5] RU",
|
|
3090
3147
|
threads: [
|
|
@@ -3098,15 +3155,14 @@ exports.Formats = [
|
|
|
3098
3155
|
unbanlist: ['Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
|
|
3099
3156
|
},
|
|
3100
3157
|
{
|
|
3101
|
-
name: "[Gen 5]
|
|
3158
|
+
name: "[Gen 5] PU",
|
|
3102
3159
|
threads: [
|
|
3103
|
-
`• <a href="https://www.smogon.com/forums/posts/
|
|
3104
|
-
`• <a href="https://www.smogon.com/forums/threads/3484121/">BW2 NU Viability Rankings</a>`,
|
|
3160
|
+
`• <a href="https://www.smogon.com/forums/posts/7326932/">BW2 PU</a>`,
|
|
3105
3161
|
],
|
|
3106
3162
|
mod: 'gen5',
|
|
3107
3163
|
searchShow: false,
|
|
3108
|
-
ruleset: ['[Gen 5]
|
|
3109
|
-
banlist: ['
|
|
3164
|
+
ruleset: ['[Gen 5] NU', 'Sleep Moves Clause'],
|
|
3165
|
+
banlist: ['NU', 'PUBL'],
|
|
3110
3166
|
},
|
|
3111
3167
|
{
|
|
3112
3168
|
name: "[Gen 5] LC",
|
|
@@ -3188,7 +3244,7 @@ exports.Formats = [
|
|
|
3188
3244
|
gameType: 'doubles',
|
|
3189
3245
|
searchShow: false,
|
|
3190
3246
|
ruleset: ['Flat Rules'],
|
|
3191
|
-
banlist: ['Dark Void', 'Sky Drop', 'Soul Dew'],
|
|
3247
|
+
banlist: ['Chatot', 'Dark Void', 'Sky Drop', 'Soul Dew'],
|
|
3192
3248
|
},
|
|
3193
3249
|
{
|
|
3194
3250
|
name: "[Gen 5] VGC 2012",
|
|
@@ -3242,6 +3298,18 @@ exports.Formats = [
|
|
|
3242
3298
|
ruleset: ['Standard'],
|
|
3243
3299
|
banlist: ['AG'],
|
|
3244
3300
|
},
|
|
3301
|
+
{
|
|
3302
|
+
name: "[Gen 4] UU",
|
|
3303
|
+
threads: [
|
|
3304
|
+
`• <a href="https://www.smogon.com/forums/threads/3532624/">DPP UU Metagame Discussion</a>`,
|
|
3305
|
+
`• <a href="https://www.smogon.com/forums/threads/3503638/">DPP UU Viability Rankings</a>`,
|
|
3306
|
+
],
|
|
3307
|
+
mod: 'gen4',
|
|
3308
|
+
searchShow: false,
|
|
3309
|
+
ruleset: ['[Gen 4] OU'],
|
|
3310
|
+
banlist: ['OU', 'UUBL'],
|
|
3311
|
+
unbanlist: ['Arena Trap', 'Swagger'],
|
|
3312
|
+
},
|
|
3245
3313
|
{
|
|
3246
3314
|
name: "[Gen 4] NU",
|
|
3247
3315
|
threads: [
|
|
@@ -3345,7 +3413,7 @@ exports.Formats = [
|
|
|
3345
3413
|
gameType: 'doubles',
|
|
3346
3414
|
searchShow: false,
|
|
3347
3415
|
ruleset: ['Flat Rules', '! Adjust Level Down', 'Max Level = 50', 'Max Team Size = 4'],
|
|
3348
|
-
banlist: ['
|
|
3416
|
+
banlist: ['Tyranitar', 'Rotom', 'Judgment', 'Soul Dew'],
|
|
3349
3417
|
},
|
|
3350
3418
|
{
|
|
3351
3419
|
name: "[Gen 4] Doubles Custom Game",
|
|
@@ -3383,7 +3451,7 @@ exports.Formats = [
|
|
|
3383
3451
|
searchShow: false,
|
|
3384
3452
|
ruleset: ['Standard', 'NFE Clause'],
|
|
3385
3453
|
banlist: ['Uber', 'OU', 'UUBL', 'Smeargle + Ingrain', 'Baton Pass'],
|
|
3386
|
-
unbanlist: ['Scyther'
|
|
3454
|
+
unbanlist: ['Scyther'],
|
|
3387
3455
|
},
|
|
3388
3456
|
{
|
|
3389
3457
|
name: "[Gen 3] NU",
|