From 57fe65025a19fa9104b3967ed9c74feb7191c91c Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Sat, 27 Aug 2022 20:56:55 -0500 Subject: [PATCH] [DMU] Implemented The Cruelty of Gix --- .../src/mage/cards/t/TheCrueltyOfGix.java | 76 +++++++++++++++++++ Mage.Sets/src/mage/sets/DominariaUnited.java | 1 + 2 files changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TheCrueltyOfGix.java diff --git a/Mage.Sets/src/mage/cards/t/TheCrueltyOfGix.java b/Mage.Sets/src/mage/cards/t/TheCrueltyOfGix.java new file mode 100644 index 0000000000..a87d04b03c --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TheCrueltyOfGix.java @@ -0,0 +1,76 @@ +package mage.cards.t; + +import java.util.UUID; + +import mage.abilities.common.SagaAbility; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.constants.SagaChapter; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.Predicates; +import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetOpponent; + +/** + * + * @author weirddan455 + */ +public final class TheCrueltyOfGix extends CardImpl { + + private static final FilterCard filter = new FilterCard("creature or planeswalker card"); + private static final FilterCreatureCard filter2 = new FilterCreatureCard("creature card from a graveyard"); + + static { + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + CardType.PLANESWALKER.getPredicate() + )); + } + + public TheCrueltyOfGix(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); + + this.subtype.add(SubType.SAGA); + + // Read ahead + SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III, true); + + // I -- Target opponent reveals their hand. You choose a creature or planeswalker card from it. That player discards that card. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_I, + new DiscardCardYouChooseTargetEffect(filter), new TargetOpponent() + ); + + // II -- Search your library for a card, put that card into your hand, then shuffle. You lose 3 life. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_II, + new SearchLibraryPutInHandEffect(new TargetCardInLibrary()), + new LoseLifeSourceControllerEffect(3) + ); + + // III -- Put target creature card from a graveyard onto the battlefield under your control. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_III, SagaChapter.CHAPTER_III, + new ReturnFromGraveyardToBattlefieldTargetEffect(), + new TargetCardInGraveyard(filter2) + ); + this.addAbility(sagaAbility); + } + + private TheCrueltyOfGix(final TheCrueltyOfGix card) { + super(card); + } + + @Override + public TheCrueltyOfGix copy() { + return new TheCrueltyOfGix(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DominariaUnited.java b/Mage.Sets/src/mage/sets/DominariaUnited.java index 39c85ec1e6..a957980fc5 100644 --- a/Mage.Sets/src/mage/sets/DominariaUnited.java +++ b/Mage.Sets/src/mage/sets/DominariaUnited.java @@ -203,6 +203,7 @@ public final class DominariaUnited extends ExpansionSet { cards.add(new SetCardInfo("Tear Asunder", 183, Rarity.UNCOMMON, mage.cards.t.TearAsunder.class)); cards.add(new SetCardInfo("Temporal Firestorm", 147, Rarity.RARE, mage.cards.t.TemporalFirestorm.class)); cards.add(new SetCardInfo("Territorial Maro", 184, Rarity.UNCOMMON, mage.cards.t.TerritorialMaro.class)); + cards.add(new SetCardInfo("The Cruelty of Gix", 87, Rarity.RARE, mage.cards.t.TheCrueltyOfGix.class)); cards.add(new SetCardInfo("The Elder Dragon War", 121, Rarity.RARE, mage.cards.t.TheElderDragonWar.class)); cards.add(new SetCardInfo("The Raven Man", 103, Rarity.RARE, mage.cards.t.TheRavenMan.class)); cards.add(new SetCardInfo("The World Spell", 189, Rarity.MYTHIC, mage.cards.t.TheWorldSpell.class));