* Monohybrid mana cost improves:

* fixed wrong manually pay by mana pool (it pays generic cost instead colored part of monohybrid);
 * fixed not working cost reduction effects (now monohybrid cost will be reduced correctly with some limitation, see #6130);
This commit is contained in:
Oleg Agafonov 2020-02-11 22:29:07 +04:00
parent 13ad86cb21
commit b5acf64772
9 changed files with 589 additions and 78 deletions

View file

@ -456,4 +456,23 @@ public class ManaPool implements Serializable {
manaItems.addAll(itemsCopy);
}
}
public int getColoredAmount(ManaType manaType) {
switch (manaType) {
case BLACK:
return getBlack();
case BLUE:
return getBlue();
case GREEN:
return getGreen();
case RED:
return getRed();
case WHITE:
return getWhite();
case GENERIC:
case COLORLESS:
default:
throw new IllegalArgumentException("Wrong mana type " + manaType);
}
}
}