Fixed Foretold cards with cost reduced to 0 being uncastable (fixes #7607)

This commit is contained in:
Daniel Bomar 2021-02-20 11:42:49 -06:00
parent 238ab4fcc8
commit bfe91ad32b
No known key found for this signature in database
GPG key ID: C86C8658F4023918

View file

@ -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));