From 31a0b252e6cbe4a104c2de4bf2f0a5a922de1ecf Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 07:19:16 +0000 Subject: [PATCH] - Bugfix: Cost_Payment stops a second SacrificeThis activation when interacting with Whenever keyword by checking if the card is in play. --- src/forge/Cost_Payment.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/forge/Cost_Payment.java b/src/forge/Cost_Payment.java index 6b826b91a01..0042e96af33 100644 --- a/src/forge/Cost_Payment.java +++ b/src/forge/Cost_Payment.java @@ -127,7 +127,6 @@ public class Cost_Payment { } if (!payLife && cost.getLifeCost()){ // pay life here - // todo: should ask with a yes/no popup box to pay life? StringBuilder sb = new StringBuilder(); sb.append(getCard().getName()); sb.append(" - Pay "); @@ -250,7 +249,7 @@ public class Cost_Payment { @Override public void showMessage() { Card card = spell.getSourceCard(); - if(card.getController().equals(Constant.Player.Human)) { + if(card.getController().equals(Constant.Player.Human) && AllZone.GameAction.isCardInPlay(card)) { StringBuilder sb = new StringBuilder(); sb.append(card.getName()); sb.append(" - Sacrifice?"); @@ -259,8 +258,8 @@ public class Cost_Payment { JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, possibleValues, possibleValues[0]); if(choice.equals(0)) { - AllZone.GameAction.sacrifice(card); payment.setPaySac(true); + AllZone.GameAction.sacrifice(card); stop(); payment.payCost(); } @@ -300,8 +299,8 @@ public class Cost_Payment { @Override public void selectCard(Card card, PlayerZone zone) { if(typeList.contains(card)) { - AllZone.GameAction.sacrifice(card); payment.setPaySac(true); + AllZone.GameAction.sacrifice(card); stop(); payment.payCost(); }