mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
Random Battles: Prevent Magearna-Mega from showing up (#11615)
This commit is contained in:
parent
9df07a958d
commit
4990f0a65e
|
|
@ -2156,10 +2156,11 @@ export class RandomGen8Teams {
|
|||
if (species.name.endsWith('-Gmax')) return species.name.slice(0, -5);
|
||||
|
||||
// Consolidate mostly-cosmetic formes, at least for the purposes of Random Battles
|
||||
if (['Magearna', 'Polteageist', 'Zarude'].includes(species.baseSpecies)) {
|
||||
if (['Polteageist', 'Zarude'].includes(species.baseSpecies)) {
|
||||
return this.sample([species.name].concat(species.otherFormes!));
|
||||
}
|
||||
if (species.baseSpecies === 'Basculin') return 'Basculin' + this.sample(['', '-Blue-Striped']);
|
||||
if (species.baseSpecies === 'Magearna') return 'Magearna' + this.sample(['', '-Original']);
|
||||
if (species.baseSpecies === 'Keldeo' && this.gen <= 7) return 'Keldeo' + this.sample(['', '-Resolute']);
|
||||
if (species.baseSpecies === 'Pikachu' && this.dex.currentMod === 'gen8') {
|
||||
return 'Pikachu' + this.sample(
|
||||
|
|
|
|||
|
|
@ -1445,10 +1445,11 @@ export class RandomTeams {
|
|||
if (species.cosmeticFormes) return this.sample([species.name].concat(species.cosmeticFormes));
|
||||
|
||||
// Consolidate mostly-cosmetic formes, at least for the purposes of Random Battles
|
||||
if (['Dudunsparce', 'Magearna', 'Maushold', 'Polteageist', 'Sinistcha', 'Zarude'].includes(species.baseSpecies)) {
|
||||
if (['Dudunsparce', 'Maushold', 'Polteageist', 'Sinistcha', 'Zarude'].includes(species.baseSpecies)) {
|
||||
return this.sample([species.name].concat(species.otherFormes!));
|
||||
}
|
||||
if (species.baseSpecies === 'Basculin') return 'Basculin' + this.sample(['', '-Blue-Striped']);
|
||||
if (species.baseSpecies === 'Magearna') return 'Magearna' + this.sample(['', '-Original']);
|
||||
if (species.baseSpecies === 'Pikachu') {
|
||||
return 'Pikachu' + this.sample(
|
||||
['', '-Original', '-Hoenn', '-Sinnoh', '-Unova', '-Kalos', '-Alola', '-Partner', '-World']
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ function assertSetValidity(format, set) {
|
|||
|
||||
// We check `dex.gen` here because Format#gen is 0 in the current gen, while ModdedDex#gen is never 0.
|
||||
assert(species.exists, `The species "${species.name}" does not exist. (set: ${setString})`);
|
||||
// assert(species.gen <= dex.gen, `The species "${species.name}" is from a newer generation. (set: ${setString})`);
|
||||
assert(species.gen <= dex.gen, `The species "${species.name}" is from a newer generation. (set: ${setString})`);
|
||||
|
||||
if (set.item) {
|
||||
const item = dex.items.get(set.item);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user