@pkmn/randoms 0.9.28 → 0.9.30
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/build/index.js +2 -8
- package/build/index.js.map +1 -1
- package/build/index.mjs +2 -8
- package/build/index.mjs.map +1 -1
- package/package.json +2 -2
package/build/index.mjs
CHANGED
|
@@ -1971,8 +1971,6 @@ var RandomGen8Teams = class {
|
|
|
1971
1971
|
const isDoubles = this.format.gameType !== "singles";
|
|
1972
1972
|
const typePool = this.dex.types.names();
|
|
1973
1973
|
const type = this.forceMonotype || this.sample(typePool);
|
|
1974
|
-
const usePotD = global.Config && Config.potd && ruleTable.has("potd");
|
|
1975
|
-
const potd = usePotD ? this.dex.species.get(Config.potd) : null;
|
|
1976
1974
|
const baseFormes = {};
|
|
1977
1975
|
const typeCount = {};
|
|
1978
1976
|
const typeComboCount = {};
|
|
@@ -1989,7 +1987,7 @@ var RandomGen8Teams = class {
|
|
|
1989
1987
|
const [pokemonPool, baseSpeciesPool] = this.getPokemonPool(type, pokemon, isMonotype, pokemonList);
|
|
1990
1988
|
while (baseSpeciesPool.length && pokemon.length < this.maxTeamSize) {
|
|
1991
1989
|
const baseSpecies = this.sampleNoReplace(baseSpeciesPool);
|
|
1992
|
-
|
|
1990
|
+
const species = this.dex.species.get(this.sample(pokemonPool[baseSpecies]));
|
|
1993
1991
|
if (!species.exists) continue;
|
|
1994
1992
|
if (baseFormes[species.baseSpecies]) continue;
|
|
1995
1993
|
if (species.name === "Zoroark" && pokemon.length >= this.maxTeamSize - 1) continue;
|
|
@@ -2037,7 +2035,6 @@ var RandomGen8Teams = class {
|
|
|
2037
2035
|
if (!this.adjustLevel && numMaxLevelPokemon >= limitFactor && this.getLevel(species, isDoubles, this.dex.formats.getRuleTable(this.format).has("dynamaxclause")) === 100) continue;
|
|
2038
2036
|
}
|
|
2039
2037
|
if (!this.forceMonotype && isMonotype && typeComboCount[typeCombo] >= 3 * limitFactor) continue;
|
|
2040
|
-
if ((potd == null ? void 0 : potd.exists) && (pokemon.length === 1 || this.maxTeamSize === 1)) species = potd;
|
|
2041
2038
|
const set = this.randomSet(
|
|
2042
2039
|
species,
|
|
2043
2040
|
teamDetails,
|
|
@@ -10704,8 +10701,6 @@ var RandomTeams = class {
|
|
|
10704
10701
|
const isDoubles = this.format.gameType !== "singles";
|
|
10705
10702
|
const typePool = this.dex.types.names().filter((name) => name !== "Stellar");
|
|
10706
10703
|
const type = this.forceMonotype || this.sample(typePool);
|
|
10707
|
-
const usePotD = global.Config && Config.potd && ruleTable.has("potd");
|
|
10708
|
-
const potd = usePotD ? this.dex.species.get(Config.potd) : null;
|
|
10709
10704
|
const baseFormes = {};
|
|
10710
10705
|
const typeCount = {};
|
|
10711
10706
|
const typeComboCount = {};
|
|
@@ -10718,7 +10713,7 @@ var RandomTeams = class {
|
|
|
10718
10713
|
let leadsRemaining = this.format.gameType === "doubles" ? 2 : 1;
|
|
10719
10714
|
while (baseSpeciesPool.length && pokemon.length < this.maxTeamSize) {
|
|
10720
10715
|
const baseSpecies = this.sampleNoReplace(baseSpeciesPool);
|
|
10721
|
-
|
|
10716
|
+
const species = this.dex.species.get(this.sample(pokemonPool[baseSpecies]));
|
|
10722
10717
|
if (!species.exists) continue;
|
|
10723
10718
|
if (baseFormes[species.baseSpecies]) continue;
|
|
10724
10719
|
if (["ogerpon", "ogerponhearthflame", "terapagos"].includes(species.id) && teamDetails.teraBlast) continue;
|
|
@@ -10766,7 +10761,6 @@ var RandomTeams = class {
|
|
|
10766
10761
|
}
|
|
10767
10762
|
}
|
|
10768
10763
|
if (!this.forceMonotype && isMonotype && typeComboCount[typeCombo] >= 3 * limitFactor) continue;
|
|
10769
|
-
if ((potd == null ? void 0 : potd.exists) && (pokemon.length === 1 || this.maxTeamSize === 1)) species = potd;
|
|
10770
10764
|
let set;
|
|
10771
10765
|
if (leadsRemaining) {
|
|
10772
10766
|
if (isDoubles && DOUBLES_NO_LEAD_POKEMON.includes(species.baseSpecies) || !isDoubles && NO_LEAD_POKEMON.includes(species.baseSpecies)) {
|