mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- More Improvements of AI playing equipments.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user