* 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).

This commit is contained in:
LevelX2 2015-04-29 10:32:33 +02:00
parent 7648ca4b4f
commit 66499bd58f

View file

@ -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;
}