From e63545be934889c3b3c2f873e368459303b7f10a Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 20 Jan 2026 09:31:15 -0500 Subject: [PATCH] [ECL] Implement Soul Immolation --- .../src/mage/cards/s/SoulImmolation.java | 75 +++++++++++++++++++ Mage.Sets/src/mage/sets/LorwynEclipsed.java | 2 + 2 files changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SoulImmolation.java diff --git a/Mage.Sets/src/mage/cards/s/SoulImmolation.java b/Mage.Sets/src/mage/cards/s/SoulImmolation.java new file mode 100644 index 00000000000..4e3f6f6c623 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SoulImmolation.java @@ -0,0 +1,75 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.VariableCostImpl; +import mage.abilities.costs.VariableCostType; +import mage.abilities.costs.common.BlightCost; +import mage.abilities.dynamicvalue.common.GetXValue; +import mage.abilities.dynamicvalue.common.GreatestAmongPermanentsValue; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.StaticFilters; +import mage.game.Game; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SoulImmolation extends CardImpl { + + public SoulImmolation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); + + // As an additional cost to cast this spell, blight X. X can't be greater than the greatest toughness among creatures you control. + this.getSpellAbility().addCost(new SoulImmolationCost()); + this.getSpellAbility().addHint(GreatestAmongPermanentsValue.TOUGHNESS_CONTROLLED_CREATURES.getHint()); + + // Soul Immolation deals X damage to each opponent and each creature they control. + this.getSpellAbility().addEffect(new DamagePlayersEffect(GetXValue.instance, TargetController.OPPONENT)); + this.getSpellAbility().addEffect(new DamageAllEffect( + GetXValue.instance, StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES + ).setText("{this} deals X damage to each opponent and each creature they control")); + } + + private SoulImmolation(final SoulImmolation card) { + super(card); + } + + @Override + public SoulImmolation copy() { + return new SoulImmolation(this); + } +} + +class SoulImmolationCost extends VariableCostImpl { + + SoulImmolationCost() { + super(VariableCostType.ADDITIONAL, "amount to blight"); + this.setText("blight X. X can't be greater than the greatest toughness among creatures you control."); + } + + private SoulImmolationCost(final SoulImmolationCost cost) { + super(cost); + } + + @Override + public SoulImmolationCost copy() { + return new SoulImmolationCost(this); + } + + @Override + public Cost getFixedCostsFromAnnouncedValue(int xValue) { + return new BlightCost(xValue); + } + + @Override + public int getMaxValue(Ability source, Game game) { + return GreatestAmongPermanentsValue.TOUGHNESS_CONTROLLED_CREATURES.calculate(game, source, null); + } +} diff --git a/Mage.Sets/src/mage/sets/LorwynEclipsed.java b/Mage.Sets/src/mage/sets/LorwynEclipsed.java index c1dc1792215..f4e28b934e9 100644 --- a/Mage.Sets/src/mage/sets/LorwynEclipsed.java +++ b/Mage.Sets/src/mage/sets/LorwynEclipsed.java @@ -346,6 +346,8 @@ public final class LorwynEclipsed extends ExpansionSet { cards.add(new SetCardInfo("Sizzling Changeling", 155, Rarity.UNCOMMON, mage.cards.s.SizzlingChangeling.class)); cards.add(new SetCardInfo("Slumbering Walker", 302, Rarity.RARE, mage.cards.s.SlumberingWalker.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Slumbering Walker", 35, Rarity.RARE, mage.cards.s.SlumberingWalker.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Soul Immolation", 156, Rarity.MYTHIC, mage.cards.s.SoulImmolation.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Soul Immolation", 321, Rarity.MYTHIC, mage.cards.s.SoulImmolation.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Soulbright Seeker", 157, Rarity.UNCOMMON, mage.cards.s.SoulbrightSeeker.class)); cards.add(new SetCardInfo("Sourbread Auntie", 158, Rarity.UNCOMMON, mage.cards.s.SourbreadAuntie.class)); cards.add(new SetCardInfo("Spell Snare", 71, Rarity.UNCOMMON, mage.cards.s.SpellSnare.class));