Browse Source

drop rates adjusted again again third time

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
90facabc7b
  1. 10
      src/engine/gameManager/LootManager.java
  2. 1
      src/engine/objects/Mob.java

10
src/engine/gameManager/LootManager.java

@ -115,7 +115,6 @@ public enum LootManager {
} }
// Iterate all entries in this bootySet and process accordingly // Iterate all entries in this bootySet and process accordingly
boolean hasExtraRolled = false;
for (BootySetEntry bse : entries) { for (BootySetEntry bse : entries) {
switch (bse.bootyType) { switch (bse.bootyType) {
case "GOLD": case "GOLD":
@ -124,18 +123,18 @@ public enum LootManager {
case "LOOT": case "LOOT":
if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate))
GenerateLootDrop(mob, bse.genTable); //generate normal loot drop GenerateLootDrop(mob, bse.genTable); //generate normal loot drop
if(!hasExtraRolled && ThreadLocalRandom.current().nextInt(1,5000) < 10 * dropRate){ if(!mob.hasExtraRolled && ThreadLocalRandom.current().nextInt(1,5000) < 10 * dropRate){
mob.hasExtraRolled = true;
MobLoot extraLoot = rollForContract(bse.genTable, mob); MobLoot extraLoot = rollForContract(bse.genTable, mob);
if (extraLoot != null) { if (extraLoot != null) {
mob.getCharItemManager().addItemToInventory(extraLoot); mob.getCharItemManager().addItemToInventory(extraLoot);
hasExtraRolled = true;
} }
} }
if(!hasExtraRolled && ThreadLocalRandom.current().nextInt(1,5000) < 10 * dropRate){ if(!mob.hasExtraRolled && ThreadLocalRandom.current().nextInt(1,5000) < 10 * dropRate){
mob.hasExtraRolled = true;
MobLoot extraLoot = rollForRune(bse.genTable, mob); MobLoot extraLoot = rollForRune(bse.genTable, mob);
if (extraLoot != null) { if (extraLoot != null) {
mob.getCharItemManager().addItemToInventory(extraLoot); mob.getCharItemManager().addItemToInventory(extraLoot);
hasExtraRolled = true;
} }
} }
break; break;
@ -191,6 +190,7 @@ public enum LootManager {
mob.getCharItemManager().addItemToInventory(specialDrop); mob.getCharItemManager().addItemToInventory(specialDrop);
mob.setResists(new Resists("Dropper")); mob.setResists(new Resists("Dropper"));
} }
mob.hasExtraRolled = false;
} }
public static MobLoot getGenTableItem(int genTableID, AbstractCharacter mob) { public static MobLoot getGenTableItem(int genTableID, AbstractCharacter mob) {

1
src/engine/objects/Mob.java

@ -88,6 +88,7 @@ public class Mob extends AbstractIntelligenceAgent {
public int contractCounter = 0; public int contractCounter = 0;
public int runeCounter = 0; public int runeCounter = 0;
public boolean hasExtraRolled = false;
// New Mobile constructor. Fill in the blanks and then call // New Mobile constructor. Fill in the blanks and then call
// PERSIST. // PERSIST.

Loading…
Cancel
Save