forked from External/mage
Displaying top revealed card in client. PlayWithTheTopCardRevealedEffect.
This commit is contained in:
parent
8b415e2296
commit
31d849ef46
9 changed files with 160 additions and 20 deletions
|
|
@ -57,6 +57,7 @@ public class PlayerView implements Serializable {
|
|||
private ManaPoolView manaPool;
|
||||
private SimpleCardsView graveyard = new SimpleCardsView();
|
||||
private Map<UUID, PermanentView> battlefield = new HashMap<UUID, PermanentView>();
|
||||
private CardView topCard;
|
||||
|
||||
public PlayerView(Player player, GameState state, Game game) {
|
||||
this.playerId = player.getId();
|
||||
|
|
@ -77,6 +78,8 @@ public class PlayerView implements Serializable {
|
|||
battlefield.put(view.getId(), view);
|
||||
}
|
||||
}
|
||||
this.topCard = player.isTopCardRevealed() && player.getLibrary().size() > 0 ?
|
||||
new CardView(player.getLibrary().getFromTop(game)) : null;
|
||||
}
|
||||
|
||||
private boolean showInBattlefield(Permanent permanent, GameState state) {
|
||||
|
|
@ -136,4 +139,8 @@ public class PlayerView implements Serializable {
|
|||
public boolean hasLeft() {
|
||||
return this.hasLeft;
|
||||
}
|
||||
|
||||
public CardView getTopCard() {
|
||||
return this.topCard;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue