forked from External/mage
fixed issue 103 - this should catch most card logic errors, log the error on the server and trigger a message on the client
This commit is contained in:
parent
29865e79af
commit
82654f10d5
7 changed files with 44 additions and 5 deletions
|
|
@ -58,9 +58,14 @@ public class SpellStack extends Stack<StackObject> {
|
|||
|
||||
//resolve top StackObject
|
||||
public void resolve(Game game) {
|
||||
StackObject top = this.peek();
|
||||
top.resolve(game);
|
||||
this.remove(top);
|
||||
StackObject top = null;
|
||||
try {
|
||||
top = this.peek();
|
||||
top.resolve(game);
|
||||
} finally {
|
||||
if (top != null)
|
||||
this.remove(top);
|
||||
}
|
||||
}
|
||||
|
||||
public void checkTriggers(GameEvent event, Game game) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue