From ada78ce388981deb0ee9d96b821217ee142c7a8f Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 30 Oct 2015 21:58:17 +0000 Subject: [PATCH] - Added AI support for the Time Vault + Voltaic Key combo. --- .../main/java/forge/ai/ability/UntapAi.java | 21 ++++++++++++++----- forge-gui/res/cardsfolder/t/time_vault.txt | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ability/UntapAi.java b/forge-ai/src/main/java/forge/ai/ability/UntapAi.java index db663523e1b..b0b084cc4aa 100644 --- a/forge-ai/src/main/java/forge/ai/ability/UntapAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/UntapAi.java @@ -159,11 +159,22 @@ public class UntapAi extends SpellAbilityAi { } } else { - if (CardLists.getNotType(untapList, "Creature").isEmpty()) { - choice = ComputerUtilCard.getBestCreatureAI(untapList); // if only creatures take the best - } else { - choice = ComputerUtilCard.getMostExpensivePermanentAI(untapList, sa, false); - } + //Untap Time Vault? - Yes please! + for (Card c : untapList) { + if (c.getName().equals("Time Vault")) { + choice = c; + break; + } + } + if (choice == null) { + if (CardLists.getNotType(untapList, "Creature").isEmpty()) { + choice = ComputerUtilCard.getBestCreatureAI(untapList); // if only creatures take the best + } else { + if (!sa.getPayCosts().hasManaCost() || sa.isTrigger()) { + choice = ComputerUtilCard.getMostExpensivePermanentAI(untapList, sa, false); + } + } + } } if (choice == null) { // can't find anything left diff --git a/forge-gui/res/cardsfolder/t/time_vault.txt b/forge-gui/res/cardsfolder/t/time_vault.txt index 4bc885f0908..5423f24d936 100644 --- a/forge-gui/res/cardsfolder/t/time_vault.txt +++ b/forge-gui/res/cardsfolder/t/time_vault.txt @@ -5,6 +5,7 @@ Text:If you would begin your turn while CARDNAME is tapped, you may skip that tu K:CARDNAME doesn't untap during your untap step. K:CARDNAME enters the battlefield tapped. A:AB$ AddTurn | Cost$ T | NumTurns$ 1 | SpellDescription$ Take an extra turn after this one. +SVar:PlayMain1:Always SVar:RemRandomDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/time_vault.jpg Oracle:Time Vault enters the battlefield tapped.\nTime Vault doesn't untap during your untap step.\nIf you would begin your turn while Time Vault is tapped, you may skip that turn instead. If you do, untap Time Vault.\n{T}: Take an extra turn after this one.