resistance modifiers for mobs

This commit is contained in:
2024-07-10 20:48:55 -05:00
parent 4c9b82b649
commit f6baf8fe83
2 changed files with 18 additions and 14 deletions
+1 -1
View File
@@ -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() {
+17 -13
View File
@@ -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