mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[WOE] Implement Ice Out
This commit is contained in:
parent
3b2a7f6a23
commit
042109f2f0
3 changed files with 59 additions and 1 deletions
57
Mage.Sets/src/mage/cards/i/IceOut.java
Normal file
57
Mage.Sets/src/mage/cards/i/IceOut.java
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.BargainedCondition;
|
||||
import mage.abilities.costs.CostAdjuster;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.abilities.keyword.BargainAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class IceOut extends CardImpl {
|
||||
|
||||
public IceOut(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}");
|
||||
|
||||
// Bargain
|
||||
this.addAbility(new BargainAbility());
|
||||
|
||||
// This spell costs {1} less to cast if it's bargained.
|
||||
this.getSpellAbility().addEffect(new InfoEffect("this spell costs {1} less to cast if it's bargained"));
|
||||
this.getSpellAbility().setCostAdjuster(IceOutAdjuster.instance);
|
||||
|
||||
// Counter target spell.
|
||||
this.getSpellAbility().addEffect(new CounterTargetEffect().concatBy("<br>"));
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
}
|
||||
|
||||
private IceOut(final IceOut card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IceOut copy() {
|
||||
return new IceOut(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum IceOutAdjuster implements CostAdjuster {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {
|
||||
if (BargainedCondition.instance.apply(game, ability)) {
|
||||
CardUtil.reduceCost(ability, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -56,4 +56,4 @@ enum JohannsStopgapAdjuster implements CostAdjuster {
|
|||
CardUtil.reduceCost(ability, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ public final class WildsOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Hopeless Nightmare", 95, Rarity.COMMON, mage.cards.h.HopelessNightmare.class));
|
||||
cards.add(new SetCardInfo("Howling Galefang", 175, Rarity.UNCOMMON, mage.cards.h.HowlingGalefang.class));
|
||||
cards.add(new SetCardInfo("Hylda of the Icy Crown", 206, Rarity.MYTHIC, mage.cards.h.HyldaOfTheIcyCrown.class));
|
||||
cards.add(new SetCardInfo("Ice Out", 54, Rarity.COMMON, mage.cards.i.IceOut.class));
|
||||
cards.add(new SetCardInfo("Icewrought Sentry", 55, Rarity.UNCOMMON, mage.cards.i.IcewroughtSentry.class));
|
||||
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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue