From 2236e2ef029e179dd60f6ca5feea155af4be29a1 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 05:12:24 +0000 Subject: [PATCH] - Added Deserted Temple. --- res/cards.txt | 6 ++++ src/forge/CardFactory_Lands.java | 55 ++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/res/cards.txt b/res/cards.txt index ca0d207e748..afc34b54322 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,9 @@ +Deserted Temple +no cost +Land +no text +tap: add 1 + Hymn to Tourach B B Sorcery diff --git a/src/forge/CardFactory_Lands.java b/src/forge/CardFactory_Lands.java index 17551dcb8e8..74dccae6c44 100644 --- a/src/forge/CardFactory_Lands.java +++ b/src/forge/CardFactory_Lands.java @@ -1804,6 +1804,61 @@ class CardFactory_Lands { }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Deserted Temple")) { + final Ability_Tap ability = new Ability_Tap(card, "1") { + + private static final long serialVersionUID = -3463896908132386453L; + + @Override + public boolean canPlayAI() { + return false; + } + + @Override + public void resolve() { + + final Card[] target = new Card[1]; + + + target[0] = getTargetCard(); + if(AllZone.GameAction.isCardInPlay(target[0]) + && target[0].isTapped() + && (target[0].getType().contains("Land")) && CardFactoryUtil.canTarget(card, target[0])) { + target[0].untap(); + } + } + }; + + Input runtime = new Input() { + private static final long serialVersionUID = -6822924521729238991L; + + @Override + public void showMessage() { + CardList choice = new CardList(); + choice.addAll(AllZone.Human_Play.getCards()); + choice.addAll(AllZone.Computer_Play.getCards()); + + choice = choice.getType("Land"); + choice = choice.filter(new CardListFilter() { + public boolean addCard(Card c) { + return (c.isTapped()); + } + }); + + //System.out.println("size of choice: " + choice.size()); + stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choice, "Select target Land", true, + false)); + } + }; + + ability.setDescription("1, tap: Untap target land."); + + card.addSpellAbility(ability); + ability.setBeforePayMana(runtime); + + }//*************** END ************ END ************************** + //*************** START *********** START ************************** else if(cardName.equals("Academy Ruins")) { final Ability_Tap ability = new Ability_Tap(card, "1 U") {