Fix 107.3j

This commit is contained in:
tool4EvEr
2022-04-13 12:57:06 +02:00
parent 16613fe1d0
commit 12774df929
2 changed files with 11 additions and 11 deletions

View File

@@ -1715,6 +1715,12 @@ public class AbilityUtils {
return doXMath(root.getXManaCostPaid(), expr, c, ctb); return doXMath(root.getXManaCostPaid(), expr, c, ctb);
} }
// 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 doXMath(0, expr, c, ctb);
}
if (root.isTrigger()) { if (root.isTrigger()) {
Trigger t = root.getTrigger(); Trigger t = root.getTrigger();
if (t == null) { if (t == null) {
@@ -1755,17 +1761,9 @@ public class AbilityUtils {
} }
} }
// If the chosen creature has X in its mana cost, that X is considered to be 0. if (root.isReplacementAbility() && sa.hasParam("ETB")) {
// 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 doXMath(0, expr, c, ctb);
}
if (root.isReplacementAbility()) {
if (sa.hasParam("ETB")) {
return doXMath(c.getXManaCostPaid(), expr, c, ctb); return doXMath(c.getXManaCostPaid(), expr, c, ctb);
} }
}
return doXMath(0, expr, c, ctb); return doXMath(0, expr, c, ctb);
} }

View File

@@ -174,8 +174,10 @@ public class CardFactory {
if (targetSA.isBestow()) { if (targetSA.isBestow()) {
c.animateBestow(); c.animateBestow();
} }
return c; return c;
} }
/** /**
* <p> * <p>
* copySpellAbilityAndPossiblyHost. * copySpellAbilityAndPossiblyHost.
@@ -306,7 +308,7 @@ public class CardFactory {
buildPlaneAbilities(card); buildPlaneAbilities(card);
} }
CardFactoryUtil.setupKeywordedAbilities(card); // Should happen AFTER setting left/right split abilities to set Fuse ability to both sides CardFactoryUtil.setupKeywordedAbilities(card); // Should happen AFTER setting left/right split abilities to set Fuse ability to both sides
card.getView().updateState(card); card.updateStateForView();
} }
private static void buildPlaneAbilities(Card card) { private static void buildPlaneAbilities(Card card) {