From dffc16f5ce1f03bf1495185992230677774de7d8 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 8 Apr 2023 14:19:47 -0500 Subject: [PATCH] mob roll range formula --- src/engine/loot/LootManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/loot/LootManager.java b/src/engine/loot/LootManager.java index 1b3a9c86..445a6c8c 100644 --- a/src/engine/loot/LootManager.java +++ b/src/engine/loot/LootManager.java @@ -124,8 +124,11 @@ public class LootManager { return null; } int itemTableId = selectedRow.itemTableID; - int minRollRange = roll + mob.getParentZone().minLvl + mob.getLevel(); - int maxRollRange = (roll + mob.getParentZone().maxLvl + mob.getLevel()) * 2; + int minRollRange = mob.getLevel() + roll + mob.getParentZone().minLvl; + int maxRollRange = (mob.getLevel() * 2) + roll + (mob.getParentZone().maxLvl * 2); + if(maxRollRange > 320){ + maxRollRange = 320; + } int roll2 = new Random().nextInt(maxRollRange- minRollRange) + minRollRange; ItemTableRow tableRow = itemTables.get(itemTableId).getRowForRange(roll2); if(tableRow == null){