diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/ReclaimTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/ReclaimTrap.java index f2e35a250..c2eaec9b3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/ReclaimTrap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/ReclaimTrap.java @@ -37,6 +37,8 @@ import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; import com.watabou.utils.Reflection; +import java.util.ArrayList; + public class ReclaimTrap extends TargetedSpell { { @@ -45,6 +47,17 @@ public class ReclaimTrap extends TargetedSpell { private Class storedTrap = null; + @Override + public ArrayList actions(Hero hero) { + ArrayList actions = super.actions(hero); + //prevents exploits + if (storedTrap != null){ + actions.remove(AC_DROP); + actions.remove(AC_THROW); + } + return actions; + } + @Override protected void affectTarget(Ballistica bolt, Hero hero) { if (storedTrap == null) { @@ -80,18 +93,6 @@ public class ReclaimTrap extends TargetedSpell { return desc; } - @Override - protected void onThrow(int cell) { - storedTrap = null; - super.onThrow(cell); - } - - @Override - public void doDrop(Hero hero) { - storedTrap = null; - super.doDrop(hero); - } - private static final ItemSprite.Glowing[] COLORS = new ItemSprite.Glowing[]{ new ItemSprite.Glowing( 0xFF0000 ), new ItemSprite.Glowing( 0xFF8000 ),