From d923b8e32f798887f17aa827672726fd8a280b23 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 25 Jan 2024 21:27:33 -0500 Subject: [PATCH] [MKM] Implement Reckless Detective --- .../src/mage/cards/r/RecklessDetective.java | 52 +++++++++++++++++++ .../src/mage/sets/MurdersAtKarlovManor.java | 1 + 2 files changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RecklessDetective.java diff --git a/Mage.Sets/src/mage/cards/r/RecklessDetective.java b/Mage.Sets/src/mage/cards/r/RecklessDetective.java new file mode 100644 index 00000000000..d8d10d09b29 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RecklessDetective.java @@ -0,0 +1,52 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.costs.OrCost; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RecklessDetective extends CardImpl { + + public RecklessDetective(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.DEVIL); + this.subtype.add(SubType.DETECTIVE); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Whenever Reckless Detective attacks, you may sacrifice an artifact or discard a card. If you do, draw a card and Reckless Detective gets +2/+0 until end of turn. + this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid( + new DrawCardSourceControllerEffect(1), + new OrCost( + "sacrifice an artifact or discard a card", + new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN), + new DiscardCardCost() + ) + ).addEffect(new BoostSourceEffect(2, 0, Duration.EndOfTurn).concatBy("and")))); + } + + private RecklessDetective(final RecklessDetective card) { + super(card); + } + + @Override + public RecklessDetective copy() { + return new RecklessDetective(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java index 8b7c42081ee..cdbe6bdebb0 100644 --- a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java +++ b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java @@ -128,6 +128,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet { cards.add(new SetCardInfo("Public Thoroughfare", 265, Rarity.COMMON, mage.cards.p.PublicThoroughfare.class)); cards.add(new SetCardInfo("Rakish Scoundrel", 225, Rarity.COMMON, mage.cards.r.RakishScoundrel.class)); cards.add(new SetCardInfo("Raucous Theater", 266, Rarity.RARE, mage.cards.r.RaucousTheater.class)); + cards.add(new SetCardInfo("Reckless Detective", 141, Rarity.UNCOMMON, mage.cards.r.RecklessDetective.class)); cards.add(new SetCardInfo("Red Herring", 142, Rarity.COMMON, mage.cards.r.RedHerring.class)); cards.add(new SetCardInfo("Repeat Offender", 101, Rarity.COMMON, mage.cards.r.RepeatOffender.class)); cards.add(new SetCardInfo("Riftburst Hellion", 228, Rarity.COMMON, mage.cards.r.RiftburstHellion.class));