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
|
Name:Bringer of the White Dawn
|
||||||
ManaCost:7 W W
|
ManaCost:7 W W
|
||||||
Types:Creature Bringer
|
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
|
PT:5/5
|
||||||
K:Trample
|
K:Trample
|
||||||
SVar:AltCost:W U B R G
|
SVar:AltCost:W U B R G
|
||||||
|
|||||||
@@ -10671,71 +10671,70 @@ public class GameActionUtil {
|
|||||||
}// for
|
}// for
|
||||||
}// upkeep_Bringer_of_the_Blue_Dawn()
|
}// upkeep_Bringer_of_the_Blue_Dawn()
|
||||||
|
|
||||||
private static void upkeep_Bringer_of_the_White_Dawn() {
|
private static void upkeep_Bringer_of_the_White_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);
|
||||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||||
|
|
||||||
CardList list = new CardList(playZone.getCards());
|
CardList list = new CardList(playZone.getCards());
|
||||||
list = list.getName("Bringer of the White Dawn");
|
list = list.getName("Bringer of the White Dawn");
|
||||||
|
|
||||||
CardList artifacts = new CardList(graveyard.getCards());
|
CardList artifacts = new CardList(graveyard.getCards());
|
||||||
artifacts = artifacts.getType("Artifact");
|
artifacts = artifacts.getType("Artifact");
|
||||||
|
|
||||||
if(artifacts.size() > 0 && list.size() > 0) {
|
if (artifacts.size() > 0 && list.size() > 0) {
|
||||||
Ability ability;
|
Ability ability;
|
||||||
for(int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
ability = new Ability(list.get(i), "0") {
|
final Card crd = list.get(i);
|
||||||
@Override
|
ability = new Ability(crd, "0") {
|
||||||
public void resolve() {
|
@Override
|
||||||
String[] choices = {"Yes", "No"};
|
public void resolve() {
|
||||||
|
|
||||||
Object q = null;
|
if (player.equals(AllZone.HumanPlayer)) {
|
||||||
if(player.equals(AllZone.HumanPlayer)) {
|
String question = "Return target artifact card from your graveyard to the battlefield?";
|
||||||
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);
|
|
||||||
|
|
||||||
CardList arts = new CardList(graveyard.getCards());
|
if (GameActionUtil.showYesNoDialog(crd, question)) {
|
||||||
arts = arts.getType("Artifact");
|
|
||||||
|
|
||||||
Object o = AllZone.Display.getChoiceOptional("Pick an artifact to put into play",
|
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||||
arts.toArray());
|
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||||
if(o != null) {
|
|
||||||
Card card = (Card) o;
|
|
||||||
graveyard.remove(card);
|
|
||||||
playZone.add(card);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
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)) {
|
if (o != null) {
|
||||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
Card card = (Card) o;
|
||||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
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());
|
CardList arts = new CardList(graveyard.getCards());
|
||||||
arts = arts.getType("Artifact");
|
arts = arts.getType("Artifact");
|
||||||
|
arts.shuffle();
|
||||||
|
|
||||||
Card card = arts.get(0);
|
Card card = arts.get(0);
|
||||||
graveyard.remove(card);
|
graveyard.remove(card);
|
||||||
playZone.add(card);
|
playZone.add(card);
|
||||||
}
|
}
|
||||||
|
}// resolve()
|
||||||
|
};// Ability
|
||||||
|
|
||||||
}// resolve()
|
StringBuilder sb = new StringBuilder();
|
||||||
};// Ability
|
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();
|
AllZone.Stack.add(ability);
|
||||||
sb.append("Bringer of the White Dawn - ").append(player);
|
}// for
|
||||||
sb.append(" returns an artifact to play.");
|
}//if
|
||||||
ability.setStackDescription(sb.toString());
|
}// upkeep_Bringer_of_the_White_Dawn()
|
||||||
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}// for
|
|
||||||
}//if
|
|
||||||
}// upkeep_Bringer_of_the_White_Dawn()
|
|
||||||
|
|
||||||
|
|
||||||
private static void upkeep_Serendib_Efreet() {
|
private static void upkeep_Serendib_Efreet() {
|
||||||
|
|||||||
Reference in New Issue
Block a user