Seal simultaneous production choices until everyone confirms

This commit is contained in:
coyotte508 2026-10-01 14:23:58 +02:00
commit b29b826e30
30 changed files with 344 additions and 79 deletions

View file

@ -49,7 +49,8 @@ original edition's physical decks differ in a few counts (e.g. only two "4" wate
- Mega production cards (expert rule 12.1) are implemented: with 4+ operated water/titanium/
new-chemicals factories you may elect 1 Mega card per group of 4 (fixed printed value —
Mega Water 30, Mega Titanium 44, Mega New Chemicals 88 — that counts as 4 cards toward
hand capacity). The election is **blind**, made before any of that round's production
hand capacity). Eligible players choose **simultaneously**, with choices sealed until everyone confirms.
Production and choices are revealed together. The election is **blind**, made before any of that round's production
draws are revealed, and decided per group of 4; only operated factories count (never
upgrade freebies or Kicker bonuses). Mega cards are a separate face-up pool; a spent or
discarded mega returns to its pool. The pool is unlimited — like every component in the

View file

@ -1,6 +1,6 @@
{
"name": "outpost-engine",
"version": "0.10.17",
"version": "0.10.18",
"description": "Unofficial Outpost rules engine for boardgamers.space",
"license": "AGPL-3.0",
"files": [

View file

@ -68,6 +68,9 @@ export function describeLogEntry(state: GameState, entry: LogEntry): string {
const info = entry.info;
switch (move.action) {
case "mega": {
if (info?.megaSealed) {
return `${name} locks in their production choice`;
}
const count = info?.mega ?? 0;
return count > 0
? `${name} takes ${count} mega production card${count === 1 ? "" : "s"}`

View file

@ -1,10 +1,10 @@
import assert from "node:assert/strict";
import { test } from "node:test";
import { MEGA_CARDS } from "./data.js";
import { applyMove, initGame } from "./moves.js";
import { applyMove, dropPlayer, initGame } from "./moves.js";
import { replay } from "./replay.js";
import { countingHandSize, handValue, megaEligible } from "./state.js";
import { currentPlayer, stripSecret } from "../wrapper.js";
import { availableMoves, countingHandSize, handValue, megaEligible } from "./state.js";
import { currentPlayer, logSlice, stripSecret } from "../wrapper.js";
import type { GameState, PlayerState, ProductionCard } from "./types.js";
/** A game where seat 0 just produced 5 water draws (1 mega group + 1 single). */
@ -214,3 +214,168 @@ test("mega: full flow replays identically, including from a stripped log", () =>
assert.equal(replayMega?.v, MEGA_CARDS.water?.value);
assert.equal(handValue(strippedReplay.players[0] as PlayerState) >= 0, true);
});
function simultaneousMegaGame(): GameState {
const state = megaGame();
const first = state.players[0]!;
for (const [seat, player] of state.players.entries()) {
player.hand = [];
player.pendingMega = first.pendingMega!.map((c) => ({ ...c, v: c.v + seat }));
player.megaGroups = { water: 1 };
player.factories = first.factories.map((f) => ({ ...f }));
}
const round = state.log.find((e) => e.type === "round");
assert.ok(round?.type === "round");
round.produced = state.players.map((p, player) => ({ player, cards: structuredClone(p.pendingMega!) }));
round.megaGroups = state.players.map((_, player) => ({ player, groups: { water: 1 } }));
return state;
}
test("mega: submitted choices cannot be inferred from state, deck counts, or sliced logs", () => {
const mega = simultaneousMegaGame();
const singles = structuredClone(mega);
const before = structuredClone(mega);
applyMove(mega, { action: "mega", take: { water: 1 } }, 2);
applyMove(singles, { action: "mega", take: {} }, 2);
assert.deepEqual(currentPlayer(mega), [0, 1]);
assert.deepEqual(availableMoves(mega, 2), []);
assert.deepEqual(mega.decks, before.decks);
assert.deepEqual(
mega.players.map((p) => p.hand),
before.players.map((p) => p.hand)
);
for (const viewer of [undefined, -1, 0, 1]) {
assert.deepEqual(stripSecret(mega, viewer), stripSecret(singles, viewer));
const hidden = stripSecret(mega, viewer);
assert.deepEqual(hidden.players[2]!.megaChoice, {});
const entry = hidden.log.at(-1);
assert.ok(entry?.type === "move" && entry.move.action === "mega");
assert.deepEqual(entry.move.take, {});
assert.deepEqual(entry.info, { megaSealed: true });
const slice = logSlice(mega, { player: viewer, start: mega.log.length - 1 });
assert.deepEqual(slice, logSlice(singles, { player: viewer, start: singles.log.length - 1 }));
assert.match(slice.log[0]!.simple!, /locks in their production choice/);
}
const own = stripSecret(mega, 2);
assert.deepEqual(own.players[2]!.megaChoice, { water: 1 });
assert.ok(own.players[2]!.pendingMega!.every((c) => c.v === -1));
});
test("mega: all choices reveal together after JSON persistence, including earlier log slices", () => {
let state = simultaneousMegaGame();
applyMove(state, { action: "mega", take: { water: 1 } }, 2);
const index = state.log.length - 1;
state = JSON.parse(JSON.stringify(state)) as GameState;
applyMove(state, { action: "mega", take: {} }, 0);
assert.equal(currentPlayer(state), 1);
assert.equal(state.phase, "mega");
assert.ok(state.players.every((p) => p.hand.length === 0));
applyMove(state, { action: "mega", take: { water: 1 } }, 1);
assert.notEqual(state.phase, "mega");
assert.deepEqual(
state.players.map((p) => p.hand.filter((c) => c.m).length),
[0, 1, 1]
);
assert.ok(state.players.every((p) => p.megaChoice === undefined && p.pendingMega?.length === 0));
for (const viewer of [undefined, 0, 1, 2]) {
const entry = logSlice(state, { player: viewer, start: index, end: index + 1 }).log[0];
assert.ok(entry?.type === "move" && entry.move.action === "mega");
assert.deepEqual(entry.move.take, { water: 1 });
assert.match(entry.simple!, /takes 1 mega production card/);
const hand = stripSecret(state, viewer).players[2]!.hand;
assert.equal(hand.find((c) => c.m)?.v, MEGA_CARDS.water!.value);
assert.ok(hand.filter((c) => !c.m).every((c) => (viewer === 2 ? c.v > 0 : c.v === -1)));
}
});
test("mega: duplicate and invalid commitments leave the whole state unchanged", () => {
const state = simultaneousMegaGame();
const before = structuredClone(state);
assert.throws(() => applyMove(state, { action: "mega", take: { water: 2 } }, 0));
assert.deepEqual(state, before);
applyMove(state, { action: "mega", take: {} }, 0);
const committed = structuredClone(state);
assert.throws(() => applyMove(state, { action: "mega", take: { water: 1 } }, 0));
assert.deepEqual(state, committed);
});
test("mega: pending and resolved secret-stripped replays preserve hands and sealed choices", () => {
const state = simultaneousMegaGame();
applyMove(state, { action: "mega", take: { water: 1 } }, 2);
for (const viewer of [undefined, 0, 1, 2]) {
const visible = stripSecret(state, viewer);
const rebuilt = replay(visible);
assert.equal(rebuilt.phase, "mega");
if (viewer !== 2) {
const last = rebuilt.log.at(-1);
assert.ok(last?.type === "move" && last.info?.megaSealed);
}
assert.deepEqual(currentPlayer(rebuilt), currentPlayer(visible));
for (let i = 0; i < 3; i++) {
assert.deepEqual(rebuilt.players[i]!.hand, visible.players[i]!.hand);
assert.deepEqual(rebuilt.players[i]!.pendingMega, visible.players[i]!.pendingMega);
assert.deepEqual(rebuilt.players[i]!.megaChoice, visible.players[i]!.megaChoice);
}
}
applyMove(state, { action: "mega", take: {} }, 0);
applyMove(state, { action: "mega", take: { water: 1 } }, 1);
for (const viewer of [undefined, 0, 1, 2]) {
const visible = stripSecret(state, viewer);
const rebuilt = replay(visible);
assert.equal(rebuilt.phase, visible.phase);
assert.deepEqual(
rebuilt.players.map((p) => p.hand),
visible.players.map((p) => p.hand)
);
}
});
test("mega: response order cannot change resolved hands or returned deck order", () => {
const first = simultaneousMegaGame();
const second = structuredClone(first);
for (const seat of [2, 0, 1]) {
applyMove(first, { action: "mega", take: { water: 1 } }, seat);
}
for (const seat of [0, 1, 2]) {
applyMove(second, { action: "mega", take: { water: 1 } }, seat);
}
assert.deepEqual(first.decks, second.decks);
assert.deepEqual(first.players, second.players);
});
test("mega: dropping the last waiting player reveals the remaining commitments", () => {
const state = simultaneousMegaGame();
applyMove(state, { action: "mega", take: { water: 1 } }, 0);
applyMove(state, { action: "mega", take: {} }, 1);
dropPlayer(state, 2);
assert.notEqual(state.phase, "mega");
assert.equal(state.players[0]!.hand.filter((c) => c.m).length, 1);
assert.equal(state.players[1]!.hand.length, 6);
assert.equal(state.players[2]!.hand.length, 0);
assert.ok(state.players.every((p) => p.megaChoice === undefined));
});
test("mega: dropping a committed player cancels their choice without blocking others", () => {
const state = simultaneousMegaGame();
applyMove(state, { action: "mega", take: { water: 1 } }, 0);
dropPlayer(state, 0);
assert.deepEqual(currentPlayer(state), [1, 2]);
applyMove(state, { action: "mega", take: {} }, 1);
applyMove(state, { action: "mega", take: {} }, 2);
assert.notEqual(state.phase, "mega");
assert.equal(state.players[0]!.hand.length, 0);
assert.ok(state.players.every((p) => p.megaChoice === undefined));
});
test("mega: old mid-production saves with already-collected hands still complete", () => {
const state = simultaneousMegaGame();
state.players[0]!.hand = [{ t: "water", v: MEGA_CARDS.water!.value, m: true }];
state.players[0]!.pendingMega = [];
state.players[0]!.megaGroups = {};
const existingHand = structuredClone(state.players[0]!.hand);
assert.deepEqual(currentPlayer(state), [1, 2]);
applyMove(state, { action: "mega", take: {} }, 1);
applyMove(state, { action: "mega", take: { water: 1 } }, 2);
assert.notEqual(state.phase, "mega");
assert.deepEqual(state.players[0]!.hand, existingHand);
});

View file

@ -11,6 +11,7 @@ import {
hasExchange,
maxBid,
megaEligible,
needsMegaChoice,
mustAutoPassBid,
populationCost,
populationMax,
@ -137,6 +138,7 @@ export function enterMegaPhase(state: GameState): void {
for (const player of state.players) {
player.done = false;
player.mustDiscard = false;
delete player.megaChoice;
if (player.dropped) {
player.pendingMega = [];
continue;
@ -333,7 +335,7 @@ export function applyMove(state: GameState, rawMove: Move | unknown, seat: numbe
switch (move.action) {
case "mega":
info = moveMega(state, move, seat, player);
info = moveMega(state, move, player);
break;
case "discard":
info = moveDiscard(state, move, seat, player);
@ -371,7 +373,8 @@ export function applyMove(state: GameState, rawMove: Move | unknown, seat: numbe
/** Phase transitions that must happen after the move is logged (may end the round/game). */
function postMove(state: GameState, move: Move): void {
if (state.phase === "mega" && !state.players.some((p) => (p.pendingMega?.length ?? 0) > 0)) {
if (state.phase === "mega" && !state.players.some(needsMegaChoice)) {
resolveMegaChoices(state);
enterDiscardPhase(state);
return;
}
@ -384,13 +387,8 @@ function postMove(state: GameState, move: Move): void {
}
}
/**
* Confirm the mega-vs-singles choice for the staged production draws. Any full
* group of 4 pending draws of a mega resource may be exchanged for one fixed
* Mega card (while the pool lasts); the rest joins the hand as singles.
*/
function moveMega(state: GameState, move: Move & { action: "mega" }, seat: number, player: PlayerState): MoveInfo {
if (state.phase !== "mega" || (player.pendingMega?.length ?? 0) === 0) {
function moveMega(state: GameState, move: Move & { action: "mega" }, player: PlayerState): MoveInfo {
if (state.phase !== "mega" || !needsMegaChoice(player)) {
err("no production pending for this player");
}
// The election is blind (rule 12.1): the player commits to a number of Mega
@ -403,6 +401,23 @@ function moveMega(state: GameState, move: Move & { action: "mega" }, seat: numbe
err(`cannot take ${count} mega ${resource} card(s)`);
}
}
player.megaChoice = { ...take };
const count = Object.values(take).reduce((sum, value) => sum + (value ?? 0), 0);
return count > 0 ? { mega: count } : {};
}
function resolveMegaChoices(state: GameState): void {
// Resolve in purchase order so response timing cannot change the deck order.
for (const seat of state.purchaseOrder) {
const player = state.players[seat];
if (player && !player.dropped && player.megaChoice !== undefined) {
collectProduction(state, player, player.megaChoice);
delete player.megaChoice;
}
}
}
function collectProduction(state: GameState, player: PlayerState, take: Partial<Record<Resource, number>>): void {
const pending = player.pendingMega ?? [];
const megas: ProductionCard[] = [];
const consumed = new Set<number>();
@ -434,7 +449,6 @@ function moveMega(state: GameState, move: Move & { action: "mega" }, seat: numbe
player.hand.push(...keep, ...megas);
player.pendingMega = [];
player.megaGroups = {};
return megas.length > 0 ? { mega: megas.length } : {};
}
function moveDiscard(
@ -1025,6 +1039,7 @@ export function dropPlayer(state: GameState, seat: number): GameState {
player.mustDiscard = false;
player.done = true;
player.pendingMega = [];
delete player.megaChoice;
for (const factory of player.factories) {
factory.manned = false;
}
@ -1033,12 +1048,15 @@ export function dropPlayer(state: GameState, seat: number): GameState {
if (state.ended) {
return state;
}
if (state.phase === "mega" && !state.players.some(needsMegaChoice)) {
resolveMegaChoices(state);
}
if (activePlayers(state) <= 1) {
finishGame(state);
return state;
}
if (state.phase === "mega" && !state.players.some((p) => (p.pendingMega?.length ?? 0) > 0)) {
if (state.phase === "mega" && !state.players.some(needsMegaChoice)) {
enterDiscardPhase(state);
return state;
}

View file

@ -67,6 +67,12 @@ export function replay(state: GameState, options?: { to?: number; trackKnowledge
}
setReplayExchangeTake(entry.info?.exchangeTake ?? -1);
applyMove(replayed, entry.move, entry.player);
if (entry.info?.megaSealed) {
const applied = replayed.log.at(-1);
if (applied?.type === "move") {
applied.info = { megaSealed: true };
}
}
}
}
} finally {

View file

@ -214,6 +214,10 @@ export function handValue(player: PlayerState): number {
return player.hand.reduce((sum, c) => sum + c.v, 0) + (player.pendingMega ?? []).reduce((sum, c) => sum + c.v, 0);
}
export function needsMegaChoice(player: PlayerState): boolean {
return !player.dropped && (player.pendingMega?.length ?? 0) > 0 && player.megaChoice === undefined;
}
/**
* Mega production eligibility (rule 12.1): the Mega cards a player may elect to
* take this round — full groups of 4 operated factories per mega resource. Only
@ -632,7 +636,7 @@ export function availableMoves(state: GameState, player?: number): string[] {
}
switch (state.phase) {
case "mega":
return (p.pendingMega?.length ?? 0) > 0 ? ["mega"] : [];
return needsMegaChoice(p) ? ["mega"] : [];
case "discard":
return p.mustDiscard ? ["discard"] : [];
case "exchange":

View file

@ -89,6 +89,8 @@ export interface PlayerState {
* blind — made before the pendingMega values are revealed to the player.
*/
megaGroups?: Partial<Record<Resource, number>>;
/** Committed production choice, kept sealed until every eligible player has chosen. */
megaChoice?: Partial<Record<Resource, number>>;
dropped: boolean;
/** Per-player gameplay settings (set via setPlayerSettings). */
settings: PlayerSettings;
@ -208,6 +210,7 @@ export interface MoveInfo {
discarded?: number;
/** Mega cards taken with this "mega" move (for the log description). */
mega?: number;
megaSealed?: true;
/**
* Seats auto-passed out of the auction by this move (public bound or the
* autoPassBids setting). Replay applies these verbatim: the true-value check

View file

@ -1,7 +1,7 @@
import { PRODUCTION_DECKS, KICKER_SPECS, UPGRADE_SPECS } from "./src/data.js";
import { nextInt, shuffle } from "./src/prng.js";
import { RESOURCES } from "./src/types.js";
import { maxBid } from "./src/state.js";
import { maxBid, needsMegaChoice } from "./src/state.js";
import { moveAI as moveAICore } from "./src/ai.js";
import { describeLogEntry } from "./src/describe.js";
import { applyMove, dropPlayer as dropPlayerCore, initGame } from "./src/moves.js";
@ -65,7 +65,7 @@ export function currentPlayer(data: GameState): number | number[] | undefined {
}
switch (data.phase) {
case "mega": {
const waiting = data.players.flatMap((p, seat) => ((p.pendingMega?.length ?? 0) > 0 && !p.dropped ? [seat] : []));
const waiting = data.players.flatMap((p, seat) => (needsMegaChoice(p) ? [seat] : []));
return waiting.length === 1 ? waiting[0] : waiting;
}
case "discard": {
@ -97,7 +97,7 @@ export function logLength(data: GameState): number {
return data.log.length;
}
/** Rule 12.1: the viewer's own production draws stay hidden while their mega election is pending. */
/** Rule 12.1: production draws stay hidden until all mega elections are resolved. */
function hideOwnProduction(data: GameState, viewer: number | undefined): boolean {
if (data.phase !== "mega" || viewer === undefined) {
return false;
@ -267,7 +267,7 @@ export function stripSecret(data: GameState, player?: number): GameState {
players: data.players.map((p, i) => {
if (i === viewer) {
// Rule 12.1: the mega election is blind — the player's own pending
// draw values stay hidden until they commit (mega phase only).
// draw values stay hidden until all choices resolve (mega phase only).
if (data.phase === "mega" && (p.pendingMega?.length ?? 0) > 0) {
return { ...p, pendingMega: p.pendingMega?.map((c): ProductionCard => ({ t: c.t, v: -1 })) };
}
@ -275,6 +275,7 @@ export function stripSecret(data: GameState, player?: number): GameState {
}
return {
...p,
...(p.megaChoice !== undefined ? { megaChoice: {} } : {}),
hand: p.hand.map((c): ProductionCard => ({ t: c.t, v: c.m ? c.v : -1, ...(c.m ? { m: true } : {}) })),
pendingMega: p.pendingMega?.map(
(c): ProductionCard => ({
@ -306,19 +307,31 @@ function maskLog(
// An exchange's received card is parked on the upgrade until the exchange
// step (end of the discard phase) closes, i.e. while data.exchange is set.
const exchangeOngoing = data.exchange != null && !data.ended;
return data.log
.slice(start, end)
.map((entry, i) =>
hideProduced(
entry,
viewer,
data.options.fastBid === true,
hideOwn,
revealed.has(i + start),
data.ended,
exchangeOngoing
)
let productionStart = data.log.length;
if (data.phase === "mega" && !data.ended) {
while (productionStart > 0 && data.log[productionStart - 1]?.type !== "round") {
productionStart--;
}
}
return data.log.slice(start, end).map((entry, i) => {
if (
i + start >= productionStart &&
entry.type === "move" &&
entry.move.action === "mega" &&
entry.player !== viewer
) {
return { ...entry, move: { action: "mega" as const, take: {} }, info: { megaSealed: true as const } };
}
return hideProduced(
entry,
viewer,
data.options.fastBid === true,
hideOwn,
revealed.has(i + start),
data.ended,
exchangeOngoing
);
});
}
export interface LogSliceOptions {

View file

@ -1,6 +1,6 @@
{
"name": "outpost-viewer",
"version": "0.1.9",
"version": "0.1.10",
"description": "Browser viewer for the Outpost game on boardgamers.space",
"license": "AGPL-3.0",
"files": [

View file

@ -7,6 +7,7 @@
MIN_CARD_VALUE,
UPGRADE_SPECS,
auctionCard,
needsMegaChoice,
operators,
} from "outpost-engine";
import ResourceIcon from "./ResourceIcon.svelte";
@ -44,7 +45,7 @@
seat === undefined ? "…" : (s.players[seat]?.name ?? `Player ${seat + 1}`);
switch (s.phase) {
case "mega": {
const seats = s.players.flatMap((p, i) => ((p.pendingMega?.length ?? 0) > 0 ? [i] : []));
const seats = s.players.flatMap((p, i) => (needsMegaChoice(p) ? [i] : []));
return `Waiting for ${seats.map(name).join(", ")} to take production…`;
}
case "discard": {
@ -106,6 +107,7 @@
Production: choose Mega cards before drawing. Each Mega replaces the production of 4 staffed factories; other
factories produce single cards.
</span>
<span class="hint dim">Choices stay hidden until everyone has confirmed.</span>
{#each Object.entries(store.megaEligible) as [resource, groups] (resource)}
{@const mega = MEGA_CARDS[resource as keyof typeof MEGA_CARDS]}
{@const taking = store.megaTake[resource] ?? 0}
@ -282,6 +284,10 @@
{/if}
{:else}
<div class="flow">
{#if state?.phase === "mega" && me?.megaChoice !== undefined}
<span class="hint">Production choice locked.</span>
<span class="hint dim">Choices stay hidden until everyone has confirmed.</span>
{/if}
<span class="hint dim">{waitingOn}</span>
</div>
{/if}

View file

@ -10,6 +10,7 @@
UPGRADES,
handValueExpected,
handValueRange,
needsMegaChoice,
productionRange,
operators as availableOperators,
type GameState,
@ -42,7 +43,8 @@
const orderPos = $derived(state.purchaseOrder.indexOf(index) + 1);
const isActive = $derived(
!state.ended &&
((state.phase === "actions" && state.activeSeat === index) ||
((state.phase === "mega" && needsMegaChoice(player)) ||
(state.phase === "actions" && state.activeSeat === index) ||
(state.phase === "discard" && player.mustDiscard) ||
(state.phase === "auction" &&
(state.auction?.bids ? state.auction.bids[index] === undefined : state.auction?.activeBidder === index)) ||
@ -264,14 +266,9 @@
{/if}
</div>
{/if}
{#if isMe && store.myMega && (player.pendingMega?.length ?? 0) > 0}
{#if isMe && state.phase === "mega" && (player.pendingMega?.length ?? 0) > 0}
<div class="row hand pending">
<span
class="pending-label"
title="cards just produced — values hidden until you commit to Mega cards (rule 12.1)"
>
produced:
</span>
<span class="pending-label" title="Choices stay hidden until everyone has confirmed."> produced: </span>
{#each player.pendingMega ?? [] as card, i (i)}
<ProductionCardView {card} />
{/each}

View file

@ -302,9 +302,9 @@
>
<defs>
<linearGradient id="moonbody" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#7a6a55" />
<stop offset="0.45" stop-color="#5d5140" />
<stop offset="1" stop-color="#3c352a" />
<stop offset="0" stop-color="#434c54" />
<stop offset="0.45" stop-color="#303841" />
<stop offset="1" stop-color="#1f262e" />
</linearGradient>
</defs>
<path
@ -640,21 +640,21 @@
}
.moon .rim {
fill: none;
stroke: #97815f;
stroke: #76848e;
stroke-width: 2;
opacity: 0.7;
}
.moon .crater {
fill: #453c2e;
fill: #202830;
}
.moon .crater-hi {
fill: none;
stroke: #87714f;
stroke: #53616b;
stroke-width: 1.2;
opacity: 0.6;
}
/* Player buildings: factories and upgrades clustered per player.
Player color is the outline/accent; unmanned factories are dimmer. */
Player color marks the foundations and upgrade lights; unmanned factories are dimmer. */
.bldg {
pointer-events: all;
}
@ -677,8 +677,8 @@
opacity: 0.55;
}
.bldg {
stroke-linecap: round;
stroke-linejoin: round;
stroke-linecap: square;
stroke-linejoin: bevel;
}
.bldg .footprint {
fill: #17191c;
@ -686,17 +686,17 @@
}
.bldg .body {
fill: #29343d;
stroke: color-mix(in srgb, var(--bc) 55%, #68747e);
stroke: #526674;
stroke-width: 0.85;
}
.bldg .roof {
fill: #414e57;
stroke: var(--bc);
stroke: #8295a1;
stroke-width: 0.8;
}
.bldg .base {
fill: #263038;
stroke: #637079;
stroke: color-mix(in srgb, var(--bc) 65%, #637079);
stroke-width: 0.6;
}
.bldg .detail {
@ -706,7 +706,7 @@
}
.bldg .panel {
fill: #182c3f;
stroke: var(--bc);
stroke: #6c8390;
stroke-width: 0.7;
}
.bldg .signal {
@ -715,19 +715,19 @@
stroke-width: 1;
}
.bldg.manned .body {
fill: color-mix(in srgb, var(--bc) 18%, #27323b);
stroke: var(--bc);
fill: #31434f;
stroke: #8295a1;
}
.bldg.manned .roof {
fill: color-mix(in srgb, var(--bc) 38%, #53616a);
fill: #485c68;
}
.bldg.manned .signal {
fill: var(--rc);
stroke: var(--rc);
}
.bldg.upgrade .signal {
fill: #e5dcb0;
stroke: #e5dcb0;
fill: color-mix(in srgb, var(--bc) 65%, #c5d3d7);
stroke: color-mix(in srgb, var(--bc) 65%, #c5d3d7);
}
.bldg:hover {
filter: brightness(1.35);

View file

@ -17,6 +17,7 @@ import {
handCapacity,
handValue,
megaEligible as megaEligibleEngine,
needsMegaChoice,
operators as availableOperators,
populationCost,
populationMax,
@ -380,7 +381,7 @@ export class ViewerStore {
/** Mega phase: I have staged production draws awaiting the mega-vs-singles choice. */
get myMega(): boolean {
const s = this.liveState;
return !!s && !s.ended && s.phase === "mega" && !this.replay.active && (this.me?.pendingMega?.length ?? 0) > 0;
return !!s && !s.ended && s.phase === "mega" && !this.replay.active && !!this.me && needsMegaChoice(this.me);
}
/** Mega conversions available from my staged draws (resource -> groups of 4). */
@ -574,7 +575,7 @@ export class ViewerStore {
get myHandValue(): number {
const me = this.me;
return me ? handValue(me) : 0;
return me ? me.hand.reduce((sum, card) => sum + card.v, 0) : 0;
}
vpOf(index: number): number {

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Pas på auktioner, jeg ikke har råd til",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Pas automatisk på en auktion, når dine kort og rabatter ikke kan dække det krævede bud. Det kan afsløre, at din hånd er for svag."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Pas automatisk på en auktion, når dine kort og rabatter ikke kan dække det krævede bud. Det kan afsløre, at din hånd er for svag.",
"Choices stay hidden until everyone has confirmed.": "Valgene forbliver skjulte, indtil alle har bekræftet.",
"Production choice locked.": "Produktionsvalg bekræftet.",
"{p0} locks in their production choice": "{p0} bekræfter sit produktionsvalg"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Bei unbezahlbaren Auktionen passen",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Bei einer Auktion automatisch passen, wenn deine Karten und Rabatte das erforderliche Gebot nicht decken. Das kann verraten, dass deine Hand zu schwach ist."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Bei einer Auktion automatisch passen, wenn deine Karten und Rabatte das erforderliche Gebot nicht decken. Das kann verraten, dass deine Hand zu schwach ist.",
"Choices stay hidden until everyone has confirmed.": "Die Entscheidungen bleiben verborgen, bis alle bestätigt haben.",
"Production choice locked.": "Produktionsentscheidung bestätigt.",
"{p0} locks in their production choice": "{p0} bestätigt die Produktionsentscheidung"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Πάσο σε δημοπρασίες που δεν μπορώ να πληρώσω",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Αυτόματο πάσο σε δημοπρασία όταν οι κάρτες και οι εκπτώσεις σου δεν καλύπτουν την απαιτούμενη προσφορά. Αυτό μπορεί να αποκαλύψει ότι το χέρι σου είναι πολύ αδύναμο."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Αυτόματο πάσο σε δημοπρασία όταν οι κάρτες και οι εκπτώσεις σου δεν καλύπτουν την απαιτούμενη προσφορά. Αυτό μπορεί να αποκαλύψει ότι το χέρι σου είναι πολύ αδύναμο.",
"Choices stay hidden until everyone has confirmed.": "Οι επιλογές παραμένουν κρυφές μέχρι να επιβεβαιώσουν όλοι.",
"Production choice locked.": "Η επιλογή παραγωγής κλειδώθηκε.",
"{p0} locks in their production choice": "{p0} κλειδώνει την επιλογή παραγωγής"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Pass auctions I can't afford",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.",
"Choices stay hidden until everyone has confirmed.": "Choices stay hidden until everyone has confirmed.",
"Production choice locked.": "Production choice locked.",
"{p0} locks in their production choice": "{p0} locks in their production choice"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "ارتقاهای باقی‌مانده",
"Remaining Kicker cards": "کارت‌های کیکر باقی‌مانده",
"Pass auctions I can't afford": "در مزایده‌هایی که توان پرداخت ندارم، انصراف بده",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "وقتی کارت‌ها و تخفیف‌هایتان مبلغ پیشنهاد لازم را پوشش نمی‌دهند، خودکار از حراج انصراف دهید. این کار ممکن است ضعیف بودن دستتان را آشکار کند."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "وقتی کارت‌ها و تخفیف‌هایتان مبلغ پیشنهاد لازم را پوشش نمی‌دهند، خودکار از حراج انصراف دهید. این کار ممکن است ضعیف بودن دستتان را آشکار کند.",
"Choices stay hidden until everyone has confirmed.": "انتخاب‌ها تا زمانی که همه تأیید کنند پنهان می‌مانند.",
"Production choice locked.": "انتخاب تولید ثبت شد.",
"{p0} locks in their production choice": "{p0} انتخاب تولید خود را ثبت می‌کند"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Passer les enchères hors budget",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Passer automatiquement une enchère si vos cartes et réductions ne permettent pas de couvrir l’enchère requise. Cela peut révéler que votre main est trop faible."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Passer automatiquement une enchère si vos cartes et réductions ne permettent pas de couvrir l’enchère requise. Cela peut révéler que votre main est trop faible.",
"Choices stay hidden until everyone has confirmed.": "Les choix restent cachés jusqu’à ce que tout le monde ait confirmé.",
"Production choice locked.": "Choix de production confirmé.",
"{p0} locks in their production choice": "{p0} confirme son choix de production"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "जिन नीलामियों का भुगतान न कर सकूँ, उनमें पास करें",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "जब आपके कार्ड और छूट आवश्यक बोली के लिए पर्याप्त न हों, तो नीलामी में अपने-आप पास करें। इससे पता चल सकता है कि आपका हाथ कमज़ोर है।"
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "जब आपके कार्ड और छूट आवश्यक बोली के लिए पर्याप्त न हों, तो नीलामी में अपने-आप पास करें। इससे पता चल सकता है कि आपका हाथ कमज़ोर है।",
"Choices stay hidden until everyone has confirmed.": "सभी की पुष्टि होने तक विकल्प छिपे रहेंगे।",
"Production choice locked.": "उत्पादन का विकल्प तय हो गया।",
"{p0} locks in their production choice": "{p0} अपना उत्पादन विकल्प तय करता है"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Passa nelle aste che non posso permettermi",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Passa automaticamente in un’asta quando le tue carte e i tuoi sconti non coprono l’offerta richiesta. Questo può rivelare che la tua mano è troppo debole."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Passa automaticamente in un’asta quando le tue carte e i tuoi sconti non coprono l’offerta richiesta. Questo può rivelare che la tua mano è troppo debole.",
"Choices stay hidden until everyone has confirmed.": "Le scelte restano nascoste finché tutti non hanno confermato.",
"Production choice locked.": "Scelta di produzione confermata.",
"{p0} locks in their production choice": "{p0} conferma la propria scelta di produzione"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "감당할 수 없는 경매는 패스",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "카드와 할인으로 필요한 입찰 금액을 충당할 수 없으면 경매에서 자동으로 패스합니다. 이로 인해 패가 약하다는 사실이 드러날 수 있습니다."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "카드와 할인으로 필요한 입찰 금액을 충당할 수 없으면 경매에서 자동으로 패스합니다. 이로 인해 패가 약하다는 사실이 드러날 수 있습니다.",
"Choices stay hidden until everyone has confirmed.": "모두가 확정할 때까지 선택은 공개되지 않습니다.",
"Production choice locked.": "생산 선택이 확정되었습니다.",
"{p0} locks in their production choice": "{p0} 님이 생산 선택을 확정합니다"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Pas bij veilingen die ik niet kan betalen",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Pas automatisch bij een veiling als je kaarten en kortingen het vereiste bod niet dekken. Dit kan verraden dat je hand te zwak is."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Pas automatisch bij een veiling als je kaarten en kortingen het vereiste bod niet dekken. Dit kan verraden dat je hand te zwak is.",
"Choices stay hidden until everyone has confirmed.": "De keuzes blijven verborgen totdat iedereen heeft bevestigd.",
"Production choice locked.": "Productiekeuze bevestigd.",
"{p0} locks in their production choice": "{p0} bevestigt de productiekeuze"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Pasuj w aukcjach, na które mnie nie stać",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Automatycznie pasuj w licytacji, gdy twoje karty i zniżki nie wystarczają na wymaganą ofertę. Może to ujawnić, że twoja ręka jest zbyt słaba."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Automatycznie pasuj w licytacji, gdy twoje karty i zniżki nie wystarczają na wymaganą ofertę. Może to ujawnić, że twoja ręka jest zbyt słaba.",
"Choices stay hidden until everyone has confirmed.": "Wybory pozostają ukryte, dopóki wszyscy ich nie zatwierdzą.",
"Production choice locked.": "Wybór produkcji zatwierdzony.",
"{p0} locks in their production choice": "{p0} zatwierdza wybór produkcji"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Passar em leilões que não posso pagar",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Passe automaticamente em um leilão quando suas cartas e descontos não cobrirem o lance necessário. Isso pode revelar que sua mão é fraca demais."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Passe automaticamente em um leilão quando suas cartas e descontos não cobrirem o lance necessário. Isso pode revelar que sua mão é fraca demais.",
"Choices stay hidden until everyone has confirmed.": "As escolhas ficam ocultas até que todos tenham confirmado.",
"Production choice locked.": "Escolha de produção confirmada.",
"{p0} locks in their production choice": "{p0} confirma sua escolha de produção"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Pas la licitațiile pe care nu mi le permit",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Pasează automat la o licitație când cărțile și reducerile tale nu acoperă oferta necesară. Asta poate dezvălui că mâna ta este prea slabă."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Pasează automat la o licitație când cărțile și reducerile tale nu acoperă oferta necesară. Asta poate dezvălui că mâna ta este prea slabă.",
"Choices stay hidden until everyone has confirmed.": "Alegerile rămân ascunse până când toți au confirmat.",
"Production choice locked.": "Alegerea producției a fost confirmată.",
"{p0} locks in their production choice": "{p0} confirmă alegerea producției"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Пасовать на аукционах, если не хватает средств",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Автоматически пасовать на аукционе, если ваших карт и скидок недостаточно для требуемой ставки. Это может выдать слабость вашей руки."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Автоматически пасовать на аукционе, если ваших карт и скидок недостаточно для требуемой ставки. Это может выдать слабость вашей руки.",
"Choices stay hidden until everyone has confirmed.": "Выбор остаётся скрытым, пока все его не подтвердят.",
"Production choice locked.": "Выбор производства подтверждён.",
"{p0} locks in their production choice": "{p0} подтверждает выбор производства"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "Bỏ qua đấu giá khi không đủ tiền",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Tự động bỏ lượt đấu giá khi bài và mức giảm giá của bạn không đủ cho giá thầu cần thiết. Điều này có thể tiết lộ rằng bài trên tay bạn quá yếu."
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "Tự động bỏ lượt đấu giá khi bài và mức giảm giá của bạn không đủ cho giá thầu cần thiết. Điều này có thể tiết lộ rằng bài trên tay bạn quá yếu.",
"Choices stay hidden until everyone has confirmed.": "Các lựa chọn được giữ kín cho đến khi mọi người xác nhận.",
"Production choice locked.": "Đã chốt lựa chọn sản xuất.",
"{p0} locks in their production choice": "{p0} chốt lựa chọn sản xuất"
}

View file

@ -1179,5 +1179,8 @@
"Remaining upgrades": "Remaining upgrades",
"Remaining Kicker cards": "Remaining Kicker cards",
"Pass auctions I can't afford": "自動放棄無力支付的拍賣",
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "當手牌和折扣不足以支付所需的出價時,自動放棄競標。這可能讓其他玩家知道你的手牌價值不足。"
"Automatically pass an auction when your cards and discounts cannot cover the required bid. This can reveal that your hand is too weak.": "當手牌和折扣不足以支付所需的出價時,自動放棄競標。這可能讓其他玩家知道你的手牌價值不足。",
"Choices stay hidden until everyone has confirmed.": "所有人確認前,選擇都會保持隱藏。",
"Production choice locked.": "生產選擇已確認。",
"{p0} locks in their production choice": "{p0} 確認了生產選擇"
}