diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 276a4b7dfbb..13dc7bd035a 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -18,6 +18,7 @@ forest.jpg http://resources.wizards.com/magic/cards/unh/en-us/card73946.jpg forest1.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=2748 forest2.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=587 forest3.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=586 +prowess_of_the_fair.jpg http://www.wizards.com/global/images/magic/general/prowess_of_the_fair.jpg abomination.jpg http://www.wizards.com/global/images/magic/general/abomination.jpg time_warp.jpg http://www.wizards.com/global/images/magic/general/time_warp.jpg deadly_grub.jpg http://www.wizards.com/global/images/magic/general/deadly_grub.jpg diff --git a/res/cards.txt b/res/cards.txt index e0d067f3238..61835872829 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,9 @@ +Prowess of the Fair +1 B +Tribal Enchantment Elf +no text +Whenever another nontoken Elf is put into your graveyard from the battlefield, you may put a 1/1 green Elf Warrior creature token onto the battlefield. + Abomination 3 B B Creature Horror diff --git a/src/forge/GameAction.java b/src/forge/GameAction.java index 4333cb19812..f6a2c8aed77 100644 --- a/src/forge/GameAction.java +++ b/src/forge/GameAction.java @@ -586,7 +586,7 @@ private Card getCurrentCard(int ID) ArrayList keywords = c.getKeyword(); for (String kw : keywords) { - if (kw.startsWith("Whenever ") && kw.contains(" put into a graveyard from the battlefield,")) + if (kw.startsWith("Whenever ") && kw.contains(" put into") && kw.contains("graveyard from the battlefield,")) return true; } return false; diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 33063344640..a7f98e5d738 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -2953,6 +2953,8 @@ public class GameActionUtil destroyCreature_Dauthi_Ghoul(c, destroyed); else if (c.getName().equals("Soulcatcher") && destroyed.getKeyword().contains("Flying")) destroyCreature_Soulcatcher(c, destroyed); + else if (c.getName().equals("Prowess of the Fair") && destroyed.getType().contains("Elf") && !destroyed.isToken() && !c.equals(destroyed) && destroyed.getController().equals(c.getController()) ) + destroyCreature_Prowess_of_the_Fair(c, destroyed); else if (c.getName().equals("Fecundity")) destroyCreature_Fecundity(c, destroyed); else if (c.getName().equals("Moonlit Wake")) @@ -3023,6 +3025,50 @@ public class GameActionUtil AllZone.Stack.add(ability); } + private static void destroyCreature_Prowess_of_the_Fair(Card c, Card destroyed) + { + final Card crd = c; + final Card crd2 = c; + Ability ability = new Ability(c, "0") + { + public void resolve() + { + String player = crd.getController(); + if (player.equals(Constant.Player.Human)) { + if (showDialog(crd2)) + makeToken(); + } + else + makeToken(); + } + public void makeToken() + { + String player = crd.getController(); + Card c = new Card(); + + c.setName("Elf Warrior"); + c.setImageName("G 1 1 Elf Warrior"); + + c.setOwner(player); + c.setController(player); + + c.setManaCost("G"); + c.setToken(true); + + c.addType("Creature"); + c.addType("Elf"); + c.addType("Warrior"); + c.setBaseAttack(1); + c.setBaseDefense(1); + + PlayerZone play = AllZone.getZone(Constant.Zone.Play, player); + play.add(c); + } + }; + ability.setStackDescription("Prowess of the Fair - " + c.getController() +" may put a 1/1 green Elf Warrior creature token onto the battlefield."); + AllZone.Stack.add(ability); + } + private static void destroyCreature_Fecundity(Card c, Card destroyed) { final Card crd = destroyed;