From bfe91ad32b05cbc6e34c996f3c160836998d8ea8 Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Sat, 20 Feb 2021 11:42:49 -0600 Subject: [PATCH] Fixed Foretold cards with cost reduced to 0 being uncastable (fixes #7607) --- .../main/java/mage/abilities/keyword/ForetellAbility.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mage/src/main/java/mage/abilities/keyword/ForetellAbility.java b/Mage/src/main/java/mage/abilities/keyword/ForetellAbility.java index 26d2527a0f0..abd1b080544 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ForetellAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ForetellAbility.java @@ -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));