Combat: use lkiCase only if blocker itself is an lki

This commit is contained in:
Hans Mackowiak
2020-03-08 11:00:14 +01:00
parent d5b578b306
commit e1659a4539

View File

@@ -882,6 +882,10 @@ public class Combat {
return true; // is blocking something at the moment return true; // is blocking something at the moment
} }
if (!blocker.isLKI()) {
return false;
}
CombatLki lki = lkiCache.get(blocker); CombatLki lki = lkiCache.get(blocker);
return null != lki && !lki.isAttacker; // was blocking something anyway return null != lki && !lki.isAttacker; // was blocking something anyway
} }
@@ -893,6 +897,10 @@ public class Combat {
return true; // is blocking the attacker's band at the moment return true; // is blocking the attacker's band at the moment
} }
if (!blocker.isLKI()) {
return false;
}
CombatLki lki = lkiCache.get(blocker); CombatLki lki = lkiCache.get(blocker);
return null != lki && !lki.isAttacker && lki.relatedBands.contains(ab); // was blocking that very band return null != lki && !lki.isAttacker && lki.relatedBands.contains(ab); // was blocking that very band
} }