From c7337e90c1df05d4c7f693214108f6cac1f9d8ca Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 2 Jun 2024 14:00:37 -0400 Subject: [PATCH] v2.4.2: cursed wands can no longer sheepify important NPCs --- .../shatteredpixeldungeon/items/wands/CursedWand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java index 97f6d5dea..d7e1ab9cd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/CursedWand.java @@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GoldenMimic; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Sheep; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; @@ -280,8 +281,10 @@ public class CursedWand { Char ch = Actor.findChar( targetPos ); if (ch != null && !(ch instanceof Hero) + //ignores bosses, questgivers, rat king, etc. && !ch.properties().contains(Char.Property.BOSS) - && !ch.properties().contains(Char.Property.MINIBOSS)){ + && !ch.properties().contains(Char.Property.MINIBOSS) + && !(ch instanceof NPC && ch.alignment == Char.Alignment.NEUTRAL)){ Sheep sheep = new Sheep(); sheep.lifespan = 10; sheep.pos = ch.pos;