From 3d683fc9a379d907afb12c1e3bd5366b4c1d4d3d Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 1 May 2024 21:00:26 -0500 Subject: [PATCH] dropper resists --- src/engine/gameManager/LootManager.java | 8 ++++---- src/engine/objects/Mob.java | 11 +++++------ src/engine/objects/Resists.java | 5 +++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index d93d4516..19f93d1f 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -450,10 +450,10 @@ public enum LootManager { if(!Mob.disciplineDroppers.contains(mob)) Mob.disciplineDroppers.add(mob); - mob.level = 65; - mob.healthMax = 7500; - mob.setHealth(7500); - mob.setResists(new Resists("Dropper")); + //mob.level = 65; + //mob.healthMax = 7500; + //mob.setHealth(7500); + //mob.setResists(new Resists("Dropper")); ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().getName() + " has found the " + ItemBase.getItemBase(bse.itemBase).getName() + ". Are you tough enough to take it?"); chatMsg.setMessageType(10); chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID()); diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 19204f96..2da3f755 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -80,8 +80,8 @@ public class Mob extends AbstractIntelligenceAgent { private DeferredPowerJob weaponPower; private DateTime upgradeDateTime = null; private boolean lootSync = false; - public int discDelay = 6; - public boolean firstSpawn = true; + + public boolean dropper = false; // New Mobile constructor. Fill in the blanks and then call // PERSIST. @@ -1740,22 +1740,21 @@ public class Mob extends AbstractIntelligenceAgent { this.behaviourType = MobBehaviourType.Aggro; } - boolean isDropper = false; for(MobEquipment equipped: this.equip.values()){ if(equipped.getItemBase().isVorg() && this.getMobBaseID() != 14062){ //this.healthMax = 7500; //this.setHealth(this.healthMax); //this.level = 65; - isDropper = true; + this.dropper = true; } } for(Item item : this.charItemManager.getInventory()){ if(item.getItemBase().isDiscRune() && this.level < 75){ - isDropper = true; + this.dropper = true; } } - if(isDropper){ + if(this.dropper){ this.level = 65; this.resists = new Resists("Dropper"); this.atrHandOne *= 2; diff --git a/src/engine/objects/Resists.java b/src/engine/objects/Resists.java index 81c7b5eb..68837913 100644 --- a/src/engine/objects/Resists.java +++ b/src/engine/objects/Resists.java @@ -441,6 +441,11 @@ public class Resists { } public void calculateResists(AbstractCharacter ac, boolean val) { + + if(ac.getObjectType().equals(Enum.GameObjectType.Mob) && ((Mob)ac).dropper){ + this.setDropperResists(); + return; + } this.immuneTo.clear(); // get resists for runes