* Stoic Rebuttal - Fixed cost reduction, that did not work in a proper way.

This commit is contained in:
LevelX2 2014-03-11 16:43:21 +01:00
parent 27c8f8fd47
commit 604f397d65

View file

@ -30,14 +30,17 @@ package mage.sets.scarsofmirrodin;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.condition.common.MetalcraftCondition; import mage.abilities.condition.common.MetalcraftCondition;
import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.Game;
import mage.target.TargetSpell; import mage.target.TargetSpell;
import java.util.UUID; import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.constants.AbilityWord;
import mage.constants.Zone;
/** /**
* @author ayrat * @author ayrat
@ -48,6 +51,13 @@ public class StoicRebuttal extends CardImpl<StoicRebuttal> {
super(ownerId, 46, "Stoic Rebuttal", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); super(ownerId, 46, "Stoic Rebuttal", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{U}");
this.expansionSetCode = "SOM"; this.expansionSetCode = "SOM";
this.color.setBlue(true); this.color.setBlue(true);
// Metalcraft - Stoic Rebuttal costs {1} less to cast if you control three or more artifacts.
Ability ability = new SimpleStaticAbility(Zone.STACK, new SpellCostReductionSourceEffect(1, MetalcraftCondition.getInstance()));
ability.setRuleAtTheTop(true);
ability.setAbilityWord(AbilityWord.METALCRAFT);
this.addAbility(ability);
// Counter target spell.
this.getSpellAbility().addTarget(new TargetSpell()); this.getSpellAbility().addTarget(new TargetSpell());
this.getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellAbility().addEffect(new CounterTargetEffect());
} }
@ -56,14 +66,6 @@ public class StoicRebuttal extends CardImpl<StoicRebuttal> {
super(card); super(card);
} }
@Override
public void adjustCosts(Ability ability, Game game) {
if (MetalcraftCondition.getInstance().apply(game, ability)) {
ability.getManaCostsToPay().clear();
ability.getManaCostsToPay().load("{U}{U}");
}
}
@Override @Override
public StoicRebuttal copy() { public StoicRebuttal copy() {
return new StoicRebuttal(this); return new StoicRebuttal(this);