From 1c40671700b688e37247b030c7dca4151df5c88d Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 30 May 2023 18:36:27 -0400 Subject: [PATCH] [LTR] Implement Galadriel, Gift-Giver --- .../src/mage/cards/g/GaladrielGiftGiver.java | 59 +++++++++++++++++++ .../TheLordOfTheRingsTalesOfMiddleEarth.java | 1 + 2 files changed, 60 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GaladrielGiftGiver.java diff --git a/Mage.Sets/src/mage/cards/g/GaladrielGiftGiver.java b/Mage.Sets/src/mage/cards/g/GaladrielGiftGiver.java new file mode 100644 index 0000000000..406a501c16 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GaladrielGiftGiver.java @@ -0,0 +1,59 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.permanent.token.FoodToken; +import mage.game.permanent.token.TreasureToken; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GaladrielGiftGiver extends CardImpl { + + public GaladrielGiftGiver(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.NOBLE); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever Galadriel, Gift-Giver enters the battlefield or attacks, choose one -- + // * Put a +1/+1 counter on another target creature. + Ability ability = new EntersBattlefieldTriggeredAbility( + new AddCountersTargetEffect(CounterType.P1P1.createInstance()) + ); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE)); + + // * Create a Food token. + ability.addMode(new Mode(new CreateTokenEffect(new FoodToken()))); + + // * Create a Treasure token. + ability.addMode(new Mode(new CreateTokenEffect(new TreasureToken()))); + this.addAbility(ability); + } + + private GaladrielGiftGiver(final GaladrielGiftGiver card) { + super(card); + } + + @Override + public GaladrielGiftGiver copy() { + return new GaladrielGiftGiver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index c2b84c654c..4076305ff2 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -25,6 +25,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Forest", 280, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Frodo Baggins", 205, Rarity.UNCOMMON, mage.cards.f.FrodoBaggins.class)); cards.add(new SetCardInfo("Frodo, Sauron's Bane", 18, Rarity.RARE, mage.cards.f.FrodoSauronsBane.class)); + cards.add(new SetCardInfo("Galadriel, Gift-Giver", 296, Rarity.RARE, mage.cards.g.GaladrielGiftGiver.class)); 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("Gollum, Patient Plotter", 84, Rarity.UNCOMMON, mage.cards.g.GollumPatientPlotter.class));