From 10909c669424b7a1c58f1423cb3c0e3aa5a7bbe0 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 17 Sep 2022 23:01:42 -0400 Subject: [PATCH] [40K] Implemented Exterminatus --- Mage.Sets/src/mage/cards/e/Exterminatus.java | 51 ++++++++++++++++++++ Mage.Sets/src/mage/sets/Warhammer40000.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/Exterminatus.java diff --git a/Mage.Sets/src/mage/cards/e/Exterminatus.java b/Mage.Sets/src/mage/cards/e/Exterminatus.java new file mode 100644 index 0000000000..0f4fe06f7c --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/Exterminatus.java @@ -0,0 +1,51 @@ +package mage.cards.e; + +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.effects.common.continuous.LoseAbilityAllEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterNonlandPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Exterminatus extends CardImpl { + + private static final FilterPermanent filter + = new FilterNonlandPermanent("nonland permanents your opponents control"); + + static { + filter.add(TargetController.OPPONENT.getControllerPredicate()); + } + + public Exterminatus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{W}{B}"); + + // Nonland permanents your opponents control lose indestructible until end of turn. + this.getSpellAbility().addEffect(new LoseAbilityAllEffect( + IndestructibleAbility.getInstance(), Duration.EndOfTurn, filter + )); + + // Destroy all nonland permanents. + this.getSpellAbility().addEffect(new DestroyAllEffect( + StaticFilters.FILTER_PERMANENTS_NON_LAND + ).concatBy("
")); + } + + private Exterminatus(final Exterminatus card) { + super(card); + } + + @Override + public Exterminatus copy() { + return new Exterminatus(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Warhammer40000.java b/Mage.Sets/src/mage/sets/Warhammer40000.java index f01003223e..bb4e025ebc 100644 --- a/Mage.Sets/src/mage/sets/Warhammer40000.java +++ b/Mage.Sets/src/mage/sets/Warhammer40000.java @@ -87,6 +87,7 @@ public final class Warhammer40000 extends ExpansionSet { cards.add(new SetCardInfo("Exocrine", 76, Rarity.RARE, mage.cards.e.Exocrine.class)); cards.add(new SetCardInfo("Exotic Orchard", 278, Rarity.RARE, mage.cards.e.ExoticOrchard.class)); cards.add(new SetCardInfo("Explore", 213, Rarity.COMMON, mage.cards.e.Explore.class)); + cards.add(new SetCardInfo("Exterminatus", 120, Rarity.RARE, mage.cards.e.Exterminatus.class)); cards.add(new SetCardInfo("Fabricate", 181, Rarity.RARE, mage.cards.f.Fabricate.class)); cards.add(new SetCardInfo("Farseek", 214, Rarity.COMMON, mage.cards.f.Farseek.class)); cards.add(new SetCardInfo("Fell the Mighty", 186, Rarity.RARE, mage.cards.f.FellTheMighty.class));