From 827bbac1055090cda2c22a2bc99522cc8ce95861 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 14 Sep 2014 02:11:06 -0400 Subject: [PATCH] V0.2.0: Corrected missile logic with Ring of Sharpshooting --- .../items/weapon/missiles/MissileWeapon.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java index e9861110e..21c2c8f8d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java @@ -60,7 +60,10 @@ public class MissileWeapon extends Weapon { protected void onThrow( int cell ) { Char enemy = Actor.findChar( cell ); if (enemy == null || enemy == curUser) { - miss( cell ); + if (this instanceof Boomerang) + super.onThrow( cell ); + else + miss( cell ); } else { if (!curUser.shoot( enemy, this )) { miss( cell ); @@ -81,7 +84,7 @@ public class MissileWeapon extends Weapon { bonus += ((RingOfSharpshooting.Aim)buff).level; } - if (Random.Float() > Math.pow(0.7, -bonus)) + if (Random.Float() < Math.pow(0.6, -bonus)) super.onThrow( cell ); }