The AI will only cast Mind Twist/Shatter if it can cause the human to discard at least two cards. Added a MaxX test into the canPlayAI() to make sure that the computer has enough untapped mana to power up the X cost.

This commit is contained in:
jendave
2011-08-06 03:56:14 +00:00
parent cc1bb83c02
commit 9596143170

View File

@@ -17128,7 +17128,9 @@ public class CardFactory implements NewConstants {
@Override
public boolean canPlayAI() {
return AllZone.Human_Hand.size() > 1;
final int maxX = ComputerUtil.getAvailableMana().size() - 1;
return ((cardName.equals("Mind Twist") && AllZone.Human_Hand.size() > 1 && maxX >= 2) ||
(cardName.equals("Mind Shatter") && AllZone.Human_Hand.size() > 1 && maxX >= 3));
}
@Override