Fixed Foretold cards with cost reduced to 0 being uncastable (fixes
@@ -294,6 +294,12 @@ public class ForetellAbility extends SpecialAction {
public ForetellCostAbility(String foretellCost) {
super(null, "Testing", Zone.EXILED, SpellAbilityType.BASE_ALTERNATE, SpellAbilityCastMode.NORMAL);
+ // Needed for Dream Devourer and Ethereal Valkyrie reducing the cost of a colorless CMC 2 or less spell to 0
+ // CardUtil.reduceCost returns an empty string in that case so we add a cost of 0 here
+ // https://github.com/magefree/mage/issues/7607
+ if (foretellCost != null && foretellCost.isEmpty()) {
+ foretellCost = "{0}";
+ }
this.setAdditionalCostsRuleVisible(false);
this.name = "Foretell " + foretellCost;
this.addCost(new ManaCostsImpl(foretellCost));
