forked from External/mage
[OTJ] Implement Plan the Heist
This commit is contained in:
parent
64507a5191
commit
6142d46cfc
4 changed files with 84 additions and 0 deletions
41
Mage.Sets/src/mage/cards/p/PlanTheHeist.java
Normal file
41
Mage.Sets/src/mage/cards/p/PlanTheHeist.java
Normal file
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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<String> 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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
35
Mage/src/main/java/mage/abilities/keyword/PlotAbility.java
Normal file
35
Mage/src/main/java/mage/abilities/keyword/PlotAbility.java
Normal file
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
@ -95,6 +95,7 @@ Persist|new|
|
|||
Phasing|instance|
|
||||
Plainscycling|cost|
|
||||
Plainswalk|new|
|
||||
Plot|card, manaString|
|
||||
Poisonous|number|
|
||||
Prototype|card, manaString|
|
||||
Provoke|new|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue