From 1074b2c28069d364761e4a00ad41454c57bf0024 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 3 Nov 2022 09:49:52 -0400 Subject: [PATCH] [BRO] Implement Loran, Disciple of History --- .../mage/cards/l/LoranDiscipleOfHistory.java | 56 +++++++++++++++++++ Mage.Sets/src/mage/sets/TheBrothersWar.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/l/LoranDiscipleOfHistory.java diff --git a/Mage.Sets/src/mage/cards/l/LoranDiscipleOfHistory.java b/Mage.Sets/src/mage/cards/l/LoranDiscipleOfHistory.java new file mode 100644 index 0000000000..9d58cb8a63 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LoranDiscipleOfHistory.java @@ -0,0 +1,56 @@ +package mage.cards.l; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldThisOrAnotherTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LoranDiscipleOfHistory extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("another legendary creature"); + + static { + filter.add(SuperType.LEGENDARY.getPredicate()); + } + + public LoranDiscipleOfHistory(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Loran, Disciple of History or another legendary creature enters the battlefield under your control, return target artifact card from your graveyard to your hand. + Ability ability = new EntersBattlefieldThisOrAnotherTriggeredAbility( + new ReturnFromGraveyardToHandTargetEffect(), filter, false, true + ); + ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_ARTIFACT_FROM_YOUR_GRAVEYARD)); + this.addAbility(ability); + } + + private LoranDiscipleOfHistory(final LoranDiscipleOfHistory card) { + super(card); + } + + @Override + public LoranDiscipleOfHistory copy() { + return new LoranDiscipleOfHistory(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index 20232d895a..fdcddabf91 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -86,6 +86,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Lat-Nam Adept", 56, Rarity.COMMON, mage.cards.l.LatNamAdept.class)); cards.add(new SetCardInfo("Llanowar Wastes", 264, Rarity.RARE, mage.cards.l.LlanowarWastes.class)); cards.add(new SetCardInfo("Loran of the Third Path", 12, Rarity.RARE, mage.cards.l.LoranOfTheThirdPath.class)); + cards.add(new SetCardInfo("Loran, Disciple of History", 13, Rarity.UNCOMMON, mage.cards.l.LoranDiscipleOfHistory.class)); cards.add(new SetCardInfo("Mass Production", 15, Rarity.UNCOMMON, mage.cards.m.MassProduction.class)); cards.add(new SetCardInfo("Mishra's Command", 141, Rarity.RARE, mage.cards.m.MishrasCommand.class)); cards.add(new SetCardInfo("Mishra's Foundry", 265, Rarity.RARE, mage.cards.m.MishrasFoundry.class));