mirror of
https://github.com/correl/mage.git
synced 2025-01-14 03:00:10 +00:00
* Time Vault - Fixed replacement handling (fixes #465).
This commit is contained in:
parent
3cceac5df3
commit
9b955a185a
1 changed files with 4 additions and 5 deletions
|
@ -87,7 +87,6 @@ class TimeVaultReplacementEffect extends ReplacementEffectImpl {
|
||||||
TimeVaultReplacementEffect() {
|
TimeVaultReplacementEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Untap);
|
super(Duration.WhileOnBattlefield, Outcome.Untap);
|
||||||
staticText = "If you would begin your turn while {this} is tapped, you may skip that turn instead. If you do, untap Time Vault.";
|
staticText = "If you would begin your turn while {this} is tapped, you may skip that turn instead. If you do, untap Time Vault.";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeVaultReplacementEffect(final TimeVaultReplacementEffect effect) {
|
TimeVaultReplacementEffect(final TimeVaultReplacementEffect effect) {
|
||||||
|
@ -101,7 +100,7 @@ class TimeVaultReplacementEffect extends ReplacementEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
if (event.getType() == EventType.BEGINNING_PHASE && source.getControllerId().equals(event.getPlayerId())) {
|
if (event.getType() == EventType.PLAY_TURN && source.getControllerId().equals(event.getPlayerId())) {
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||||
if (permanent != null && permanent.isTapped()) {
|
if (permanent != null && permanent.isTapped()) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -122,7 +121,7 @@ class TimeVaultReplacementEffect extends ReplacementEffectImpl {
|
||||||
if (player != null && permanent != null) {
|
if (player != null && permanent != null) {
|
||||||
if (player.chooseUse(Outcome.Untap, "Skip your turn to untap " + permanent.getName() + "?", game)) {
|
if (player.chooseUse(Outcome.Untap, "Skip your turn to untap " + permanent.getName() + "?", game)) {
|
||||||
permanent.untap(game);
|
permanent.untap(game);
|
||||||
game.endTurn();
|
game.informPlayers(player.getName() + " skips his or her turn to untap " + permanent.getLogName());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue