forked from External/mage
* Game: fixed priority lost on rollback (example: game skips to next step instead current step after a rollback error);
* Game: added game logs on rollback error;
This commit is contained in:
parent
c8445c31a3
commit
1d60c2039b
4 changed files with 26 additions and 11 deletions
|
|
@ -25,6 +25,7 @@ import mage.filter.FilterCard;
|
|||
import mage.filter.FilterMana;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameState;
|
||||
import mage.game.Graveyard;
|
||||
import mage.game.Table;
|
||||
import mage.game.combat.CombatGroup;
|
||||
|
|
@ -541,11 +542,12 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
|
||||
void resetStoredBookmark(Game game);
|
||||
|
||||
default void restoreState(int bookmark, String text, Game game) {
|
||||
game.restoreState(bookmark, text);
|
||||
default GameState restoreState(int bookmark, String text, Game game) {
|
||||
GameState state = game.restoreState(bookmark, text);
|
||||
if (getStoredBookmark() >= bookmark) {
|
||||
resetStoredBookmark(game);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
void revealCards(Ability source, Cards cards, Game game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue