From 201edec5f93b9f9152546d2e8e9f0b4a8d7c4f3e Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Wed, 21 Feb 2024 04:36:21 +0000 Subject: [PATCH] [MKC] Implement Mirko, Obsessive Theorist (#11813) --- .../mage/cards/m/MirkoObsessiveTheorist.java | 80 +++++++++++++++++++ .../sets/MurdersAtKarlovManorCommander.java | 3 + 2 files changed, 83 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MirkoObsessiveTheorist.java diff --git a/Mage.Sets/src/mage/cards/m/MirkoObsessiveTheorist.java b/Mage.Sets/src/mage/cards/m/MirkoObsessiveTheorist.java new file mode 100644 index 00000000000..dd325ba83ee --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MirkoObsessiveTheorist.java @@ -0,0 +1,80 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; +import mage.abilities.common.SurveilTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldWithCounterTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class MirkoObsessiveTheorist extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("creature with power less than this creature's"); + + static { + filter.add(MirkoObsessiveTheoristPredicate.instance); + } + + public MirkoObsessiveTheorist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}"); + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.VAMPIRE, SubType.DETECTIVE); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Whenever you surveil, put a +1/+1 counter on Mirko, Obsessive Theorist. + this.addAbility(new SurveilTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()))); + + // At the beginning of your end step, you may return target creature card with power less than Mirko's from your graveyard to the battlefield with a finality counter on it. + Ability ability = new BeginningOfYourEndStepTriggeredAbility( + new ReturnFromGraveyardToBattlefieldWithCounterTargetEffect(CounterType.FINALITY.createInstance()) + .setText("you may return target creature card with power less than {this}'s from your graveyard to the " + + "battlefield with a finality counter on it. (If it would die, exile it instead.)"),true + ); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + private MirkoObsessiveTheorist(final MirkoObsessiveTheorist card) { + super(card); + } + + @Override + public MirkoObsessiveTheorist copy() { + return new MirkoObsessiveTheorist(this); + } +} + +enum MirkoObsessiveTheoristPredicate implements ObjectSourcePlayerPredicate { + instance; + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + Permanent sourcePermanent = input.getSource().getSourcePermanentOrLKI(game); + return sourcePermanent != null && input.getObject().getPower().getValue() <= sourcePermanent.getPower().getValue(); + } +} diff --git a/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java b/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java index 8018492d5f9..a70cd941784 100644 --- a/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java +++ b/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java @@ -150,6 +150,9 @@ public final class MurdersAtKarlovManorCommander extends ExpansionSet { cards.add(new SetCardInfo("Merchant of Truth", 11, Rarity.RARE, mage.cards.m.MerchantOfTruth.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Merchant of Truth", 322, Rarity.RARE, mage.cards.m.MerchantOfTruth.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mind Stone", 232, Rarity.UNCOMMON, mage.cards.m.MindStone.class)); + cards.add(new SetCardInfo("Mirko, Obsessive Theorist", 2, Rarity.MYTHIC, mage.cards.m.MirkoObsessiveTheorist.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mirko, Obsessive Theorist", 50, Rarity.MYTHIC, mage.cards.m.MirkoObsessiveTheorist.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mirko, Obsessive Theorist", 316, Rarity.MYTHIC, mage.cards.m.MirkoObsessiveTheorist.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mirror Entity", 75, Rarity.RARE, mage.cards.m.MirrorEntity.class)); cards.add(new SetCardInfo("Mission Briefing", 110, Rarity.RARE, mage.cards.m.MissionBriefing.class)); cards.add(new SetCardInfo("Morska, Undersea Sleuth", 3, Rarity.MYTHIC, mage.cards.m.MorskaUnderseaSleuth.class));