v0.9.4: fixed spectral blades not going through allies

This commit is contained in:
Evan Debenham 2021-08-11 15:21:48 -04:00
parent 0f8c5126e7
commit 2987ed1c19

View File

@ -138,12 +138,10 @@ public class SpectralBlades extends ArmorAbility {
for (int cell : path.path){ for (int cell : path.path){
Char ch = Actor.findChar(cell); Char ch = Actor.findChar(cell);
if (ch != null){ if (ch != null){
if (ch == hero || existingTargets.contains(ch)){ if (ch == hero || existingTargets.contains(ch) || ch.alignment == Char.Alignment.ALLY){
continue; continue;
} else if (ch.alignment != Char.Alignment.ALLY){
return ch;
} else { } else {
return null; return ch;
} }
} }
if (Dungeon.level.solid[cell]){ if (Dungeon.level.solid[cell]){