- Fixed AI double blocking creatures with "CARDNAME can't be blocked by more than one creature."

This commit is contained in:
jendave
2011-08-07 01:41:57 +00:00
parent 0915f7e574
commit f1aa02778e

View File

@@ -142,7 +142,8 @@ public class ComputerUtil_Block2
private static Combat makeGangBlocks(Combat combat){ private static Combat makeGangBlocks(Combat combat){
CardList currentAttackers = new CardList(attackersLeft.toArray()); CardList currentAttackers = new CardList(attackersLeft.toArray());
currentAttackers = currentAttackers.getKeywordsDontContain("Rampage"); currentAttackers = currentAttackers.getKeywordsDontContain("Rampage");
currentAttackers = currentAttackers.getKeywordsDontContain("CARDNAME can't be blocked by more than one creature.");
CardList blockers; CardList blockers;
//Try to block an attacker without first strike with a gang of first strikers //Try to block an attacker without first strike with a gang of first strikers
@@ -277,6 +278,7 @@ public class ComputerUtil_Block2
CardList tramplingAttackers = attackers.getKeyword("Trample"); CardList tramplingAttackers = attackers.getKeyword("Trample");
tramplingAttackers = tramplingAttackers.getKeywordsDontContain("Rampage"); //Don't make it worse tramplingAttackers = tramplingAttackers.getKeywordsDontContain("Rampage"); //Don't make it worse
tramplingAttackers = tramplingAttackers.getKeywordsDontContain("CARDNAME can't be blocked by more than one creature.");
//TODO - should check here for a "rampage-like" trigger that replaced the keyword: //TODO - should check here for a "rampage-like" trigger that replaced the keyword:
// "Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it." // "Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it."
@@ -302,6 +304,7 @@ public class ComputerUtil_Block2
CardList safeBlockers; CardList safeBlockers;
CardList blockers; CardList blockers;
CardList targetAttackers = blockedButUnkilled.getKeywordsDontContain("Rampage"); //Don't make it worse CardList targetAttackers = blockedButUnkilled.getKeywordsDontContain("Rampage"); //Don't make it worse
targetAttackers = targetAttackers.getKeywordsDontContain("CARDNAME can't be blocked by more than one creature.");
//TODO - should check here for a "rampage-like" trigger that replaced the keyword: //TODO - should check here for a "rampage-like" trigger that replaced the keyword:
// "Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it." // "Whenever CARDNAME becomes blocked, it gets +1/+1 until end of turn for each creature blocking it."