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 ec68fef92..7a37200c2 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 @@ -32,13 +32,16 @@ public abstract class Runestone extends Item { stackable = true; defaultAction = AC_THROW; } - + + //runestones press the cell they're thrown to by default, but a couple stones override this + protected boolean pressesCell = true; + @Override protected void onThrow(int cell) { if (Dungeon.level.pit[cell] || !defaultAction.equals(AC_THROW)){ super.onThrow( cell ); } else { - Dungeon.level.pressCell( cell ); + if (pressesCell) Dungeon.level.pressCell( cell ); activate(cell); Invisibility.dispel(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDisarming.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDisarming.java index 4c88e2891..a3baa46ea 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDisarming.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDisarming.java @@ -43,18 +43,9 @@ public class StoneOfDisarming extends Runestone { { image = ItemSpriteSheet.STONE_DISARM; - } - @Override - protected void onThrow(int cell) { - //This runestone uniquely presses cells after its effect resolves, instead of before - if (Dungeon.level.pit[cell] || !defaultAction.equals(AC_THROW)){ - super.onThrow( cell ); - } else { - activate(cell); - Invisibility.dispel(); - Dungeon.level.pressCell( cell ); - } + //so traps do not activate before the effect + pressesCell = false; } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfFlock.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfFlock.java index 0ff1f6705..d60e2c6b4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfFlock.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfFlock.java @@ -37,6 +37,9 @@ public class StoneOfFlock extends Runestone { { image = ItemSpriteSheet.STONE_FLOCK; + + //the sheep will press the cell instead + pressesCell = false; } @Override