forked from External/mage
* Fixed CMC calculation for transformed cards (fixes #1826).
This commit is contained in:
parent
1deb4192ba
commit
2b8f73dbcc
132 changed files with 227 additions and 179 deletions
|
|
@ -20,7 +20,7 @@ public class DiscardCostCardConvertedMana implements DynamicValue {
|
|||
DiscardCardCost discardCost = (DiscardCardCost) cost;
|
||||
int cmc = 0;
|
||||
for (Card card : discardCost.getCards()) {
|
||||
cmc += card.getManaCost().convertedManaCost();
|
||||
cmc += card.getConvertedManaCost();
|
||||
}
|
||||
return cmc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public class ExileFromHandCostCardConvertedMana implements DynamicValue {
|
|||
if (cost.isPaid() && cost instanceof ExileFromHandCost) {
|
||||
int xValue = 0;
|
||||
for (Card card : ((ExileFromHandCost) cost).getCards()) {
|
||||
xValue += card.getManaCost().convertedManaCost();
|
||||
xValue += card.getConvertedManaCost();
|
||||
}
|
||||
return xValue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class SacrificeCostConvertedMana implements DynamicValue {
|
|||
SacrificeTargetCost sacrificeCost = (SacrificeTargetCost) cost;
|
||||
int totalCMC = 0;
|
||||
for(Permanent permanent : sacrificeCost.getPermanents()) {
|
||||
totalCMC += permanent.getManaCost().convertedManaCost();
|
||||
totalCMC += permanent.getConvertedManaCost();
|
||||
}
|
||||
return totalCMC;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class TargetConvertedManaCost implements DynamicValue {
|
|||
public int calculate(Game game, Ability source, Effect effect) {
|
||||
Card card = game.getCard(source.getFirstTarget());
|
||||
if (card != null) {
|
||||
return card.getManaCost().convertedManaCost();
|
||||
return card.getConvertedManaCost();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue