forked from External/mage
* Added optional rollback current turn and up to 3 previous turns to the battlefield menu. All other players have to agree to the rollback to let it happen.
This commit is contained in:
parent
5736efa103
commit
8acf28eed1
38 changed files with 661 additions and 252 deletions
|
|
@ -81,6 +81,7 @@ public class GameView implements Serializable {
|
|||
private boolean special = false;
|
||||
private final boolean isPlayer;
|
||||
private final int spellsCastCurrentTurn;
|
||||
private final boolean rollbackTurnsAllowed;
|
||||
|
||||
|
||||
public GameView(GameState state, Game game, UUID createdForPlayerId, UUID watcherUserId) {
|
||||
|
|
@ -179,7 +180,8 @@ public class GameView implements Serializable {
|
|||
spellsCastCurrentTurn = watcher.getAmountOfSpellsAllPlayersCastOnCurrentTurn();
|
||||
} else {
|
||||
spellsCastCurrentTurn = 0;
|
||||
}
|
||||
}
|
||||
rollbackTurnsAllowed = game.getOptions().rollbackTurnsAllowed;
|
||||
}
|
||||
|
||||
private void checkPaid(UUID uuid, StackAbility stackAbility) {
|
||||
|
|
@ -322,5 +324,9 @@ public class GameView implements Serializable {
|
|||
public int getSpellsCastCurrentTurn() {
|
||||
return spellsCastCurrentTurn;
|
||||
}
|
||||
|
||||
public boolean isRollbackTurnsAllowed() {
|
||||
return rollbackTurnsAllowed;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue