diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 4c8447de2cc..725963bed1f 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 +dwarven_demolition_team.jpg http://www.wizards.com/global/images/magic/general/dwarven_demolition_team.jpg oracle_of_mul_daya.jpg http://www.wizards.com/global/images/magic/general/oracle_of_mul_daya.jpg roiling_terrain.jpg http://www.wizards.com/global/images/magic/general/roiling_terrain.jpg tectonic_edge.jpg http://www.wizards.com/global/images/magic/general/tectonic_edge.jpg diff --git a/res/cards.txt b/res/cards.txt index ab24754a6cb..e43a20469b7 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,9 @@ +Dwarven Demolition Team +2 R +Creature Dwarf +no text +1/1 + Oracle of Mul Daya 3 G Creature Elf Shaman diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 0ab416c72cc..32702aa8db3 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -19614,6 +19614,72 @@ public class CardFactory_Creatures { card.addComesIntoPlayCommand(intoPlay); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Dwarven Demolition Team")) { + final Ability_Tap ability = new Ability_Tap(card) { + private static final long serialVersionUID = -4635857814967376792L; + + @Override + public boolean canPlayAI() { + CardList human = CardFactoryUtil.AI_getHumanCreature(card, true); + human = human.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.getType().contains("Wall"); + } + }); + + CardListUtil.sortAttack(human); + CardListUtil.sortFlying(human); + + if (0 < human.size()) setTargetCard(human.get(0)); + + return 0 < human.size(); + }//canPlayAI() + + @Override + public void resolve() { + Card c = getTargetCard(); + + if (AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c)) { + AllZone.GameAction.destroy(c); + } + }//resolve() + };//SpellAbility + + Input target = new Input() { + private static final long serialVersionUID = 3550520287933502665L; + + @Override + public void showMessage() { + AllZone.Display.showMessage("Select target Wall to destroy"); + ButtonUtil.enableOnlyCancel(); + } + + @Override + public void selectButtonCancel() { + stop(); + } + + @Override + public void selectCard(Card c, PlayerZone zone) { + if (!CardFactoryUtil.canTarget(card, c)) { + AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?)."); + } else if (c.isCreature() && zone.is(Constant.Zone.Play) && c.getType().contains("Wall")) { + //tap ability + card.tap(); + + ability.setTargetCard(c); + AllZone.Stack.add(ability); + stop(); + } + }//selectCard() + };//Input + + card.addSpellAbility(ability); + ability.setDescription("tap: Destroy target Wall."); + ability.setBeforePayMana(target); + }//*************** END ************ END ************************** + // Cards with Cycling abilities // -1 means keyword "Cycling" not found