Merge pull request #1665 from Northmoc/npe

StaticAbilityCanAttackDefender try to fix NPE
This commit is contained in:
Anthony Calosa
2022-10-13 05:32:21 +08:00
committed by GitHub

View File

@@ -32,7 +32,7 @@ public class StaticAbilityCanAttackDefender {
public static boolean canAttack(final Card card, final GameEntity target) {
// CanAttack static abilities
for (final Card ca : target.getGame().getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) {
for (final Card ca : card.getGame().getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) {
for (final StaticAbility stAb : ca.getStaticAbilities()) {
if (!stAb.getParam("Mode").equals(MODE) || stAb.isSuppressed() || !stAb.checkConditions()) {
continue;