diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/InventoryStone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/InventoryStone.java index fd2364240..528126edd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/InventoryStone.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/InventoryStone.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.stones; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag; @@ -51,7 +52,7 @@ public abstract class InventoryStone extends Runestone { @Override public void execute(Hero hero, String action) { super.execute(hero, action); - if (action.equals(AC_USE)){ + if (action.equals(AC_USE) && hero.buff(MagicImmune.class) == null){ activate(curUser.pos); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/Runestone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/Runestone.java index 219d2eec0..70267ece6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/Runestone.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/Runestone.java @@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.stones; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.journal.Catalog; @@ -48,6 +49,7 @@ public abstract class Runestone extends Item { protected void onThrow(int cell) { ///inventory stones are thrown like normal items, other stones don't trigger when thrown into pits if (this instanceof InventoryStone || + Dungeon.hero.buff(MagicImmune.class) != null || (Dungeon.level.pit[cell] && Actor.findChar(cell) == null)){ if (!anonymous) super.onThrow( cell ); } else {