* Fixed CMC calculation for transformed cards (fixes #1826).

This commit is contained in:
LevelX2 2016-04-15 14:59:36 +02:00
parent 1deb4192ba
commit 2b8f73dbcc
132 changed files with 227 additions and 179 deletions

View file

@ -263,6 +263,19 @@ public class PermanentCard extends PermanentImpl {
return super.getManaCost();
}
@Override
public int getConvertedManaCost() {
if (isTransformed()) {
// 711.4b While a double-faced permanents back face is up, it has only the characteristics of its back face.
// However, its converted mana cost is calculated using the mana cost of its front face. This is a change from previous rules.
// If a permanent is copying the back face of a double-faced card (even if the card representing that copy
// is itself a double-faced card), the converted mana cost of that permanent is 0.
return getCard().getConvertedManaCost();
}
return super.getConvertedManaCost();
}
@Override
public int getZoneChangeCounter(Game game) {
// permanent value of zone change counter stays always the same without exception of update during the process of putting the permanent onto the battlefield