- Added AI support for Tyrant's Choice.

This commit is contained in:
Sloth
2014-10-08 14:59:23 +00:00
parent b35c3c4cd1
commit ad0921ecbe
3 changed files with 6 additions and 2 deletions

View File

@@ -1833,6 +1833,8 @@ public class ComputerUtil {
} else {
String logic = sa.getParam("AILogic");
switch (logic) {
case "Torture":
return "Torture";
case "GraceOrCondemnation":
return ai.getCreaturesInPlay().size() > ai.getOpponent().getCreaturesInPlay().size() ? "Grace" : "Condemnation";
case "CarnageOrHomage":

View File

@@ -4,6 +4,7 @@ package forge.ai.ability;
import forge.ai.SpellAbilityAi;
import forge.game.card.Card;
import forge.game.card.CardLists;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
@@ -22,6 +23,8 @@ public class VoteAi extends SpellAbilityAi {
} else if ("Judgment".equals(logic)) {
return !CardLists.getValidCards(host.getGame().getCardsIn(ZoneType.Battlefield),
sa.getParam("VoteCard"), host.getController(), host).isEmpty();
} else if ("Torture".equals(logic)) {
return aiPlayer.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.MAIN1);
}
return false;
}