V0.2.0: Corrected missile logic with Ring of Sharpshooting

This commit is contained in:
Evan Debenham 2014-09-14 02:11:06 -04:00
parent 0f0908a268
commit 827bbac105

View File

@ -60,6 +60,9 @@ public class MissileWeapon extends Weapon {
protected void onThrow( int cell ) {
Char enemy = Actor.findChar( cell );
if (enemy == null || enemy == curUser) {
if (this instanceof Boomerang)
super.onThrow( cell );
else
miss( cell );
} else {
if (!curUser.shoot( enemy, this )) {
@ -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 );
}