Browse Source

audit command for drop rates

lakebane2
FatBoy-DOTC 3 weeks ago
parent
commit
d031f1be01
  1. 15
      src/engine/gameManager/LootManager.java

15
src/engine/gameManager/LootManager.java

@ -127,15 +127,19 @@ public enum LootManager { @@ -127,15 +127,19 @@ public enum LootManager {
float dropRate;
if (!mob.getSafeZone()) {
int baseBound = 100000;
int levelPenalty = (int) (Math.max(0, Math.abs(50 - mob.level)) * 0.01 * 100000);
int totalRange = baseBound + levelPenalty;
boolean allow = false;
if(mob.level >= 50){
totalRange = baseBound;
//totalRange = baseBound;
allow = true;
}else{
if((50 - mob.level) < ThreadLocalRandom.current().nextInt(0,101)){
allow = true;
}
}
if(allow) {
// Roll within the adjusted range
int specialCaseRoll = ThreadLocalRandom.current().nextInt(1, totalRange + 1);
int specialCaseRoll = ThreadLocalRandom.current().nextInt(1, 100000 + 1);
// Special Case Contract Drop
if (specialCaseRoll <= 400) { // 0.4% of the range
@ -162,6 +166,7 @@ public enum LootManager { @@ -162,6 +166,7 @@ public enum LootManager {
}
}
}
}
// Iterate all entries in this bootySet and process accordingly
for (BootySetEntry bse : entries) {

Loading…
Cancel
Save