Fixed a bug of Condescent (target was missing).

This commit is contained in:
LevelX2 2013-06-07 07:47:57 +02:00
parent e979a44385
commit bbf2af31de
2 changed files with 6 additions and 2 deletions

View file

@ -34,6 +34,7 @@ import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.effects.common.ScryEffect;
import mage.cards.CardImpl;
import mage.target.TargetSpell;
/**
*
@ -49,6 +50,7 @@ public class Condescend extends CardImpl<Condescend> {
// Counter target spell unless its controller pays {X}.
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new ManacostVariableValue()));
this.getSpellAbility().addTarget(new TargetSpell());
// Scry 2.
this.getSpellAbility().addEffect(new ScryEffect(2));

View file

@ -79,8 +79,10 @@ public class CounterUnlessPaysEffect extends OneShotEffect<CounterUnlessPaysEffe
if (spell != null) {
Player player = game.getPlayer(spell.getControllerId());
if (player != null) {
Cost costToPay = cost.copy();
if (cost == null) {
Cost costToPay;
if (cost != null) {
costToPay = cost.copy();
} else {
costToPay = new GenericManaCost(genericMana.calculate(game, source));
}
costToPay.clearPaid();