mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-15 03:49:33 +02:00
[Bug] Fix off by one error in Generate Random Biome
This commit is contained in:
parent
a617c5a493
commit
8c4b20f056
@ -1878,9 +1878,9 @@ export default class BattleScene extends SceneBase {
|
||||
|
||||
const randInt = Utils.randSeedInt(totalWeight);
|
||||
|
||||
for (const biome of biomes) {
|
||||
if (randInt < biomeThresholds[biome]) {
|
||||
return biome;
|
||||
for (let i = 0; i < biomes.length; i++) {
|
||||
if (randInt < biomeThresholds[i]) {
|
||||
return biomes[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user