mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-16 04:19:32 +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);
|
const randInt = Utils.randSeedInt(totalWeight);
|
||||||
|
|
||||||
for (const biome of biomes) {
|
for (let i = 0; i < biomes.length; i++) {
|
||||||
if (randInt < biomeThresholds[biome]) {
|
if (randInt < biomeThresholds[i]) {
|
||||||
return biome;
|
return biomes[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user