- fixed the AI handling of "All creatures able to block CARDNAME do so."

This commit is contained in:
jendave
2011-08-06 13:05:26 +00:00
parent ed6993aa5f
commit 41fc18294f
2 changed files with 5 additions and 5 deletions

View File

@@ -5,6 +5,6 @@ Text:no text
PT:1/1
A:AB$Discard|Cost$T|Opponent$True|NumCards$1|Mode$TgtChoose|PlayerTurn$True|ActivatingPhases$Upkeep,Draw,Main1,BeginCombat|SpellDescription$Target opponent discards a card. Activate this ability only during your turn, before attackers are declared.
SVar:Rarity:Uncommon
SVar:Picture:http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=10533&type=card
SVar:Picture:http://www.wizards.com/global/images/magic/general/cunning_advisor.jpg
SetInfo:PTK|Uncommon|http://magiccards.info/scans/en/p3k/72.jpg
End

View File

@@ -517,10 +517,10 @@ public class ComputerUtil_Block2
if (attackers.size() == 0)
return combat;
CardList attackersLeft = attackers; //keeps track of all currently unblocked attackers
CardList attackersLeft = new CardList(attackers.toArray()); //keeps track of all currently unblocked attackers
CardList blockedButUnkilled = new CardList(); //keeps track of all blocked attackers that currently wouldn't be destroyed
CardList tramplingAttackers = new CardList();
CardList blockersLeft = possibleBlockers; //keeps track of all unassigned blockers
CardList blockersLeft = new CardList(possibleBlockers.toArray()); //keeps track of all unassigned blockers
CardList blockers = new CardList();
CardList safeBlockers = new CardList();
CardList killingBlockers = new CardList();
@@ -548,7 +548,7 @@ public class ComputerUtil_Block2
for(int i = 0; i < attackersWithLure.size(); i++) {
attacker = attackersWithLure.get(i);
for(int j = 0; j < possibleBlockers.size(); j++) {
b = possibleBlockers.get(i);
b = possibleBlockers.get(j);
if(CombatUtil.canBlock(attacker, b)) canBlockAttackerWithLure.add(b);
}
}
@@ -704,7 +704,7 @@ public class ComputerUtil_Block2
safeBlockers = blockers.getKeyword("First Strike");
safeBlockers.addAll(blockers.getKeyword("Double Strike").toArray());
}
else safeBlockers = blockers;
else safeBlockers = new CardList(blockers.toArray());
for(int j = 0; j < safeBlockers.size(); j++) {
blocker = safeBlockers.get(j);