mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Fixed a bug of Condescent (target was missing).
This commit is contained in:
parent
e979a44385
commit
bbf2af31de
2 changed files with 6 additions and 2 deletions
|
@ -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));
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue