- A different approach to remedying the broken Play Effect problem (uses a dedicated SVar on a SpellAbility).

This commit is contained in:
Agetian
2017-06-21 13:33:11 +00:00
parent 8f2aa095ce
commit 70a6032e68
3 changed files with 7 additions and 7 deletions

View File

@@ -63,10 +63,6 @@ public class HumanPlay {
* a {@link forge.game.spellability.SpellAbility} object.
*/
public final static boolean playSpellAbility(final PlayerControllerHuman controller, final Player p, SpellAbility sa) {
return playSpellAbility(controller, p, sa, false);
}
public final static boolean playSpellAbility(final PlayerControllerHuman controller, final Player p, SpellAbility sa, boolean fromPlayEffect) {
FThreads.assertExecutedByEdt(false);
if (sa == controller.getGame().PLAY_LAND_SURROGATE) {
@@ -87,7 +83,7 @@ public class HumanPlay {
}
// extra play check (unless the card is cast from a play effect)
if (!(fromPlayEffect || sa.canPlay())) {
if (!sa.canPlay()) {
return false;
}

View File

@@ -1506,7 +1506,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override
public boolean playSaFromPlayEffect(final SpellAbility tgtSA) {
return HumanPlay.playSpellAbility(this, player, tgtSA, true);
tgtSA.setSVar("IsCastFromPlayEffect", "True");
return HumanPlay.playSpellAbility(this, player, tgtSA);
}
@Override