Skip to content

Commit

Permalink
Make loyalty tokens visible to Targaryen
Browse files Browse the repository at this point in the history
  • Loading branch information
gereon77 committed Jun 22, 2024
1 parent c2acbd5 commit b46d9d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,7 @@ export default class IngameGameState extends GameState<
this.entireGame.sendMessageToClients([p.user], {
type: "update-visible-regions",
playerUserId: p.user.id,
regionsToMakeVisible: makeVisible.map(r => r.serializeToClient(true, null)),
regionsToMakeVisible: makeVisible.map(r => r.serializeToClient(true, p)),
regionsToHide: toHide.map(r => r.id),
ordersToMakeVisible: makeVisible.filter(r => this.ordersOnBoard.has(r)).map(r => [r.id, this.ordersOnBoard.get(r).id])
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ export default class Region {
|| this.game.ingame.publicVisibleRegions.includes(this)
|| this.game.ingame.getVisibleRegionsForPlayer(player).includes(this);

const playerControlsTargaryen = this.game.targaryen != null && player != null && player.house == this.game.targaryen;

return {
id: this.id,
units: visible ? this.units.values.map(u => u.serializeToClient()) : [],
Expand All @@ -203,7 +205,7 @@ export default class Region {
? this.controlPowerToken.id
: null
: null,
loyaltyTokens: visible ? this.loyaltyTokens : 0,
loyaltyTokens: visible || playerControlsTargaryen ? this.loyaltyTokens : 0,
castleModifier: visible ? this.castleModifier : 0,
barrelModifier: visible ? this.barrelModifier : 0,
crownModifier: visible ? this.crownModifier : 0,
Expand Down

0 comments on commit b46d9d0

Please sign in to comment.