From 94ab8448dc5f19b274328253aa87c824d0b906e8 Mon Sep 17 00:00:00 2001 From: Sloth Date: Tue, 25 Sep 2012 21:10:38 +0000 Subject: [PATCH] - Little fix for two canPay functions.. --- src/main/java/forge/card/cost/CostDiscard.java | 3 +++ src/main/java/forge/card/cost/CostReveal.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/main/java/forge/card/cost/CostDiscard.java b/src/main/java/forge/card/cost/CostDiscard.java index 019f9fdf699..c9ec4c6c039 100644 --- a/src/main/java/forge/card/cost/CostDiscard.java +++ b/src/main/java/forge/card/cost/CostDiscard.java @@ -123,6 +123,9 @@ public class CostDiscard extends CostPartWithList { final Card c = activator.getLastDrawnCard(); return handList.contains(c); } else { + if (ability.isSpell()) { + handList.remove(source);// can't pay for itself + } if (!type.equals("Random")) { handList = handList.getValidCards(type.split(";"), activator, source); } diff --git a/src/main/java/forge/card/cost/CostReveal.java b/src/main/java/forge/card/cost/CostReveal.java index 41d4712a415..618081ff57c 100644 --- a/src/main/java/forge/card/cost/CostReveal.java +++ b/src/main/java/forge/card/cost/CostReveal.java @@ -71,11 +71,15 @@ public class CostReveal extends CostPartWithList { } else if (this.getType().equals("Hand")) { return true; } else { + if (ability.isSpell()) { + handList.remove(source); // can't pay for itself + } handList = handList.getValidCards(type.split(";"), activator, source); if ((amount != null) && (amount > handList.size())) { // not enough cards in hand to pay return false; } + System.out.println("revealcost - " + amount + type + handList); } return true;