diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 8a014625480..f1cf099604a 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -38,6 +38,8 @@ 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 +buried_alive.jpg http://www.wizards.com/global/images/magic/general/buried_alive.jpg +ulamog_the_infinite_gyre.jpg http://www.wizards.com/global/images/magic/general/ulamog_the_infinite_gyre.jpg alaborn_zealot.jpg http://serv2.tcgimages.eu/img/cards/Portal_Second_Age/alaborn_zealot.jpg dread_warlock.jpg http://www.wizards.com/global/images/magic/general/dread_warlock.jpg prowling_nightstalker.jpg http://www.wizards.com/global/images/magic/general/prowling_nightstalker.jpg diff --git a/res/cards.txt b/res/cards.txt index 421a5249f54..7cf2f58c61b 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,8 @@ +Buried Alive +2 B +Sorcery +Search your library for up to three creature cards and put them into your graveyard. Then shuffle your library. + Ulamog, the Infinite Gyre 11 Legendary Creature Eldrazi diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 84ceafc09d9..7ca0e60d81a 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -18801,6 +18801,65 @@ public class CardFactory implements NewConstants { card.addSpellAbility(spell); }// *************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Buried Alive")) { + final SpellAbility spell = new Spell(card) { + private static final long serialVersionUID = 5676345736475L; + + @Override + public void resolve() { + String player = card.getController(); + if(player.equals(Constant.Player.Human)) humanResolve(); + else computerResolve(); + } + + public void humanResolve() { + for (int i=0;i<3;i++) { + PlayerZone deck = AllZone.getZone(Constant.Zone.Library, card.getController()); + CardList list = new CardList(deck.getCards()); + list = list.getType("Creature"); + Object check = AllZone.Display.getChoiceOptional("Select a creature card", list.toArray()); + if(check != null) { + PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController()); + AllZone.GameAction.moveTo(grave, (Card) check); + } + AllZone.GameAction.shuffle(Constant.Player.Human); + } + } // humanResolve + + public void computerResolve() { + for (int i=0;i<3;i++) { + Card[] library = AllZone.Computer_Library.getCards(); + CardList list = new CardList(library); + list = list.getType("Creature"); + + //pick best creature + Card c = CardFactoryUtil.AI_getBestCreature(list); + if(c == null) c = library[0]; + //System.out.println("computer picked - " +c); + AllZone.Computer_Library.remove(c); + AllZone.Computer_Graveyard.add(c); + } + } // computerResolve + + @Override + public boolean canPlay() { + PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController()); + return library.getCards().length != 0; + } + + @Override + public boolean canPlayAI() { + CardList creature = new CardList(); + creature.addAll(AllZone.Computer_Library.getCards()); + creature = creature.getType("Creature"); + return creature.size() > 2; + } + };//SpellAbility + card.clearSpellAbility(); + card.addSpellAbility(spell); + }//*************** END ************ END ************************** + // Cards with Cycling abilities // -1 means keyword "Cycling" not found if(hasKeyword(card, "Cycling") != -1) {