- Fixed a bug in the "Spend only <color> mana on X" routine that allowed any mana to be spent after the first tapped land.

This commit is contained in:
Agetian
2012-11-14 18:33:22 +00:00
parent 814ed7efd8
commit b9fe5feece

View File

@@ -31,12 +31,8 @@ public class InputPayManaX extends InputPayMana {
colorsPaid = sa.getSourceCard().getColorsPaid(); colorsPaid = sa.getSourceCard().getColorsPaid();
costMana = costMana0; costMana = costMana0;
strX = Integer.toString(costMana.getXMana()); strX = Integer.toString(costMana.getXMana());
if (colorX != "") {
manaCost = new ManaCost(colorX);
} else {
manaCost = new ManaCost(strX); manaCost = new ManaCost(strX);
} }
}
@Override @Override
public void showMessage() { public void showMessage() {
@@ -61,7 +57,11 @@ public class InputPayManaX extends InputPayMana {
// selectCard // selectCard
@Override @Override
public void selectCard(final Card card) { public void selectCard(final Card card) {
if (!this.colorX.equals("")) {
this.manaCost = InputPayManaCostUtil.activateManaAbility(sa, card, new ManaCost(this.colorX));
} else {
this.manaCost = InputPayManaCostUtil.activateManaAbility(sa, card, this.manaCost); this.manaCost = InputPayManaCostUtil.activateManaAbility(sa, card, this.manaCost);
}
if (this.manaCost.isPaid()) { if (this.manaCost.isPaid()) {
if (!this.colorsPaid.contains(this.manaCost.getColorsPaid())) { if (!this.colorsPaid.contains(this.manaCost.getColorsPaid())) {
this.colorsPaid += this.manaCost.getColorsPaid(); this.colorsPaid += this.manaCost.getColorsPaid();