[Bug] Fix off by one error in Generate Random Biome

This commit is contained in:
Jimmybald1 2025-01-13 13:43:27 +01:00
parent a617c5a493
commit 8c4b20f056

View File

@ -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];
}
}