Added designation names to player tooltip.

This commit is contained in:
LevelX2 2018-01-13 18:55:07 +01:00
parent f528d556d6
commit 2e3ba7e104
4 changed files with 18 additions and 5 deletions

View file

@ -34,9 +34,9 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import mage.cards.Card;
import mage.counters.Counters;
import mage.designations.Designation;
import mage.game.ExileZone;
import mage.game.Game;
import mage.game.GameState;
@ -84,6 +84,7 @@ public class PlayerView implements Serializable {
private final boolean passedAllTurns; // F9
private final boolean passedUntilEndStepBeforeMyTurn; // F11
private final boolean monarch;
private final List<String> designationNames = new ArrayList<>();
public PlayerView(Player player, GameState state, Game game, UUID createdForPlayerId, UUID watcherUserId) {
this.playerId = player.getId();
@ -164,6 +165,9 @@ public class PlayerView implements Serializable {
this.passedUntilStackResolved = player.getPassedUntilStackResolved();
this.passedUntilEndStepBeforeMyTurn = player.getPassedUntilEndStepBeforeMyTurn();
this.monarch = player.getId().equals(game.getMonarchId());
for (Designation designation : player.getDesignations()) {
this.designationNames.add(designation.getName());
}
}
private boolean showInBattlefield(Permanent permanent, GameState state) {
@ -305,4 +309,8 @@ public class PlayerView implements Serializable {
return monarch;
}
public List<String> getDesignationNames() {
return designationNames;
}
}