MH3 9 cards (#5380)

This commit is contained in:
Simisays
2024-06-15 15:48:01 +02:00
committed by GitHub
parent ae4fcc8b5a
commit 4308cc3a77
10 changed files with 97 additions and 1 deletions

View File

@@ -223,7 +223,15 @@ public class CostAdjustment {
// Reduce cost
int sumGeneric = 0;
if (sa.hasParam("ReduceCost")) {
sumGeneric += AbilityUtils.calculateAmount(originalCard, sa.getParam("ReduceCost"), sa);
String cst = sa.getParam("ReduceCost");
String amt = sa.getParamOrDefault("ReduceAmount", cst);
int num = AbilityUtils.calculateAmount(originalCard, amt, sa);
if (sa.hasParam("ReduceAmount") && num > 0) {
cost.subtractManaCost(new ManaCost(new ManaCostParser(Strings.repeat(cst + " ", num))));
} else {
sumGeneric += num;
}
}
while (!reduceAbilities.isEmpty()) {