- Alternative Cost for spells should be added to all spells on the card, not only the first spell ability (fixes interaction with split cards, among possibly other things).

This commit is contained in:
Agetian
2017-07-28 13:45:14 +00:00
parent 839ced1b32
commit 53f0544da8

View File

@@ -3564,10 +3564,7 @@ public class CardFactoryUtil {
if (keyword.startsWith("Alternative Cost") && !card.isLand()) { if (keyword.startsWith("Alternative Cost") && !card.isLand()) {
final String[] kw = keyword.split(":"); final String[] kw = keyword.split(":");
String costStr = kw[1]; String costStr = kw[1];
final SpellAbility sa = card.getFirstSpellAbility(); for (SpellAbility sa: card.getBasicSpells()) {
if (sa == null) {
return;
}
final SpellAbility newSA = sa.copy(); final SpellAbility newSA = sa.copy();
newSA.setBasicSpell(false); newSA.setBasicSpell(false);
if (costStr.equals("ConvertedManaCost")) { if (costStr.equals("ConvertedManaCost")) {
@@ -3584,6 +3581,7 @@ public class CardFactoryUtil {
kws.addSpellAbility(newSA); kws.addSpellAbility(newSA);
} }
card.addSpellAbility(newSA); card.addSpellAbility(newSA);
}
} else if (keyword.equals("Aftermath")) { } else if (keyword.equals("Aftermath")) {
// Aftermath does modify existing SA, and does not add new one // Aftermath does modify existing SA, and does not add new one