From 878f05c3239bbc66ed4db6cb6301a995ffad0099 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 27 Dec 2024 20:10:39 -0600 Subject: [PATCH] audit command for drop rates --- src/engine/devcmd/cmds/SimulateBootyCmd.java | 3 +-- src/engine/gameManager/LootManager.java | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/engine/devcmd/cmds/SimulateBootyCmd.java b/src/engine/devcmd/cmds/SimulateBootyCmd.java index 27a81761..98b56126 100644 --- a/src/engine/devcmd/cmds/SimulateBootyCmd.java +++ b/src/engine/devcmd/cmds/SimulateBootyCmd.java @@ -145,8 +145,7 @@ public class SimulateBootyCmd extends AbstractDevCmd { } int baseBound = 100000; - int levelPenalty = (int) ((mob.level > 50 ? (mob.level - 50) : (50 - mob.level)) * 0.01 * baseBound); - // Total range with penalty applied + int levelPenalty = (int) (Math.max(0, Math.abs(50 - mob.level)) * 0.01 * 100000); int totalRange = baseBound + levelPenalty; output += "TOTAL ROLL POTENTIAL: " + totalRange + newline; output += "GLASS DROPS: " + GlassItems.size() + newline; diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index d31b5cc8..3d9fc2d3 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -128,10 +128,7 @@ public enum LootManager { if (!mob.getSafeZone()) { int baseBound = 100000; - int levelPenalty = (int) ((mob.level > 50 ? (mob.level - 50) : (50 - mob.level)) * 0.01 * baseBound); - - - // Total range with penalty applied + int levelPenalty = (int) (Math.max(0, Math.abs(50 - mob.level)) * 0.01 * 100000); int totalRange = baseBound + levelPenalty; // Roll within the adjusted range