From 616348a0e5efe712d5e8391ddc0ed0fe84f25cc8 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 3 Sep 2016 17:54:22 -0400 Subject: [PATCH] v0.4.2: fixed some bugs involving cursed boomerangs --- .../shatteredpixeldungeon/items/weapon/missiles/Boomerang.java | 2 +- .../shatteredpixeldungeon/levels/traps/CursingTrap.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Boomerang.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Boomerang.java index 130e5e1fa..70d6b8d4d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Boomerang.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Boomerang.java @@ -125,7 +125,7 @@ public class Boomerang extends MissileWeapon { @Override public void cast( Hero user, int dst ) { - throwEquiped = isEquipped( user ); + throwEquiped = isEquipped( user ) && !cursed; if (throwEquiped) Dungeon.quickslot.convertToPlaceholder(this); super.cast( user, dst ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/CursingTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/CursingTrap.java index 94eccf974..9e62f419e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/CursingTrap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/CursingTrap.java @@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact; import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Boomerang; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.TrapSprite; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -77,7 +78,7 @@ public class CursingTrap extends Trap { ArrayList canCurse = new ArrayList<>(); KindOfWeapon weapon = hero.belongings.weapon; - if (weapon instanceof Weapon && !weapon.cursed){ + if (weapon instanceof Weapon && !weapon.cursed && !(weapon instanceof Boomerang)){ if (((Weapon) weapon).enchantment == null) priorityCurse.add(weapon); else