v0.7.4a: fixed heavy boomerangs being lost when inventory is full

This commit is contained in:
Evan Debenham 2019-07-24 17:40:46 -04:00
parent af7bb632ea
commit e36ea99a61

View File

@ -100,9 +100,12 @@ public class HeavyBoomerang extends MissileWeapon {
@Override @Override
public void call() { public void call() {
if (returnTarget == Dungeon.hero){ if (returnTarget == Dungeon.hero){
boomerang.doPickUp(Dungeon.hero); if (boomerang.doPickUp(Dungeon.hero)) {
//grabbing the boomerang takes no time //grabbing the boomerang takes no time
Dungeon.hero.spend( -TIME_TO_PICK_UP ); Dungeon.hero.spend(-TIME_TO_PICK_UP);
} else {
Dungeon.level.drop(boomerang, returnPos).sprite.drop();
}
} else if (returnTarget != null){ } else if (returnTarget != null){
if (curUser.shoot( returnTarget, boomerang )) { if (curUser.shoot( returnTarget, boomerang )) {