CombatUtil.java add "quasi-goad" logic

This commit is contained in:
Northmoc
2021-04-15 20:03:44 -04:00
parent 9876741c50
commit ff9729d27a

View File

@@ -240,6 +240,17 @@ public class CombatUtil {
} }
} }
// Quasi-goad logic for "Kardur, Doomscourge" etc. that isn't goad but behaves the same
if (defender.hasKeyword("Creatures your opponents control attack a player other than you if able.")) {
for (GameEntity ge : getAllPossibleDefenders(attacker.getController())) {
if (!defender.equals(ge) && ge instanceof Player) {
if (canAttack(attacker, ge)) {
return false;
}
}
}
}
// Keywords // Keywords
final boolean canAttackWithDefender = attacker.hasKeyword("CARDNAME can attack as though it didn't have defender."); final boolean canAttackWithDefender = attacker.hasKeyword("CARDNAME can attack as though it didn't have defender.");
for (final KeywordInterface keyword : attacker.getKeywords()) { for (final KeywordInterface keyword : attacker.getKeywords()) {