* Fixed calculation of converted mana costs for spells on the stack (fixes #459). Added test. Some minor formattings.

This commit is contained in:
LevelX2 2014-07-19 15:17:46 +02:00
parent acd5db9e62
commit 6bd1a9c7ca
8 changed files with 117 additions and 8 deletions

View file

@ -601,7 +601,7 @@ public class Spell implements StackObject, Card {
public int getConvertedManaCost() {
int cmc = 0;
for (Ability spellAbility: spellAbilities) {
cmc += spellAbility.getManaCostsToPay().convertedManaCost();
cmc += spellAbility.getManaCosts().convertedManaCost() + spellAbility.getManaCostsToPay().getX();
}
return cmc;
}