mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Resolve "SkipPhase needs better Duration$ for "their next turn""
This commit is contained in:
committed by
Michael Kamensky
parent
b317e46353
commit
ceff5b3e06
@@ -744,6 +744,13 @@ public abstract class SpellAbilityEffect {
|
|||||||
} else {
|
} else {
|
||||||
game.getEndOfTurn().addUntilEnd(sa.getActivatingPlayer(), until);
|
game.getEndOfTurn().addUntilEnd(sa.getActivatingPlayer(), until);
|
||||||
}
|
}
|
||||||
|
} else if ("UntilTheEndOfTargetedNextTurn".equals(duration)) {
|
||||||
|
Player targeted = sa.getTargets().getFirstTargetedPlayer();
|
||||||
|
if (game.getPhaseHandler().isPlayerTurn(targeted)) {
|
||||||
|
game.getEndOfTurn().registerUntilEnd(targeted, until);
|
||||||
|
} else {
|
||||||
|
game.getEndOfTurn().addUntilEnd(targeted, until);
|
||||||
|
}
|
||||||
} else if (duration != null && duration.startsWith("UntilAPlayerCastSpell")) {
|
} else if (duration != null && duration.startsWith("UntilAPlayerCastSpell")) {
|
||||||
game.getStack().addCastCommand(duration.split(" ")[1], until);
|
game.getStack().addCastCommand(duration.split(" ")[1], until);
|
||||||
} else if ("UntilHostLeavesPlay".equals(duration)) {
|
} else if ("UntilHostLeavesPlay".equals(duration)) {
|
||||||
|
|||||||
@@ -115,9 +115,24 @@ public class SkipPhaseEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
eff.addReplacementEffect(re);
|
eff.addReplacementEffect(re);
|
||||||
|
|
||||||
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
|
if (sa.hasParam("Start")) {
|
||||||
game.getAction().moveTo(ZoneType.Command, eff, sa, AbilityKey.newMap());
|
final GameCommand startEffect = new GameCommand() {
|
||||||
eff.updateStateForView();
|
private static final long serialVersionUID = -5861749814760561373L;
|
||||||
game.getTriggerHandler().clearSuppression(TriggerType.ChangesZone);
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
|
||||||
|
game.getAction().moveTo(ZoneType.Command, eff, sa, AbilityKey.newMap());
|
||||||
|
eff.updateStateForView();
|
||||||
|
game.getTriggerHandler().clearSuppression(TriggerType.ChangesZone);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
game.getUpkeep().addUntil(player, startEffect);
|
||||||
|
} else {
|
||||||
|
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
|
||||||
|
game.getAction().moveTo(ZoneType.Command, eff, sa, AbilityKey.newMap());
|
||||||
|
eff.updateStateForView();
|
||||||
|
game.getTriggerHandler().clearSuppression(TriggerType.ChangesZone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Name:Empty City Ruse
|
Name:Empty City Ruse
|
||||||
ManaCost:W
|
ManaCost:W
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ SkipPhase | Cost$ W | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | Phase$ Combat | Duration$ UntilTheEndOfYourNextTurn | SpellDescription$ Target opponent skips all combat phases of their next turn.
|
A:SP$ SkipPhase | Cost$ W | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | Phase$ Combat | Start$ FromNext | Duration$ UntilTheEndOfTargetedNextTurn | SpellDescription$ Target opponent skips all combat phases of their next turn.
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
Oracle:Target opponent skips all combat phases of their next turn.
|
Oracle:Target opponent skips all combat phases of their next turn.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Name:False Peace
|
Name:False Peace
|
||||||
ManaCost:W
|
ManaCost:W
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ SkipPhase | Cost$ W | ValidTgts$ Player | TgtPrompt$ Select target player | Phase$ Combat | Duration$ UntilTheEndOfYourNextTurn | SpellDescription$ Target player skips all combat phases of their next turn.
|
A:SP$ SkipPhase | Cost$ W | ValidTgts$ Player | TgtPrompt$ Select target player | Phase$ Combat | Start$ FromNext | Duration$ UntilTheEndOfTargetedNextTurn | SpellDescription$ Target player skips all combat phases of their next turn.
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
Oracle:Target player skips all combat phases of their next turn.
|
Oracle:Target player skips all combat phases of their next turn.
|
||||||
|
|||||||
Reference in New Issue
Block a user