mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Merge pull request #1665 from Northmoc/npe
StaticAbilityCanAttackDefender try to fix NPE
This commit is contained in:
@@ -32,7 +32,7 @@ public class StaticAbilityCanAttackDefender {
|
|||||||
|
|
||||||
public static boolean canAttack(final Card card, final GameEntity target) {
|
public static boolean canAttack(final Card card, final GameEntity target) {
|
||||||
// CanAttack static abilities
|
// 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()) {
|
for (final StaticAbility stAb : ca.getStaticAbilities()) {
|
||||||
if (!stAb.getParam("Mode").equals(MODE) || stAb.isSuppressed() || !stAb.checkConditions()) {
|
if (!stAb.getParam("Mode").equals(MODE) || stAb.isSuppressed() || !stAb.checkConditions()) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user