@pkmn/randoms 0.7.3 → 0.7.4
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 +12 -4
- package/build/index.js.map +1 -1
- package/build/index.mjs +12 -4
- package/build/index.mjs.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -480,7 +480,7 @@ var RandomTeams = class {
|
|
|
480
480
|
}
|
|
481
481
|
const happiness = this.random(256);
|
|
482
482
|
const shiny = this.randomChance(1, 1024);
|
|
483
|
-
|
|
483
|
+
const set = {
|
|
484
484
|
name: species.baseSpecies,
|
|
485
485
|
species: species.name,
|
|
486
486
|
gender: species.gender,
|
|
@@ -493,7 +493,11 @@ var RandomTeams = class {
|
|
|
493
493
|
level,
|
|
494
494
|
happiness,
|
|
495
495
|
shiny
|
|
496
|
-
}
|
|
496
|
+
};
|
|
497
|
+
if (this.gen === 9) {
|
|
498
|
+
set.teraType = this.sample(this.dex.types.all()).name;
|
|
499
|
+
}
|
|
500
|
+
team.push(set);
|
|
497
501
|
}
|
|
498
502
|
return team;
|
|
499
503
|
}
|
|
@@ -817,7 +821,7 @@ var RandomTeams = class {
|
|
|
817
821
|
}
|
|
818
822
|
const happiness = this.random(256);
|
|
819
823
|
const shiny = this.randomChance(1, 1024);
|
|
820
|
-
|
|
824
|
+
const set = {
|
|
821
825
|
name: species.baseSpecies,
|
|
822
826
|
species: species.name,
|
|
823
827
|
gender: species.gender,
|
|
@@ -830,7 +834,11 @@ var RandomTeams = class {
|
|
|
830
834
|
level,
|
|
831
835
|
happiness,
|
|
832
836
|
shiny
|
|
833
|
-
}
|
|
837
|
+
};
|
|
838
|
+
if (this.gen === 9) {
|
|
839
|
+
set.teraType = this.sample(this.dex.types.all()).name;
|
|
840
|
+
}
|
|
841
|
+
team.push(set);
|
|
834
842
|
}
|
|
835
843
|
return team;
|
|
836
844
|
}
|