Fix amount for X spells

This commit is contained in:
tool4EvEr
2021-07-04 13:41:24 +02:00
parent b982620402
commit 12be76899a

View File

@@ -138,7 +138,7 @@ public class CostAdjustment {
count = Integer.parseInt(amount); count = Integer.parseInt(amount);
} else { } else {
if (st.hasParam("AffectedAmount")) { if (st.hasParam("AffectedAmount")) {
count = AbilityUtils.calculateAmount(hostCard, amount, sa); count = AbilityUtils.calculateAmount(card, st.hasSVar(amount) ? st.getSVar(amount) : amount, sa);
} else { } else {
count = AbilityUtils.calculateAmount(hostCard, amount, st); count = AbilityUtils.calculateAmount(hostCard, amount, st);
} }
@@ -310,7 +310,6 @@ public class CostAdjustment {
} }
private static void adjustCostByEmerge(final ManaCostBeingPaid cost, final SpellAbility sa) { private static void adjustCostByEmerge(final ManaCostBeingPaid cost, final SpellAbility sa) {
Card toSac = null; Card toSac = null;
CardCollectionView canEmerge = CardLists.filter(sa.getActivatingPlayer().getCreaturesInPlay(), CardPredicates.canBeSacrificedBy(sa)); CardCollectionView canEmerge = CardLists.filter(sa.getActivatingPlayer().getCreaturesInPlay(), CardPredicates.canBeSacrificedBy(sa));