mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added the keyword "CARDNAME must be blocked if able.".
- Added Inescapable Brute.
This commit is contained in:
@@ -452,8 +452,14 @@ public class CombatUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
CardList attackersWithLure = new CardList(combat.getAttackers());
|
||||
attackersWithLure = attackersWithLure.getKeyword("All creatures able to block CARDNAME do so.");
|
||||
CardList attackers = new CardList(combat.getAttackers());
|
||||
CardList attackersWithLure = new CardList();
|
||||
for (Card attacker : attackers) {
|
||||
if (attacker.hasStartOfKeyword("All creatures able to block CARDNAME do so.")
|
||||
|| (attacker.hasStartOfKeyword("CARDNAME must be blocked if able.")
|
||||
&& combat.getBlockers(attacker).isEmpty()))
|
||||
attackersWithLure.add(attacker);
|
||||
}
|
||||
|
||||
for (final Card attacker : attackersWithLure) {
|
||||
if (CombatUtil.canBeBlocked(attacker, combat) && CombatUtil.canBlock(attacker, blocker)) {
|
||||
@@ -520,6 +526,7 @@ public class CombatUtil {
|
||||
// if the attacker has no lure effect, but the blocker can block another
|
||||
// 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())
|
||||
&& !blocker.getMustBlockCards().contains(attacker) && CombatUtil.mustBlockAnAttacker(blocker, combat)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -892,7 +892,9 @@ public class ComputerUtilBlock {
|
||||
for (final Card attacker : ComputerUtilBlock.getAttackers()) {
|
||||
blockers = ComputerUtilBlock.getPossibleBlockers(attacker, chumpBlockers, combat);
|
||||
for (final Card blocker : blockers) {
|
||||
if (CombatUtil.canBlock(attacker, blocker, combat) && ComputerUtilBlock.getBlockersLeft().contains(blocker)) {
|
||||
if (CombatUtil.canBlock(attacker, blocker, combat) && ComputerUtilBlock.getBlockersLeft().contains(blocker)
|
||||
&& (CombatUtil.mustBlockAnAttacker(blocker, combat)
|
||||
|| blocker.hasKeyword("CARDNAME blocks each turn if able."))) {
|
||||
combat.addBlocker(attacker, blocker);
|
||||
ComputerUtilBlock.getBlockersLeft().removeAll(blocker);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user