* Fixed that for "Shoal" spells a wrong CMC was calculated while on the stack, if alternate casting cost was used (fixes #696).

This commit is contained in:
LevelX2 2015-02-06 16:13:51 +01:00
parent 103f2f4883
commit 974951e18d
7 changed files with 109 additions and 6 deletions

View file

@ -61,7 +61,7 @@ public class BlazingShoal extends CardImpl {
FilterOwnedCard filter = new FilterOwnedCard("a red card with converted mana cost X from your hand");
filter.add(new ColorPredicate(ObjectColor.RED));
filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter),true)));
// Target creature gets +X/+0 until end of turn.
this.getSpellAbility().addEffect(new BoostTargetEffect(new ExileFromHandCostCardConvertedMana(), new StaticValue(0), Duration.EndOfTurn));

View file

@ -65,7 +65,7 @@ public class DisruptingShoal extends CardImpl {
FilterOwnedCard filter = new FilterOwnedCard("a blue card with converted mana cost X from your hand");
filter.add(new ColorPredicate(ObjectColor.BLUE));
filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter), true)));
// 2/1/2005: Disrupting Shoal can target any spell, but does nothing unless that spell's converted mana cost is X.
// Counter target spell if its converted mana cost is X.

View file

@ -58,7 +58,7 @@ public class NourishingShoal extends CardImpl {
FilterOwnedCard filter = new FilterOwnedCard("a green card with converted mana cost X from your hand");
filter.add(new ColorPredicate(ObjectColor.GREEN));
filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter), true)));
// You gain X life.
this.getSpellAbility().addEffect(new GainLifeEffect(new ExileFromHandCostCardConvertedMana()));

View file

@ -68,7 +68,7 @@ public class ShiningShoal extends CardImpl {
FilterOwnedCard filter = new FilterOwnedCard("a white card with converted mana cost X from your hand");
filter.add(new ColorPredicate(ObjectColor.WHITE));
filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter), true)));
// The next X damage that a source of your choice would deal to you and/or creatures you control this turn is dealt to target creature or player instead.
this.getSpellAbility().addEffect(new ShiningShoalPreventDamageTargetEffect(Duration.EndOfTurn, new ExileFromHandCostCardConvertedMana()));

View file

@ -62,7 +62,7 @@ public class SickeningShoal extends CardImpl {
FilterOwnedCard filter = new FilterOwnedCard("a black card with converted mana cost X from your hand");
filter.add(new ColorPredicate(ObjectColor.BLACK));
filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter), true)));
// Target creature gets -X/-X until end of turn.
DynamicValue x = new SignInversionDynamicValue(new ExileFromHandCostCardConvertedMana());