Freerunning as calculateAmount (#5511)

* Freerunning as calculateAmount

* Fix desc

---------

Co-authored-by: TRT <>
This commit is contained in:
Hans Mackowiak
2024-07-05 06:16:17 +02:00
committed by GitHub
parent 608beb0aac
commit 01cc878b4d
4 changed files with 30 additions and 1 deletions

View File

@@ -1665,6 +1665,10 @@ public class AbilityUtils {
return doXMath(calculateAmount(c, sq[sa.isBargained() ? 1 : 2], ctb), expr, c, ctb);
}
if (sq[0].startsWith("Freerunning")) {
return doXMath(calculateAmount(c, sq[sa.isFreerunning() ? 1 : 2], ctb), expr, c, ctb);
}
// Count$Madness.<True>.<False>
if (sq[0].startsWith("Madness")) {
return doXMath(calculateAmount(c, sq[sa.isMadness() ? 1 : 2], ctb), expr, c, ctb);

View File

@@ -3127,7 +3127,14 @@ public class CardFactoryUtil {
newSA.putParam("Secondary", "True");
}
newSA.putParam("PrecostDesc", "Freerunning");
newSA.putParam("CostDesc", ManaCostParser.parse(k[1]));
StringBuilder costDesc = new StringBuilder();
if (!freerunningCost.isOnlyManaCost()) {
costDesc.append("");
} else {
costDesc.append(" ");
}
costDesc.append(freerunningCost.toSimpleString());
newSA.putParam("CostDesc", costDesc.toString());
// makes new SpellDescription
final StringBuilder sb = new StringBuilder();