- Fixed copying a SA with no mana cost not setting the WithoutManaCost param which is needed by e.g. Play effect AI to properly determine that the spell should be played without paying its mana cost.

This commit is contained in:
Agetian
2016-12-20 05:22:37 +00:00
parent 7e4ab8d0bb
commit c255cb5285

View File

@@ -781,6 +781,9 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
public SpellAbility copyWithNoManaCost() {
final SpellAbility newSA = copy();
newSA.setPayCosts(newSA.getPayCosts().copyWithNoMana());
if (!newSA.hasParam("WithoutManaCost")) {
newSA.mapParams.put("WithoutManaCost", "True");
}
newSA.setDescription(newSA.getDescription() + " (without paying its mana cost)");
return newSA;
}