forked from External/mage
* Fixed wrong timer handling while other player controlled a player's turn. Attackers now marked with blue frame. Playable cards have a violet frame. If a player has to select cards from hand, the possible cards are marked yellow now. Discard of multiple cards now marks already selected cards and happens in one selection.
This commit is contained in:
parent
194efe6237
commit
67479bb5a4
20 changed files with 205 additions and 163 deletions
|
|
@ -60,6 +60,7 @@ public class PlayerView implements Serializable {
|
|||
private final int handCount;
|
||||
private final boolean isActive;
|
||||
private final boolean hasPriority;
|
||||
private final boolean timerActive;
|
||||
private final boolean hasLeft;
|
||||
private final ManaPoolView manaPool;
|
||||
private final CardsView graveyard = new CardsView();
|
||||
|
|
@ -87,6 +88,10 @@ public class PlayerView implements Serializable {
|
|||
this.manaPool = new ManaPoolView(player.getManaPool());
|
||||
this.isActive = (player.getId().equals(state.getActivePlayerId()));
|
||||
this.hasPriority = player.getId().equals(state.getPriorityPlayerId());
|
||||
this.priorityTimeLeft = player.getPriorityTimeLeft();
|
||||
this.timerActive = (this.hasPriority && player.isGameUnderControl()) ||
|
||||
(player.getPlayersUnderYourControl().contains(state.getPriorityPlayerId()));
|
||||
|
||||
this.hasLeft = player.hasLeft();
|
||||
for (Card card: player.getGraveyard().getCards(game)) {
|
||||
graveyard.put(card.getId(), new CardView(card));
|
||||
|
|
@ -138,7 +143,6 @@ public class PlayerView implements Serializable {
|
|||
}
|
||||
|
||||
this.statesSavedSize = player.getStoredBookmark();
|
||||
this.priorityTimeLeft = player.getPriorityTimeLeft();
|
||||
|
||||
this.passedTurn = player.getPassedTurn();
|
||||
this.passedUntilEndOfTurn = player.getPassedUntilEndOfTurn();
|
||||
|
|
@ -244,6 +248,10 @@ public class PlayerView implements Serializable {
|
|||
return hasPriority;
|
||||
}
|
||||
|
||||
public boolean isTimerActive() {
|
||||
return timerActive;
|
||||
}
|
||||
|
||||
public boolean isPassedTurn() {
|
||||
return passedTurn;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue