v0.9.2b: fixed hero being able to attack removed chars

This commit is contained in:
Evan Debenham 2021-03-18 16:35:06 -04:00
parent 3562c044da
commit 3b1d93abef

View File

@ -531,7 +531,7 @@ public class Hero extends Char {
}
public boolean canAttack(Char enemy){
if (enemy == null || pos == enemy.pos) {
if (enemy == null || pos == enemy.pos || !Actor.chars().contains(enemy)) {
return false;
}