From 0a1a15ae896f33e01bdd30c4d9f56e0cfdb4e5c7 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Fri, 15 Apr 2022 12:15:08 -0400 Subject: [PATCH] StaticAbilityContinuous support MayPlay altCost being additional using "RegularCost" --- .../StaticAbilityContinuous.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java index 2460aad3bf6..c447e44b99e 100644 --- a/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java +++ b/forge-game/src/main/java/forge/game/staticability/StaticAbilityContinuous.java @@ -937,25 +937,32 @@ public final class StaticAbilityContinuous { if (controllerMayPlay && (mayPlayLimit == null || stAb.getMayPlayTurn() < mayPlayLimit)) { String mayPlayAltCost = mayPlayAltManaCost; + boolean additional = mayPlayAltCost.contains("RegularCost"); - if (mayPlayAltCost != null && mayPlayAltCost.contains("ConvertedManaCost")) { - final String costcmc = Integer.toString(affectedCard.getCMC()); - mayPlayAltCost = mayPlayAltCost.replace("ConvertedManaCost", costcmc); + if (mayPlayAltCost != null) { + if (mayPlayAltCost.contains("ConvertedManaCost")) { + final String costcmc = Integer.toString(affectedCard.getCMC()); + mayPlayAltCost = mayPlayAltCost.replace("ConvertedManaCost", costcmc); + } else if (additional) { + final String regCost = affectedCard.getManaCost().getShortString(); + mayPlayAltCost = mayPlayAltManaCost.replace("RegularCost", regCost); + + } } Player mayPlayController = params.containsKey("MayPlayPlayer") ? AbilityUtils.getDefinedPlayers(affectedCard, params.get("MayPlayPlayer"), stAb).get(0) : controller; affectedCard.setMayPlay(mayPlayController, mayPlayWithoutManaCost, - mayPlayAltCost != null ? new Cost(mayPlayAltCost, false) : null, - mayPlayWithFlash, mayPlayGrantZonePermissions, stAb); + mayPlayAltCost != null ? new Cost(mayPlayAltCost, false) : null, additional, mayPlayWithFlash, + mayPlayGrantZonePermissions, stAb); // If the MayPlay effect only affected itself, check if it is in graveyard and give other player who cast Shaman's Trance MayPlay if (stAb.hasParam("Affected") && stAb.getParam("Affected").equals("Card.Self") && affectedCard.isInZone(ZoneType.Graveyard)) { for (final Player p : game.getPlayers()) { if (p.hasKeyword("Shaman's Trance") && mayPlayController != p) { affectedCard.setMayPlay(p, mayPlayWithoutManaCost, - mayPlayAltCost != null ? new Cost(mayPlayAltCost, false) : null, + mayPlayAltCost != null ? new Cost(mayPlayAltCost, false) : null, additional, mayPlayWithFlash, mayPlayGrantZonePermissions, stAb); } }