From 3469bd4eaa576c6a7c87375009b39fed4b380b0c Mon Sep 17 00:00:00 2001 From: drdev Date: Sat, 22 Mar 2014 16:29:11 +0000 Subject: [PATCH] Tweak previous fix --- .../src/main/java/forge/gui/GuiDisplayUtil.java | 12 ++++++++---- forge-m-base/src/forge/screens/match/views/VDev.java | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/forge-gui/src/main/java/forge/gui/GuiDisplayUtil.java b/forge-gui/src/main/java/forge/gui/GuiDisplayUtil.java index b548a9bb333..315ca856d6c 100644 --- a/forge-gui/src/main/java/forge/gui/GuiDisplayUtil.java +++ b/forge-gui/src/main/java/forge/gui/GuiDisplayUtil.java @@ -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 produced = new HashMap(); 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 lib = pPriority.getCardsIn(ZoneType.Library); final Card card = GuiChoose.oneOrNone("Choose a card", lib); if (card == null) { return; } diff --git a/forge-m-base/src/forge/screens/match/views/VDev.java b/forge-m-base/src/forge/screens/match/views/VDev.java index 1e23df293a0..2ddeec8116a 100644 --- a/forge-m-base/src/forge/screens/match/views/VDev.java +++ b/forge-m-base/src/forge/screens/match/views/VDev.java @@ -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 produced = new HashMap(); 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 lib = pPriority.getCardsIn(ZoneType.Library); final Card card = GuiChoose.oneOrNone("Choose a card", lib); if (card == null) { return; }