- The AI can now use Animate Wall.

This commit is contained in:
Sloth
2013-02-27 19:13:11 +00:00
parent 74a31e137e
commit 0e10eb9296
3 changed files with 7 additions and 2 deletions

View File

@@ -801,7 +801,7 @@ public class AttachAi extends SpellAbilityAi {
prefList = CardLists.filter(prefList, Predicates.not(Presets.ENCHANTED));
}
if (!grantingAbilities) {
if (!grantingAbilities && keywords.isEmpty()) {
// Probably prefer to Enchant Creatures that Can Attack
// Filter out creatures that can't Attack or have Defender
prefList = CardLists.filter(prefList, new Predicate<Card>() {
@@ -1063,6 +1063,10 @@ public class AttachAi extends SpellAbilityAi {
if (!CombatUtil.canBlock(card, true) || card.hasKeyword("CARDNAME can block any number of creatures.")) {
return false;
}
} else if (keyword.equals("CARDNAME can attack as though it didn't have defender.")) {
if (!card.hasKeyword("Defender") || card.hasKeyword("CARDNAME can attack as though it didn't have defender.")) {
return false;
}
} else if (keyword.equals("Shroud") || keyword.equals("Hexproof")) {
if (card.hasKeyword("Shroud") || card.hasKeyword("Hexproof")) {
return false;

View File

@@ -249,6 +249,7 @@ public class Upkeep extends Phase {
};
slowtrip.setStackDescription(card + " - Draw a card.");
slowtrip.setDescription(card + " - Draw a card.");
slowtrip.setActivatingPlayer(player);
game.getStack().addSimultaneousStackEntry(slowtrip);