mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Update PlaneswalkEffect.java (#4315)
Fixes an issue where planeswalk replacements were being applied before confirmation for optional planeswalks, thus making it so that one couldn't choose not to planeswalk with TARDIS's attack trigger if one also controls Susan Foreman
This commit is contained in:
@@ -24,6 +24,11 @@ public class PlaneswalkEffect extends SpellAbilityEffect {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sa.hasParam("Optional") && !sa.getActivatingPlayer().getController().confirmAction(sa, null,
|
||||||
|
Localizer.getInstance().getMessage("lblWouldYouLikeToPlaneswalk"), null)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(activator);
|
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(activator);
|
||||||
Object cause = sa.hasParam("Cause") ? sa.getParam("Cause") : sa;
|
Object cause = sa.hasParam("Cause") ? sa.getParam("Cause") : sa;
|
||||||
repParams.put(AbilityKey.Cause, cause);
|
repParams.put(AbilityKey.Cause, cause);
|
||||||
@@ -31,11 +36,6 @@ public class PlaneswalkEffect extends SpellAbilityEffect {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sa.hasParam("Optional") && !sa.getActivatingPlayer().getController().confirmAction(sa, null,
|
|
||||||
Localizer.getInstance().getMessage("lblWouldYouLikeToPlaneswalk"), null)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sa.hasParam("DontPlaneswalkAway")) {
|
if (!sa.hasParam("DontPlaneswalkAway")) {
|
||||||
for (Player p : game.getPlayers()) {
|
for (Player p : game.getPlayers()) {
|
||||||
p.leaveCurrentPlane();
|
p.leaveCurrentPlane();
|
||||||
|
|||||||
Reference in New Issue
Block a user