From f247e08eacb7031e8c5fe16c89aec6b0d5b41d77 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 3 Jun 2023 09:56:50 -0400 Subject: [PATCH] [LTR] Implement Gimli's Axe --- Mage.Sets/src/mage/cards/g/GimlisAxe.java | 55 +++++++++++++++++++ .../TheLordOfTheRingsTalesOfMiddleEarth.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GimlisAxe.java diff --git a/Mage.Sets/src/mage/cards/g/GimlisAxe.java b/Mage.Sets/src/mage/cards/g/GimlisAxe.java new file mode 100644 index 0000000000..14fe178ce8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GimlisAxe.java @@ -0,0 +1,55 @@ +package mage.cards.g; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.AttachedToMatchesFilterCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GimlisAxe extends CardImpl { + + private static final Condition condition + = new AttachedToMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_LEGENDARY); + + public GimlisAxe(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{R}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +3/+0. + this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(3, 0))); + + // As long as equipped creature is legendary, it has menace. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new GainAbilityAttachedEffect(new MenaceAbility(false), AttachmentType.EQUIPMENT), + condition, "As long as equipped creature is legendary, it has menace. " + + "(It can't be blocked except by two or more creatures.)" + ))); + + // Equip {2} + this.addAbility(new EquipAbility(2)); + } + + private GimlisAxe(final GimlisAxe card) { + super(card); + } + + @Override + public GimlisAxe copy() { + return new GimlisAxe(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index a49c5a4340..574427054e 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -48,6 +48,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Gandalf the Grey", 207, Rarity.RARE, mage.cards.g.GandalfTheGrey.class)); cards.add(new SetCardInfo("Gandalf, Friend of the Shire", 50, Rarity.UNCOMMON, mage.cards.g.GandalfFriendOfTheShire.class)); cards.add(new SetCardInfo("Generous Ent", 169, Rarity.COMMON, mage.cards.g.GenerousEnt.class)); + cards.add(new SetCardInfo("Gimli's Axe", 130, Rarity.COMMON, mage.cards.g.GimlisAxe.class)); cards.add(new SetCardInfo("Gimli's Fury", 131, Rarity.COMMON, mage.cards.g.GimlisFury.class)); cards.add(new SetCardInfo("Goblin Assailant", 295, Rarity.COMMON, mage.cards.g.GoblinAssailant.class)); cards.add(new SetCardInfo("Gollum's Bite", 85, Rarity.UNCOMMON, mage.cards.g.GollumsBite.class));