mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added the keyword "CARDNAME must be blocked if able.".
- Added Inescapable Brute.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -4154,6 +4154,7 @@ res/cardsfolder/i/indrik_stomphowler.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/i/induce_despair.txt -text
|
res/cardsfolder/i/induce_despair.txt -text
|
||||||
res/cardsfolder/i/induce_paranoia.txt -text svneol=unset#text/plain
|
res/cardsfolder/i/induce_paranoia.txt -text svneol=unset#text/plain
|
||||||
res/cardsfolder/i/inertia_bubble.txt svneol=native#text/plain
|
res/cardsfolder/i/inertia_bubble.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/i/inescapable_brute.txt -text
|
||||||
res/cardsfolder/i/inexorable_tide.txt svneol=native#text/plain
|
res/cardsfolder/i/inexorable_tide.txt svneol=native#text/plain
|
||||||
res/cardsfolder/i/infantry_veteran.txt svneol=native#text/plain
|
res/cardsfolder/i/infantry_veteran.txt svneol=native#text/plain
|
||||||
res/cardsfolder/i/infected_vermin.txt svneol=native#text/plain
|
res/cardsfolder/i/infected_vermin.txt svneol=native#text/plain
|
||||||
|
|||||||
12
res/cardsfolder/i/inescapable_brute.txt
Normal file
12
res/cardsfolder/i/inescapable_brute.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Name:Inescapable Brute
|
||||||
|
ManaCost:5 R
|
||||||
|
Types:Creature Giant Warrior
|
||||||
|
Text:no text
|
||||||
|
PT:3/3
|
||||||
|
K:Wither
|
||||||
|
K:CARDNAME must be blocked if able.
|
||||||
|
SVar:Rarity:Common
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/inescapable_brute.jpg
|
||||||
|
SetInfo:SHM|Common|http://magiccards.info/scans/en/shm/95.jpg
|
||||||
|
Oracle:Wither (This deals damage to creatures in the form of -1/-1 counters.)\nInescapable Brute must be blocked if able.
|
||||||
|
End
|
||||||
@@ -452,8 +452,14 @@ public class CombatUtil {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CardList attackersWithLure = new CardList(combat.getAttackers());
|
CardList attackers = new CardList(combat.getAttackers());
|
||||||
attackersWithLure = attackersWithLure.getKeyword("All creatures able to block CARDNAME do so.");
|
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) {
|
for (final Card attacker : attackersWithLure) {
|
||||||
if (CombatUtil.canBeBlocked(attacker, combat) && CombatUtil.canBlock(attacker, blocker)) {
|
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
|
// if the attacker has no lure effect, but the blocker can block another
|
||||||
// attacker with lure, the blocker can't block the former
|
// attacker with lure, the blocker can't block the former
|
||||||
if (!attacker.hasKeyword("All creatures able to block CARDNAME do so.")
|
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)) {
|
&& !blocker.getMustBlockCards().contains(attacker) && CombatUtil.mustBlockAnAttacker(blocker, combat)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -892,7 +892,9 @@ public class ComputerUtilBlock {
|
|||||||
for (final Card attacker : ComputerUtilBlock.getAttackers()) {
|
for (final Card attacker : ComputerUtilBlock.getAttackers()) {
|
||||||
blockers = ComputerUtilBlock.getPossibleBlockers(attacker, chumpBlockers, combat);
|
blockers = ComputerUtilBlock.getPossibleBlockers(attacker, chumpBlockers, combat);
|
||||||
for (final Card blocker : blockers) {
|
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);
|
combat.addBlocker(attacker, blocker);
|
||||||
ComputerUtilBlock.getBlockersLeft().removeAll(blocker);
|
ComputerUtilBlock.getBlockersLeft().removeAll(blocker);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user