Tweak previous fix

This commit is contained in:
drdev
2014-03-22 16:29:11 +00:00
parent 9d4bd7489e
commit 3469bd4eaa
2 changed files with 16 additions and 8 deletions

View File

@@ -54,11 +54,14 @@ public final class GuiDisplayUtil {
}
public static void devModeGenerateMana() {
Player player = getGame().getPhaseHandler().getPriorityPlayer();
if (player == null) { return; }
Player pPriority = getGame().getPhaseHandler().getPriorityPlayer();
if (pPriority == null) {
GuiDialog.message("No player has priority at the moment, so mana cannot be added to their pool.");
return;
}
final Card dummy = new Card(-777777);
dummy.setOwner(player);
dummy.setOwner(pPriority);
Map<String, String> produced = new HashMap<String, String>();
produced.put("Produced", "W W W W W W W U U U U U U U B B B B B B B G G G G G G G R R R R R R R 7");
final AbilityManaPart abMana = new AbilityManaPart(dummy, produced);
@@ -237,9 +240,10 @@ public final class GuiDisplayUtil {
public static void devModeTutor() {
Player pPriority = getGame().getPhaseHandler().getPriorityPlayer();
if (pPriority == null) {
GuiDialog.message("No player has priority now, can't tutor from their deck at the moment");
GuiDialog.message("No player has priority at the moment, so their deck can't be tutored from.");
return;
}
final List<Card> lib = pPriority.getCardsIn(ZoneType.Library);
final Card card = GuiChoose.oneOrNone("Choose a card", lib);
if (card == null) { return; }

View File

@@ -192,11 +192,14 @@ public class VDev extends HeaderDropDown {
}
private static void generateMana() {
Player player = FControl.getGame().getPhaseHandler().getPriorityPlayer();
if (player == null) { return; }
Player pPriority = FControl.getGame().getPhaseHandler().getPriorityPlayer();
if (pPriority == null) {
GuiDialog.message("No player has priority at the moment, so mana cannot be added to their pool.");
return;
}
final Card dummy = new Card(-777777);
dummy.setOwner(player);
dummy.setOwner(pPriority);
Map<String, String> produced = new HashMap<String, String>();
produced.put("Produced", "W W W W W W W U U U U U U U B B B B B B B G G G G G G G R R R R R R R 7");
final AbilityManaPart abMana = new AbilityManaPart(dummy, produced);
@@ -211,9 +214,10 @@ public class VDev extends HeaderDropDown {
private static void tutorForCard() {
Player pPriority = FControl.getGame().getPhaseHandler().getPriorityPlayer();
if (pPriority == null) {
GuiDialog.message("No player has priority now, can't tutor from their deck at the moment");
GuiDialog.message("No player has priority at the moment, so their deck can't be tutored from.");
return;
}
final List<Card> lib = pPriority.getCardsIn(ZoneType.Library);
final Card card = GuiChoose.oneOrNone("Choose a card", lib);
if (card == null) { return; }