mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Add support for keyword: CARDNAME must be blocked by exactly one creature if able.
This commit is contained in:
@@ -840,6 +840,8 @@ public class CombatUtil {
|
||||
if (attacker.hasStartOfKeyword("All creatures able to block CARDNAME do so.")
|
||||
|| (attacker.hasStartOfKeyword("CARDNAME must be blocked if able.")
|
||||
&& combat.getBlockers(attacker).isEmpty())
|
||||
|| (attacker.hasStartOfKeyword("CARDNAME must be blocked by exactly one creature if able.")
|
||||
&& combat.getBlockers(attacker).size() != 1)
|
||||
|| (attacker.hasStartOfKeyword("CARDNAME must be blocked by two or more creatures if able.")
|
||||
&& combat.getBlockers(attacker).size() < 2)) {
|
||||
attackersWithLure.add(attacker);
|
||||
@@ -990,6 +992,7 @@ public class CombatUtil {
|
||||
// attacker with lure, the blocker can't block the former
|
||||
if (!attacker.hasKeyword("All creatures able to block CARDNAME do so.")
|
||||
&& !(attacker.hasKeyword("CARDNAME must be blocked if able.") && combat.getBlockers(attacker).isEmpty())
|
||||
&& !(attacker.hasKeyword("CARDNAME must be blocked by exactly one creature if able.") && combat.getBlockers(attacker).size() != 1)
|
||||
&& !(attacker.hasKeyword("CARDNAME must be blocked by two or more creatures if able.") && combat.getBlockers(attacker).size() < 2)
|
||||
&& !(blocker.getMustBlockCards() != null && blocker.getMustBlockCards().contains(attacker))
|
||||
&& !mustBeBlockedBy
|
||||
|
||||
Reference in New Issue
Block a user