Add ignored failing test and fix bug for hybrid mana payments (#9566)

This commit is contained in:
Alex Vasile 2022-09-27 21:51:49 -04:00 committed by GitHub
parent b1b78d6db0
commit 01ee54d416
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 10 deletions

View file

@ -62,37 +62,37 @@ public class HybridManaCost extends ManaCostImpl {
public boolean testPay(Mana testMana) {
switch (mana1) {
case B:
if (testMana.getBlack() > 0) {
if (testMana.getBlack() > 0 || testMana.getAny() > 0) {
return true;
}
case U:
if (testMana.getBlue() > 0) {
if (testMana.getBlue() > 0 || testMana.getAny() > 0) {
return true;
}
case R:
if (testMana.getRed() > 0) {
if (testMana.getRed() > 0 || testMana.getAny() > 0) {
return true;
}
case W:
if (testMana.getWhite() > 0) {
if (testMana.getWhite() > 0 || testMana.getAny() > 0) {
return true;
}
case G:
if (testMana.getGreen() > 0) {
if (testMana.getGreen() > 0 || testMana.getAny() > 0) {
return true;
}
}
switch (mana2) {
case B:
return testMana.getBlack() > 0;
return testMana.getBlack() > 0 || testMana.getAny() > 0;
case U:
return testMana.getBlue() > 0;
return testMana.getBlue() > 0 || testMana.getAny() > 0;
case R:
return testMana.getRed() > 0;
return testMana.getRed() > 0 || testMana.getAny() > 0;
case W:
return testMana.getWhite() > 0;
return testMana.getWhite() > 0 || testMana.getAny() > 0;
case G:
return testMana.getGreen() > 0;
return testMana.getGreen() > 0 || testMana.getAny() > 0;
}
return false;
}