Browse Source

Hamlet Guards Immune To All

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
2274a9e16e
  1. 6
      src/engine/objects/AbstractCharacter.java
  2. 22
      src/engine/objects/Resists.java

6
src/engine/objects/AbstractCharacter.java

@ -680,6 +680,12 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
public final Resists getResists() { public final Resists getResists() {
if (this.resists == null) if (this.resists == null)
return Resists.getResists(0); 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; return this.resists;
} }

22
src/engine/objects/Resists.java

@ -48,6 +48,8 @@ public class Resists {
break; break;
case "Dropper": case "Dropper":
setDropperResists(); setDropperResists();
case "HamletGuard":
setHamletGuardResists();
default: default:
setGenericResists(); setGenericResists();
break; break;
@ -251,6 +253,26 @@ public class Resists {
this.resists.put(DamageType.Siege, 0f); 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 * Create generic resists
*/ */

Loading…
Cancel
Save