Browse Source

stronghold loot adjustment

lakebane-strongholds
FatBoy-DOTC 3 months ago
parent
commit
d5e95eedf3
  1. 25
      src/engine/gameManager/LootManager.java

25
src/engine/gameManager/LootManager.java

@ -660,7 +660,7 @@ public enum LootManager {
//random contract drop chance for all //random contract drop chance for all
if (ThreadLocalRandom.current().nextInt(100) < 40) { if (ThreadLocalRandom.current().nextInt(100) < 40) {
int contractTableID = 250; int contractTableID = 250;
contractTableID += ThreadLocalRandom.current().nextInt(0, 12); contractTableID += ThreadLocalRandom.current().nextInt(0, 11);
if (contractTableID > 259) if (contractTableID > 259)
contractTableID = 659; contractTableID = 659;
@ -676,16 +676,16 @@ public enum LootManager {
//special commander drop chances //special commander drop chances
if (commander) if (commander)
GenerateCommanderLoot(mob); GenerateCommanderLoot(mob,false);
//special epic drop chances //special epic drop chances
if (epic) { if (epic) {
GenerateCommanderLoot(mob); GenerateCommanderLoot(mob, true);
GenerateCommanderLoot(mob); GenerateCommanderLoot(mob,false);
} }
} }
public static void GenerateCommanderLoot(Mob mob){ public static void GenerateCommanderLoot(Mob mob, boolean epic){
//present chance //present chance
if (ThreadLocalRandom.current().nextInt(100) < 25) if (ThreadLocalRandom.current().nextInt(100) < 25)
DropPresent(mob); DropPresent(mob);
@ -729,5 +729,20 @@ public enum LootManager {
mob.getCharItemManager().addItemToInventory(toAdd4); mob.getCharItemManager().addItemToInventory(toAdd4);
} }
} }
if(epic){
int contractTableID = 250;
contractTableID += ThreadLocalRandom.current().nextInt(0, 11);
if (contractTableID > 259)
contractTableID = 659;
int id = rollRandomItem(contractTableID);
ItemBase ib = ItemBase.getItemBase(id);
if (ib != null) {
MobLoot contract = new MobLoot(mob, ib, true);
if (contract != null)
mob.getCharItemManager().addItemToInventory(contract);
}
}
} }
} }

Loading…
Cancel
Save