* Disrupting Shoal - Fixed that the converted mana costs of split cards were not handled correctly.

This commit is contained in:
LevelX2 2016-03-05 10:33:27 +01:00
parent 4baa9e5588
commit 41af3e9d4a
3 changed files with 118 additions and 82 deletions

View file

@ -33,7 +33,6 @@ import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.costs.AlternativeCostSourceAbility;
import mage.abilities.costs.common.ExileFromHandCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.ExileFromHandCostCardConvertedMana;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
@ -60,7 +59,6 @@ public class DisruptingShoal extends CardImpl {
this.expansionSetCode = "BOK";
this.subtype.add("Arcane");
// You may exile a blue card with converted mana cost X from your hand rather than pay Disrupting Shoal's mana cost.
FilterOwnedCard filter = new FilterOwnedCard("a blue card with converted mana cost X from your hand");
filter.add(new ColorPredicate(ObjectColor.BLUE));
@ -100,9 +98,8 @@ class DisruptingShoalCounterTargetEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
DynamicValue amount = new ExileFromHandCostCardConvertedMana();
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
if (spell != null && spell.getConvertedManaCost() == amount.calculate(game, source, this)) {
if (spell != null && new ExileFromHandCostCardConvertedMana().isConvertedManaCostEqual(game, source, this, spell.getConvertedManaCost())) {
return game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game);
}
return false;