mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Fixed mandatory targets not being enforced for suspended spells.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user