mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Fixed casting a non-instant spell from a Play Effect not working for the human player.
This commit is contained in:
@@ -63,6 +63,10 @@ public class HumanPlay {
|
|||||||
* a {@link forge.game.spellability.SpellAbility} object.
|
* a {@link forge.game.spellability.SpellAbility} object.
|
||||||
*/
|
*/
|
||||||
public final static boolean playSpellAbility(final PlayerControllerHuman controller, final Player p, SpellAbility sa) {
|
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);
|
FThreads.assertExecutedByEdt(false);
|
||||||
|
|
||||||
if (sa == controller.getGame().PLAY_LAND_SURROGATE) {
|
if (sa == controller.getGame().PLAY_LAND_SURROGATE) {
|
||||||
@@ -82,8 +86,8 @@ public class HumanPlay {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// extra play check
|
// extra play check (unless the card is cast from a play effect)
|
||||||
if (!sa.canPlay()) {
|
if (!(fromPlayEffect || sa.canPlay())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1506,7 +1506,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean playSaFromPlayEffect(final SpellAbility tgtSA) {
|
public boolean playSaFromPlayEffect(final SpellAbility tgtSA) {
|
||||||
return HumanPlay.playSpellAbility(this, player, tgtSA);
|
return HumanPlay.playSpellAbility(this, player, tgtSA, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user