From e36ea99a61475781051d635abbceb1e23b70e779 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 24 Jul 2019 17:40:46 -0400 Subject: [PATCH] v0.7.4a: fixed heavy boomerangs being lost when inventory is full --- .../items/weapon/missiles/HeavyBoomerang.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/HeavyBoomerang.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/HeavyBoomerang.java index 7c5b0cb98..600003baf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/HeavyBoomerang.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/HeavyBoomerang.java @@ -100,9 +100,12 @@ public class HeavyBoomerang extends MissileWeapon { @Override public void call() { if (returnTarget == Dungeon.hero){ - boomerang.doPickUp(Dungeon.hero); - //grabbing the boomerang takes no time - Dungeon.hero.spend( -TIME_TO_PICK_UP ); + if (boomerang.doPickUp(Dungeon.hero)) { + //grabbing the boomerang takes no time + Dungeon.hero.spend(-TIME_TO_PICK_UP); + } else { + Dungeon.level.drop(boomerang, returnPos).sprite.drop(); + } } else if (returnTarget != null){ if (curUser.shoot( returnTarget, boomerang )) {