v1.4.0: fixed giant enemies not being able to attack from solid cells

This commit is contained in:
Evan Debenham
2022-10-03 13:24:51 -04:00
parent 539f1c8ea5
commit 3024e4df29

View File

@@ -195,7 +195,8 @@ public abstract class ChampionEnemy extends Buff {
} else {
boolean[] passable = BArray.not(Dungeon.level.solid, null);
for (Char ch : Actor.chars()) {
if (ch != target) passable[ch.pos] = false;
//our own tile is always passable
passable[ch.pos] = ch == target;
}
PathFinder.buildDistanceMap(enemy.pos, passable, 2);