diff --git a/Mage.Sets/src/mage/cards/m/MarchFromTheBlackGate.java b/Mage.Sets/src/mage/cards/m/MarchFromTheBlackGate.java new file mode 100644 index 0000000000..4a3f10a513 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MarchFromTheBlackGate.java @@ -0,0 +1,77 @@ +package mage.cards.m; + +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.keyword.AmassEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MarchFromTheBlackGate extends CardImpl { + + public MarchFromTheBlackGate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + + // When March from the Black Gate enters the battlefield and whenever an Army you control attacks, amass Orcs 1. + this.addAbility(new MarchFromTheBlackGateTriggeredAbility()); + } + + private MarchFromTheBlackGate(final MarchFromTheBlackGate card) { + super(card); + } + + @Override + public MarchFromTheBlackGate copy() { + return new MarchFromTheBlackGate(this); + } +} + +class MarchFromTheBlackGateTriggeredAbility extends TriggeredAbilityImpl { + + MarchFromTheBlackGateTriggeredAbility() { + super(Zone.BATTLEFIELD, new AmassEffect(1, SubType.ORC)); + this.setTriggerPhrase("When {this} enters the battlefield and whenever an Army you control attacks, "); + } + + private MarchFromTheBlackGateTriggeredAbility(final MarchFromTheBlackGateTriggeredAbility ability) { + super(ability); + } + + @Override + public MarchFromTheBlackGateTriggeredAbility copy() { + return new MarchFromTheBlackGateTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + switch (event.getType()) { + case ENTERS_THE_BATTLEFIELD: + case ATTACKER_DECLARED: + return true; + } + return false; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + switch (event.getType()) { + case ENTERS_THE_BATTLEFIELD: + return event.getTargetId().equals(this.getSourceId()); + case ATTACKER_DECLARED: + Permanent permanent = game.getPermanent(event.getSourceId()); + return permanent != null + && permanent.hasSubtype(SubType.ARMY, game) + && permanent.isControlledBy(this.getControllerId()); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index f1537b2b14..34986f83b7 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -143,6 +143,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Lothlorien Lookout", 175, Rarity.COMMON, mage.cards.l.LothlorienLookout.class)); cards.add(new SetCardInfo("Lotho, Corrupt Shirriff", 213, Rarity.RARE, mage.cards.l.LothoCorruptShirriff.class)); cards.add(new SetCardInfo("Many Partings", 176, Rarity.COMMON, mage.cards.m.ManyPartings.class)); + cards.add(new SetCardInfo("March from the Black Gate", 94, Rarity.UNCOMMON, mage.cards.m.MarchFromTheBlackGate.class)); cards.add(new SetCardInfo("Mauhur, Uruk-hai Captain", 214, Rarity.UNCOMMON, mage.cards.m.MauhurUrukHaiCaptain.class)); cards.add(new SetCardInfo("Meriadoc Brandybuck", 177, Rarity.UNCOMMON, mage.cards.m.MeriadocBrandybuck.class)); cards.add(new SetCardInfo("Minas Tirith", 256, Rarity.RARE, mage.cards.m.MinasTirith.class));