diff --git a/.gitattributes b/.gitattributes index 268726d27c9..dcda2adf08f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1907,6 +1907,7 @@ res/cardsfolder/jet_medallion.txt -text svneol=native#text/plain res/cardsfolder/jhessian_infiltrator.txt -text svneol=native#text/plain res/cardsfolder/jhessian_lookout.txt -text svneol=native#text/plain res/cardsfolder/jhessian_zombies.txt -text svneol=native#text/plain +res/cardsfolder/jhoira_of_the_ghitu.txt svneol=native#text/plain res/cardsfolder/jhovall_queen.txt -text svneol=native#text/plain res/cardsfolder/jhovall_rider.txt -text svneol=native#text/plain res/cardsfolder/jodahs_avenger.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/jhoira_of_the_ghitu.txt b/res/cardsfolder/jhoira_of_the_ghitu.txt new file mode 100644 index 00000000000..a62516b5320 --- /dev/null +++ b/res/cardsfolder/jhoira_of_the_ghitu.txt @@ -0,0 +1,8 @@ +Name:Jhoira of the Ghitu +ManaCost:1 U R +Types:Legendary Creature Human Wizard +Text:2, Exile a nonland card from your hand: Put four time counters on the exiled card. If it doesn't have suspend, it gains suspend. +PT:2/2 +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/jhoira_of_the_ghitu.jpg +End \ No newline at end of file diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 0e60f2233c8..97e2bab973e 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -3,6 +3,7 @@ package forge; import java.util.ArrayList; +import java.util.Stack; import java.util.HashMap; import java.util.List; import java.util.Random; @@ -5428,6 +5429,64 @@ public class CardFactory_Creatures { card.addSpellAbility(ability); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Jhoira of the Ghitu")) { + final Stack chosen= new Stack(); + final SpellAbility ability = new Ability(card, "2") { + private static final long serialVersionUID = 4414609319033894302L; + @Override + public boolean canPlay() { + CardList possible = new CardList(AllZone.getZone(Constant.Zone.Hand, card.getController()).getCards()); + possible.filter(new CardListFilter(){ + public boolean addCard(Card c){ + return !c.isLand(); + } + }); + return !possible.isEmpty() && super.canPlay(); + } + + /*@Override + public void chooseTargetAI() { + CardList targets = new CardList(AllZone.Computer_Hand.getCards()); + CardListUtil.sortCMC(targets); + Card c = targets.get(0); + AllZone.GameAction.removeFromGame(c); + chosen.push(c); + }*/ + public boolean canPlayAI(){return false;} + + @Override + public void resolve() { + Card c = chosen.pop(); + c.addCounter(Counters.TIME, 4); + c.setSuspend(true); + } + }; + + ability.setAfterPayMana(new Input() { + private static final long serialVersionUID = -1647181037510967127L; + + @Override + public void showMessage() + { + ButtonUtil.disableAll(); + AllZone.Display.showMessage("Exile a nonland card from your hand."); + } + + @Override + public void selectCard(Card c, PlayerZone zone) + { + if(zone.is(Constant.Zone.Hand) && !c.isLand()) + { + AllZone.GameAction.removeFromGame(c); + chosen.push(c); + AllZone.Stack.add(ability); + stopSetNext(new ComputerAI_StackNotEmpty()); + } + } + }); + card.addSpellAbility(ability); + }//*************** END ************ END ************************** //*************** START *********** START ************************** else if(cardName.equals("Mindwrack Liege")) {