diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index fed00095..a8204fa6 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -125,7 +125,7 @@ public enum LootManager { mob.getCharItemManager().addItemToInventory(specialDrop); mob.setResists(new Resists("Dropper")); if(!Mob.discDroppers.contains(mob)) - Mob.discDroppers.add(mob); + Mob.AddDiscDropper(mob); } //iterate the booty sets @@ -460,7 +460,7 @@ public enum LootManager { if (lootItem != null) { mob.getCharItemManager().addItemToInventory(lootItem); if(lootItem.getItemBase().isDiscRune() && !Mob.discDroppers.contains(mob)) - Mob.discDroppers.add(mob); + Mob.AddDiscDropper(mob); } } diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 6cb12663..6871a2c9 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1397,6 +1397,11 @@ public class Mob extends AbstractIntelligenceAgent { loadInventory(); this.updateLocation(); + + if(Mob.discDroppers.contains(this)){ + this.setLevel((short)65); + this.setResists(new Resists("Dropper")); + } } public void despawn() { @@ -1467,7 +1472,7 @@ public class Mob extends AbstractIntelligenceAgent { Logger.error(e.getMessage()); } - Resists.calculateResists(this); + //Resists.calculateResists(this); } public void calculateMaxHealthManaStamina() { @@ -2264,5 +2269,9 @@ public class Mob extends AbstractIntelligenceAgent { } } } - + public static void AddDiscDropper(Mob mob){ + discDroppers.add(mob); + mob.setLevel((short)65); + mob.setResists(new Resists("Dropper")); + } } \ No newline at end of file diff --git a/src/engine/objects/Resists.java b/src/engine/objects/Resists.java index e72b1827..6b23699d 100644 --- a/src/engine/objects/Resists.java +++ b/src/engine/objects/Resists.java @@ -46,6 +46,9 @@ public class Resists { case "Mine": setMineResists(); break; + case "Dropper": + setDropperResists(); + break; default: setGenericResists(); break; @@ -231,6 +234,24 @@ public class Resists { this.resists.put(DamageType.Siege, 0f); } + public final void setDropperResists() { + this.immuneToAll = false; + this.resists.put(DamageType.Slash, 50f); + this.resists.put(DamageType.Crush, 50f); + this.resists.put(DamageType.Pierce, 50f); + this.resists.put(DamageType.Magic, 50f); + this.resists.put(DamageType.Bleed, 50f); + this.resists.put(DamageType.Poison, 50f); + this.resists.put(DamageType.Mental, 50f); + this.resists.put(DamageType.Holy, 50f); + this.resists.put(DamageType.Unholy, 50f); + this.resists.put(DamageType.Lightning, 50f); + this.resists.put(DamageType.Fire, 50f); + this.resists.put(DamageType.Cold, 50f); + this.resists.put(DamageType.Healing, 0f); + this.immuneTo.put(DamageType.Siege, true); + } + /** * Create generic resists */