mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added a GameActionUtil.showYesNoDialog() to Squee, Goblin Nabob.
This commit is contained in:
@@ -7297,19 +7297,17 @@ public class GameActionUtil {
|
|||||||
final int[] index = new int[1];
|
final int[] index = new int[1];
|
||||||
index[0] = 0;
|
index[0] = 0;
|
||||||
|
|
||||||
for(int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
Ability ability = new Ability(list.get(i), "0") {
|
Ability ability = new Ability(list.get(i), "0") {
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||||
|
|
||||||
Card c = squees.get(index[0]);
|
Card c = squees.get(index[0]);
|
||||||
if(AllZone.GameAction.isCardInZone(c, graveyard)) {
|
if (AllZone.GameAction.isCardInZone(c, graveyard)) {
|
||||||
if(player.equals(AllZone.HumanPlayer)) {
|
if (player.equals(AllZone.HumanPlayer)) {
|
||||||
String[] choices = {"Yes", "No"};
|
String question = "Return Squee, Goblin Nabob from your graveyard to your hand?";
|
||||||
Object o = AllZone.Display.getChoiceOptional(
|
if (!GameActionUtil.showYesNoDialog(c, question)) {
|
||||||
"Return Squee from your graveyard to your hand?", choices);
|
|
||||||
if(!o.equals("Yes")) {
|
|
||||||
index[0] = index[0] + 1;
|
index[0] = index[0] + 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -7320,13 +7318,14 @@ public class GameActionUtil {
|
|||||||
index[0] = index[0] + 1;
|
index[0] = index[0] + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};// Ability
|
};// Ability
|
||||||
ability.setStackDescription("Squee gets returned from graveyard to hand.");
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("Squee, Goblin Nabob - ").append(player);
|
||||||
|
sb.append(" may return Squee, Goblin Nabob from graveyard to hand.");
|
||||||
|
ability.setStackDescription(sb.toString());
|
||||||
AllZone.Stack.add(ability);
|
AllZone.Stack.add(ability);
|
||||||
} // if creatures > 0
|
} // if creatures > 0
|
||||||
|
} // upkeep_Squee()
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
private static void upkeep_AEther_Vial() {
|
private static void upkeep_AEther_Vial() {
|
||||||
|
|||||||
Reference in New Issue
Block a user