From 03b012bc1e47f12e917d12ff74a1d9a4c48ee1c1 Mon Sep 17 00:00:00 2001 From: Daniel Bomar <dbdaniel42@gmail.com> Date: Sat, 3 Jul 2021 12:38:52 -0500 Subject: [PATCH] [AFR] Implemented Guardian of Faith --- .../src/mage/cards/g/GuardianOfFaith.java | 61 +++++++++++++++++++ .../sets/AdventuresInTheForgottenRealms.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GuardianOfFaith.java diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfFaith.java b/Mage.Sets/src/mage/cards/g/GuardianOfFaith.java new file mode 100644 index 0000000000..c6504703b7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GuardianOfFaith.java @@ -0,0 +1,61 @@ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.PhaseOutTargetEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author weirddan455 + */ +public final class GuardianOfFaith extends CardImpl { + + private static final FilterControlledCreaturePermanent filter + = new FilterControlledCreaturePermanent("other creatures you control"); + + static { + filter.add(AnotherPredicate.instance); + } + + public GuardianOfFaith(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // When Guardian of Faith enters the battlefield, any number of other target creatures you control phase out. + Ability ability = new EntersBattlefieldTriggeredAbility(new PhaseOutTargetEffect( + "any number of other target creatures you control", false + )); + ability.addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, false)); + this.addAbility(ability); + } + + private GuardianOfFaith(final GuardianOfFaith card) { + super(card); + } + + @Override + public GuardianOfFaith copy() { + return new GuardianOfFaith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java index cc9d63a5ec..3eb739f623 100644 --- a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java +++ b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java @@ -80,6 +80,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet { cards.add(new SetCardInfo("Green Dragon", 186, Rarity.UNCOMMON, mage.cards.g.GreenDragon.class)); cards.add(new SetCardInfo("Gretchen Titchwillow", 223, Rarity.UNCOMMON, mage.cards.g.GretchenTitchwillow.class)); cards.add(new SetCardInfo("Grim Wanderer", 107, Rarity.UNCOMMON, mage.cards.g.GrimWanderer.class)); + cards.add(new SetCardInfo("Guardian of Faith", 18, Rarity.RARE, mage.cards.g.GuardianOfFaith.class)); cards.add(new SetCardInfo("Guild Thief", 61, Rarity.UNCOMMON, mage.cards.g.GuildThief.class)); cards.add(new SetCardInfo("Half-Elf Monk", 19, Rarity.COMMON, mage.cards.h.HalfElfMonk.class)); cards.add(new SetCardInfo("Hama Pashar, Ruin Seeker", 224, Rarity.UNCOMMON, mage.cards.h.HamaPasharRuinSeeker.class));