[ECL] Implement Soul Immolation

This commit is contained in:
theelk801 2026-01-20 09:31:15 -05:00
parent 18e28a888a
commit e63545be93
2 changed files with 77 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));