From b9fe5feece7fcef59c78bb1e767da582acefbb4f Mon Sep 17 00:00:00 2001 From: Agetian Date: Wed, 14 Nov 2012 18:33:22 +0000 Subject: [PATCH] - Fixed a bug in the "Spend only mana on X" routine that allowed any mana to be spent after the first tapped land. --- src/main/java/forge/control/input/InputPayManaX.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/forge/control/input/InputPayManaX.java b/src/main/java/forge/control/input/InputPayManaX.java index 30960129f85..c8fcb977470 100644 --- a/src/main/java/forge/control/input/InputPayManaX.java +++ b/src/main/java/forge/control/input/InputPayManaX.java @@ -31,11 +31,7 @@ public class InputPayManaX extends InputPayMana { colorsPaid = sa.getSourceCard().getColorsPaid(); costMana = costMana0; strX = Integer.toString(costMana.getXMana()); - if (colorX != "") { - manaCost = new ManaCost(colorX); - } else { - manaCost = new ManaCost(strX); - } + manaCost = new ManaCost(strX); } @Override @@ -61,7 +57,11 @@ public class InputPayManaX extends InputPayMana { // selectCard @Override public void selectCard(final Card card) { - this.manaCost = InputPayManaCostUtil.activateManaAbility(sa, card, this.manaCost); + if (!this.colorX.equals("")) { + this.manaCost = InputPayManaCostUtil.activateManaAbility(sa, card, new ManaCost(this.colorX)); + } else { + this.manaCost = InputPayManaCostUtil.activateManaAbility(sa, card, this.manaCost); + } if (this.manaCost.isPaid()) { if (!this.colorsPaid.contains(this.manaCost.getColorsPaid())) { this.colorsPaid += this.manaCost.getColorsPaid();