v0.3.0: self-targeting with wands is now impossible

This commit is contained in:
Evan Debenham 2015-03-24 02:44:16 -04:00
parent f564c3478d
commit ec2ba6afca

View File

@ -423,16 +423,16 @@ public abstract class Wand extends KindOfWeapon {
if (target != null) {
if (target == curUser.pos) {
final Wand curWand = (Wand)Wand.curItem;
final int cell = Ballistica.cast( curUser.pos, target, true, curWand.hitChars );
if (target == curUser.pos || cell == curUser.pos) {
GLog.i( TXT_SELF_TARGET );
return;
}
final Wand curWand = (Wand)Wand.curItem;
curWand.setKnown();
final int cell = Ballistica.cast( curUser.pos, target, true, curWand.hitChars );
curUser.sprite.zap( cell );
//targets the enemy hit for char-hitting wands, or the cell aimed at for other wands.