From a1a46a088a328826e53f4debf808aa1b23f7f780 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 29 Jun 2021 19:51:39 -0400 Subject: [PATCH] [AFR] Implemented You See a Guard Approach --- .../mage/cards/y/YouSeeAGuardApproach.java | 44 +++++++++++++++++++ .../sets/AdventuresInTheForgottenRealms.java | 1 + 2 files changed, 45 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/y/YouSeeAGuardApproach.java diff --git a/Mage.Sets/src/mage/cards/y/YouSeeAGuardApproach.java b/Mage.Sets/src/mage/cards/y/YouSeeAGuardApproach.java new file mode 100644 index 00000000000..c920e0e7311 --- /dev/null +++ b/Mage.Sets/src/mage/cards/y/YouSeeAGuardApproach.java @@ -0,0 +1,44 @@ +package mage.cards.y; + +import mage.abilities.Mode; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class YouSeeAGuardApproach extends CardImpl { + + public YouSeeAGuardApproach(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); + + // Choose one — + // • Distract the Guard — Tap target creature. + this.getSpellAbility().addEffect(new TapTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().getEffects().setFlavorWord("Distract the Guard"); + + // • Hide — Target creature you control gains hexproof until end of turn. + Mode mode = new Mode(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn)); + mode.addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addMode(mode.setFlavorWord("Hide")); + } + + private YouSeeAGuardApproach(final YouSeeAGuardApproach card) { + super(card); + } + + @Override + public YouSeeAGuardApproach copy() { + return new YouSeeAGuardApproach(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java index 85443aef139..5795f4e914e 100644 --- a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java +++ b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java @@ -52,6 +52,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet { cards.add(new SetCardInfo("Tiamat", 235, Rarity.MYTHIC, mage.cards.t.Tiamat.class)); cards.add(new SetCardInfo("Trelasarra Moon Dancer", 236, Rarity.UNCOMMON, mage.cards.t.TrelasarraMoonDancer.class)); cards.add(new SetCardInfo("Vorpal Sword", 124, Rarity.RARE, mage.cards.v.VorpalSword.class)); + cards.add(new SetCardInfo("You See a Guard Approach", 85, Rarity.COMMON, mage.cards.y.YouSeeAGuardApproach.class)); } }