From 8a9fd1aa82fcf39410b950ad20cc96d252bf0151 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 09:21:45 -0400 Subject: [PATCH] Implemented Mace of the Valiant --- .../src/mage/cards/m/MaceOfTheValiant.java | 60 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 61 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MaceOfTheValiant.java diff --git a/Mage.Sets/src/mage/cards/m/MaceOfTheValiant.java b/Mage.Sets/src/mage/cards/m/MaceOfTheValiant.java new file mode 100644 index 0000000000..9755eccfd1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MaceOfTheValiant.java @@ -0,0 +1,60 @@ +package mage.cards.m; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MaceOfTheValiant extends CardImpl { + + private static final DynamicValue xValue = new CountersSourceCount(CounterType.CHARGE); + + public MaceOfTheValiant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{W}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +1/+1 for each charge counter on Mace of the Valiant and has vigilance. + Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(xValue, xValue)); + ability.addEffect(new GainAbilityAttachedEffect( + VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT + ).setText("and has vigilance")); + this.addAbility(ability); + + // Whenever a creature enters the battlefield under your control, put a charge counter on Mace of the Valiant. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), + StaticFilters.FILTER_PERMANENT_A_CREATURE + )); + + // Equip {3} + this.addAbility(new EquipAbility(3)); + } + + private MaceOfTheValiant(final MaceOfTheValiant card) { + super(card); + } + + @Override + public MaceOfTheValiant copy() { + return new MaceOfTheValiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 0748b44f55..6c375fcd9c 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -54,6 +54,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Heraldic Banner", 222, Rarity.UNCOMMON, mage.cards.h.HeraldicBanner.class)); cards.add(new SetCardInfo("Inspiring Veteran", 194, Rarity.UNCOMMON, mage.cards.i.InspiringVeteran.class)); cards.add(new SetCardInfo("Lovestruck Beast", 165, Rarity.RARE, mage.cards.l.LovestruckBeast.class)); + cards.add(new SetCardInfo("Mace of the Valiant", 314, Rarity.RARE, mage.cards.m.MaceOfTheValiant.class)); cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class)); cards.add(new SetCardInfo("Order of Midnight", 99, Rarity.UNCOMMON, mage.cards.o.OrderOfMidnight.class)); cards.add(new SetCardInfo("Rankle, Master of Pranks", 101, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class));