From c3b655f6758b1e590a575c4a19ef4377698932e5 Mon Sep 17 00:00:00 2001 From: Agetian Date: Tue, 6 Feb 2018 22:17:48 +0300 Subject: [PATCH] - Do not allow the human to confirm a Reveal cost with 0 revealed cards if the minimum is more than zero (fixes e.g. Morph costs with "Reveal a X card" when the human player doesn't have that kind of card in hand). --- forge-gui/src/main/java/forge/player/HumanCostDecision.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/forge-gui/src/main/java/forge/player/HumanCostDecision.java b/forge-gui/src/main/java/forge/player/HumanCostDecision.java index e445ddf5d4e..2621cea7ac2 100644 --- a/forge-gui/src/main/java/forge/player/HumanCostDecision.java +++ b/forge-gui/src/main/java/forge/player/HumanCostDecision.java @@ -855,6 +855,9 @@ public class HumanCostDecision extends CostDecisionMakerBase { num = AbilityUtils.calculateAmount(source, amount, ability); } } + if (hand.size() < num) { + return null; + } if (num == 0) { return PaymentDecision.number(0); };