Hamlet Guards Immune To All

This commit is contained in:
2024-05-11 17:22:34 -05:00
parent 1caa704b6a
commit 2274a9e16e
2 changed files with 28 additions and 0 deletions
@@ -680,6 +680,12 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
public final Resists getResists() {
if (this.resists == null)
return Resists.getResists(0);
if(Mob.disciplineDroppers.contains(this)){
return new Resists("Dropper");
}
if(this.getObjectType().equals(GameObjectType.Mob) && ((Mob)this).behaviourType.equals(MobBehaviourType.HamletGuard))
return new Resists("HamletGuard");
return this.resists;
}
+22
View File
@@ -48,6 +48,8 @@ public class Resists {
break;
case "Dropper":
setDropperResists();
case "HamletGuard":
setHamletGuardResists();
default:
setGenericResists();
break;
@@ -251,6 +253,26 @@ public class Resists {
this.resists.put(DamageType.Siege, 0f);
}
/**
* Create generic resists for mines
*/
public final void setHamletGuardResists() {
this.immuneToAll = true;
this.immuneTo.put(DamageType.Slash, true);
this.immuneTo.put(DamageType.Crush, true);
this.immuneTo.put(DamageType.Pierce, true);
this.immuneTo.put(DamageType.Magic, true);
this.immuneTo.put(DamageType.Bleed, true);
this.immuneTo.put(DamageType.Poison, true);
this.immuneTo.put(DamageType.Mental, true);
this.immuneTo.put(DamageType.Holy, true);
this.immuneTo.put(DamageType.Unholy, true);
this.immuneTo.put(DamageType.Lightning, true);
this.immuneTo.put(DamageType.Fire, true);
this.immuneTo.put(DamageType.Cold, true);
this.immuneTo.put(DamageType.Siege, true);
}
/**
* Create generic resists
*/