forked from External/mage
[WOE] Implement Johann's Stopgap
This commit is contained in:
parent
6f5e59b690
commit
3b2a7f6a23
3 changed files with 61 additions and 0 deletions
59
Mage.Sets/src/mage/cards/j/JohannsStopgap.java
Normal file
59
Mage.Sets/src/mage/cards/j/JohannsStopgap.java
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
package mage.cards.j;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.BargainedCondition;
|
||||
import mage.abilities.costs.CostAdjuster;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.BargainAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class JohannsStopgap extends CardImpl {
|
||||
|
||||
public JohannsStopgap(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}");
|
||||
|
||||
// Bargain
|
||||
this.addAbility(new BargainAbility());
|
||||
|
||||
// This spell costs {2} less to cast if it's bargained.
|
||||
this.getSpellAbility().addEffect(new InfoEffect("this spell costs {2} less to cast if it's bargained"));
|
||||
this.getSpellAbility().setCostAdjuster(JohannsStopgapAdjuster.instance);
|
||||
|
||||
// Return target nonland permanent to its owner's hand. Draw a card.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().concatBy("<br>"));
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent().withChooseHint("to return to hand"));
|
||||
}
|
||||
|
||||
private JohannsStopgap(final JohannsStopgap card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JohannsStopgap copy() {
|
||||
return new JohannsStopgap(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum JohannsStopgapAdjuster implements CostAdjuster {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {
|
||||
if (BargainedCondition.instance.apply(game, ability)) {
|
||||
CardUtil.reduceCost(ability, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -70,6 +70,7 @@ public final class WildsOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ingenious Prodigy", 56, Rarity.RARE, mage.cards.i.IngeniousProdigy.class));
|
||||
cards.add(new SetCardInfo("Into the Fae Court", 57, Rarity.COMMON, mage.cards.i.IntoTheFaeCourt.class));
|
||||
cards.add(new SetCardInfo("Island", 263, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Johann's Stopgap", 58, Rarity.COMMON, mage.cards.j.JohannsStopgap.class));
|
||||
cards.add(new SetCardInfo("Johann, Apprentice Sorcerer", 207, Rarity.UNCOMMON, mage.cards.j.JohannApprenticeSorcerer.class));
|
||||
cards.add(new SetCardInfo("Kellan, the Fae-Blooded", 230, Rarity.MYTHIC, mage.cards.k.KellanTheFaeBlooded.class));
|
||||
cards.add(new SetCardInfo("Knight of Doves", 19, Rarity.UNCOMMON, mage.cards.k.KnightOfDoves.class));
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Ascend|new|
|
|||
Assist|new|
|
||||
Backup|card, number|
|
||||
Basic landcycling|cost|
|
||||
Bargain|new|
|
||||
Battle cry|new|
|
||||
Bestow|card, manaString|
|
||||
Blitz|card, manaString|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue