diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 0a58cc3406b..2857b86fbc4 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg +keening_stone.jpg http://www.wizards.com/global/images/magic/general/keening_stone.jpg sarkhan_the_mad.jpg http://www.wizards.com/global/images/magic/general/sarkhan_the_mad.jpg harrow.jpg http://www.wizards.com/global/images/magic/general/harrow.jpg souls_attendant.jpg http://www.wizards.com/global/images/magic/general/souls_attendant.jpg diff --git a/res/cards.txt b/res/cards.txt index e278e070cd5..b9e434b2f20 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,8 @@ +Keening Stone +6 +Artifact +5, tap: Target player puts the top X cards of his or her library into his or her graveyard, where X is the number of cards in that player's graveyard. + Sarkhan the Mad 3 B R Planeswalker - Sarkhan diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 9c01ab20a53..1e2de1989d8 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -18264,6 +18264,48 @@ public class CardFactory implements NewConstants { card.clearSpellAbility(); card.addSpellAbility(spell); }//*************** END ************ END ************************** + + //*************** START *********** START ************************** + else if(cardName.equals("Keening Stone")) { + /* + * 5, Tap: Target player puts the top X cards of his or her + * library into his or her graveyard, where X is the number of + * cards in that player's graveyard. + */ + Ability_Tap ab1 = new Ability_Tap(card, "5") { + private static final long serialVersionUID = -6282104343089446216L; + + @Override + public boolean canPlayAI() { + String player = getTargetPlayer(); + PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player); + CardList libList = new CardList(lib.getCards()); + return libList.size() > 0; + } + + @Override + public void resolve() { + String player = getTargetPlayer(); + PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player); + PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player); + CardList libList = new CardList(lib.getCards()); + + int numCards = grave.size(); + + int max = libList.size(); + if(numCards > max) numCards = max; + + for(int i = 0; i < numCards; i++) { + Card c = libList.get(i); + lib.remove(c); + grave.add(c); + } + } + }; + ab1.setChooseTargetAI(CardFactoryUtil.AI_targetHuman()); + ab1.setBeforePayMana(CardFactoryUtil.input_targetPlayer(ab1)); + card.addSpellAbility(ab1); + }//*************** END ************ END ************************** // Cards with Cycling abilities