diff --git a/res/card-pictures.txt b/res/card-pictures.txt index a1125952acd..531768d4fde 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 +slate_of_ancestry.jpg http://www.wizards.com/global/images/magic/general/slate_of_ancestry.jpg champions_drake.jpg http://www.wizards.com/global/images/magic/general/champions_drake.jpg halimar_wavewatch.jpg http://www.wizards.com/global/images/magic/general/halimar_wavewatch.jpg tuktuk_the_explorer.jpg http://www.wizards.com/global/images/magic/general/tuktuk_the_explorer.jpg diff --git a/res/cards.txt b/res/cards.txt index f38fd792fd2..b3bf1dd83d4 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,8 @@ +Slate of Ancestry +4 +Artifact +no text + Champion's Drake 1 U Creature Drake diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index a37b3eb7b2b..5befb6cf157 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -18516,6 +18516,58 @@ public class CardFactory implements NewConstants { card.addSpellAbility(ability); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Slate of Ancestry")) { + /* + * 4, Tap, Discard your hand: Draw a card for each creature you control. + */ + final Ability_Tap ability = new Ability_Tap(card, "4") { + private static final long serialVersionUID = 5135410670684913401L; + + @Override + public void resolve() { + final String player = card.getController(); + // Discard hand into graveyard + PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player); + Card[] c = hand.getCards(); + for(int i = 0; i < c.length; i++) + AllZone.GameAction.discard(c[i]); + + PlayerZone play = AllZone.getZone(Constant.Zone.Play, player); + CardList creatures = new CardList(play.getCards()); + creatures = creatures.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isCreature(); + } + }); + // Draw a card for each creature + for(int i = 0; i < creatures.size(); i++) + AllZone.GameAction.drawCard(player); + + }//resolve() + + @Override + public boolean canPlayAI() { + PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer); + CardList creatures = new CardList(play.getCards()); + creatures = creatures.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isCreature(); + } + }); + PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer); + CardList handList = new CardList(hand.getCards()); + return creatures.size() > handList.size(); + } + + };//Ability_Tap + + ability.setDescription("4, tap: Discard your hand: Draw a card for each creature you control."); + ability.setStackDescription(cardName+" - discard hand and draw 1 card for every creature you control."); + ability.setBeforePayMana(new Input_PayManaCost(ability)); + card.addSpellAbility(ability); + }//*************** END ************ END ************************** + // Cards with Cycling abilities // -1 means keyword "Cycling" not found if(hasKeyword(card, "Cycling") != -1) {