Fixed that a spell was still shown on the stack if triggered abilities from enters the battlefield event of the cast spell were put on the stack.

This commit is contained in:
LevelX2 2014-08-24 09:11:34 +02:00
parent aad1a2da89
commit 28d3d72c5d
3 changed files with 15 additions and 11 deletions

View file

@ -1106,14 +1106,15 @@ public abstract class GameImpl implements Game, Serializable {
top = state.getStack().peek();
top.resolve(this);
} finally {
if (top != null) {
if (top != null) {
state.getStack().remove(top);
rememberLKI(top.getSourceId(), Zone.STACK, top);
if (!getTurn().isEndTurnRequested()) {
while (state.hasSimultaneousEvents()) {
state.handleSimultaneousEvent(this);
checkTriggered();
}
}
state.getStack().remove(top);
}
}
}
}