From 492e27e42a5ddf371253b0442513f41e1e47d792 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 9 Sep 2021 08:32:46 -0400 Subject: [PATCH] [MID] Implemented Hedgewitch's Mask --- .../src/mage/cards/h/HedgewitchsMask.java | 52 +++++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 1 + 2 files changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HedgewitchsMask.java diff --git a/Mage.Sets/src/mage/cards/h/HedgewitchsMask.java b/Mage.Sets/src/mage/cards/h/HedgewitchsMask.java new file mode 100644 index 0000000000..7d36e45d94 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HedgewitchsMask.java @@ -0,0 +1,52 @@ +package mage.cards.h; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesAttachedEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HedgewitchsMask extends CardImpl { + + private static final FilterCreaturePermanent filter + = new FilterCreaturePermanent("creatures with power 4 or greater"); + + static { + filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 3)); + } + + public HedgewitchsMask(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{W}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +1/+1. + this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(1, 1))); + + // Equipped creature can't be blocked by creatures with power 4 or greater. + this.addAbility(new SimpleStaticAbility(new CantBeBlockedByCreaturesAttachedEffect( + Duration.WhileOnBattlefield, filter, AttachmentType.EQUIPMENT + ))); + + // Equip {2} + this.addAbility(new EquipAbility(2)); + } + + private HedgewitchsMask(final HedgewitchsMask card) { + super(card); + } + + @Override + public HedgewitchsMask copy() { + return new HedgewitchsMask(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index a4d0f9a0ee..39819f7c6e 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -81,6 +81,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Graveyard Glutton", 104, Rarity.RARE, mage.cards.g.GraveyardGlutton.class)); cards.add(new SetCardInfo("Graveyard Trespasser", 104, Rarity.RARE, mage.cards.g.GraveyardTrespasser.class)); cards.add(new SetCardInfo("Haunted Ridge", 263, Rarity.RARE, mage.cards.h.HauntedRidge.class)); + cards.add(new SetCardInfo("Hedgewitch's Mask", 23, Rarity.COMMON, mage.cards.h.HedgewitchsMask.class)); cards.add(new SetCardInfo("Hobbling Zombie", 106, Rarity.COMMON, mage.cards.h.HobblingZombie.class)); cards.add(new SetCardInfo("Hound Tamer", 187, Rarity.UNCOMMON, mage.cards.h.HoundTamer.class)); cards.add(new SetCardInfo("Howl of the Hunt", 188, Rarity.COMMON, mage.cards.h.HowlOfTheHunt.class));