diff --git a/.gitattributes b/.gitattributes index a56b67b09d5..83e0b18cc9d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4142,6 +4142,7 @@ res/cardsfolder/scrapheap.txt -text svneol=native#text/plain res/cardsfolder/screaming_fury.txt -text svneol=native#text/plain res/cardsfolder/screeching_harpy.txt -text svneol=native#text/plain res/cardsfolder/scrivener.txt -text svneol=native#text/plain +res/cardsfolder/scroll_rack.txt -text svneol=native#text/plain res/cardsfolder/scroll_thief.txt -text svneol=native#text/plain res/cardsfolder/scrubland.txt -text svneol=native#text/plain res/cardsfolder/scryb_sprites.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/scroll_rack.txt b/res/cardsfolder/scroll_rack.txt new file mode 100644 index 00000000000..c66e62ca043 --- /dev/null +++ b/res/cardsfolder/scroll_rack.txt @@ -0,0 +1,8 @@ +Name:Scroll Rack +ManaCost:2 +Types:Artifact +Text:no text +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/scroll_rack.jpg +End \ No newline at end of file diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index f088977ea62..db0c327831f 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -8027,6 +8027,78 @@ public class CardFactory implements NewConstants { card.addComesIntoPlayCommand(intoPlay); }//*************** END ************ END ************************** + + //*************** START *********** START ************************** + else if(cardName.equals("Scroll Rack")) { + Ability_Cost abCost = new Ability_Cost("1 T", cardName, true); + final Ability_Activated ability = new Ability_Activated(card, abCost, null) { + private static final long serialVersionUID = -5588587187720068547L; + + @Override + public void resolve() { + //not implemented for compy + if(card.getController().isHuman()) { + AllZone.InputControl.setInput(new Input() { + private static final long serialVersionUID = -2305549394512889450L; + CardList exiled = new CardList(); + + @Override + public void showMessage() { + AllZone.Display.showMessage(card.getName()+" - Exile cards from hand. Currently, "+exiled.size()+" selected. (Press OK when done.)"); + ButtonUtil.enableOnlyOK(); + } + + @Override + public void selectButtonOK() { done(); } + + @Override + public void selectCard(final Card c, PlayerZone zone) { + if(zone.is(Constant.Zone.Hand, AllZone.HumanPlayer) + && !exiled.contains(c)) { + exiled.add(c); + showMessage(); + } + } + + public void done() { + //exile those cards + for(Card c:exiled) AllZone.GameAction.exile(c); + + //Put that many cards from the top of your library into your hand. + //Ruling: This is not a draw... + PlayerZone lib = AllZone.getZone(Constant.Zone.Library, AllZone.HumanPlayer); + int numCards = 0; + while(lib.size() > 0 && numCards < exiled.size()) { + AllZone.GameAction.moveToHand(lib.get(0)); + numCards++; + } + + AllZone.Display.showMessage(card.getName()+" - Returning cards to top of library."); + + //Then look at the exiled cards and put them on top of your library in any order. + while(exiled.size() > 0) { + Object o = AllZone.Display.getChoice("Put a card on top of your library.", exiled.toArray()); + Card c1 = (Card)o; + AllZone.GameAction.moveToTopOfLibrary(c1); + exiled.remove(c1); + } + + stop(); + } + }); + } + } + + @Override + public boolean canPlayAI() { + return false; + } + };//ability + ability.setDescription(abCost+"Exile any number of cards from your hand face down. Put that many cards from the top of your library into your hand. Then look at the exiled cards and put them on top of your library in any order."); + ability.setStackDescription(cardName+" - exile any number of cards from your hand."); + card.addSpellAbility(ability); + }//*************** END ************ END ************************** + return postFactoryKeywords(card); }//getCard2