From 1f3dc0ac571a38c4c3c2d9b592e040a1333c618b Mon Sep 17 00:00:00 2001 From: Northmoc Date: Thu, 5 Nov 2020 16:06:44 -0500 Subject: [PATCH] - remove Keyword:CardManaCost when targeted card has no mana cost --- .../java/forge/game/ability/effects/PumpEffect.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/forge-game/src/main/java/forge/game/ability/effects/PumpEffect.java b/forge-game/src/main/java/forge/game/ability/effects/PumpEffect.java index c4c21832b5b..310ee8a4b75 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/PumpEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/PumpEffect.java @@ -1,5 +1,7 @@ package forge.game.ability.effects; +import com.google.common.base.Predicate; +import com.google.common.collect.Iterables; import forge.GameCommand; import forge.card.CardType; import forge.game.Game; @@ -404,6 +406,17 @@ public class PumpEffect extends SpellAbilityEffect { // substitute specific tgtC mana cost for keyword placeholder CardManaCost if (sa.getParam("KW").contains("CardManaCost")) { String cost = tgtC.getManaCost().getShortString(); + Iterables.removeIf(keywords, new Predicate() { + @Override + public boolean apply(String input) { + if (input.contains("CardManaCost")) { + if (tgtC.getManaCost().isNoCost()) { + return true; + } + } + return false; + } + }); for (int i = 0; i < keywords.size(); i++) { keywords.set(i, TextUtil.fastReplace(keywords.get(i), "CardManaCost", cost)); }