From c173c603f1a4d61ff5e6a5a567e66917951264b4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 26 Apr 2024 10:56:57 -0400 Subject: [PATCH] v2.4.0: fixed static chars not being immune to ai state debuffs --- .../shatteredpixeldungeon/actors/Char.java | 10 +++++++--- .../items/wands/WandOfRegrowth.java | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index ad93f2e28..280b72fe8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StormCloud; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Adrenaline; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArcaneArmor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AscensionChallenge; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin; @@ -63,6 +64,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Preparation; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ShieldBuff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SnipersMark; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Speed; @@ -1192,15 +1194,17 @@ public abstract class Char extends Actor { new HashSet( Arrays.asList(Frost.class, Chill.class))), ACIDIC ( new HashSet( Arrays.asList(Corrosion.class)), new HashSet( Arrays.asList(Ooze.class))), - ELECTRIC ( new HashSet( Arrays.asList(WandOfLightning.class, Shocking.class, Potential.class, Electricity.class, ShockingDart.class, Elemental.ShockElemental.class )), + ELECTRIC ( new HashSet( Arrays.asList(WandOfLightning.class, Shocking.class, Potential.class, + Electricity.class, ShockingDart.class, Elemental.ShockElemental.class )), new HashSet()), LARGE, IMMOVABLE ( new HashSet(), new HashSet( Arrays.asList(Vertigo.class) )), //A character that acts in an unchanging manner. immune to AI state debuffs or stuns/slows STATIC( new HashSet(), - new HashSet( Arrays.asList(Paralysis.class, Frost.class, Chill.class, Slow.class, Speed.class) )); - + new HashSet( Arrays.asList(AllyBuff.class, Dread.class, Terror.class, Amok.class, Charm.class, Sleep.class, + Paralysis.class, Frost.class, Chill.class, Slow.class, Speed.class) )); + private HashSet resistances; private HashSet immunities; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java index cff1ef334..05e2a76fb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfRegrowth.java @@ -464,7 +464,6 @@ public class WandOfRegrowth extends Wand { } { - immunities.add( AllyBuff.class ); immunities.add( Doom.class ); }