mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Added designation names to player tooltip.
This commit is contained in:
parent
f528d556d6
commit
2e3ba7e104
4 changed files with 18 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue