mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
ChangeX: fix Unbound Flourishing
This commit is contained in:
@@ -23,14 +23,17 @@ public class ChangeXEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
final MagicStack stack = activator.getGame().getStack();
|
final MagicStack stack = activator.getGame().getStack();
|
||||||
for (final SpellAbility tgtSA : sas) {
|
for (final SpellAbility tgtSA : sas) {
|
||||||
SpellAbilityStackInstance si = stack.getInstanceFromSpellAbility(tgtSA);
|
// for Unbound Flourishing, can't go over SpellAbilityStackInstances because the x is in cast SA copy
|
||||||
if (si == null) {
|
SpellAbility castSA = tgtSA.getHostCard().getCastSA();
|
||||||
// If there isn't a Stack Instance, then this doesn't matter
|
if (castSA != null && tgtSA.equals(castSA)) {
|
||||||
continue;
|
castSA.setXManaCostPaid(castSA.getXManaCostPaid() * 2);
|
||||||
|
}
|
||||||
|
// fall back to other potential cards
|
||||||
|
SpellAbilityStackInstance si = stack.getInstanceFromSpellAbility(tgtSA);
|
||||||
|
if (si != null) {
|
||||||
|
// currently hard coded, no nicer way to get the xManaPaid from that Spell/Card
|
||||||
|
si.setXManaPaid(si.getXManaPaid() * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// currently hard coded, no nicer way to get the xManaPaid from that Spell/Card
|
|
||||||
si.setXManaPaid(si.getXManaPaid() * 2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user