- Fixed cmc calculation of cards with multiple X in their costs.

This commit is contained in:
Sloth
2012-09-13 07:37:26 +00:00
parent 6f0b456e26
commit 3548c3b3fb

View File

@@ -342,8 +342,8 @@ public final class CardUtil {
int xPaid = 0; int xPaid = 0;
// 2012-07-22 - If a card is on the stack, count the xManaCost in with it's CMC // 2012-07-22 - If a card is on the stack, count the xManaCost in with it's CMC
if (AllZoneUtil.getCardsIn(ZoneType.Stack).contains(c)) { if (AllZoneUtil.getCardsIn(ZoneType.Stack).contains(c) && c.getManaCost() != null) {
xPaid = c.getXManaCostPaid(); xPaid = c.getXManaCostPaid() * c.getManaCost().countX();
} }
return c.getManaCost().getCMC() + xPaid; return c.getManaCost().getCMC() + xPaid;
} }