diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 5f282b00..703671aa 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1493,8 +1493,8 @@ public class Mob extends AbstractIntelligenceAgent { } if(this.StrongholdCommander || this.StrongholdGuardian || this.StrongholdEpic){ this.setResists(new Resists("Elite")); - return; } + this.resists.calculateResists(this, false); } public void calculateMaxHealthManaStamina() { diff --git a/src/engine/objects/Resists.java b/src/engine/objects/Resists.java index 94bd0ce5..e9f2c4e5 100644 --- a/src/engine/objects/Resists.java +++ b/src/engine/objects/Resists.java @@ -468,6 +468,23 @@ public class Resists { // get resists for runes PlayerBonuses rb = ac.getBonuses(); float slash = 0f, crush = 0f, pierce = 0f, magic = 0f, bleed = 0f, mental = 0f, holy = 0f, unholy = 0f, poison = 0f, lightning = 0f, fire = 0f, cold = 0f, healing = 0f; + if(ac.getObjectType().equals(Enum.GameObjectType.Mob)){ + Mob mob = (Mob)ac; + if(mob.StrongholdEpic || mob.StrongholdCommander || mob.StrongholdGuardian) + slash = 75f; + crush = 75f; + pierce = 75f; + magic = 75f; + bleed = 75f; + mental = 75f; + holy = 75f; + unholy = 75f; + poison = 75f; + lightning = 75f; + fire = 75f; + cold = 75f; + healing = 0f; + } if (rb != null) { // Handle immunities @@ -507,19 +524,6 @@ public class Resists { cold += rb.getFloat(ModType.Resistance, SourceType.Cold); healing += rb.getFloat(ModType.Resistance, SourceType.Healing); // DamageType.Healing.name()); - //HHO - -// String protectionString = rb.getString("protection"); -// -// if (protectionString.isEmpty()) -// this.protection = null; -// else try { -// this.protection = DamageType.valueOf(rb.getString("protection")); -// } catch (IllegalArgumentException e) { -// Logger.error( "No enum for: " + protectionString); -// this.protection = null; -// } -// this.protectionTrains = rb.getFloat("protection"); } // get resists from equipment