Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MKC] Implement Mirko, Obsessive Theorist #11813

Merged
merged 2 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions Mage.Sets/src/mage/cards/m/MirkoObsessiveTheorist.java
Original file line number Diff line number Diff line change
@@ -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. <i>(If it would die, exile it instead.)</i>"),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<Card> {
instance;

@Override
public boolean apply(ObjectSourcePlayer<Card> input, Game game) {
Permanent sourcePermanent = input.getSource().getSourcePermanentOrLKI(game);
return sourcePermanent != null && input.getObject().getPower().getValue() <= sourcePermanent.getPower().getValue();
}
}
3 changes: 3 additions & 0 deletions Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ private MurdersAtKarlovManorCommander() {
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));
Expand Down
Loading