From 5f65a7d08cd1e228b51c00fc31a431778860764c Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 6 Jan 2026 09:44:22 -0500 Subject: [PATCH] [ECC] Implement Auntie Ool, Cursewretch --- .../mage/cards/a/AuntieOolCursewretch.java | 115 ++++++++++++++++++ .../mage/sets/LorwynEclipsedCommander.java | 3 + 2 files changed, 118 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AuntieOolCursewretch.java diff --git a/Mage.Sets/src/mage/cards/a/AuntieOolCursewretch.java b/Mage.Sets/src/mage/cards/a/AuntieOolCursewretch.java new file mode 100644 index 00000000000..abfa1d6f50c --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AuntieOolCursewretch.java @@ -0,0 +1,115 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.costs.common.BlightCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.WardAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.game.Controllable; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +import java.util.Optional; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AuntieOolCursewretch extends CardImpl { + + public AuntieOolCursewretch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}{G}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.WARLOCK); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Ward--Blight 2. + this.addAbility(new WardAbility(new BlightCost(2))); + + // Whenever one or more -1/-1 counters are put on a creature, draw a card if you control that creature. If you don't control it, its controller loses 1 life. + this.addAbility(new AuntieOolCursewretchTriggeredAbility()); + } + + private AuntieOolCursewretch(final AuntieOolCursewretch card) { + super(card); + } + + @Override + public AuntieOolCursewretch copy() { + return new AuntieOolCursewretch(this); + } +} + +class AuntieOolCursewretchTriggeredAbility extends TriggeredAbilityImpl { + + AuntieOolCursewretchTriggeredAbility() { + super(Zone.BATTLEFIELD, new AuntieOolCursewretchEffect()); + setTriggerPhrase("Whenever one or more -1/-1 counters are put on a creature, "); + } + + private AuntieOolCursewretchTriggeredAbility(final AuntieOolCursewretchTriggeredAbility ability) { + super(ability); + } + + @Override + public AuntieOolCursewretchTriggeredAbility copy() { + return new AuntieOolCursewretchTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COUNTERS_ADDED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); + if (permanent == null + || !permanent.isCreature(game) + || !event.getData().equals(CounterType.M1M1.getName()) + || event.getAmount() < 1) { + return false; + } + this.getEffects().setValue("creature", permanent); + return true; + } +} + +class AuntieOolCursewretchEffect extends OneShotEffect { + + AuntieOolCursewretchEffect() { + super(Outcome.Benefit); + staticText = "draw a card if you control that creature. If you don't control it, its controller loses 1 life"; + } + + private AuntieOolCursewretchEffect(final AuntieOolCursewretchEffect effect) { + super(effect); + } + + @Override + public AuntieOolCursewretchEffect copy() { + return new AuntieOolCursewretchEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return Optional + .ofNullable((Permanent) getValue("creature")) + .map(Controllable::getControllerId) + .map(game::getPlayer) + .map(player -> source.isControlledBy(player.getId()) + ? player.drawCards(1, source, game) + : player.loseLife(1, game, source, false)) + .filter(x -> x > 0) + .isPresent(); + } +} diff --git a/Mage.Sets/src/mage/sets/LorwynEclipsedCommander.java b/Mage.Sets/src/mage/sets/LorwynEclipsedCommander.java index e5981a5c826..229ab4cf2a9 100644 --- a/Mage.Sets/src/mage/sets/LorwynEclipsedCommander.java +++ b/Mage.Sets/src/mage/sets/LorwynEclipsedCommander.java @@ -1,6 +1,7 @@ package mage.sets; import mage.cards.ExpansionSet; +import mage.constants.Rarity; import mage.constants.SetType; /** @@ -17,5 +18,7 @@ public final class LorwynEclipsedCommander extends ExpansionSet { private LorwynEclipsedCommander() { super("Lorwyn Eclipsed Commander", "ECC", ExpansionSet.buildDate(2026, 1, 23), SetType.SUPPLEMENTAL); this.hasBasicLands = false; // temporary + + cards.add(new SetCardInfo("Auntie Ool, Cursewretch", 2, Rarity.MYTHIC, mage.cards.a.AuntieOolCursewretch.class)); } }