From 73b7922b1991bd52925c59f7ec30d7d49a91d1e8 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 3 May 2023 09:08:17 -0400 Subject: [PATCH] [MAT] Implement Jirina, Dauntless General --- .../mage/cards/j/JirinaDauntlessGeneral.java | 62 +++++++++++++++++++ .../sets/MarchOfTheMachineTheAftermath.java | 1 + 2 files changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/j/JirinaDauntlessGeneral.java diff --git a/Mage.Sets/src/mage/cards/j/JirinaDauntlessGeneral.java b/Mage.Sets/src/mage/cards/j/JirinaDauntlessGeneral.java new file mode 100644 index 0000000000..8a78d62f30 --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JirinaDauntlessGeneral.java @@ -0,0 +1,62 @@ +package mage.cards.j; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.ExileGraveyardAllTargetPlayerEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterPermanent; +import mage.target.TargetPlayer; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class JirinaDauntlessGeneral extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(SubType.HUMAN, ""); + + public JirinaDauntlessGeneral(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Jirina, Dauntless General enters the battlefield, exile target player's graveyard. + Ability ability = new EntersBattlefieldTriggeredAbility(new ExileGraveyardAllTargetPlayerEffect()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + + // Sacrifice Jirina: Humans you control gain hexproof and indestructible until end of turn. + ability = new SimpleActivatedAbility(new GainAbilityControlledEffect( + HexproofAbility.getInstance(), Duration.EndOfTurn, filter + ).setText("Humans you control gain hexproof"), new SacrificeSourceCost()); + ability.addEffect(new GainAbilityControlledEffect( + IndestructibleAbility.getInstance(), Duration.EndOfTurn, filter + ).setText("and indestructible until end of turn")); + this.addAbility(ability); + } + + private JirinaDauntlessGeneral(final JirinaDauntlessGeneral card) { + super(card); + } + + @Override + public JirinaDauntlessGeneral copy() { + return new JirinaDauntlessGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java b/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java index 3e11f96971..b27b4810b7 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java @@ -27,6 +27,7 @@ public final class MarchOfTheMachineTheAftermath extends ExpansionSet { cards.add(new SetCardInfo("Filter Out", 7, Rarity.UNCOMMON, mage.cards.f.FilterOut.class)); cards.add(new SetCardInfo("Gold-Forged Thopteryx", 31, Rarity.UNCOMMON, mage.cards.g.GoldForgedThopteryx.class)); cards.add(new SetCardInfo("Harnessed Snubhorn", 3, Rarity.UNCOMMON, mage.cards.h.HarnessedSnubhorn.class)); + cards.add(new SetCardInfo("Jirina, Dauntless General", 32, Rarity.RARE, mage.cards.j.JirinaDauntlessGeneral.class)); cards.add(new SetCardInfo("Jolrael, Voice of Zhalfir", 33, Rarity.RARE, mage.cards.j.JolraelVoiceOfZhalfir.class)); cards.add(new SetCardInfo("Karn, Legacy Reforged", 49, Rarity.MYTHIC, mage.cards.k.KarnLegacyReforged.class)); cards.add(new SetCardInfo("Kiora, Sovereign of the Deep", 35, Rarity.MYTHIC, mage.cards.k.KioraSovereignOfTheDeep.class));