From 2801939c3c9a2adf2e726309e55c26772dc27c1c Mon Sep 17 00:00:00 2001 From: Cameron Merkel <44722506+Cguy7777@users.noreply.github.com> Date: Mon, 4 Mar 2024 04:51:52 -0600 Subject: [PATCH] [MKC] Implement Detective of the Month (#11899) --- .../src/mage/cards/d/DetectiveOfTheMonth.java | 61 +++++++++++++++++++ .../sets/MurdersAtKarlovManorCommander.java | 2 + 2 files changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DetectiveOfTheMonth.java diff --git a/Mage.Sets/src/mage/cards/d/DetectiveOfTheMonth.java b/Mage.Sets/src/mage/cards/d/DetectiveOfTheMonth.java new file mode 100644 index 00000000000..14b9c3ab535 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DetectiveOfTheMonth.java @@ -0,0 +1,61 @@ +package mage.cards.d; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.common.DrawNthCardTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CitysBlessingCondition; +import mage.abilities.decorator.ConditionalRestrictionEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.combat.CantBeBlockedAllEffect; +import mage.abilities.hint.common.CitysBlessingHint; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.abilities.keyword.AscendAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.permanent.token.DetectiveToken; + +/** + * @author Cguy7777 + */ +public final class DetectiveOfTheMonth extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.DETECTIVE); + + public DetectiveOfTheMonth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.DETECTIVE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Ascend + this.addAbility(new AscendAbility()); + + // As long as you have the city's blessing, Detectives you control can't be blocked. + Effect effect = new ConditionalRestrictionEffect( + new CantBeBlockedAllEffect(filter, Duration.WhileOnBattlefield), + CitysBlessingCondition.instance, + "as long as you have the city's blessing, Detectives you control can't be blocked"); + this.addAbility(new SimpleStaticAbility(effect).addHint(CitysBlessingHint.instance)); + + // Whenever you draw your second card each turn, create a 2/2 white and blue Detective creature token. + this.addAbility(new DrawNthCardTriggeredAbility( + new CreateTokenEffect(new DetectiveToken()), false, 2)); + } + + private DetectiveOfTheMonth(final DetectiveOfTheMonth card) { + super(card); + } + + @Override + public DetectiveOfTheMonth copy() { + return new DetectiveOfTheMonth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java b/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java index 18b95474f19..4f5c009d86e 100644 --- a/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java +++ b/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java @@ -78,6 +78,8 @@ public final class MurdersAtKarlovManorCommander extends ExpansionSet { cards.add(new SetCardInfo("Deep Analysis", 100, Rarity.COMMON, mage.cards.d.DeepAnalysis.class)); cards.add(new SetCardInfo("Deflecting Palm", 205, Rarity.RARE, mage.cards.d.DeflectingPalm.class)); cards.add(new SetCardInfo("Den Protector", 169, Rarity.RARE, mage.cards.d.DenProtector.class)); + cards.add(new SetCardInfo("Detective of the Month", 21, Rarity.RARE, mage.cards.d.DetectiveOfTheMonth.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Detective of the Month", 331, Rarity.RARE, mage.cards.d.DetectiveOfTheMonth.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Dimir Aqueduct", 258, Rarity.UNCOMMON, mage.cards.d.DimirAqueduct.class)); cards.add(new SetCardInfo("Dimir Signet", 226, Rarity.UNCOMMON, mage.cards.d.DimirSignet.class)); cards.add(new SetCardInfo("Dimir Spybug", 206, Rarity.UNCOMMON, mage.cards.d.DimirSpybug.class));