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,7 +60,10 @@ public class MissileWeapon extends Weapon {
protected void onThrow( int cell ) { protected void onThrow( int cell ) {
Char enemy = Actor.findChar( cell ); Char enemy = Actor.findChar( cell );
if (enemy == null || enemy == curUser) { if (enemy == null || enemy == curUser) {
miss( cell ); if (this instanceof Boomerang)
super.onThrow( cell );
else
miss( cell );
} else { } else {
if (!curUser.shoot( enemy, this )) { if (!curUser.shoot( enemy, this )) {
miss( cell ); miss( cell );
@ -81,7 +84,7 @@ public class MissileWeapon extends Weapon {
bonus += ((RingOfSharpshooting.Aim)buff).level; bonus += ((RingOfSharpshooting.Aim)buff).level;
} }
if (Random.Float() > Math.pow(0.7, -bonus)) if (Random.Float() < Math.pow(0.6, -bonus))
super.onThrow( cell ); super.onThrow( cell );
} }