From f76686c6cb34684fdfcd0494cb7f4c40f9ea1c6e Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 13:56:44 +0000 Subject: [PATCH] - Updated the card text for Witch-Maw Nephilim. - Added a GameActionUtil.showYesNoDialog() to Witch-Maw Nephilim. --- res/cardsfolder/witch_maw_nephilim.txt | 2 +- src/forge/GameActionUtil.java | 70 +++++++++++++------------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/res/cardsfolder/witch_maw_nephilim.txt b/res/cardsfolder/witch_maw_nephilim.txt index 113a40d2354..a4a7a257ad6 100644 --- a/res/cardsfolder/witch_maw_nephilim.txt +++ b/res/cardsfolder/witch_maw_nephilim.txt @@ -1,7 +1,7 @@ Name:Witch-Maw Nephilim ManaCost:G W U B Types:Creature Nephilim -Text:Whenever you play a spell, you may put two +1/+1 counters on Witch-Maw Nephilim.\r\nWhenever Witch-Maw Nephilim attacks, it gains trample until end of turn if its power is 10 or greater. +Text:Whenever you cast a spell, you may put two +1/+1 counters on Witch-Maw Nephilim.\r\nWhenever Witch-Maw Nephilim attacks, it gains trample until end of turn if its power is 10 or greater. PT:1/1 SVar:BuffedBy:Spell SVar:Rarity:Rare diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 354b06e6f86..c924c0de958 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -2367,49 +2367,47 @@ public class GameActionUtil { }// Voracious Hatchling - public static void playCard_Witch_Maw_Nephilim(Card c) { - final Player controller = c.getController(); + public static void playCard_Witch_Maw_Nephilim(Card c) { + final Player controller = c.getController(); - final PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, controller); + final PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, controller); - CardList list = new CardList(); - list.addAll(play.getCards()); + CardList list = new CardList(); + list.addAll(play.getCards()); - list = list.getName("Witch-Maw Nephilim"); + list = list.getName("Witch-Maw Nephilim"); - if(list.size() > 0) { + if (list.size() > 0) { - for(int i = 0; i < list.size(); i++) { - final Card card = list.get(i); + for (int i = 0; i < list.size(); i++) { + final Card card = list.get(i); - Ability ability2 = new Ability(card, "0") { - @Override - public void resolve() { + Ability ability2 = new Ability(card, "0") { + @Override + public void resolve() { - if(card.getController().equals(AllZone.HumanPlayer)) { - String[] choices = {"Yes", "No"}; - Object choice = AllZone.Display.getChoice("Put two +1/+1 on Witch-Maw Nephilim?", - choices); - if(choice.equals("Yes")) { - card.addCounter(Counters.P1P1, 2); - } - } - if(card.getController().equals(AllZone.ComputerPlayer)) { - card.addCounter(Counters.P1P1, 2); - } - } - - }; // ability2 - - StringBuilder sb = new StringBuilder(); - sb.append(card.getName()).append(" - ").append(c.getController()); - sb.append(" played a spell, you may put two +1/+1 counters on Witch-Maw Nephilim."); - ability2.setStackDescription(sb.toString()); - - AllZone.Stack.add(ability2); - } - } - }// Witch-Maw Nephilim + if (card.getController().equals(AllZone.HumanPlayer)) { + String question = "Put two +1/+1 counters on Witch-Maw Nephilim?"; + + if (GameActionUtil.showYesNoDialog(card, question)) { + card.addCounter(Counters.P1P1, 2); + } + } + if (card.getController().equals(AllZone.ComputerPlayer)) { + card.addCounter(Counters.P1P1, 2); + } + } + }; // ability2 + + StringBuilder sb = new StringBuilder(); + sb.append(card.getName()).append(" - ").append(c.getController()); + sb.append(" played a spell and may put two +1/+1 counters on Witch-Maw Nephilim."); + ability2.setStackDescription(sb.toString()); + + AllZone.Stack.add(ability2); + } + } + }// Witch-Maw Nephilim public static void playCard_Gelectrode(Card c) { final Player controller = c.getController();