From 9360956f70369e7bbebfbd1d2150d1f13fc72f1c Mon Sep 17 00:00:00 2001 From: Daniel Bomar <dbdaniel42@gmail.com> Date: Mon, 5 Jul 2021 09:13:52 -0500 Subject: [PATCH] [AFR] Implemented Paladin's Shield --- .../src/mage/cards/p/PaladinsShield.java | 55 +++++++++++++++++++ .../sets/AdventuresInTheForgottenRealms.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PaladinsShield.java diff --git a/Mage.Sets/src/mage/cards/p/PaladinsShield.java b/Mage.Sets/src/mage/cards/p/PaladinsShield.java new file mode 100644 index 0000000000..6acce9c03f --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PaladinsShield.java @@ -0,0 +1,55 @@ +package mage.cards.p; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author weirddan455 + */ +public final class PaladinsShield extends CardImpl { + + public PaladinsShield(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{W}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // When Paladin's Shield enters the battlefield, attach it to target creature you control. + Ability ability = new EntersBattlefieldTriggeredAbility( + new AttachEffect(Outcome.BoostCreature, "attach it to target creature you control") + ); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + + // Equipped creature gets +0/+2. + this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(0, 2))); + + // Equip {3} + this.addAbility(new EquipAbility(3)); + } + + private PaladinsShield(final PaladinsShield card) { + super(card); + } + + @Override + public PaladinsShield copy() { + return new PaladinsShield(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java index 7b94b3cd1f..32738d7188 100644 --- a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java +++ b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java @@ -113,6 +113,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet { cards.add(new SetCardInfo("Nadaar, Selfless Paladin", 27, Rarity.RARE, mage.cards.n.NadaarSelflessPaladin.class)); cards.add(new SetCardInfo("Old Gnawbone", 197, Rarity.MYTHIC, mage.cards.o.OldGnawbone.class)); cards.add(new SetCardInfo("Owlbear", 198, Rarity.COMMON, mage.cards.o.Owlbear.class)); + cards.add(new SetCardInfo("Paladin's Shield", 30, Rarity.COMMON, mage.cards.p.PaladinsShield.class)); cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Planar Ally", 31, Rarity.COMMON, mage.cards.p.PlanarAlly.class)); cards.add(new SetCardInfo("Plundering Barbarian", 158, Rarity.COMMON, mage.cards.p.PlunderingBarbarian.class));