diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 098920a283f..fcca52f453c 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 +nekrataal.jpg http://www.wizards.com/global/images/magic/general/nekrataal.jpg +bone_shredder.jpg http://www.wizards.com/global/images/magic/general/bone_shredder.jpg oath_of_ghouls.jpg http://www.wizards.com/global/images/magic/general/oath_of_ghouls.jpg darba.jpg http://www.wizards.com/global/images/magic/general/darba.jpg molting_harpy.jpg http://www.wizards.com/global/images/magic/general/molting_harpy.jpg diff --git a/res/cards.txt b/res/cards.txt index 1096268d451..2b1a7418ded 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,18 @@ +Bone Shredder +2 B +Creature Minion +When CARDNAME enters the battlfield, destroy target nonartifact, nonblack creature. +1/1 +Flying +Echo:2 B + +Nekrataal +2 B B +Creature Human Assassin +When CARDNAME enters the battlfield, destroy target nonartifact, nonblack creature. It can't be regenerated. +2/1 +First Strike + Squirrel Mob 1 G G Creature Squirrel diff --git a/res/uncommon.txt b/res/uncommon.txt index bbf15ac2d9c..fdd33603f9b 100644 --- a/res/uncommon.txt +++ b/res/uncommon.txt @@ -92,6 +92,7 @@ Boggart Ram-Gang Boil Boiling Seas Bonded Fetch +Bone Shredder Boreal Shelf Boros Guildmage Boros Swiftblade @@ -535,6 +536,7 @@ Nature's Ruin Naya Battlemage Needle Storm Needlebug +Nekrataal Nettletooth Djinn Night's Whisper Nightshade Schemers diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index 5cf9bf05501..e2665c35779 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -3211,6 +3211,107 @@ public class CardFactory_Creatures { }); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Nekrataal") || cardName.equals("Bone Shredder")) { + // add creatures that destroy nonblack nonartifact without any additional weirdness like evoke + final String name = cardName; + final CommandReturn getCreature = new CommandReturn() { + //get target card, may be null + public Object execute() { + CardList nonblack = CardFactoryUtil.AI_getHumanCreature(card, true); + nonblack = nonblack.filter(new CardListFilter() { + public boolean addCard(Card c) { + return (!c.isArtifact() && !CardUtil.getColors(c).contains(Constant.Color.Black)); + } + }); + + CardList list = new CardList(nonblack.toArray()); + if (list.isEmpty()) // todo: if human doesn't have a valid creature must kill own valid target + return null; + + // Sorts: Highest Attacking Flyer at the top. + CardListUtil.sortAttack(list); + CardListUtil.sortFlying(list); + + Card target = list.get(0); + // if "Best creature has 2+ Attack and flying target that. + if(2 <= target.getNetAttack() && target.getKeyword().contains("Flying")) + return target; + + if(MyRandom.percentTrue(50)) + CardListUtil.sortAttack(list); + + return target; + }//execute() + };//CommandReturn + + final SpellAbility ability = new Ability(card, "0") { + @Override + public void resolve() { + Card c = getTargetCard(); + + if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c) + && !CardUtil.getColors(c).contains(Constant.Color.Black) && !c.isArtifact()) { + if (name.equals("Nekrataal")) + AllZone.GameAction.destroyNoRegeneration(c); + else if (name.equals("Bone Shredder")) + AllZone.GameAction.destroy(c); + } + }//resolve() + };//SpellAbility + Command intoPlay = new Command() { + private static final long serialVersionUID = 8480493532270093002L; + + public void execute() { + Input target = new Input() { + private static final long serialVersionUID = 913605099043649992L; + + @Override + public void showMessage() { + AllZone.Display.showMessage("Select target nonartifact, nonblack creature to destroy"); + ButtonUtil.disableAll(); + } + + @Override + public void selectCard(Card card, PlayerZone zone) { + if(!CardFactoryUtil.canTarget(ability, card)) { + AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?)."); + } else if(card.isCreature() && zone.is(Constant.Zone.Play) && !card.isArtifact() + && !CardUtil.getColors(card).contains(Constant.Color.Black)) { + ability.setTargetCard(card); + AllZone.Stack.add(ability); + stop(); + } + } + };//Input target + + + if(card.getController().equals(Constant.Player.Human)) { + //get all creatures + CardList creatures = AllZoneUtil.getTypeInPlay("Creature"); + + creatures = creatures.filter(new CardListFilter() { + public boolean addCard(Card c) { + return (!c.isArtifact() && !CardUtil.getColors(c).contains(Constant.Color.Black)); + } + }); + + if(creatures.size() != 0) AllZone.InputControl.setInput(target); + + } + else{ //computer + Object o = getCreature.execute(); + if(o != null)//should never happen, but just in case + { + ability.setTargetCard((Card) o); + AllZone.Stack.add(ability); + } + }//else + }//execute() + }; + card.addComesIntoPlayCommand(intoPlay); + }//*************** END ************ END ************************** + //*************** START *********** START ************************** else if(cardName.equals("Briarhorn")) {