From 2f93647196f71492d2db64d485c06aab1acb89c1 Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Wed, 7 Sep 2022 23:15:18 -0400 Subject: [PATCH] Fix IllegalArgumentException on Volcano Hellion echo trigger --- .../java/mage/abilities/effects/keyword/EchoEffect.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/EchoEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/EchoEffect.java index 8f9a058608..abe6d19a05 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/EchoEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/EchoEffect.java @@ -3,7 +3,7 @@ package mage.abilities.effects.keyword; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.costs.Cost; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.OneShotEffect; import mage.constants.AsThoughEffectType; @@ -41,13 +41,13 @@ public class EchoEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { if (cost == null) { - cost = new ManaCostsImpl<>(Integer.toString(amount.calculate(game, source, this))); + cost = new GenericManaCost(amount.calculate(game, source, this)); } Player controller = game.getPlayer(source.getControllerId()); if (controller != null && source.getSourceObjectIfItStillExists(game) != null) { if (game.getContinuousEffects().asThough(source.getSourceId(), AsThoughEffectType.PAY_0_ECHO, source, source.getControllerId(), game) != null) { - Cost altCost = new ManaCostsImpl<>("{0}"); + Cost altCost = new GenericManaCost(0); if (controller.chooseUse(Outcome.Benefit, "Pay {0} instead of the echo cost?", source, game)) { altCost.clearPaid(); if (altCost.pay(source, game, source, source.getControllerId(), false, null)) {