- Added a GameActionUtil.showYesNoDialog() to Bringer of the Green Dawn.

- Updated the card text for Bringer of the Green Dawn.
This commit is contained in:
jendave
2011-08-06 14:02:53 +00:00
parent e2eb58f8b3
commit 5d686f0acf
2 changed files with 37 additions and 36 deletions

View File

@@ -1,7 +1,7 @@
Name:Bringer of the Green Dawn Name:Bringer of the Green Dawn
ManaCost:7 G G ManaCost:7 G G
Types:Creature Bringer Types:Creature Bringer
Text:At the beginning of your upkeep, you may put a 3/3 green Beast creature token into play. Text:At the beginning of your upkeep, you may put a 3/3 green Beast creature token onto the battlefield.
PT:5/5 PT:5/5
K:Trample K:Trample
SVar:AltCost:W U B R G SVar:AltCost:W U B R G

View File

@@ -10618,45 +10618,46 @@ public class GameActionUtil {
}// for }// for
}// upkeep_Dragon_Broodmother() }// upkeep_Dragon_Broodmother()
private static void upkeep_Bringer_of_the_Green_Dawn() { private static void upkeep_Bringer_of_the_Green_Dawn() {
final Player player = AllZone.Phase.getPlayerTurn(); final Player player = AllZone.Phase.getPlayerTurn();
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player); PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
CardList list = new CardList(playZone.getCards()); CardList list = new CardList(playZone.getCards());
list = list.getName("Bringer of the Green Dawn"); list = list.getName("Bringer of the Green Dawn");
Ability ability; Ability ability;
for(int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
final Card crd = list.get(i); final Card crd = list.get(i);
ability = new Ability(list.get(i), "0") { ability = new Ability(list.get(i), "0") {
@Override @Override
public void resolve() { public void resolve() {
String[] choices = {"Yes", "No"};
Object q = null; if (player.equals(AllZone.HumanPlayer)) {
if(player.equals(AllZone.HumanPlayer)) { String question = "Place a 3/3 green Beast creature token onto the battlefield?";
q = AllZone.Display.getChoiceOptional("Use Bringer of the Green Dawn?", choices);
if(q == null || q.equals("No")) return; if (GameActionUtil.showYesNoDialog(crd, question)) {
if(q.equals("Yes")) { makeBeastToken();
CardFactoryUtil.makeToken("Beast", "G 3 3 Beast", crd.getController(), "G", new String[] { }
"Creature", "Beast"}, 3, 3, new String[] {""}); } // player is computer
} else {
} else if(player.equals(AllZone.ComputerPlayer)) { makeBeastToken();
CardFactoryUtil.makeToken("Beast", "G 3 3 Beast", crd.getController(), "G", new String[] { }
"Creature", "Beast"}, 3, 3, new String[] {""}); }// resolve()
}
}// resolve()
};// Ability
StringBuilder sb = new StringBuilder(); private void makeBeastToken() {
sb.append("Bringer of the Green Dawn - ").append(player); CardFactoryUtil.makeToken("Beast", "G 3 3 Beast", crd.getController(), "G",
sb.append(" puts a 3/3 Green Beast token creature into play."); new String[] {"Creature", "Beast"}, 3, 3, new String[] {""});
ability.setStackDescription(sb.toString()); }
};// Ability
AllZone.Stack.add(ability); StringBuilder sb = new StringBuilder();
}// for sb.append("Bringer of the Green Dawn - ").append(player);
}// upkeep_Bringer_of_the_Green_Dawn() sb.append(" may place a 3/3 Green Beast token creature onto the battlefield.");
ability.setStackDescription(sb.toString());
AllZone.Stack.add(ability);
}// for
}// upkeep_Bringer_of_the_Green_Dawn()
private static void upkeep_Bringer_of_the_Blue_Dawn() { private static void upkeep_Bringer_of_the_Blue_Dawn() {
final Player player = AllZone.Phase.getPlayerTurn(); final Player player = AllZone.Phase.getPlayerTurn();