[LTR] Implement Haunt of the Dead Marshes

This commit is contained in:
theelk801 2023-06-14 22:01:41 -04:00
parent 7f3b50f216
commit b09111a8e5
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,65 @@
package mage.cards.h;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HauntOfTheDeadMarshes extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("you control a legendary creature");
static {
filter.add(SuperType.LEGENDARY.getPredicate());
}
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
private static final Hint hint = new ConditionHint(condition, "You control a legendary creature");
public HauntOfTheDeadMarshes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.subtype.add(SubType.NIGHTMARE);
this.subtype.add(SubType.ELF);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// When Haunt of the Dead Marshes enters the battlefield, scry 1.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(1, false)));
// {2}{B}: Return Haunt of the Dead Marshes from your graveyard to the battlefield tapped. Activate only if you control a legendary creature.
this.addAbility(new ConditionalActivatedAbility(
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true),
new ManaCostsImpl<>("{2}{B}"), condition
).addHint(hint));
}
private HauntOfTheDeadMarshes(final HauntOfTheDeadMarshes card) {
super(card);
}
@Override
public HauntOfTheDeadMarshes copy() {
return new HauntOfTheDeadMarshes(this);
}
}

View file

@ -106,6 +106,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
cards.add(new SetCardInfo("Grond, the Gatebreaker", 89, Rarity.UNCOMMON, mage.cards.g.GrondTheGatebreaker.class));
cards.add(new SetCardInfo("Gwaihir the Windlord", 210, Rarity.UNCOMMON, mage.cards.g.GwaihirTheWindlord.class));
cards.add(new SetCardInfo("Haradrim Spearmaster", 135, Rarity.COMMON, mage.cards.h.HaradrimSpearmaster.class));
cards.add(new SetCardInfo("Haunt of the Dead Marshes", 90, Rarity.COMMON, mage.cards.h.HauntOfTheDeadMarshes.class));
cards.add(new SetCardInfo("Hew the Entwood", 136, Rarity.MYTHIC, mage.cards.h.HewTheEntwood.class));
cards.add(new SetCardInfo("Hithlain Knots", 54, Rarity.COMMON, mage.cards.h.HithlainKnots.class));
cards.add(new SetCardInfo("Hobbit's Sting", 20, Rarity.COMMON, mage.cards.h.HobbitsSting.class));