From 9474f67f5ca797c042e21a411b2a0e4f77336579 Mon Sep 17 00:00:00 2001 From: Cameron Merkel <44722506+Cguy7777@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:10:22 -0500 Subject: [PATCH] [PIP] Implement Nick Valentine, Private Eye (#11965) --- .../mage/cards/n/NickValentinePrivateEye.java | 65 +++++++++++++++++++ Mage.Sets/src/mage/sets/Fallout.java | 4 ++ .../src/main/java/mage/constants/SubType.java | 1 + 3 files changed, 70 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/NickValentinePrivateEye.java diff --git a/Mage.Sets/src/mage/cards/n/NickValentinePrivateEye.java b/Mage.Sets/src/mage/cards/n/NickValentinePrivateEye.java new file mode 100644 index 00000000000..78189c5ca2e --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NickValentinePrivateEye.java @@ -0,0 +1,65 @@ +package mage.cards.n; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.effects.keyword.InvestigateEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; + +/** + * @author Cguy7777 + */ +public final class NickValentinePrivateEye extends CardImpl { + + private static final FilterCreaturePermanent filterNonArtifact + = new FilterCreaturePermanent("except by artifact creatures"); + private static final FilterControlledCreaturePermanent filterControlledArtifact + = new FilterControlledCreaturePermanent("artifact creature you control"); + + static { + filterNonArtifact.add(Predicates.not(CardType.ARTIFACT.getPredicate())); + filterControlledArtifact.add(CardType.ARTIFACT.getPredicate()); + } + + public NickValentinePrivateEye(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.SYNTH); + this.subtype.add(SubType.DETECTIVE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Nick Valentine, Private Eye can't be blocked except by artifact creatures. + this.addAbility(new SimpleEvasionAbility( + new CantBeBlockedByCreaturesSourceEffect(filterNonArtifact, Duration.WhileOnBattlefield))); + + // Whenever Nick Valentine or another artifact creature you control dies, you may investigate. + this.addAbility(new DiesThisOrAnotherCreatureTriggeredAbility( + new InvestigateEffect() + .setText("investigate. (To investigate, create a Clue token. " + + "It's an artifact with \"{2}, Sacrifice this artifact: Draw a card.\")"), + true, + filterControlledArtifact)); + } + + private NickValentinePrivateEye(final NickValentinePrivateEye card) { + super(card); + } + + @Override + public NickValentinePrivateEye copy() { + return new NickValentinePrivateEye(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Fallout.java b/Mage.Sets/src/mage/sets/Fallout.java index 215c55f79f6..2936ddcdf8b 100644 --- a/Mage.Sets/src/mage/sets/Fallout.java +++ b/Mage.Sets/src/mage/sets/Fallout.java @@ -168,6 +168,10 @@ public final class Fallout extends ExpansionSet { cards.add(new SetCardInfo("Nerd Rage", 34, Rarity.UNCOMMON, mage.cards.n.NerdRage.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Nerd Rage", 562, Rarity.UNCOMMON, mage.cards.n.NerdRage.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Nesting Grounds", 276, Rarity.RARE, mage.cards.n.NestingGrounds.class)); + cards.add(new SetCardInfo("Nick Valentine, Private Eye", 35, Rarity.RARE, mage.cards.n.NickValentinePrivateEye.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Nick Valentine, Private Eye", 378, Rarity.RARE, mage.cards.n.NickValentinePrivateEye.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Nick Valentine, Private Eye", 563, Rarity.RARE, mage.cards.n.NickValentinePrivateEye.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Nick Valentine, Private Eye", 906, Rarity.RARE, mage.cards.n.NickValentinePrivateEye.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Nomad Outpost", 277, Rarity.UNCOMMON, mage.cards.n.NomadOutpost.class)); cards.add(new SetCardInfo("Nuka-Cola Vending Machine", 137, Rarity.UNCOMMON, mage.cards.n.NukaColaVendingMachine.class)); cards.add(new SetCardInfo("One with the Machine", 179, Rarity.RARE, mage.cards.o.OneWithTheMachine.class)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 73e412a22f5..5b13f4a967d 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -384,6 +384,7 @@ public enum SubType { SULLUSTAN("Sullustan", SubTypeSet.CreatureType, true), // Star Wars SURRAKAR("Surrakar", SubTypeSet.CreatureType), SURVIVOR("Survivor", SubTypeSet.CreatureType), + SYNTH("Synth", SubTypeSet.CreatureType), // T TENTACLE("Tentacle", SubTypeSet.CreatureType), TETRAVITE("Tetravite", SubTypeSet.CreatureType),