From 6142d46cfc2fb7a1bb4d595a0a7181d61ced0fa8 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 26 Mar 2024 16:50:28 -0400 Subject: [PATCH] [OTJ] Implement Plan the Heist --- Mage.Sets/src/mage/cards/p/PlanTheHeist.java | 41 +++++++++++++++++++ .../mage/sets/OutlawsOfThunderJunction.java | 7 ++++ .../mage/abilities/keyword/PlotAbility.java | 35 ++++++++++++++++ Utils/keywords.txt | 1 + 4 files changed, 84 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PlanTheHeist.java create mode 100644 Mage/src/main/java/mage/abilities/keyword/PlotAbility.java diff --git a/Mage.Sets/src/mage/cards/p/PlanTheHeist.java b/Mage.Sets/src/mage/cards/p/PlanTheHeist.java new file mode 100644 index 00000000000..944171ff6fc --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PlanTheHeist.java @@ -0,0 +1,41 @@ +package mage.cards.p; + +import mage.abilities.condition.common.HellbentCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.keyword.SurveilEffect; +import mage.abilities.keyword.PlotAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PlanTheHeist extends CardImpl { + + public PlanTheHeist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}"); + + // Surveil 3 if you have no cards in hand. Then draw three cards. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new SurveilEffect(3), HellbentCondition.instance, + "surveil 3 if you have no cards in hand" + )); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3).concatBy("Then")); + + // Plot {3}{U} + this.addAbility(new PlotAbility(this, "{3}{U}")); + } + + private PlanTheHeist(final PlanTheHeist card) { + super(card); + } + + @Override + public PlanTheHeist copy() { + return new PlanTheHeist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java index a95e21d986e..bc5608e44ed 100644 --- a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java +++ b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java @@ -4,11 +4,15 @@ import mage.cards.ExpansionSet; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.Arrays; +import java.util.List; + /** * @author TheElk801 */ public final class OutlawsOfThunderJunction extends ExpansionSet { + private static final List unfinished = Arrays.asList("Fblthp, Lost on the Range", "Plan the Heist"); private static final OutlawsOfThunderJunction instance = new OutlawsOfThunderJunction(); public static OutlawsOfThunderJunction getInstance() { @@ -27,6 +31,9 @@ public final class OutlawsOfThunderJunction extends ExpansionSet { cards.add(new SetCardInfo("Lavaspur Boots", 243, Rarity.UNCOMMON, mage.cards.l.LavaspurBoots.class)); cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plan the Heist", 62, Rarity.UNCOMMON, mage.cards.p.PlanTheHeist.class)); cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + + cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when mechanic is implemented } } diff --git a/Mage/src/main/java/mage/abilities/keyword/PlotAbility.java b/Mage/src/main/java/mage/abilities/keyword/PlotAbility.java new file mode 100644 index 00000000000..b76a1f0a3b2 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/PlotAbility.java @@ -0,0 +1,35 @@ +package mage.abilities.keyword; + +import mage.abilities.SpecialAction; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.cards.Card; +import mage.constants.TimingRule; +import mage.constants.Zone; + +/** + * TODO: Implement this + * + * @author TheElk801 + */ +public class PlotAbility extends SpecialAction { + + public PlotAbility(Card card, String plotCost) { + super(Zone.HAND); + this.addCost(new ManaCostsImpl<>(plotCost)); + this.setTiming(TimingRule.SORCERY); + } + + private PlotAbility(final PlotAbility ability) { + super(ability); + } + + @Override + public PlotAbility copy() { + return new PlotAbility(this); + } + + @Override + public String getRule() { + return "Plot"; + } +} diff --git a/Utils/keywords.txt b/Utils/keywords.txt index 02f7e59008a..100b37cb3e3 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -95,6 +95,7 @@ Persist|new| Phasing|instance| Plainscycling|cost| Plainswalk|new| +Plot|card, manaString| Poisonous|number| Prototype|card, manaString| Provoke|new|