v0.6.2a: fixed gladiator being able to use his ability on unseen enemies

This commit is contained in:
Evan Debenham 2017-10-31 23:00:42 -04:00
parent 99156c0005
commit 943dbe2100

View File

@ -183,7 +183,10 @@ public class Combo extends Buff implements ActionIndicator.Action {
public void onSelect(Integer cell) { public void onSelect(Integer cell) {
if (cell == null) return; if (cell == null) return;
final Char enemy = Actor.findChar( cell ); final Char enemy = Actor.findChar( cell );
if (enemy == null || !((Hero)target).canAttack(enemy) || target.isCharmedBy( enemy )){ if (enemy == null
|| !Dungeon.level.heroFOV[cell]
|| !((Hero)target).canAttack(enemy)
|| target.isCharmedBy( enemy )){
GLog.w( Messages.get(Combo.class, "bad_target") ); GLog.w( Messages.get(Combo.class, "bad_target") );
} else { } else {
target.sprite.attack(cell, new Callback() { target.sprite.attack(cell, new Callback() {