From 2b00797cff248179759aa7bddd1e32ade7f0cc18 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 9 Apr 2022 18:57:24 -0400 Subject: [PATCH] [SNC] Implemented Jaxis, the Troublemaker --- .../mage/cards/j/JaxisTheTroublemaker.java | 94 +++++++++++++++++++ .../src/mage/sets/NewCapennaCommander.java | 3 +- .../src/mage/sets/StreetsOfNewCapenna.java | 3 +- .../mage/abilities/keyword/BlitzAbility.java | 24 +++++ Utils/keywords.txt | 1 + 5 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/j/JaxisTheTroublemaker.java create mode 100644 Mage/src/main/java/mage/abilities/keyword/BlitzAbility.java diff --git a/Mage.Sets/src/mage/cards/j/JaxisTheTroublemaker.java b/Mage.Sets/src/mage/cards/j/JaxisTheTroublemaker.java new file mode 100644 index 0000000000..4a571b2aef --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JaxisTheTroublemaker.java @@ -0,0 +1,94 @@ +package mage.cards.j; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.BlitzAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class JaxisTheTroublemaker extends CardImpl { + + public JaxisTheTroublemaker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {R}, {T}, Discard a card: Create a token that's a copy of another target creature you control. It gains haste and "When this creature dies, draw a card." Sacrifice it at the beginning of the next end step. Activate only as a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility( + new JaxisTheTroublemakerEffect(), new ManaCostsImpl<>("{R}") + ); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)); + this.addAbility(ability); + + // Blitz {1}{R} + this.addAbility(new BlitzAbility("{1}{R}")); + } + + private JaxisTheTroublemaker(final JaxisTheTroublemaker card) { + super(card); + } + + @Override + public JaxisTheTroublemaker copy() { + return new JaxisTheTroublemaker(this); + } +} + +class JaxisTheTroublemakerEffect extends OneShotEffect { + + JaxisTheTroublemakerEffect() { + super(Outcome.Benefit); + staticText = "create a token that's a copy of another target creature you control. It gains haste and " + + "\"When this creature dies, draw a card.\" Sacrifice it at the beginning of the next end step"; + } + + private JaxisTheTroublemakerEffect(final JaxisTheTroublemakerEffect effect) { + super(effect); + } + + @Override + public JaxisTheTroublemakerEffect copy() { + return new JaxisTheTroublemakerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); + effect.addAdditionalAbilities( + HasteAbility.getInstance(), + new DiesSourceTriggeredAbility( + new DrawCardSourceControllerEffect(1) + ).setTriggerPhrase("When this creature dies, ") + ); + effect.apply(game, source); + effect.sacrificeTokensCreatedAtNextEndStep(game, source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/NewCapennaCommander.java b/Mage.Sets/src/mage/sets/NewCapennaCommander.java index 30d154fb76..316e3f5779 100644 --- a/Mage.Sets/src/mage/sets/NewCapennaCommander.java +++ b/Mage.Sets/src/mage/sets/NewCapennaCommander.java @@ -12,7 +12,8 @@ import java.util.List; */ public final class NewCapennaCommander extends ExpansionSet { - private static final List unfinished = Arrays.asList("Kros, Defense Contractor", "Perrie, the Pulveriser"); + private static final List unfinished = Arrays.asList("Henzie \"Toolbox\" Torre", "Kros, Defense Contractor", "Perrie, the Pulveriser"); + private static final NewCapennaCommander instance = new NewCapennaCommander(); public static NewCapennaCommander getInstance() { diff --git a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java index 85b1b1c1b7..62898ab831 100644 --- a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java +++ b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java @@ -12,7 +12,7 @@ import java.util.List; */ public final class StreetsOfNewCapenna extends ExpansionSet { - private static final List unfinished = Arrays.asList("Disciplined Duelist", "Elspeth Resplendent", "Falco Spara, Pactweaver"); + private static final List unfinished = Arrays.asList("Disciplined Duelist", "Elspeth Resplendent", "Falco Spara, Pactweaver", "Jaxis, the Troublemaker"); private static final StreetsOfNewCapenna instance = new StreetsOfNewCapenna(); @@ -47,6 +47,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet { cards.add(new SetCardInfo("Halo Fountain", 15, Rarity.MYTHIC, mage.cards.h.HaloFountain.class)); cards.add(new SetCardInfo("Incriminate", 84, Rarity.COMMON, mage.cards.i.Incriminate.class)); cards.add(new SetCardInfo("Island", 264, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Jaxis, the Troublemaker", 112, Rarity.RARE, mage.cards.j.JaxisTheTroublemaker.class)); cards.add(new SetCardInfo("Jetmir's Garden", 250, Rarity.RARE, mage.cards.j.JetmirsGarden.class)); cards.add(new SetCardInfo("Jetmir, Nexus of Revels", 193, Rarity.MYTHIC, mage.cards.j.JetmirNexusOfRevels.class)); cards.add(new SetCardInfo("Join the Maestros", 85, Rarity.COMMON, mage.cards.j.JoinTheMaestros.class)); diff --git a/Mage/src/main/java/mage/abilities/keyword/BlitzAbility.java b/Mage/src/main/java/mage/abilities/keyword/BlitzAbility.java new file mode 100644 index 0000000000..7c39c566ef --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/BlitzAbility.java @@ -0,0 +1,24 @@ +package mage.abilities.keyword; + +import mage.abilities.StaticAbility; +import mage.constants.Zone; + +/** + * @author TheElk801 + */ +public class BlitzAbility extends StaticAbility { + + public BlitzAbility(String manaString) { + // TODO: Implement this + super(Zone.ALL, null); + } + + private BlitzAbility(final BlitzAbility ability) { + super(ability); + } + + @Override + public BlitzAbility copy() { + return new BlitzAbility(this); + } +} diff --git a/Utils/keywords.txt b/Utils/keywords.txt index 2e4e79b1d8..a84f9269e1 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -6,6 +6,7 @@ Assist|new| Basic landcycling|cost| Battle cry|new| Bestow|card, manaString| +Blitz|manaString| Bloodthirst|number| Bushido|number| Buyback|manaString|