From c65031ea31526fae5676b9ea0fcbb86ee00b4e1d Mon Sep 17 00:00:00 2001 From: drdev Date: Tue, 10 Dec 2013 00:17:46 +0000 Subject: [PATCH] Avoid removing source card from lists --- forge-gui/src/main/java/forge/game/cost/CostDiscard.java | 7 ------- forge-gui/src/main/java/forge/game/cost/CostExile.java | 7 ------- 2 files changed, 14 deletions(-) diff --git a/forge-gui/src/main/java/forge/game/cost/CostDiscard.java b/forge-gui/src/main/java/forge/game/cost/CostDiscard.java index b5080b6c3e0..5e422429b1e 100644 --- a/forge-gui/src/main/java/forge/game/cost/CostDiscard.java +++ b/forge-gui/src/main/java/forge/game/cost/CostDiscard.java @@ -121,9 +121,6 @@ public class CostDiscard extends CostPartWithList { } } else { - if (source.isInZone(ZoneType.Hand)) { - handList.remove(source); //source can't pay for itself - } if (type.equals("Hand")) { // this will always work } @@ -178,10 +175,6 @@ public class CostDiscard extends CostPartWithList { return handList.contains(source) && executePayment(ability, source); } - if (source.isInZone(ZoneType.Hand)) { - handList.remove(source); //ensure source can't be discarded to pay its own additional cost - } - if (discardType.equals("Hand")) { return executePayment(ability, handList); } diff --git a/forge-gui/src/main/java/forge/game/cost/CostExile.java b/forge-gui/src/main/java/forge/game/cost/CostExile.java index 8dfa645fb0b..adeba0ff013 100644 --- a/forge-gui/src/main/java/forge/game/cost/CostExile.java +++ b/forge-gui/src/main/java/forge/game/cost/CostExile.java @@ -183,9 +183,6 @@ public class CostExile extends CostPartWithList { return list.contains(source); } - if (source.isInZone(this.from)) { - list.remove(source); //source can't pay for itself - } list = CardLists.getValidCards(list, type.split(";"), activator, source); final Integer amount = this.convertAmount(); @@ -248,10 +245,6 @@ public class CostExile extends CostPartWithList { return source.getZone() == activator.getZone(from) && GuiDialog.confirm(source, source.getName() + " - Exile?") && executePayment(ability, source); } - if (source.isInZone(this.from)) { - list.remove(source); //ensure source can't be exiled to pay its own additional cost - } - if (type.equals("All")) { for (final Card card : list) { executePayment(ability, card);