- The PlayMain1 AI SVar now has the distinctions "TRUE", "ALWAYS" and "OPPONENTCREATURES".

This commit is contained in:
Sloth
2014-10-18 19:53:49 +00:00
parent 8089d73ce9
commit ab9fc96f3e
16 changed files with 27 additions and 12 deletions

View File

@@ -676,10 +676,19 @@ public class ComputerUtil {
if ("True".equals(card.getSVar("NonStackingEffect")) && card.getController().isCardInPlay(card.getName())) {
return false;
}
if (card.getSVar("PlayMain1").equals("TRUE") && (!card.getController().getCreaturesInPlay().isEmpty() || sa.getPayCosts().hasNoManaCost()
|| card.isPlaneswalker())) {
return true;
if (card.hasSVar("PlayMain1")) {
if (card.getSVar("PlayMain1").equals("ALWAYS") || sa.getPayCosts().hasNoManaCost()) {
return true;
} else if (card.getSVar("PlayMain1").equals("OPPONENTCREATURES")) {
//Only play these main1 when the opponent has creatures (stealing and giving them haste)
if (!card.getController().getOpponent().getCreaturesInPlay().isEmpty()) {
return true;
}
} else if (!card.getController().getCreaturesInPlay().isEmpty()) {
return true;
}
}
if ((card.isCreature() && (ComputerUtil.hasACardGivingHaste(ai)
|| card.hasKeyword("Haste"))) || card.hasKeyword("Exalted")) {
return true;