diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 233016383dd..b5faf3ce1df 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 +haunting_misery.jpg http://www.wizards.com/global/images/magic/general/haunting_misery.jpg phyrexian_plaguelord.jpg http://www.wizards.com/global/images/magic/general/phyrexian_plaguelord.jpg reclaim.jpg http://www.wizards.com/global/images/magic/general/reclaim.jpg skirk_prospector.jpg http://www.wizards.com/global/images/magic/general/skirk_prospector.jpg diff --git a/res/cards.txt b/res/cards.txt index e73d4a18025..1b5671aad54 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,8 @@ +Haunting Misery +1 B B +Sorcery +As an additional cost, exile X creature cards from your graveyard. Haunting Misery deals X damage to target player. + Nut Collector 5 G Creature Human Druid diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 3947fd97944..f3d7dd0d3da 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -21365,6 +21365,65 @@ public class CardFactory implements NewConstants { card.addSpellAbility(spell); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if (cardName.equals("Haunting Misery")) + { + final SpellAbility spell = new Spell(card){ + private static final long serialVersionUID = 6867051257656060195L; + + @Override + public void resolve() { + String player = card.getController(); + String tPlayer = getTargetPlayer(); + PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player); + CardList graveList = new CardList(grave.getCards()); + + graveList = graveList.getType("Creature"); + + int size = graveList.size(); + int damage = 0; + + if( player.equals(Constant.Player.Human)) { + for(int i = 0; i < size; i++) { + Object o = AllZone.Display.getChoice("Remove from game", graveList.toArray()); + if(o == null) break; + damage++; // tally up how many cards removed + Card c_1 = (Card) o; + graveList.remove(c_1); //remove from the display list + AllZone.GameAction.removeFromGame(c_1); + } + } + else { //Computer + // it would be nice if the computer chose vanilla creatures over + for(int j = 0; j < size; j++) { + AllZone.GameAction.removeFromGame(graveList.get(j)); + } + } + AllZone.GameAction.addDamage(tPlayer, card, damage); + } + + @Override + public void chooseTargetAI() { + setTargetPlayer(Constant.Player.Human); + }//chooseTargetAI() + + @Override + public boolean canPlayAI() { + String player = getTargetPlayer(); + PlayerZone grave = AllZone.getZone(Constant.Zone.Library, player); + CardList graveList = new CardList(grave.getCards()); + graveList = graveList.getType("Creature"); + int humanLife = AllZone.Human_Life.getLife(); + + return (graveList.size() > 5 || graveList.size() > humanLife); + } + }; + + spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell)); + card.clearSpellAbility(); + card.addSpellAbility(spell); + }//*************** END ************ END ************************** + //*************** START *********** START ************************** else if (cardName.equals("Perish the Thought")) { final SpellAbility spell = new Spell(card){