forked from External/mage
* Void Winnower - Fixed that the check for even casting costs did not work correctly.
This commit is contained in:
parent
50b5602459
commit
d3000da3a3
11 changed files with 163 additions and 25 deletions
|
|
@ -491,21 +491,8 @@ public class Spell extends StackObjImpl implements Card {
|
|||
if (faceDown) {
|
||||
return 0;
|
||||
}
|
||||
for (Ability spellAbility : spellAbilities) {
|
||||
int xMultiplier = 0;
|
||||
for (String symbolString : spellAbility.getManaCosts().getSymbols()) {
|
||||
int index = symbolString.indexOf("{X}");
|
||||
while (index != -1) {
|
||||
xMultiplier++;
|
||||
symbolString = symbolString.substring(index + 3);
|
||||
index = symbolString.indexOf("{X}");
|
||||
}
|
||||
}
|
||||
if (this.getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.BASE_ALTERNATE)) {
|
||||
cmc += spellAbility.getManaCostsToPay().getX() * xMultiplier;
|
||||
} else {
|
||||
cmc += spellAbility.getManaCosts().convertedManaCost() + spellAbility.getManaCostsToPay().getX() * xMultiplier;
|
||||
}
|
||||
for (SpellAbility spellAbility : spellAbilities) {
|
||||
cmc += spellAbility.getConvertedManaCost();
|
||||
}
|
||||
if (this.getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.BASE_ALTERNATE)) {
|
||||
cmc += getCard().getManaCost().convertedManaCost();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue