Merge branch 'card-fixes' into 'master'

Card fixes

Closes #1763

See merge request core-developers/forge!4142
This commit is contained in:
Michael Kamensky
2021-03-08 04:15:31 +00:00
3 changed files with 8 additions and 8 deletions

View File

@@ -1616,12 +1616,6 @@ public class AbilityUtils {
return CardFactoryUtil.doXMath(root.getXManaCostPaid(), expr, c);
}
// If the chosen creature has X in its mana cost, that X is considered to be 0.
// The value of X in Altered Egos last ability will be whatever value was chosen for X while casting Altered Ego.
if (sa.isCopiedTrait() || !sa.getHostCard().equals(c)) {
return CardFactoryUtil.doXMath(0, expr, c);
}
if (root.isTrigger()) {
Trigger t = root.getTrigger();
if (t == null) {
@@ -1662,6 +1656,12 @@ public class AbilityUtils {
}
}
// If the chosen creature has X in its mana cost, that X is considered to be 0.
// The value of X in Altered Egos last ability will be whatever value was chosen for X while casting Altered Ego.
if (sa.isCopiedTrait() || !sa.getHostCard().equals(c)) {
return CardFactoryUtil.doXMath(0, expr, c);
}
if (root.isReplacementAbility()) {
if (sa.hasParam("ETB")) {
return CardFactoryUtil.doXMath(c.getXManaCostPaid(), expr, c);