From 66499bd58f01a52491a7f73a09a773ec9ef1fcba Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 29 Apr 2015 10:32:33 +0200 Subject: [PATCH] * Mana Payment - Fixed a bug where the check if a specific colorored mana was payed could give back the wrong result (allowed e.g. the player sometimes to pay colored hybrid mana with the wrong colored mana). --- .../abilities/costs/mana/ManaCostImpl.java | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java b/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java index 33af3a210a9..e22723c32fe 100644 --- a/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java +++ b/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java @@ -178,25 +178,15 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost { protected boolean isColoredPaid(ColoredManaSymbol mana) { switch (mana) { case B: - if (this.payment.getBlack() > 0) { - return true; - } + return this.payment.getBlack() > 0; case U: - if (this.payment.getBlue() > 0) { - return true; - } + return this.payment.getBlue() > 0; case W: - if (this.payment.getWhite() > 0) { - return true; - } + return this.payment.getWhite() > 0; case G: - if (this.payment.getGreen() > 0) { - return true; - } + return this.payment.getGreen() > 0; case R: - if (this.payment.getRed() > 0) { - return true; - } + return this.payment.getRed() > 0; } return false; }