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

- Updated the card text for Bringer of the White Dawn.
This commit is contained in:
jendave
2011-08-06 14:03:09 +00:00
parent 09592381ae
commit 773b9a0dbc
2 changed files with 58 additions and 59 deletions

View File

@@ -1,7 +1,7 @@
Name:Bringer of the White Dawn
ManaCost:7 W W
Types:Creature Bringer
Text:At the beginning of your upkeep, you may return target artifact card from your graveyard to play.
Text:At the beginning of your upkeep, you may return target artifact card from your graveyard to the battlefield.
PT:5/5
K:Trample
SVar:AltCost:W U B R G

View File

@@ -10685,51 +10685,50 @@ public class GameActionUtil {
if (artifacts.size() > 0 && list.size() > 0) {
Ability ability;
for (int i = 0; i < list.size(); i++) {
ability = new Ability(list.get(i), "0") {
final Card crd = list.get(i);
ability = new Ability(crd, "0") {
@Override
public void resolve() {
String[] choices = {"Yes", "No"};
Object q = null;
if (player.equals(AllZone.HumanPlayer)) {
q = AllZone.Display.getChoiceOptional("Use Bringer of the White Dawn?", choices);
if(q == null || q.equals("No")) return;
if(q.equals("Yes")) {
String question = "Return target artifact card from your graveyard to the battlefield?";
if (GameActionUtil.showYesNoDialog(crd, question)) {
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
CardList arts = new CardList(graveyard.getCards());
arts = arts.getType("Artifact");
String title = "Choose an artifact";
Object o = AllZone.Display.getChoiceOptional(title, arts.toArray());
Object o = AllZone.Display.getChoiceOptional("Pick an artifact to put into play",
arts.toArray());
if (o != null) {
Card card = (Card) o;
graveyard.remove(card);
playZone.add(card);
}
}
}
else if(player.equals(AllZone.ComputerPlayer)) {
// player is computer
else {
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
CardList arts = new CardList(graveyard.getCards());
arts = arts.getType("Artifact");
arts.shuffle();
Card card = arts.get(0);
graveyard.remove(card);
playZone.add(card);
}
}// resolve()
};// Ability
StringBuilder sb = new StringBuilder();
sb.append("Bringer of the White Dawn - ").append(player);
sb.append(" returns an artifact to play.");
sb.append(" may return target artifact card from the graveyard to the battlefield.");
ability.setStackDescription(sb.toString());
AllZone.Stack.add(ability);