From 5468a89514cd3bb27d0fbd387b36cf050abe6005 Mon Sep 17 00:00:00 2001 From: Muz Ali Date: Mon, 6 Jul 2026 20:36:17 -0500 Subject: [PATCH] [MSC] Implement Ultron's Auxiliary --- .../src/mage/cards/u/UltronsAuxiliary.java | 105 ++++++++++++++++++ .../mage/sets/MarvelSuperHeroesCommander.java | 1 + 2 files changed, 106 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/u/UltronsAuxiliary.java diff --git a/Mage.Sets/src/mage/cards/u/UltronsAuxiliary.java b/Mage.Sets/src/mage/cards/u/UltronsAuxiliary.java new file mode 100644 index 000000000000..2b4b27a6df85 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UltronsAuxiliary.java @@ -0,0 +1,105 @@ +package mage.cards.u; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author muz + */ +public final class UltronsAuxiliary extends CardImpl { + + public UltronsAuxiliary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.ROBOT); + this.subtype.add(SubType.VILLAIN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Menace + this.addAbility(new MenaceAbility()); + + // Whenever another artifact is put into your graveyard from the battlefield or an artifact card is put into your graveyard from anywhere other than the battlefield, put a +1/+1 counter on this creature. + this.addAbility(new UltronsAuxiliaryTriggeredAbility()); + } + + private UltronsAuxiliary(final UltronsAuxiliary card) { + super(card); + } + + @Override + public UltronsAuxiliary copy() { + return new UltronsAuxiliary(this); + } +} + +class UltronsAuxiliaryTriggeredAbility extends TriggeredAbilityImpl { + + UltronsAuxiliaryTriggeredAbility() { + super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance())); + setLeavesTheBattlefieldTrigger(true); + } + + private UltronsAuxiliaryTriggeredAbility(final UltronsAuxiliaryTriggeredAbility ability) { + super(ability); + } + + @Override + public UltronsAuxiliaryTriggeredAbility copy() { + return new UltronsAuxiliaryTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ZONE_CHANGE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + ZoneChangeEvent zEvent = (ZoneChangeEvent) event; + // Whenever another artifact enters your graveyard from the battlefield + if (zEvent.isDiesEvent() + && zEvent.isPermanentMoved() + && !zEvent.getTargetId().equals(this.getSourceId()) + && zEvent.getTarget().isArtifact(game)) { + return true; + } + Card card = game.getCard(zEvent.getTargetId()); + // Or an artifact card is put into a graveyard from anywhere other than the battlefield + if (card == null || !card.isArtifact(game)) { + return false; + } + if (zEvent.getToZone() == Zone.GRAVEYARD + && zEvent.getFromZone() != Zone.BATTLEFIELD) { + return true; + } + return false; + } + + @Override + public boolean isInUseableZone(Game game, MageObject sourceObject, GameEvent event) { + return TriggeredAbilityImpl.isInUseableZoneDiesTrigger(this, sourceObject, event, game); + } + + @Override + public String getRule() { + return "Whenever another artifact is put into your graveyard from the battlefield " + + "or an artifact card is put into your graveyard from anywhere other than the battlefield, " + + "put a +1/+1 counter on this creature."; + } +} diff --git a/Mage.Sets/src/mage/sets/MarvelSuperHeroesCommander.java b/Mage.Sets/src/mage/sets/MarvelSuperHeroesCommander.java index 6b576cc20e53..118e8b781c8e 100644 --- a/Mage.Sets/src/mage/sets/MarvelSuperHeroesCommander.java +++ b/Mage.Sets/src/mage/sets/MarvelSuperHeroesCommander.java @@ -612,6 +612,7 @@ private MarvelSuperHeroesCommander() { cards.add(new SetCardInfo("Tragic Arrogance", 323, Rarity.RARE, mage.cards.t.TragicArrogance.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ultimate Alliance", 611, Rarity.COMMON, mage.cards.u.UltimateAlliance.class)); cards.add(new SetCardInfo("Ultimo, Civilization's End", 540, Rarity.UNCOMMON, mage.cards.u.UltimoCivilizationsEnd.class)); + cards.add(new SetCardInfo("Ultron's Auxiliary", 669, Rarity.UNCOMMON, mage.cards.u.UltronsAuxiliary.class)); cards.add(new SetCardInfo("Ultron, Machine Overlord", 507, Rarity.RARE, mage.cards.u.UltronMachineOverlord.class)); cards.add(new SetCardInfo("Unclaimed Territory", 275, Rarity.UNCOMMON, mage.cards.u.UnclaimedTerritory.class)); cards.add(new SetCardInfo("Undead Hand Ninja", 670, Rarity.UNCOMMON, mage.cards.u.UndeadHandNinja.class));