- More Improvements of AI playing equipments.

This commit is contained in:
Sloth
2013-04-05 17:34:49 +00:00
parent b39ba46d45
commit 08f8c70bdd

View File

@@ -810,12 +810,20 @@ public class ComputerUtil {
|| card.hasKeyword("Haste"))) || card.hasKeyword("Exalted")) { || card.hasKeyword("Haste"))) || card.hasKeyword("Exalted")) {
return true; return true;
} }
//cast equipments in Main1 when there are creatures to equip //cast equipments in Main1 when there are creatures to equip and no other unequipped equipment
if (card.isEquipment()) { if (card.isEquipment()) {
for (Card c : card.getController().getCreaturesInPlay()) { boolean playNow = false;
if (CombatUtil.canAttackNextTurn(c) && c.canBeEquippedBy(card)) { for (Card c : card.getController().getCardsIn(ZoneType.Battlefield)) {
return true; if (c.isEquipment() && ! c.isEquipping()) {
playNow = false;
break;
} }
if (!playNow && c.isCreature() && CombatUtil.canAttackNextTurn(c) && c.canBeEquippedBy(card)) {
playNow = true;
}
}
if (playNow) {
return true;
} }
} }