mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- 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:
@@ -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
|
||||
|
||||
@@ -10671,71 +10671,70 @@ public class GameActionUtil {
|
||||
}// for
|
||||
}// upkeep_Bringer_of_the_Blue_Dawn()
|
||||
|
||||
private static void upkeep_Bringer_of_the_White_Dawn() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
private static void upkeep_Bringer_of_the_White_Dawn() {
|
||||
final Player player = AllZone.Phase.getPlayerTurn();
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
|
||||
CardList list = new CardList(playZone.getCards());
|
||||
list = list.getName("Bringer of the White Dawn");
|
||||
CardList list = new CardList(playZone.getCards());
|
||||
list = list.getName("Bringer of the White Dawn");
|
||||
|
||||
CardList artifacts = new CardList(graveyard.getCards());
|
||||
artifacts = artifacts.getType("Artifact");
|
||||
CardList artifacts = new CardList(graveyard.getCards());
|
||||
artifacts = artifacts.getType("Artifact");
|
||||
|
||||
if(artifacts.size() > 0 && list.size() > 0) {
|
||||
Ability ability;
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
ability = new Ability(list.get(i), "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
String[] choices = {"Yes", "No"};
|
||||
if (artifacts.size() > 0 && list.size() > 0) {
|
||||
Ability ability;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
final Card crd = list.get(i);
|
||||
ability = new Ability(crd, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
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")) {
|
||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
if (player.equals(AllZone.HumanPlayer)) {
|
||||
String question = "Return target artifact card from your graveyard to the battlefield?";
|
||||
|
||||
CardList arts = new CardList(graveyard.getCards());
|
||||
arts = arts.getType("Artifact");
|
||||
if (GameActionUtil.showYesNoDialog(crd, question)) {
|
||||
|
||||
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);
|
||||
}
|
||||
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());
|
||||
|
||||
else if(player.equals(AllZone.ComputerPlayer)) {
|
||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
if (o != null) {
|
||||
Card card = (Card) o;
|
||||
graveyard.remove(card);
|
||||
playZone.add(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 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");
|
||||
CardList arts = new CardList(graveyard.getCards());
|
||||
arts = arts.getType("Artifact");
|
||||
arts.shuffle();
|
||||
|
||||
Card card = arts.get(0);
|
||||
graveyard.remove(card);
|
||||
playZone.add(card);
|
||||
}
|
||||
Card card = arts.get(0);
|
||||
graveyard.remove(card);
|
||||
playZone.add(card);
|
||||
}
|
||||
}// resolve()
|
||||
};// Ability
|
||||
|
||||
}// resolve()
|
||||
};// Ability
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Bringer of the White Dawn - ").append(player);
|
||||
sb.append(" may return target artifact card from the graveyard to the battlefield.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Bringer of the White Dawn - ").append(player);
|
||||
sb.append(" returns an artifact to play.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
AllZone.Stack.add(ability);
|
||||
}// for
|
||||
}//if
|
||||
}// upkeep_Bringer_of_the_White_Dawn()
|
||||
AllZone.Stack.add(ability);
|
||||
}// for
|
||||
}//if
|
||||
}// upkeep_Bringer_of_the_White_Dawn()
|
||||
|
||||
|
||||
private static void upkeep_Serendib_Efreet() {
|
||||
|
||||
Reference in New Issue
Block a user