From 5ce7a0ff507d5e54db5e661a09033f017e742b90 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 7 Jun 2023 21:35:06 -0400 Subject: [PATCH] [LTR] Implement Rally at the Hornburg --- .../src/mage/cards/r/RallyAtTheHornburg.java | 42 +++++++++++++++++++ .../TheLordOfTheRingsTalesOfMiddleEarth.java | 1 + 2 files changed, 43 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RallyAtTheHornburg.java diff --git a/Mage.Sets/src/mage/cards/r/RallyAtTheHornburg.java b/Mage.Sets/src/mage/cards/r/RallyAtTheHornburg.java new file mode 100644 index 0000000000..b5d41a3b42 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RallyAtTheHornburg.java @@ -0,0 +1,42 @@ +package mage.cards.r; + +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.game.permanent.token.HumanSoldierToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RallyAtTheHornburg extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent(SubType.HUMAN, "Humans"); + + public RallyAtTheHornburg(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); + + // Create two 1/1 white Human Soldier creature tokens. Humans you control gain haste until end of turn. + this.getSpellAbility().addEffect(new CreateTokenEffect(new HumanSoldierToken(), 2)); + this.getSpellAbility().addEffect(new GainAbilityControlledEffect( + HasteAbility.getInstance(), Duration.EndOfTurn, filter + )); + } + + private RallyAtTheHornburg(final RallyAtTheHornburg card) { + super(card); + } + + @Override + public RallyAtTheHornburg copy() { + return new RallyAtTheHornburg(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index e6e0b1ae8a..8d1e284701 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -95,6 +95,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Prince Imrahil the Fair", 219, Rarity.UNCOMMON, mage.cards.p.PrinceImrahilTheFair.class)); cards.add(new SetCardInfo("Protector of Gondor", 25, Rarity.COMMON, mage.cards.p.ProtectorOfGondor.class)); cards.add(new SetCardInfo("Quickbeam, Upstart Ent", 183, Rarity.UNCOMMON, mage.cards.q.QuickbeamUpstartEnt.class)); + cards.add(new SetCardInfo("Rally at the Hornburg", 142, Rarity.COMMON, mage.cards.r.RallyAtTheHornburg.class)); cards.add(new SetCardInfo("Reprieve", 26, Rarity.UNCOMMON, mage.cards.r.Reprieve.class)); cards.add(new SetCardInfo("Ringsight", 220, Rarity.UNCOMMON, mage.cards.r.Ringsight.class)); cards.add(new SetCardInfo("Rising of the Day", 145, Rarity.UNCOMMON, mage.cards.r.RisingOfTheDay.class));