From bcd000ac99543901ddeb592a5599396b905c8d8f Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Aug 2021 21:05:20 -0400 Subject: [PATCH] [J21] Implemented Boneyard Aberration --- .../src/mage/cards/b/BoneyardAberration.java | 44 +++++++++++++++++++ .../mage/sets/JumpstartHistoricHorizons.java | 1 + .../mage/test/cards/digital/ConjureTest.java | 24 ++++++++++ 3 files changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BoneyardAberration.java diff --git a/Mage.Sets/src/mage/cards/b/BoneyardAberration.java b/Mage.Sets/src/mage/cards/b/BoneyardAberration.java new file mode 100644 index 0000000000..ef6fcbf481 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BoneyardAberration.java @@ -0,0 +1,44 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.costs.common.ExileSourceFromGraveCost; +import mage.abilities.effects.common.ConjureCardEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BoneyardAberration extends CardImpl { + + public BoneyardAberration(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); + + this.subtype.add(SubType.SKELETON); + this.subtype.add(SubType.DOG); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Boneyard Aberration dies, exile it. If you do, conjure three Reassembling Skeleton cards into your graveyard. + this.addAbility(new DiesSourceTriggeredAbility(new DoIfCostPaid( + new ConjureCardEffect("Reassembling Skeleton", Zone.GRAVEYARD, 3), + new ExileSourceFromGraveCost().setText("exile it"), null, false + ))); + } + + private BoneyardAberration(final BoneyardAberration card) { + super(card); + } + + @Override + public BoneyardAberration copy() { + return new BoneyardAberration(this); + } +} diff --git a/Mage.Sets/src/mage/sets/JumpstartHistoricHorizons.java b/Mage.Sets/src/mage/sets/JumpstartHistoricHorizons.java index c4afdef536..562b6fb32c 100644 --- a/Mage.Sets/src/mage/sets/JumpstartHistoricHorizons.java +++ b/Mage.Sets/src/mage/sets/JumpstartHistoricHorizons.java @@ -20,6 +20,7 @@ public final class JumpstartHistoricHorizons extends ExpansionSet { this.hasBoosters = false; this.hasBasicLands = false; + cards.add(new SetCardInfo("Boneyard Aberration", 13, Rarity.UNCOMMON, mage.cards.b.BoneyardAberration.class)); cards.add(new SetCardInfo("Bounty of the Deep", 7, Rarity.UNCOMMON, mage.cards.b.BountyOfTheDeep.class)); cards.add(new SetCardInfo("Faceless Agent", 31, Rarity.COMMON, mage.cards.f.FacelessAgent.class)); cards.add(new SetCardInfo("Manor Guardian", 16, Rarity.UNCOMMON, mage.cards.m.ManorGuardian.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/digital/ConjureTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/digital/ConjureTest.java index 22ba17e988..578f2c2413 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/digital/ConjureTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/digital/ConjureTest.java @@ -12,6 +12,9 @@ public class ConjureTest extends CardTestPlayerBase { private static final String trainer = "Wingsteed Trainer"; private static final String pegasus = "Stormfront Pegasus"; + private static final String aberration = "Boneyard Aberration"; + private static final String murder = "Murder"; + private static final String skeleton = "Reassembling Skeleton"; @Test public void testConjureToHand() { @@ -45,4 +48,25 @@ public class ConjureTest extends CardTestPlayerBase { assertPermanentCount(playerA, trainer, 1); assertPermanentCount(playerA, pegasus, 1); } + + @Test + public void testAberration() { + addCard(Zone.HAND, playerA, murder); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5); + addCard(Zone.BATTLEFIELD, playerA, aberration); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, murder, aberration); + + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{1}{B}:"); + + setStrictChooseMode(true); + setStopAt(1, PhaseStep.END_TURN); + execute(); + assertAllCommandsUsed(); + + assertGraveyardCount(playerA, skeleton, 2); + assertGraveyardCount(playerA, murder, 1); + assertExileCount(playerA, aberration, 1); + assertPermanentCount(playerA, skeleton, 1); + } }