From 9d8e6680b040286ef256a309a68c50fdc9ab6c15 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 04:42:59 +0000 Subject: [PATCH] AI should no longer be able to animate an equip or to attach an animated equip onto one of it's creatures (animated equip or not). I am not sure how to handle the human player at this time. --- src/forge/CardFactoryUtil.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index 6400bbe6233..8711f712152 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -1488,7 +1488,9 @@ public class CardFactoryUtil { @Override public boolean canPlayAI() { - return getCreature().size() != 0 && !sourceCard.isEquipping(); + return getCreature().size() != 0 && + !sourceCard.isEquipping() && + !sourceCard.isCreature(); } @@ -1502,10 +1504,12 @@ public class CardFactoryUtil { CardList list = new CardList(AllZone.Computer_Play.getCards()); list = list.filter(new CardListFilter() { public boolean addCard(Card c) { - return c.isCreature() && (!CardFactoryUtil.AI_doesCreatureAttack(c)) - && CardFactoryUtil.canTarget(sourceCard, c) - && (!c.getKeyword().contains("Defender")) - && (c.getNetDefense() + Tough > 0); + return c.isCreature() && + (!CardFactoryUtil.AI_doesCreatureAttack(c)) && + CardFactoryUtil.canTarget(sourceCard, c) && + (!c.getKeyword().contains("Defender")) && + (c.getNetDefense() + Tough > 0) && + c != sourceCard; } }); // list.remove(card); // if mana-only cost, allow self-target