mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
PlayEffect support "ConvertedManaCost" in "PlayCost$"
This commit is contained in:
@@ -363,7 +363,12 @@ public class PlayEffect extends SpellAbilityEffect {
|
|||||||
if ("ManaCost".equals(sa.getParam("PlayCost"))) {
|
if ("ManaCost".equals(sa.getParam("PlayCost"))) {
|
||||||
abCost = new Cost(source.getManaCost(), false);
|
abCost = new Cost(source.getManaCost(), false);
|
||||||
} else {
|
} else {
|
||||||
abCost = new Cost(sa.getParam("PlayCost"), false);
|
String cost = sa.getParam("PlayCost");
|
||||||
|
if (cost.contains("ConvertedManaCost")) {
|
||||||
|
final String costcmc = Integer.toString(tgtCard.getCMC());
|
||||||
|
cost = cost.replace("ConvertedManaCost", costcmc);
|
||||||
|
}
|
||||||
|
abCost = new Cost(cost, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
tgtSA = tgtSA.copyWithDefinedCost(abCost);
|
tgtSA = tgtSA.copyWithDefinedCost(abCost);
|
||||||
|
|||||||
Reference in New Issue
Block a user