mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* 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:
parent
7648ca4b4f
commit
66499bd58f
1 changed files with 5 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue