@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/config/formats.ts
CHANGED
|
@@ -187,7 +187,7 @@ export const Formats: FormatList = [
|
|
|
187
187
|
'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Mewtwo', 'Naganadel',
|
|
188
188
|
'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Pheromosa', 'Rayquaza', 'Reshiram', 'Solgaleo', 'Urshifu-Base', 'Xerneas', 'Yveltal',
|
|
189
189
|
'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zygarde-Base', 'Moody', 'Power Construct', 'Shadow Tag', 'Bright Powder',
|
|
190
|
-
'Damp Rock', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw', 'Smooth Rock', 'Terrain Extender', 'Baton Pass',
|
|
190
|
+
'Damp Rock', 'Focus Band', 'King\'s Rock', 'Lax Incense', 'Quick Claw', 'Smooth Rock', 'Terrain Extender', 'Acupressure', 'Baton Pass',
|
|
191
191
|
],
|
|
192
192
|
},
|
|
193
193
|
{
|
|
@@ -234,7 +234,7 @@ export const Formats: FormatList = [
|
|
|
234
234
|
mod: 'gen8',
|
|
235
235
|
ruleset: ['[Gen 8] PU'],
|
|
236
236
|
banlist: [
|
|
237
|
-
'PU', 'Arctovish', 'Aurorus', 'Centiskorch', 'Drampa', 'Exeggutor-Alola', 'Gallade', 'Haunter', 'Magmortar', 'Magneton', 'Omastar',
|
|
237
|
+
'PU', 'Arctovish', 'Aurorus', 'Basculin', 'Centiskorch', 'Drampa', 'Exeggutor-Alola', 'Gallade', 'Haunter', 'Magmortar', 'Magneton', 'Omastar',
|
|
238
238
|
'Rotom-Frost', 'Turtonator', 'Vanilluxe', 'Vikavolt', 'Silvally-Dragon', 'Silvally-Ground', 'Sneasel', 'Damp Rock', 'Grassy Seed',
|
|
239
239
|
],
|
|
240
240
|
},
|
|
@@ -249,9 +249,9 @@ export const Formats: FormatList = [
|
|
|
249
249
|
ruleset: ['[Gen 8] LC'],
|
|
250
250
|
banlist: [
|
|
251
251
|
// LC OU
|
|
252
|
-
'Abra', 'Carvanha', '
|
|
253
|
-
'
|
|
254
|
-
'Ponyta', 'Ponyta-Galar', 'Porygon', 'Slowpoke-Base', 'Staryu', 'Timburr', 'Trapinch', 'Tyrunt',
|
|
252
|
+
'Abra', 'Carvanha', 'Diglett-Base', 'Dwebble', 'Ferroseed', 'Foongus', 'Frillish', 'Grookey', 'Koffing',
|
|
253
|
+
'Larvesta', 'Magby', 'Magnemite', 'Mareanie', 'Mienfoo', 'Mudbray', 'Munchlax', 'Natu', 'Onix', 'Pawniard',
|
|
254
|
+
'Ponyta', 'Ponyta-Galar', 'Porygon', 'Slowpoke-Base', 'Staryu', 'Timburr', 'Trapinch', 'Tyrunt',
|
|
255
255
|
// LC UUBL
|
|
256
256
|
'Farfetch\u2019d-Galar', 'Scorbunny', 'Shellder', 'Wingull',
|
|
257
257
|
],
|
|
@@ -358,7 +358,7 @@ export const Formats: FormatList = [
|
|
|
358
358
|
gameType: 'doubles',
|
|
359
359
|
searchShow: false,
|
|
360
360
|
ruleset: ['Standard Doubles', 'Little Cup', 'Dynamax Clause', 'Swagger Clause', 'Sleep Clause Mod'],
|
|
361
|
-
banlist: ['Corsola-Galar', 'Cutiefly', 'Ponyta-Base', 'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Vulpix', 'Vulpix-Alola'],
|
|
361
|
+
banlist: ['Corsola-Galar', 'Cutiefly', 'Ponyta-Base', 'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Vulpix', 'Vulpix-Alola', 'Ally Switch'],
|
|
362
362
|
},
|
|
363
363
|
{
|
|
364
364
|
name: "[Gen 8] VGC 2022",
|
|
@@ -405,8 +405,8 @@ export const Formats: FormatList = [
|
|
|
405
405
|
banlist: [
|
|
406
406
|
'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Jirachi', 'Kyogre',
|
|
407
407
|
'Kyurem-White', 'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia',
|
|
408
|
-
'Rayquaza', 'Reshiram', 'Solgaleo', '
|
|
409
|
-
'Zekrom', 'Power Construct', 'Focus Sash', 'Ally Switch', 'Final Gambit', 'Perish Song', 'Swagger',
|
|
408
|
+
'Rayquaza', 'Reshiram', 'Solgaleo', 'Tornadus-Base', 'Urshifu-Base', 'Urshifu-Rapid-Strike', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned',
|
|
409
|
+
'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Moody', 'Power Construct', 'Focus Sash', 'Ally Switch', 'Final Gambit', 'Perish Song', 'Swagger',
|
|
410
410
|
],
|
|
411
411
|
},
|
|
412
412
|
{
|
|
@@ -637,202 +637,43 @@ export const Formats: FormatList = [
|
|
|
637
637
|
column: 2,
|
|
638
638
|
},
|
|
639
639
|
{
|
|
640
|
-
name: "[Gen 8]
|
|
641
|
-
desc: `
|
|
640
|
+
name: "[Gen 8] Sketchmons",
|
|
641
|
+
desc: `Every Pokémon gets a new move once.`,
|
|
642
642
|
threads: [
|
|
643
|
-
`• <a href="https://www.smogon.com/forums/threads/
|
|
643
|
+
`• <a href="https://www.smogon.com/forums/threads/3680298/">Sketchmons</a>`,
|
|
644
644
|
],
|
|
645
645
|
|
|
646
|
-
mod: '
|
|
647
|
-
|
|
648
|
-
ruleset: ['Standard', 'Dynamax Clause'],
|
|
646
|
+
mod: 'gen8',
|
|
647
|
+
ruleset: ['Standard', 'Sketchmons Move Legality', 'Dynamax Clause'],
|
|
649
648
|
banlist: [
|
|
650
|
-
'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
|
|
651
|
-
'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', '
|
|
652
|
-
'Marshadow', '
|
|
653
|
-
'
|
|
654
|
-
'
|
|
655
|
-
'
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
'
|
|
659
|
-
'
|
|
660
|
-
'
|
|
649
|
+
'Calyrex-Ice', 'Calyrex-Shadow', 'Cinderace', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Dragapult', 'Eternatus', 'Genesect', 'Giratina',
|
|
650
|
+
'Giratina-Origin', 'Groudon', 'Hawlucha', 'Ho-Oh', 'Kartana', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Landorus-Base', 'Lugia', 'Lunala',
|
|
651
|
+
'Marshadow', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia', 'Porygon-Z', 'Pheromosa', 'Rayquaza', 'Regieleki',
|
|
652
|
+
'Reshiram', 'Rillaboom', 'Shedinja', 'Solgaleo', 'Spectrier', 'Swoobat', 'Tapu Bulu', 'Urshifu-Base', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned',
|
|
653
|
+
'Zamazenta', 'Zamazenta-Crowned', 'Zekrom', 'Zeraora', 'Zygarde-Base', 'Arena Trap', 'Magnet Pull', 'Moody', 'Power Construct', 'Sand Rush',
|
|
654
|
+
'Shadow Tag', 'King\'s Rock', 'Baton Pass',
|
|
655
|
+
],
|
|
656
|
+
restricted: [
|
|
657
|
+
'Acupressure', 'Astral Barrage', 'Belly Drum', 'Bolt Beak', 'Clangorous Soul', 'Double Iron Bash', 'Electrify', 'Extreme Speed', 'Fishious Rend',
|
|
658
|
+
'Geomancy', 'Glacial Lance', 'Lovely Kiss', 'No Retreat', 'Oblivion Wing', 'Octolock', 'Quiver Dance', 'Secret Sword', 'Shell Smash', 'Shift Gear',
|
|
659
|
+
'Sleep Powder', 'Spore', 'Thousand Arrows', 'Transform', 'V-create', 'Wicked Blow',
|
|
661
660
|
],
|
|
662
|
-
getSharedPower(pokemon) {
|
|
663
|
-
const sharedPower = new Set<string>();
|
|
664
|
-
for (const ally of pokemon.side.pokemon) {
|
|
665
|
-
if (ally.previouslySwitchedIn > 0) {
|
|
666
|
-
if (pokemon.battle.dex.currentMod !== 'sharedpower' && ['trace', 'mirrorarmor'].includes(ally.baseAbility)) {
|
|
667
|
-
sharedPower.add('noability');
|
|
668
|
-
continue;
|
|
669
|
-
}
|
|
670
|
-
sharedPower.add(ally.baseAbility);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
sharedPower.delete(pokemon.baseAbility);
|
|
674
|
-
return sharedPower;
|
|
675
|
-
},
|
|
676
|
-
onBeforeSwitchIn(pokemon) {
|
|
677
|
-
let format = this.format;
|
|
678
|
-
if (!format.getSharedPower) format = this.dex.formats.get('gen8sharedpower');
|
|
679
|
-
for (const ability of format.getSharedPower!(pokemon)) {
|
|
680
|
-
const effect = 'ability:' + ability;
|
|
681
|
-
pokemon.volatiles[effect] = {id: this.toID(effect), target: pokemon};
|
|
682
|
-
if (!pokemon.m.abils) pokemon.m.abils = [];
|
|
683
|
-
if (!pokemon.m.abils.includes(effect)) pokemon.m.abils.push(effect);
|
|
684
|
-
}
|
|
685
|
-
},
|
|
686
|
-
onSwitchInPriority: 2,
|
|
687
|
-
onSwitchIn(pokemon) {
|
|
688
|
-
let format = this.format;
|
|
689
|
-
if (!format.getSharedPower) format = this.dex.formats.get('gen8sharedpower');
|
|
690
|
-
for (const ability of format.getSharedPower!(pokemon)) {
|
|
691
|
-
if (ability === 'noability') {
|
|
692
|
-
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.`);
|
|
693
|
-
}
|
|
694
|
-
const effect = 'ability:' + ability;
|
|
695
|
-
delete pokemon.volatiles[effect];
|
|
696
|
-
pokemon.addVolatile(effect);
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
661
|
},
|
|
700
662
|
{
|
|
701
|
-
name: "[Gen 8]
|
|
702
|
-
desc: `
|
|
663
|
+
name: "[Gen 8] Flipped",
|
|
664
|
+
desc: `Pokémon have their base stats flipped.`,
|
|
703
665
|
threads: [
|
|
704
|
-
`• <a href="https://www.smogon.com/forums/threads/
|
|
666
|
+
`• <a href="https://www.smogon.com/forums/threads/3662020/">Flipped</a>`,
|
|
705
667
|
],
|
|
706
668
|
|
|
707
669
|
mod: 'gen8',
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
const name = set.name;
|
|
716
|
-
if (names.has(this.dex.toID(name))) {
|
|
717
|
-
return [
|
|
718
|
-
`Your Pok\u00e9mon must have different nicknames.`,
|
|
719
|
-
`(You have more than one Pok\u00e9mon named '${name}')`,
|
|
720
|
-
];
|
|
721
|
-
}
|
|
722
|
-
names.add(this.dex.toID(name));
|
|
723
|
-
}
|
|
724
|
-
if (!names.size) {
|
|
725
|
-
return [
|
|
726
|
-
`${this.format.name} works using nicknames; your team has 0 nicknamed Pok\u00e9mon.`,
|
|
727
|
-
`(If this was intentional, add a nickname to one Pok\u00e9mon that isn't the name of a Pok\u00e9mon species.)`,
|
|
728
|
-
];
|
|
729
|
-
}
|
|
730
|
-
},
|
|
731
|
-
checkCanLearn(move, species, lsetData, set) {
|
|
732
|
-
// @ts-ignore
|
|
733
|
-
if (!set.sp?.exists || !set.crossSpecies?.exists) {
|
|
734
|
-
return this.checkCanLearn(move, species, lsetData, set);
|
|
735
|
-
}
|
|
736
|
-
// @ts-ignore
|
|
737
|
-
const problem = this.checkCanLearn(move, set.sp);
|
|
738
|
-
if (!problem) return null;
|
|
739
|
-
// @ts-ignore
|
|
740
|
-
if (!set.crossMovesLeft) return problem;
|
|
741
|
-
// @ts-ignore
|
|
742
|
-
if (this.checkCanLearn(move, set.crossSpecies)) return problem;
|
|
743
|
-
// @ts-ignore
|
|
744
|
-
set.crossMovesLeft--;
|
|
745
|
-
return null;
|
|
746
|
-
},
|
|
747
|
-
validateSet(set, teamHas) {
|
|
748
|
-
const crossSpecies = this.dex.species.get(set.name);
|
|
749
|
-
let problems = this.dex.formats.get('Pokemon').onChangeSet?.call(this, set, this.format) || null;
|
|
750
|
-
if (Array.isArray(problems) && problems.length) return problems;
|
|
751
|
-
const crossNonstandard = (!this.ruleTable.has('standardnatdex') && crossSpecies.isNonstandard === 'Past') ||
|
|
752
|
-
crossSpecies.isNonstandard === 'Future';
|
|
753
|
-
const crossIsCap = !this.ruleTable.has('+pokemontag:cap') && crossSpecies.isNonstandard === 'CAP';
|
|
754
|
-
if (!crossSpecies.exists || crossNonstandard || crossIsCap) return this.validateSet(set, teamHas);
|
|
755
|
-
const species = this.dex.species.get(set.species);
|
|
756
|
-
const check = this.checkSpecies(set, species, species, {});
|
|
757
|
-
if (check) return [check];
|
|
758
|
-
const nonstandard = !this.ruleTable.has('standardnatdex') && species.isNonstandard === 'Past';
|
|
759
|
-
const isCap = !this.ruleTable.has('+pokemontag:cap') && species.isNonstandard === 'CAP';
|
|
760
|
-
if (!species.exists || nonstandard || isCap || species === crossSpecies) return this.validateSet(set, teamHas);
|
|
761
|
-
if (!species.nfe) return [`${species.name} cannot cross evolve because it doesn't evolve.`];
|
|
762
|
-
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
763
|
-
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) {
|
|
764
|
-
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it isn't an evolution.`];
|
|
765
|
-
}
|
|
766
|
-
if (this.ruleTable.isRestrictedSpecies(crossSpecies)) {
|
|
767
|
-
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it is banned.`];
|
|
768
|
-
}
|
|
769
|
-
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
770
|
-
if (!crossPrevoSpecies.prevo !== !species.prevo) {
|
|
771
|
-
return [
|
|
772
|
-
`${species.name} cannot cross evolve into ${crossSpecies.name} because they are not consecutive evolution stages.`,
|
|
773
|
-
];
|
|
774
|
-
}
|
|
775
|
-
const item = this.dex.items.get(set.item);
|
|
776
|
-
if (item.itemUser?.length) {
|
|
777
|
-
if (!item.itemUser.includes(crossSpecies.name) || crossSpecies.name !== species.name) {
|
|
778
|
-
return [`${species.name} cannot use ${item.name} because it is cross evolved into ${crossSpecies.name}.`];
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
const ability = this.dex.abilities.get(set.ability);
|
|
782
|
-
if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
|
|
783
|
-
set.species = crossSpecies.name;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
// @ts-ignore
|
|
787
|
-
set.sp = species;
|
|
788
|
-
// @ts-ignore
|
|
789
|
-
set.crossSpecies = crossSpecies;
|
|
790
|
-
// @ts-ignore
|
|
791
|
-
set.crossMovesLeft = 2;
|
|
792
|
-
problems = this.validateSet(set, teamHas);
|
|
793
|
-
set.name = crossSpecies.name;
|
|
794
|
-
set.species = species.name;
|
|
795
|
-
return problems;
|
|
796
|
-
},
|
|
797
|
-
onModifySpecies(species, target, source, effect) {
|
|
798
|
-
if (!target) return; // chat
|
|
799
|
-
if (effect && ['imposter', 'transform'].includes(effect.id)) return;
|
|
800
|
-
if (target.set.name === target.set.species) return;
|
|
801
|
-
const crossSpecies = this.dex.species.get(target.set.name);
|
|
802
|
-
if (!crossSpecies.exists) return;
|
|
803
|
-
if (species.battleOnly || !species.nfe) return;
|
|
804
|
-
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
805
|
-
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) return;
|
|
806
|
-
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
807
|
-
if (!crossPrevoSpecies.prevo !== !species.prevo) return;
|
|
808
|
-
|
|
809
|
-
const mixedSpecies = this.dex.deepClone(species);
|
|
810
|
-
mixedSpecies.weightkg =
|
|
811
|
-
Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
|
|
812
|
-
mixedSpecies.nfe = false;
|
|
813
|
-
mixedSpecies.evos = [];
|
|
814
|
-
mixedSpecies.eggGroups = crossSpecies.eggGroups;
|
|
815
|
-
mixedSpecies.abilities = crossSpecies.abilities;
|
|
816
|
-
mixedSpecies.bst = 0;
|
|
817
|
-
let i: StatID;
|
|
818
|
-
for (i in species.baseStats) {
|
|
819
|
-
const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
|
|
820
|
-
mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
|
|
821
|
-
mixedSpecies.bst += mixedSpecies.baseStats[i];
|
|
822
|
-
}
|
|
823
|
-
if (crossSpecies.types[0] !== crossPrevoSpecies.types[0]) mixedSpecies.types[0] = crossSpecies.types[0];
|
|
824
|
-
if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
|
|
825
|
-
mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
|
|
826
|
-
}
|
|
827
|
-
if (mixedSpecies.types[0] === mixedSpecies.types[1]) mixedSpecies.types = [mixedSpecies.types[0]];
|
|
828
|
-
|
|
829
|
-
return mixedSpecies;
|
|
830
|
-
},
|
|
831
|
-
onBegin() {
|
|
832
|
-
for (const pokemon of this.getAllPokemon()) {
|
|
833
|
-
pokemon.baseSpecies = pokemon.species;
|
|
834
|
-
}
|
|
835
|
-
},
|
|
670
|
+
ruleset: ['Standard', 'Flipped Mod', 'Dynamax Clause'],
|
|
671
|
+
banlist: [
|
|
672
|
+
'Azumarill', 'Blissey', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Eternatus', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre',
|
|
673
|
+
'Kyurem-Black', 'Kyurem-White', 'Lugia', 'Lunala', 'Marshadow', 'Melmetal', 'Mewtwo', 'Necrozma-Dawn Wings', 'Necrozma-Dusk Mane', 'Palkia',
|
|
674
|
+
'Rayquaza', 'Reshiram', 'Solgaleo', 'Steelix', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom',
|
|
675
|
+
'Zygarde-Base', 'Arena Trap', 'Moody', 'Power Construct', 'Psychic Surge', 'Shadow Tag', 'Baton Pass', 'Psychic Terrain', 'Shell Smash',
|
|
676
|
+
],
|
|
836
677
|
},
|
|
837
678
|
|
|
838
679
|
// Other Metagames
|
|
@@ -888,15 +729,16 @@ export const Formats: FormatList = [
|
|
|
888
729
|
],
|
|
889
730
|
|
|
890
731
|
mod: 'gen8',
|
|
891
|
-
ruleset: ['
|
|
732
|
+
ruleset: ['Standard', '!Obtainable Abilities', '2 Ability Clause', 'Dynamax Clause', 'Sleep Moves Clause', '!Sleep Clause Mod'],
|
|
892
733
|
banlist: [
|
|
893
|
-
'Archeops', 'Blacephalon', 'Buzzwole', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus',
|
|
894
|
-
'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Keldeo', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White',
|
|
895
|
-
'
|
|
896
|
-
'
|
|
897
|
-
'
|
|
898
|
-
'
|
|
899
|
-
'
|
|
734
|
+
'Archeops', 'Blacephalon', 'Buzzwole', 'Calyrex-Ice', 'Calyrex-Shadow', 'Dialga', 'Dracovish', 'Dragapult', 'Dragonite', 'Eternatus',
|
|
735
|
+
'Gengar', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kartana', 'Keldeo', 'Kyogre', 'Kyurem', 'Kyurem-Black', 'Kyurem-White',
|
|
736
|
+
'Lugia', 'Lunala', 'Magearna', 'Marshadow', 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Noivern',
|
|
737
|
+
'Palkia', 'Pheromosa', 'Rayquaza', 'Regigigas', 'Reshiram', 'Shedinja', 'Solgaleo', 'Spectrier', 'Urshifu', 'Urshifu-Rapid-Strike',
|
|
738
|
+
'Victini', 'Weavile', 'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta-Base', 'Zekrom', 'Zeraora', 'Zygarde-Base',
|
|
739
|
+
'Arena Trap', 'Comatose', 'Contrary', 'Fluffy', 'Fur Coat', 'Gorilla Tactics', 'Huge Power', 'Ice Scales', 'Illusion', 'Imposter',
|
|
740
|
+
'Innards Out', 'Intrepid Sword', 'Libero', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Poison Heal', 'Protean',
|
|
741
|
+
'Pure Power', 'Shadow Tag', 'Simple', 'Stakeout', 'Speed Boost', 'Water Bubble', 'Wonder Guard', 'King\'s Rock', 'Baton Pass',
|
|
900
742
|
],
|
|
901
743
|
onValidateSet(set) {
|
|
902
744
|
// Temporary fix until battle-only is implemented properly
|
|
@@ -917,15 +759,15 @@ export const Formats: FormatList = [
|
|
|
917
759
|
],
|
|
918
760
|
|
|
919
761
|
mod: 'mixandmega',
|
|
920
|
-
ruleset: ['
|
|
762
|
+
ruleset: ['Standard', 'Overflow Stat Mod', 'Dynamax Clause'],
|
|
921
763
|
banlist: [
|
|
922
764
|
'Calyrex-Shadow', 'Eternatus', 'Kyogre', 'Zacian',
|
|
923
765
|
'Beedrillite', 'Blazikenite', 'Gengarite', 'Kangaskhanite', 'Mawilite', 'Medichamite', 'Pidgeotite',
|
|
924
766
|
'Moody', 'Shadow Tag', 'Baton Pass', 'Electrify',
|
|
925
767
|
],
|
|
926
768
|
restricted: [
|
|
927
|
-
'Calyrex-Ice', 'Dialga', 'Gengar', 'Giratina', 'Groudon', 'Ho-Oh', 'Kyurem-Black', 'Kyurem-White',
|
|
928
|
-
'
|
|
769
|
+
'Calyrex-Ice', 'Dialga', 'Gengar', 'Giratina', 'Groudon', 'Ho-Oh', 'Kyurem-Black', 'Kyurem-White', 'Lugia',
|
|
770
|
+
'Lunala', 'Marshadow', 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane',
|
|
929
771
|
'Palkia', 'Pheromosa', 'Rayquaza', 'Regigigas', 'Reshiram', 'Urshifu', 'Urshifu-Rapid-Strike', 'Xerneas',
|
|
930
772
|
'Yveltal', 'Zekrom', 'Zygarde-Complete',
|
|
931
773
|
],
|
|
@@ -934,8 +776,15 @@ export const Formats: FormatList = [
|
|
|
934
776
|
for (const set of team) {
|
|
935
777
|
const item = this.dex.items.get(set.item);
|
|
936
778
|
if (!item.megaStone) continue;
|
|
779
|
+
const natdex = this.ruleTable.has('standardnatdex');
|
|
780
|
+
if (natdex && item.id !== 'ultranecroziumz') continue;
|
|
937
781
|
const species = this.dex.species.get(set.species);
|
|
938
|
-
if (species.isNonstandard
|
|
782
|
+
if (species.isNonstandard && !this.ruleTable.has(`+${this.toID(species.isNonstandard)}`)) {
|
|
783
|
+
return [`${species.baseSpecies} does not exist in gen 8.`];
|
|
784
|
+
}
|
|
785
|
+
if (natdex && species.name.startsWith('Necrozma-') && item.id === 'ultranecroziumz') {
|
|
786
|
+
continue;
|
|
787
|
+
}
|
|
939
788
|
if (this.ruleTable.isRestrictedSpecies(species) || this.toID(set.ability) === 'powerconstruct') {
|
|
940
789
|
return [`${species.name} is not allowed to hold ${item.name}.`];
|
|
941
790
|
}
|
|
@@ -1005,8 +854,8 @@ export const Formats: FormatList = [
|
|
|
1005
854
|
mod: 'gen8',
|
|
1006
855
|
ruleset: ['Not Fully Evolved', 'Standard', 'Dynamax Clause'],
|
|
1007
856
|
banlist: [
|
|
1008
|
-
'Chansey', 'Doublade', 'Haunter', 'Kadabra', 'Magneton', 'Mr. Mime-Galar', 'Pawniard', 'Pikachu',
|
|
1009
|
-
'Rhydon', 'Scyther', 'Sneasel', 'Type: Null', 'Vulpix-Base', 'Arena Trap', 'Shadow Tag', 'Baton Pass',
|
|
857
|
+
'Chansey', 'Doublade', 'Golbat', 'Haunter', 'Kadabra', 'Magmar', 'Magneton', 'Mr. Mime-Galar', 'Pawniard', 'Pikachu',
|
|
858
|
+
'Porygon2', 'Rhydon', 'Scyther', 'Sneasel', 'Type: Null', 'Vulpix-Base', 'Arena Trap', 'Shadow Tag', 'Baton Pass',
|
|
1010
859
|
],
|
|
1011
860
|
},
|
|
1012
861
|
{
|
|
@@ -1029,8 +878,19 @@ export const Formats: FormatList = [
|
|
|
1029
878
|
for (const set of team) {
|
|
1030
879
|
let species = this.dex.species.get(set.species);
|
|
1031
880
|
if (typeof species.battleOnly === 'string') species = this.dex.species.get(species.battleOnly);
|
|
1032
|
-
if (
|
|
1033
|
-
|
|
881
|
+
if (set.item && this.dex.items.get(set.item).megaStone) {
|
|
882
|
+
const item = this.dex.items.get(set.item);
|
|
883
|
+
if (item.megaEvolves === species.baseSpecies) {
|
|
884
|
+
species = this.dex.species.get(item.megaStone);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
if (this.ruleTable.has('standardnatdex')) {
|
|
888
|
+
const format = this.dex.formats.getRuleTable(this.dex.formats.get('gen8nationaldex'));
|
|
889
|
+
if (format.isBannedSpecies(species)) gods.add(species.name);
|
|
890
|
+
} else {
|
|
891
|
+
if (['ag', 'uber'].includes(this.toID(species.tier)) || this.toID(set.ability) === 'powerconstruct') {
|
|
892
|
+
gods.add(species.name);
|
|
893
|
+
}
|
|
1034
894
|
}
|
|
1035
895
|
}
|
|
1036
896
|
if (gods.size > 1) {
|
|
@@ -1042,7 +902,10 @@ export const Formats: FormatList = [
|
|
|
1042
902
|
if (source || !target?.side) return;
|
|
1043
903
|
const god = target.side.team.find(set => {
|
|
1044
904
|
let godSpecies = this.dex.species.get(set.species);
|
|
1045
|
-
const
|
|
905
|
+
const isNatDex = this.format.ruleTable?.has('standardnatdex');
|
|
906
|
+
const validator = this.dex.formats.getRuleTable(
|
|
907
|
+
this.dex.formats.get(`gen${isNatDex && this.gen < 8 ? 8 : this.gen}${isNatDex ? 'nationaldex' : 'ou'}`)
|
|
908
|
+
);
|
|
1046
909
|
if (this.toID(set.ability) === 'powerconstruct') {
|
|
1047
910
|
return true;
|
|
1048
911
|
}
|
|
@@ -1059,6 +922,9 @@ export const Formats: FormatList = [
|
|
|
1059
922
|
if (godSpecies.forme === 'Crowned') {
|
|
1060
923
|
godSpecies = this.dex.species.get(godSpecies.changesFrom || godSpecies.baseSpecies);
|
|
1061
924
|
}
|
|
925
|
+
if (typeof godSpecies.battleOnly === 'string') {
|
|
926
|
+
godSpecies = this.dex.species.get(godSpecies.battleOnly);
|
|
927
|
+
}
|
|
1062
928
|
newSpecies.bst -= newSpecies.baseStats[stat];
|
|
1063
929
|
newSpecies.baseStats[stat] = godSpecies.baseStats[stat];
|
|
1064
930
|
newSpecies.bst += newSpecies.baseStats[stat];
|
|
@@ -1154,6 +1020,16 @@ export const Formats: FormatList = [
|
|
|
1154
1020
|
ruleset: ['[Gen 8 BDSP] RU'],
|
|
1155
1021
|
banlist: ['RU', 'NUBL', 'Damp Rock', 'Heat Rock'],
|
|
1156
1022
|
},
|
|
1023
|
+
{
|
|
1024
|
+
name: "[Gen 8 BDSP] PU",
|
|
1025
|
+
threads: [
|
|
1026
|
+
`• <a href="https://www.smogon.com/forums/threads/3700009/">BDSP PU</a>`,
|
|
1027
|
+
],
|
|
1028
|
+
|
|
1029
|
+
mod: 'gen8bdsp',
|
|
1030
|
+
ruleset: ['[Gen 8 BDSP] NU'],
|
|
1031
|
+
banlist: ['NU', 'PUBL'],
|
|
1032
|
+
},
|
|
1157
1033
|
{
|
|
1158
1034
|
name: "[Gen 8 BDSP] LC",
|
|
1159
1035
|
threads: [
|
|
@@ -1171,11 +1047,7 @@ export const Formats: FormatList = [
|
|
|
1171
1047
|
],
|
|
1172
1048
|
|
|
1173
1049
|
mod: 'gen8bdsp',
|
|
1174
|
-
ruleset: ['
|
|
1175
|
-
banlist: [
|
|
1176
|
-
'Dialga', 'Giratina', 'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Lugia', 'Mewtwo', 'Palkia', 'Rayquaza',
|
|
1177
|
-
'Arena Trap', 'Moody', 'Shadow Tag', 'Damp Rock', 'King\'s Rock', 'Razor Fang', 'Baton Pass',
|
|
1178
|
-
],
|
|
1050
|
+
ruleset: ['[Gen 8 BDSP] OU', 'Same Type Clause'],
|
|
1179
1051
|
},
|
|
1180
1052
|
{
|
|
1181
1053
|
name: "[Gen 8 BDSP] CAP",
|
|
@@ -1194,6 +1066,7 @@ export const Formats: FormatList = [
|
|
|
1194
1066
|
],
|
|
1195
1067
|
|
|
1196
1068
|
mod: 'gen8bdsp',
|
|
1069
|
+
searchShow: false,
|
|
1197
1070
|
ruleset: ['Flat Rules', 'Min Source Gen = 8'],
|
|
1198
1071
|
},
|
|
1199
1072
|
{
|
|
@@ -1205,7 +1078,7 @@ export const Formats: FormatList = [
|
|
|
1205
1078
|
mod: 'gen8bdsp',
|
|
1206
1079
|
gameType: 'doubles',
|
|
1207
1080
|
ruleset: ['Standard Doubles'],
|
|
1208
|
-
banlist: ['DUber'],
|
|
1081
|
+
banlist: ['DUber', 'Dark Void'],
|
|
1209
1082
|
},
|
|
1210
1083
|
{
|
|
1211
1084
|
name: "[Gen 8 BDSP] Battle Festival Doubles",
|
|
@@ -1250,6 +1123,143 @@ export const Formats: FormatList = [
|
|
|
1250
1123
|
'Zygarde-Base', 'Arena Trap', 'Moody', 'Power Construct', 'Shadow Tag', 'Baton Pass', 'Calm Mind',
|
|
1251
1124
|
],
|
|
1252
1125
|
},
|
|
1126
|
+
{
|
|
1127
|
+
name: "[Gen 8] Cross Evolution",
|
|
1128
|
+
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.`,
|
|
1129
|
+
threads: [
|
|
1130
|
+
`• <a href="https://www.smogon.com/forums/threads/3657562/">Cross Evolution</a>`,
|
|
1131
|
+
],
|
|
1132
|
+
|
|
1133
|
+
mod: 'gen8',
|
|
1134
|
+
searchShow: false,
|
|
1135
|
+
ruleset: ['Standard', 'Overflow Stat Mod', 'Dynamax Clause', '2 Ability Clause'],
|
|
1136
|
+
banlist: ['Corsola-Galar', 'Sneasel', 'Type: Null', 'Arena Trap', 'Ice Scales', 'Moody', 'King\'s Rock', 'Baton Pass'],
|
|
1137
|
+
restricted: ['Chansey', 'Lunala', 'Shedinja', 'Solgaleo', 'Gorilla Tactics', 'Huge Power', 'Pure Power', 'Shadow Tag'],
|
|
1138
|
+
onValidateTeam(team) {
|
|
1139
|
+
const names = new Set<ID>();
|
|
1140
|
+
for (const set of team) {
|
|
1141
|
+
const name = set.name;
|
|
1142
|
+
if (names.has(this.dex.toID(name))) {
|
|
1143
|
+
return [
|
|
1144
|
+
`Your Pok\u00e9mon must have different nicknames.`,
|
|
1145
|
+
`(You have more than one Pok\u00e9mon named '${name}')`,
|
|
1146
|
+
];
|
|
1147
|
+
}
|
|
1148
|
+
names.add(this.dex.toID(name));
|
|
1149
|
+
}
|
|
1150
|
+
if (!names.size) {
|
|
1151
|
+
return [
|
|
1152
|
+
`${this.format.name} works using nicknames; your team has 0 nicknamed Pok\u00e9mon.`,
|
|
1153
|
+
`(If this was intentional, add a nickname to one Pok\u00e9mon that isn't the name of a Pok\u00e9mon species.)`,
|
|
1154
|
+
];
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
checkCanLearn(move, species, lsetData, set) {
|
|
1158
|
+
// @ts-ignore
|
|
1159
|
+
if (!set.sp?.exists || !set.crossSpecies?.exists) {
|
|
1160
|
+
return this.checkCanLearn(move, species, lsetData, set);
|
|
1161
|
+
}
|
|
1162
|
+
// @ts-ignore
|
|
1163
|
+
const problem = this.checkCanLearn(move, set.sp);
|
|
1164
|
+
if (!problem) return null;
|
|
1165
|
+
// @ts-ignore
|
|
1166
|
+
if (!set.crossMovesLeft) return problem;
|
|
1167
|
+
// @ts-ignore
|
|
1168
|
+
if (this.checkCanLearn(move, set.crossSpecies)) return problem;
|
|
1169
|
+
// @ts-ignore
|
|
1170
|
+
set.crossMovesLeft--;
|
|
1171
|
+
return null;
|
|
1172
|
+
},
|
|
1173
|
+
validateSet(set, teamHas) {
|
|
1174
|
+
const crossSpecies = this.dex.species.get(set.name);
|
|
1175
|
+
let problems = this.dex.formats.get('Pokemon').onChangeSet?.call(this, set, this.format) || null;
|
|
1176
|
+
if (Array.isArray(problems) && problems.length) return problems;
|
|
1177
|
+
const crossNonstandard = (!this.ruleTable.has('standardnatdex') && crossSpecies.isNonstandard === 'Past') ||
|
|
1178
|
+
crossSpecies.isNonstandard === 'Future';
|
|
1179
|
+
const crossIsCap = !this.ruleTable.has('+pokemontag:cap') && crossSpecies.isNonstandard === 'CAP';
|
|
1180
|
+
if (!crossSpecies.exists || crossNonstandard || crossIsCap) return this.validateSet(set, teamHas);
|
|
1181
|
+
const species = this.dex.species.get(set.species);
|
|
1182
|
+
const check = this.checkSpecies(set, species, species, {});
|
|
1183
|
+
if (check) return [check];
|
|
1184
|
+
const nonstandard = !this.ruleTable.has('standardnatdex') && species.isNonstandard === 'Past';
|
|
1185
|
+
const isCap = !this.ruleTable.has('+pokemontag:cap') && species.isNonstandard === 'CAP';
|
|
1186
|
+
if (!species.exists || nonstandard || isCap || species === crossSpecies) return this.validateSet(set, teamHas);
|
|
1187
|
+
if (!species.nfe) return [`${species.name} cannot cross evolve because it doesn't evolve.`];
|
|
1188
|
+
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
1189
|
+
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) {
|
|
1190
|
+
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it isn't an evolution.`];
|
|
1191
|
+
}
|
|
1192
|
+
if (this.ruleTable.isRestrictedSpecies(crossSpecies)) {
|
|
1193
|
+
return [`${species.name} cannot cross evolve into ${crossSpecies.name} because it is banned.`];
|
|
1194
|
+
}
|
|
1195
|
+
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
1196
|
+
if (!crossPrevoSpecies.prevo !== !species.prevo) {
|
|
1197
|
+
return [
|
|
1198
|
+
`${species.name} cannot cross evolve into ${crossSpecies.name} because they are not consecutive evolution stages.`,
|
|
1199
|
+
];
|
|
1200
|
+
}
|
|
1201
|
+
const item = this.dex.items.get(set.item);
|
|
1202
|
+
if (item.itemUser?.length) {
|
|
1203
|
+
if (!item.itemUser.includes(crossSpecies.name) || crossSpecies.name !== species.name) {
|
|
1204
|
+
return [`${species.name} cannot use ${item.name} because it is cross evolved into ${crossSpecies.name}.`];
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
const ability = this.dex.abilities.get(set.ability);
|
|
1208
|
+
if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
|
|
1209
|
+
set.species = crossSpecies.name;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
// @ts-ignore
|
|
1213
|
+
set.sp = species;
|
|
1214
|
+
// @ts-ignore
|
|
1215
|
+
set.crossSpecies = crossSpecies;
|
|
1216
|
+
// @ts-ignore
|
|
1217
|
+
set.crossMovesLeft = 2;
|
|
1218
|
+
problems = this.validateSet(set, teamHas);
|
|
1219
|
+
set.name = crossSpecies.name;
|
|
1220
|
+
set.species = species.name;
|
|
1221
|
+
return problems;
|
|
1222
|
+
},
|
|
1223
|
+
onModifySpecies(species, target, source, effect) {
|
|
1224
|
+
if (!target) return; // chat
|
|
1225
|
+
if (effect && ['imposter', 'transform'].includes(effect.id)) return;
|
|
1226
|
+
if (target.set.name === target.set.species) return;
|
|
1227
|
+
const crossSpecies = this.dex.species.get(target.set.name);
|
|
1228
|
+
if (!crossSpecies.exists) return;
|
|
1229
|
+
if (species.battleOnly || !species.nfe) return;
|
|
1230
|
+
const crossIsUnreleased = (crossSpecies.tier === "Unreleased" && crossSpecies.isNonstandard === "Unobtainable");
|
|
1231
|
+
if (crossSpecies.battleOnly || crossIsUnreleased || !crossSpecies.prevo) return;
|
|
1232
|
+
const crossPrevoSpecies = this.dex.species.get(crossSpecies.prevo);
|
|
1233
|
+
if (!crossPrevoSpecies.prevo !== !species.prevo) return;
|
|
1234
|
+
|
|
1235
|
+
const mixedSpecies = this.dex.deepClone(species);
|
|
1236
|
+
mixedSpecies.weightkg =
|
|
1237
|
+
Math.max(0.1, +(species.weightkg + crossSpecies.weightkg - crossPrevoSpecies.weightkg)).toFixed(1);
|
|
1238
|
+
mixedSpecies.nfe = false;
|
|
1239
|
+
mixedSpecies.evos = [];
|
|
1240
|
+
mixedSpecies.eggGroups = crossSpecies.eggGroups;
|
|
1241
|
+
mixedSpecies.abilities = crossSpecies.abilities;
|
|
1242
|
+
mixedSpecies.bst = 0;
|
|
1243
|
+
let i: StatID;
|
|
1244
|
+
for (i in species.baseStats) {
|
|
1245
|
+
const statChange = crossSpecies.baseStats[i] - crossPrevoSpecies.baseStats[i];
|
|
1246
|
+
mixedSpecies.baseStats[i] = this.clampIntRange(species.baseStats[i] + statChange, 1, 255);
|
|
1247
|
+
mixedSpecies.bst += mixedSpecies.baseStats[i];
|
|
1248
|
+
}
|
|
1249
|
+
if (crossSpecies.types[0] !== crossPrevoSpecies.types[0]) mixedSpecies.types[0] = crossSpecies.types[0];
|
|
1250
|
+
if (crossSpecies.types[1] !== crossPrevoSpecies.types[1]) {
|
|
1251
|
+
mixedSpecies.types[1] = crossSpecies.types[1] || crossSpecies.types[0];
|
|
1252
|
+
}
|
|
1253
|
+
if (mixedSpecies.types[0] === mixedSpecies.types[1]) mixedSpecies.types = [mixedSpecies.types[0]];
|
|
1254
|
+
|
|
1255
|
+
return mixedSpecies;
|
|
1256
|
+
},
|
|
1257
|
+
onBegin() {
|
|
1258
|
+
for (const pokemon of this.getAllPokemon()) {
|
|
1259
|
+
pokemon.baseSpecies = pokemon.species;
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
},
|
|
1253
1263
|
{
|
|
1254
1264
|
name: "[Gen 8] Inheritance",
|
|
1255
1265
|
desc: `Pokémon may use the ability and moves of another, as long as they forfeit their own learnset.`,
|
|
@@ -1772,6 +1782,67 @@ export const Formats: FormatList = [
|
|
|
1772
1782
|
pokemon.m.innates = undefined;
|
|
1773
1783
|
},
|
|
1774
1784
|
},
|
|
1785
|
+
{
|
|
1786
|
+
name: "[Gen 8] Shared Power",
|
|
1787
|
+
desc: `Once a Pokémon switches in, its ability is shared with the rest of the team.`,
|
|
1788
|
+
threads: [
|
|
1789
|
+
`• <a href="https://www.smogon.com/forums/threads/3660877/">Shared Power</a>`,
|
|
1790
|
+
],
|
|
1791
|
+
|
|
1792
|
+
mod: 'sharedpower',
|
|
1793
|
+
searchShow: false,
|
|
1794
|
+
ruleset: ['Standard', 'Dynamax Clause'],
|
|
1795
|
+
banlist: [
|
|
1796
|
+
'Calyrex-Ice', 'Calyrex-Shadow', 'Darmanitan-Galar', 'Dialga', 'Dracovish', 'Eternatus', 'Genesect', 'Giratina',
|
|
1797
|
+
'Giratina-Origin', 'Groudon', 'Ho-Oh', 'Kyogre', 'Kyurem-Black', 'Kyurem-White', 'Lugia', 'Lunala', 'Magearna',
|
|
1798
|
+
'Marshadow', 'Melmetal', 'Mewtwo', 'Naganadel', 'Necrozma-Dawn-Wings', 'Necrozma-Dusk-Mane', 'Palkia',
|
|
1799
|
+
'Pheromosa', 'Rayquaza', 'Reshiram', 'Shedinja', 'Solgaleo', 'Urshifu-Base', 'Urshifu-Rapid-Strike',
|
|
1800
|
+
'Xerneas', 'Yveltal', 'Zacian', 'Zacian-Crowned', 'Zamazenta', 'Zamazenta-Crowned', 'Zekrom',
|
|
1801
|
+
'Arena Trap', 'Contrary', 'Drizzle ++ Swift Swim', 'Drought ++ Chlorophyll', 'Electric Surge ++ Surge Surfer',
|
|
1802
|
+
'Fur Coat', 'Guts', 'Harvest', 'Huge Power', 'Imposter', 'Innards Out', 'Libero', 'Magic Bounce', 'Magic Guard',
|
|
1803
|
+
'Magnet Pull', 'Mold Breaker', 'Moody', 'Neutralizing Gas', 'Power Construct', 'Queenly Majesty', 'Quick Draw',
|
|
1804
|
+
'Regenerator', 'Sand Rush', 'Sand Veil', 'Shadow Tag', 'Simple', 'Snow Cloak', 'Snow Warning ++ Slush Rush',
|
|
1805
|
+
'Speed Boost', 'Stakeout', 'Steelworker ++ Steely Spirit', 'Stench', 'Tinted Lens', 'Triage', 'Unaware',
|
|
1806
|
+
'Unburden', 'Water Bubble', 'King\'s Rock', 'Baton Pass',
|
|
1807
|
+
],
|
|
1808
|
+
getSharedPower(pokemon) {
|
|
1809
|
+
const sharedPower = new Set<string>();
|
|
1810
|
+
for (const ally of pokemon.side.pokemon) {
|
|
1811
|
+
if (ally.previouslySwitchedIn > 0) {
|
|
1812
|
+
if (pokemon.battle.dex.currentMod !== 'sharedpower' && ['trace', 'mirrorarmor'].includes(ally.baseAbility)) {
|
|
1813
|
+
sharedPower.add('noability');
|
|
1814
|
+
continue;
|
|
1815
|
+
}
|
|
1816
|
+
sharedPower.add(ally.baseAbility);
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
sharedPower.delete(pokemon.baseAbility);
|
|
1820
|
+
return sharedPower;
|
|
1821
|
+
},
|
|
1822
|
+
onBeforeSwitchIn(pokemon) {
|
|
1823
|
+
let format = this.format;
|
|
1824
|
+
if (!format.getSharedPower) format = this.dex.formats.get('gen8sharedpower');
|
|
1825
|
+
for (const ability of format.getSharedPower!(pokemon)) {
|
|
1826
|
+
const effect = 'ability:' + ability;
|
|
1827
|
+
pokemon.volatiles[effect] = {id: this.toID(effect), target: pokemon};
|
|
1828
|
+
if (!pokemon.m.abils) pokemon.m.abils = [];
|
|
1829
|
+
if (!pokemon.m.abils.includes(effect)) pokemon.m.abils.push(effect);
|
|
1830
|
+
}
|
|
1831
|
+
},
|
|
1832
|
+
onSwitchInPriority: 2,
|
|
1833
|
+
onSwitchIn(pokemon) {
|
|
1834
|
+
let format = this.format;
|
|
1835
|
+
if (!format.getSharedPower) format = this.dex.formats.get('gen8sharedpower');
|
|
1836
|
+
for (const ability of format.getSharedPower!(pokemon)) {
|
|
1837
|
+
if (ability === 'noability') {
|
|
1838
|
+
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.`);
|
|
1839
|
+
}
|
|
1840
|
+
const effect = 'ability:' + ability;
|
|
1841
|
+
delete pokemon.volatiles[effect];
|
|
1842
|
+
pokemon.addVolatile(effect);
|
|
1843
|
+
}
|
|
1844
|
+
},
|
|
1845
|
+
},
|
|
1775
1846
|
{
|
|
1776
1847
|
name: "[Gen 8] Trademarked",
|
|
1777
1848
|
desc: `Sacrifice your Pokémon's ability for a status move that activates on switch-in.`,
|
|
@@ -2348,45 +2419,40 @@ export const Formats: FormatList = [
|
|
|
2348
2419
|
column: 3,
|
|
2349
2420
|
},
|
|
2350
2421
|
{
|
|
2351
|
-
name: "[Gen
|
|
2422
|
+
name: "[Gen 5] UU",
|
|
2352
2423
|
threads: [
|
|
2353
|
-
`• <a href="https://www.smogon.com/forums/threads/
|
|
2354
|
-
`• <a href="https://www.smogon.com/forums/
|
|
2424
|
+
`• <a href="https://www.smogon.com/forums/threads/3474024/">BW2 UU Viability Rankings</a>`,
|
|
2425
|
+
`• <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
|
|
2355
2426
|
],
|
|
2356
2427
|
|
|
2357
|
-
mod: '
|
|
2428
|
+
mod: 'gen5',
|
|
2358
2429
|
// searchShow: false,
|
|
2359
|
-
ruleset: ['
|
|
2360
|
-
banlist: ['OU', 'UUBL'],
|
|
2361
|
-
unbanlist: ['Arena Trap', 'Swagger'],
|
|
2430
|
+
ruleset: ['Standard', 'Evasion Abilities Clause', 'Swagger Clause', 'Sleep Clause Mod'],
|
|
2431
|
+
banlist: ['Uber', 'OU', 'UUBL', 'Arena Trap', 'Drought', 'Sand Stream', 'Snow Warning', 'Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
|
|
2362
2432
|
},
|
|
2363
2433
|
{
|
|
2364
|
-
name: "[Gen
|
|
2434
|
+
name: "[Gen 5] NU",
|
|
2365
2435
|
threads: [
|
|
2366
|
-
`• <a href="https://www.smogon.com/
|
|
2367
|
-
`• <a href="https://www.smogon.com/forums/threads/
|
|
2368
|
-
`• <a href="https://www.smogon.com/forums/threads/3621440/">USM LC Viability Rankings</a>`,
|
|
2436
|
+
`• <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
|
|
2437
|
+
`• <a href="https://www.smogon.com/forums/threads/3484121/">BW2 NU Viability Rankings</a>`,
|
|
2369
2438
|
],
|
|
2370
2439
|
|
|
2371
|
-
mod: '
|
|
2440
|
+
mod: 'gen5',
|
|
2372
2441
|
// searchShow: false,
|
|
2373
|
-
ruleset: ['
|
|
2374
|
-
banlist: [
|
|
2375
|
-
'Aipom', 'Cutiefly', 'Drifloon', 'Gligar', 'Gothita', 'Meditite', 'Misdreavus', 'Murkrow', 'Porygon',
|
|
2376
|
-
'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Trapinch', 'Vulpix-Base', 'Wingull', 'Yanma',
|
|
2377
|
-
'Eevium Z', 'Baton Pass', 'Dragon Rage', 'Sonic Boom', 'Sticky Web',
|
|
2378
|
-
],
|
|
2442
|
+
ruleset: ['[Gen 5] RU', '!Sleep Moves Clause', 'Sleep Clause Mod'],
|
|
2443
|
+
banlist: ['RU', 'NUBL', 'Assist', 'Copycat'],
|
|
2379
2444
|
},
|
|
2380
2445
|
{
|
|
2381
|
-
name: "[Gen
|
|
2446
|
+
name: "[Gen 6] PU",
|
|
2382
2447
|
threads: [
|
|
2383
|
-
`• <a href="https://www.smogon.com/
|
|
2448
|
+
`• <a href="https://www.smogon.com/dex/xy/tags/pu/">ORAS PU Banlist</a>`,
|
|
2449
|
+
`• <a href="https://www.smogon.com/forums/threads/3528743/">ORAS PU Viability Rankings</a>`,
|
|
2384
2450
|
],
|
|
2385
2451
|
|
|
2386
|
-
mod: '
|
|
2452
|
+
mod: 'gen6',
|
|
2387
2453
|
// searchShow: false,
|
|
2388
|
-
ruleset: ['[Gen
|
|
2389
|
-
banlist: ['NU', 'PUBL'],
|
|
2454
|
+
ruleset: ['[Gen 6] NU'],
|
|
2455
|
+
banlist: ['NU', 'PUBL', 'Chatter'],
|
|
2390
2456
|
},
|
|
2391
2457
|
|
|
2392
2458
|
// Past Gens OU
|
|
@@ -2452,7 +2518,7 @@ export const Formats: FormatList = [
|
|
|
2452
2518
|
|
|
2453
2519
|
mod: 'gen3',
|
|
2454
2520
|
ruleset: ['Standard', 'One Boost Passer Clause'],
|
|
2455
|
-
banlist: ['Uber', 'Sand Veil', 'Assist', 'Baton Pass + Mean Look', 'Baton Pass + Spider Web', 'Smeargle + Ingrain'],
|
|
2521
|
+
banlist: ['Uber', 'Sand Veil', 'Soundproof', 'Assist', 'Baton Pass + Mean Look', 'Baton Pass + Spider Web', 'Smeargle + Ingrain'],
|
|
2456
2522
|
},
|
|
2457
2523
|
{
|
|
2458
2524
|
name: "[Gen 2] OU",
|
|
@@ -2679,6 +2745,23 @@ export const Formats: FormatList = [
|
|
|
2679
2745
|
ruleset: ['[Gen 7] NU'],
|
|
2680
2746
|
banlist: ['NU', 'PUBL'],
|
|
2681
2747
|
},
|
|
2748
|
+
{
|
|
2749
|
+
name: "[Gen 7] LC",
|
|
2750
|
+
threads: [
|
|
2751
|
+
`• <a href="https://www.smogon.com/dex/sm/formats/lc/">USM LC Banlist</a>`,
|
|
2752
|
+
`• <a href="https://www.smogon.com/forums/threads/3639319/">USM LC Sample Teams</a>`,
|
|
2753
|
+
`• <a href="https://www.smogon.com/forums/threads/3621440/">USM LC Viability Rankings</a>`,
|
|
2754
|
+
],
|
|
2755
|
+
|
|
2756
|
+
mod: 'gen7',
|
|
2757
|
+
searchShow: false,
|
|
2758
|
+
ruleset: ['Little Cup', 'Standard', 'Swagger Clause'],
|
|
2759
|
+
banlist: [
|
|
2760
|
+
'Aipom', 'Cutiefly', 'Drifloon', 'Gligar', 'Gothita', 'Meditite', 'Misdreavus', 'Murkrow', 'Porygon',
|
|
2761
|
+
'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Trapinch', 'Vulpix-Base', 'Wingull', 'Yanma',
|
|
2762
|
+
'Eevium Z', 'Baton Pass', 'Dragon Rage', 'Sonic Boom', 'Sticky Web',
|
|
2763
|
+
],
|
|
2764
|
+
},
|
|
2682
2765
|
{
|
|
2683
2766
|
name: "[Gen 7] Monotype",
|
|
2684
2767
|
desc: `All the Pokémon on a team must share a type.`,
|
|
@@ -2966,18 +3049,6 @@ export const Formats: FormatList = [
|
|
|
2966
3049
|
ruleset: ['[Gen 6] RU'],
|
|
2967
3050
|
banlist: ['RU', 'NUBL'],
|
|
2968
3051
|
},
|
|
2969
|
-
{
|
|
2970
|
-
name: "[Gen 6] PU",
|
|
2971
|
-
threads: [
|
|
2972
|
-
`• <a href="https://www.smogon.com/dex/xy/tags/pu/">ORAS PU Banlist</a>`,
|
|
2973
|
-
`• <a href="https://www.smogon.com/forums/threads/3528743/">ORAS PU Viability Rankings</a>`,
|
|
2974
|
-
],
|
|
2975
|
-
|
|
2976
|
-
mod: 'gen6',
|
|
2977
|
-
searchShow: false,
|
|
2978
|
-
ruleset: ['[Gen 6] NU'],
|
|
2979
|
-
banlist: ['NU', 'PUBL', 'Chatter'],
|
|
2980
|
-
},
|
|
2981
3052
|
{
|
|
2982
3053
|
name: "[Gen 6] LC",
|
|
2983
3054
|
threads: [
|
|
@@ -3206,18 +3277,6 @@ export const Formats: FormatList = [
|
|
|
3206
3277
|
searchShow: false,
|
|
3207
3278
|
ruleset: ['Standard', 'Sleep Clause Mod'],
|
|
3208
3279
|
},
|
|
3209
|
-
{
|
|
3210
|
-
name: "[Gen 5] UU",
|
|
3211
|
-
threads: [
|
|
3212
|
-
`• <a href="https://www.smogon.com/forums/threads/3474024/">BW2 UU Viability Rankings</a>`,
|
|
3213
|
-
`• <a href="https://www.smogon.com/forums/posts/6431094/">BW2 Sample Teams</a>`,
|
|
3214
|
-
],
|
|
3215
|
-
|
|
3216
|
-
mod: 'gen5',
|
|
3217
|
-
searchShow: false,
|
|
3218
|
-
ruleset: ['Standard', 'Evasion Abilities Clause', 'Swagger Clause', 'Sleep Clause Mod'],
|
|
3219
|
-
banlist: ['Uber', 'OU', 'UUBL', 'Arena Trap', 'Drought', 'Sand Stream', 'Snow Warning', 'Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
|
|
3220
|
-
},
|
|
3221
3280
|
{
|
|
3222
3281
|
name: "[Gen 5] RU",
|
|
3223
3282
|
threads: [
|
|
@@ -3232,16 +3291,15 @@ export const Formats: FormatList = [
|
|
|
3232
3291
|
unbanlist: ['Prankster + Assist', 'Prankster + Copycat', 'Baton Pass'],
|
|
3233
3292
|
},
|
|
3234
3293
|
{
|
|
3235
|
-
name: "[Gen 5]
|
|
3294
|
+
name: "[Gen 5] PU",
|
|
3236
3295
|
threads: [
|
|
3237
|
-
`• <a href="https://www.smogon.com/forums/posts/
|
|
3238
|
-
`• <a href="https://www.smogon.com/forums/threads/3484121/">BW2 NU Viability Rankings</a>`,
|
|
3296
|
+
`• <a href="https://www.smogon.com/forums/posts/7326932/">BW2 PU</a>`,
|
|
3239
3297
|
],
|
|
3240
3298
|
|
|
3241
3299
|
mod: 'gen5',
|
|
3242
3300
|
searchShow: false,
|
|
3243
|
-
ruleset: ['[Gen 5]
|
|
3244
|
-
banlist: ['
|
|
3301
|
+
ruleset: ['[Gen 5] NU', 'Sleep Moves Clause'],
|
|
3302
|
+
banlist: ['NU', 'PUBL'],
|
|
3245
3303
|
},
|
|
3246
3304
|
{
|
|
3247
3305
|
name: "[Gen 5] LC",
|
|
@@ -3332,7 +3390,7 @@ export const Formats: FormatList = [
|
|
|
3332
3390
|
gameType: 'doubles',
|
|
3333
3391
|
searchShow: false,
|
|
3334
3392
|
ruleset: ['Flat Rules'],
|
|
3335
|
-
banlist: ['Dark Void', 'Sky Drop', 'Soul Dew'],
|
|
3393
|
+
banlist: ['Chatot', 'Dark Void', 'Sky Drop', 'Soul Dew'],
|
|
3336
3394
|
},
|
|
3337
3395
|
{
|
|
3338
3396
|
name: "[Gen 5] VGC 2012",
|
|
@@ -3393,6 +3451,19 @@ export const Formats: FormatList = [
|
|
|
3393
3451
|
ruleset: ['Standard'],
|
|
3394
3452
|
banlist: ['AG'],
|
|
3395
3453
|
},
|
|
3454
|
+
{
|
|
3455
|
+
name: "[Gen 4] UU",
|
|
3456
|
+
threads: [
|
|
3457
|
+
`• <a href="https://www.smogon.com/forums/threads/3532624/">DPP UU Metagame Discussion</a>`,
|
|
3458
|
+
`• <a href="https://www.smogon.com/forums/threads/3503638/">DPP UU Viability Rankings</a>`,
|
|
3459
|
+
],
|
|
3460
|
+
|
|
3461
|
+
mod: 'gen4',
|
|
3462
|
+
searchShow: false,
|
|
3463
|
+
ruleset: ['[Gen 4] OU'],
|
|
3464
|
+
banlist: ['OU', 'UUBL'],
|
|
3465
|
+
unbanlist: ['Arena Trap', 'Swagger'],
|
|
3466
|
+
},
|
|
3396
3467
|
{
|
|
3397
3468
|
name: "[Gen 4] NU",
|
|
3398
3469
|
threads: [
|
|
@@ -3507,7 +3578,7 @@ export const Formats: FormatList = [
|
|
|
3507
3578
|
gameType: 'doubles',
|
|
3508
3579
|
searchShow: false,
|
|
3509
3580
|
ruleset: ['Flat Rules', '! Adjust Level Down', 'Max Level = 50', 'Max Team Size = 4'],
|
|
3510
|
-
banlist: ['
|
|
3581
|
+
banlist: ['Tyranitar', 'Rotom', 'Judgment', 'Soul Dew'],
|
|
3511
3582
|
},
|
|
3512
3583
|
{
|
|
3513
3584
|
name: "[Gen 4] Doubles Custom Game",
|
|
@@ -3550,7 +3621,7 @@ export const Formats: FormatList = [
|
|
|
3550
3621
|
searchShow: false,
|
|
3551
3622
|
ruleset: ['Standard', 'NFE Clause'],
|
|
3552
3623
|
banlist: ['Uber', 'OU', 'UUBL', 'Smeargle + Ingrain', 'Baton Pass'],
|
|
3553
|
-
unbanlist: ['Scyther'
|
|
3624
|
+
unbanlist: ['Scyther'],
|
|
3554
3625
|
},
|
|
3555
3626
|
{
|
|
3556
3627
|
name: "[Gen 3] NU",
|