- Fixed mandatory targets not being enforced for suspended spells.

This commit is contained in:
Sloth
2013-05-23 16:34:11 +00:00
parent 0303b34339
commit 09012aee8b

View File

@@ -228,15 +228,15 @@ public class PlayEffect extends SpellAbilityEffect {
SpellAbility tgtSA = null; SpellAbility tgtSA = null;
// only one mode can be used // only one mode can be used
tgtSA = sa.getActivatingPlayer().getController().getAbilityToPlay(sas); tgtSA = sa.getActivatingPlayer().getController().getAbilityToPlay(sas);
boolean noManaCost = sa.hasParam("WithoutManaCost");
tgtSA = noManaCost ? tgtSA.copyWithNoManaCost() : tgtSA;
if (tgtSA.getTarget() != null && !optional) { if (tgtSA.getTarget() != null && !optional) {
tgtSA.getTarget().setMandatory(true); tgtSA.getTarget().setMandatory(true);
} }
boolean noManaCost = sa.hasParam("WithoutManaCost");
if (controller.isHuman()) { if (controller.isHuman()) {
SpellAbility newSA = noManaCost ? tgtSA.copyWithNoManaCost() : tgtSA; HumanPlay.playSpellAbility(activator, tgtSA);
HumanPlay.playSpellAbility(activator, newSA);
} else { } else {
if (tgtSA instanceof Spell) { // Isn't it ALWAYS a spell? if (tgtSA instanceof Spell) { // Isn't it ALWAYS a spell?
Spell spell = (Spell) tgtSA; Spell spell = (Spell) tgtSA;