From bfc2baf3dbf6ab965b096a352eaeb57215f4b99e Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sun, 5 Nov 2023 16:27:06 -0500 Subject: [PATCH] [LCC] Implement Dusk Legion Sergeant --- .../src/mage/cards/d/DuskLegionSergeant.java | 61 +++++++++++++++++++ .../sets/LostCavernsOfIxalanCommander.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DuskLegionSergeant.java diff --git a/Mage.Sets/src/mage/cards/d/DuskLegionSergeant.java b/Mage.Sets/src/mage/cards/d/DuskLegionSergeant.java new file mode 100644 index 00000000000..6360dde2fd2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DuskLegionSergeant.java @@ -0,0 +1,61 @@ +package mage.cards.d; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.abilities.keyword.PersistAbility; +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.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.TokenPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DuskLegionSergeant extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent(SubType.VAMPIRE, "nontoken Vampire creature you control"); + + static { + filter.add(TokenPredicate.FALSE); + } + + public DuskLegionSergeant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Menace + this.addAbility(new MenaceAbility()); + + // {1}{B}, Sacrifice Dusk Legion Sergeant: Each nontoken Vampire creature you control gains persist until end of turn. + Ability ability = new SimpleActivatedAbility(new GainAbilityControlledEffect( + new PersistAbility(), Duration.EndOfTurn, filter + ), new ManaCostsImpl<>("{1}{B}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + private DuskLegionSergeant(final DuskLegionSergeant card) { + super(card); + } + + @Override + public DuskLegionSergeant copy() { + return new DuskLegionSergeant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/LostCavernsOfIxalanCommander.java b/Mage.Sets/src/mage/sets/LostCavernsOfIxalanCommander.java index aaeb48d236b..cd25f1667de 100644 --- a/Mage.Sets/src/mage/sets/LostCavernsOfIxalanCommander.java +++ b/Mage.Sets/src/mage/sets/LostCavernsOfIxalanCommander.java @@ -95,6 +95,7 @@ public final class LostCavernsOfIxalanCommander extends ExpansionSet { cards.add(new SetCardInfo("Distant Melody", 154, Rarity.COMMON, mage.cards.d.DistantMelody.class)); cards.add(new SetCardInfo("Drana, Liberator of Malakir", 193, Rarity.MYTHIC, mage.cards.d.DranaLiberatorOfMalakir.class)); cards.add(new SetCardInfo("Drover of the Mighty", 239, Rarity.UNCOMMON, mage.cards.d.DroverOfTheMighty.class)); + cards.add(new SetCardInfo("Dusk Legion Sergeant", 80, Rarity.RARE, mage.cards.d.DuskLegionSergeant.class)); cards.add(new SetCardInfo("Dusk Legion Zealot", 194, Rarity.COMMON, mage.cards.d.DuskLegionZealot.class)); cards.add(new SetCardInfo("Elenda, the Dusk Rose", 268, Rarity.MYTHIC, mage.cards.e.ElendaTheDuskRose.class)); cards.add(new SetCardInfo("Emperor Mihail II", 155, Rarity.RARE, mage.cards.e.EmperorMihailII.class));