@pkmn/randoms 0.10.2 → 0.10.3
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 +15 -8
- package/build/index.js.map +1 -1
- package/build/index.mjs +15 -8
- package/build/index.mjs.map +1 -1
- package/package.json +2 -2
package/build/index.mjs
CHANGED
|
@@ -1723,6 +1723,7 @@ var RandomGen8Teams = class {
|
|
|
1723
1723
|
return species.name;
|
|
1724
1724
|
}
|
|
1725
1725
|
randomSet(species, teamDetails = {}, isLead = false, isDoubles = false, isNoDynamax = false) {
|
|
1726
|
+
const ruleTable = this.dex.formats.getRuleTable(this.format);
|
|
1726
1727
|
species = this.dex.species.get(species);
|
|
1727
1728
|
const forme = this.getForme(species);
|
|
1728
1729
|
const gmax = species.name.endsWith("-Gmax");
|
|
@@ -1913,7 +1914,7 @@ var RandomGen8Teams = class {
|
|
|
1913
1914
|
if (move.damageCallback || move.damage) return true;
|
|
1914
1915
|
return move.category !== "Physical" || move.id === "bodypress";
|
|
1915
1916
|
});
|
|
1916
|
-
if (noAttackStatMoves && !moves.has("transform") && (!moves.has("shellsidearm") || !counter.get("Status"))) {
|
|
1917
|
+
if (noAttackStatMoves && !moves.has("transform") && (!moves.has("shellsidearm") || !counter.get("Status")) && !ruleTable.has("forceofthefallenmod")) {
|
|
1917
1918
|
evs.atk = 0;
|
|
1918
1919
|
ivs.atk = 0;
|
|
1919
1920
|
}
|
|
@@ -3644,6 +3645,7 @@ var RandomGen7Teams = class extends RandomGen8Teams {
|
|
|
3644
3645
|
return 80;
|
|
3645
3646
|
}
|
|
3646
3647
|
randomSet(species, teamDetails = {}, isLead = false) {
|
|
3648
|
+
const ruleTable = this.dex.formats.getRuleTable(this.format);
|
|
3647
3649
|
species = this.dex.species.get(species);
|
|
3648
3650
|
const forme = this.getForme(species);
|
|
3649
3651
|
const sets = this.randomSets[species.id]["sets"];
|
|
@@ -3699,7 +3701,7 @@ var RandomGen7Teams = class extends RandomGen8Teams {
|
|
|
3699
3701
|
item = "Black Sludge";
|
|
3700
3702
|
}
|
|
3701
3703
|
const level = this.getLevel(species);
|
|
3702
|
-
if ((!counter.get("Physical") || counter.get("Physical") <= 1 && (moves.has("foulplay") || moves.has("rapidspin"))) && !moves.has("copycat") && !moves.has("transform")) {
|
|
3704
|
+
if ((!counter.get("Physical") || counter.get("Physical") <= 1 && (moves.has("foulplay") || moves.has("rapidspin"))) && !moves.has("copycat") && !moves.has("transform") && !ruleTable.has("forceofthefallenmod")) {
|
|
3703
3705
|
evs.atk = 0;
|
|
3704
3706
|
ivs.atk = 0;
|
|
3705
3707
|
}
|
|
@@ -5282,6 +5284,7 @@ var RandomGen6Teams = class extends RandomGen7Teams {
|
|
|
5282
5284
|
return "Leftovers";
|
|
5283
5285
|
}
|
|
5284
5286
|
randomSet(species, teamDetails = {}, isLead = false) {
|
|
5287
|
+
const ruleTable = this.dex.formats.getRuleTable(this.format);
|
|
5285
5288
|
species = this.dex.species.get(species);
|
|
5286
5289
|
const forme = this.getForme(species);
|
|
5287
5290
|
const sets = this.randomSets[species.id]["sets"];
|
|
@@ -5329,7 +5332,7 @@ var RandomGen6Teams = class extends RandomGen7Teams {
|
|
|
5329
5332
|
item = "Black Sludge";
|
|
5330
5333
|
}
|
|
5331
5334
|
const level = this.getLevel(species);
|
|
5332
|
-
if ((!counter.get("Physical") || counter.get("Physical") <= 1 && (moves.has("foulplay") || moves.has("rapidspin"))) && !moves.has("copycat") && !moves.has("transform")) {
|
|
5335
|
+
if ((!counter.get("Physical") || counter.get("Physical") <= 1 && (moves.has("foulplay") || moves.has("rapidspin"))) && !moves.has("copycat") && !moves.has("transform") && !ruleTable.has("forceofthefallenmod")) {
|
|
5333
5336
|
evs.atk = 0;
|
|
5334
5337
|
ivs.atk = 0;
|
|
5335
5338
|
}
|
|
@@ -6411,6 +6414,7 @@ var RandomGen5Teams = class extends RandomGen6Teams {
|
|
|
6411
6414
|
return "Leftovers";
|
|
6412
6415
|
}
|
|
6413
6416
|
randomSet(species, teamDetails = {}, isLead = false) {
|
|
6417
|
+
const ruleTable = this.dex.formats.getRuleTable(this.format);
|
|
6414
6418
|
species = this.dex.species.get(species);
|
|
6415
6419
|
const forme = this.getForme(species);
|
|
6416
6420
|
const sets = this.randomSets[species.id]["sets"];
|
|
@@ -6503,7 +6507,7 @@ var RandomGen5Teams = class extends RandomGen6Teams {
|
|
|
6503
6507
|
}
|
|
6504
6508
|
evs.hp -= 4;
|
|
6505
6509
|
}
|
|
6506
|
-
if ((!counter.get("Physical") || counter.get("Physical") <= 1 && (moves.has("foulplay") || moves.has("rapidspin"))) && !moves.has("transform")) {
|
|
6510
|
+
if ((!counter.get("Physical") || counter.get("Physical") <= 1 && (moves.has("foulplay") || moves.has("rapidspin"))) && !moves.has("transform") && !ruleTable.has("forceofthefallenmod")) {
|
|
6507
6511
|
evs.atk = 0;
|
|
6508
6512
|
ivs.atk = hasHiddenPower ? (ivs.atk || 31) - 28 : 0;
|
|
6509
6513
|
}
|
|
@@ -7367,6 +7371,7 @@ var RandomGen4Teams = class extends RandomGen5Teams {
|
|
|
7367
7371
|
return "Leftovers";
|
|
7368
7372
|
}
|
|
7369
7373
|
randomSet(species, teamDetails = {}, isLead = false) {
|
|
7374
|
+
const ruleTable = this.dex.formats.getRuleTable(this.format);
|
|
7370
7375
|
species = this.dex.species.get(species);
|
|
7371
7376
|
const forme = this.getForme(species);
|
|
7372
7377
|
const sets = this.randomSets[species.id]["sets"];
|
|
@@ -7453,7 +7458,7 @@ var RandomGen4Teams = class extends RandomGen5Teams {
|
|
|
7453
7458
|
}
|
|
7454
7459
|
evs.hp -= 4;
|
|
7455
7460
|
}
|
|
7456
|
-
if (!counter.get("Physical") && !moves.has("transform")) {
|
|
7461
|
+
if (!counter.get("Physical") && !moves.has("transform") && !ruleTable.has("forceofthefallenmod")) {
|
|
7457
7462
|
evs.atk = 0;
|
|
7458
7463
|
ivs.atk = hasHiddenPower ? (ivs.atk || 31) - 28 : 0;
|
|
7459
7464
|
}
|
|
@@ -8071,6 +8076,7 @@ var RandomGen3Teams = class extends RandomGen4Teams {
|
|
|
8071
8076
|
return "Leftovers";
|
|
8072
8077
|
}
|
|
8073
8078
|
randomSet(species, teamDetails = {}, isLead = false) {
|
|
8079
|
+
const ruleTable = this.dex.formats.getRuleTable(this.format);
|
|
8074
8080
|
species = this.dex.species.get(species);
|
|
8075
8081
|
const forme = this.getForme(species);
|
|
8076
8082
|
const sets = this.randomSets[species.id]["sets"];
|
|
@@ -8138,7 +8144,7 @@ var RandomGen3Teams = class extends RandomGen4Teams {
|
|
|
8138
8144
|
}
|
|
8139
8145
|
evs.hp -= 4;
|
|
8140
8146
|
}
|
|
8141
|
-
if (!counter.get("Physical") && !moves.has("transform")) {
|
|
8147
|
+
if (!counter.get("Physical") && !moves.has("transform") && !ruleTable.has("forceofthefallenmod")) {
|
|
8142
8148
|
evs.atk = 0;
|
|
8143
8149
|
ivs.atk = hasHiddenPower ? (ivs.atk || 31) - 28 : 0;
|
|
8144
8150
|
}
|
|
@@ -8999,6 +9005,7 @@ var RandomGen1Teams = class extends RandomGen2Teams {
|
|
|
8999
9005
|
*/
|
|
9000
9006
|
randomSet(species) {
|
|
9001
9007
|
var _a;
|
|
9008
|
+
const ruleTable = this.dex.formats.getRuleTable(this.format);
|
|
9002
9009
|
species = this.dex.species.get(species);
|
|
9003
9010
|
if (!species.exists) species = this.dex.species.get("pikachu");
|
|
9004
9011
|
const data = this.randomData[species.id];
|
|
@@ -9037,7 +9044,7 @@ var RandomGen1Teams = class extends RandomGen2Teams {
|
|
|
9037
9044
|
if (move.damageCallback || move.damage) return true;
|
|
9038
9045
|
return move.category !== "Physical";
|
|
9039
9046
|
});
|
|
9040
|
-
if (noAttackStatMoves && !moves.has("mimic") && !moves.has("transform")) {
|
|
9047
|
+
if (noAttackStatMoves && !moves.has("mimic") && !moves.has("transform") && !ruleTable.has("forceofthefallenmod")) {
|
|
9041
9048
|
evs.atk = 0;
|
|
9042
9049
|
ivs.atk = 2;
|
|
9043
9050
|
}
|
|
@@ -10701,7 +10708,7 @@ var RandomTeams = class {
|
|
|
10701
10708
|
if (move.id === "terablast" && (species.id === "porygon2" || ["Contrary", "Defiant"].includes(ability) || moves.has("shiftgear") || species.baseStats.atk > species.baseStats.spa)) return false;
|
|
10702
10709
|
return move.category !== "Physical" || move.id === "bodypress" || move.id === "foulplay";
|
|
10703
10710
|
});
|
|
10704
|
-
if (noAttackStatMoves && !moves.has("transform") && this.format.mod !== "partnersincrime") {
|
|
10711
|
+
if (noAttackStatMoves && !moves.has("transform") && this.format.mod !== "partnersincrime" && !ruleTable.has("forceofthefallenmod")) {
|
|
10705
10712
|
evs.atk = 0;
|
|
10706
10713
|
ivs.atk = 0;
|
|
10707
10714
|
}
|