diff --git a/components/admin-lobby-controls.tsx b/components/admin-lobby-controls.tsx index 5376e420..1b84f78c 100644 --- a/components/admin-lobby-controls.tsx +++ b/components/admin-lobby-controls.tsx @@ -77,19 +77,21 @@ export function AdminLobbyControls({ accountId, code, canManage, onClose, onUpda } function selectKind(next: AdminLobbyAction['type']) { setKind(next); setConfirmed(false); setTarget(''); - setEnabled(next === 'rules' ? lobby?.advanced ?? false : next === 'techTokens' ? lobby?.techTokens ?? false : lobby?.strongholdCards ?? false); + setEnabled(next === 'rules' ? lobby?.advanced ?? false : next === 'techTokens' ? lobby?.techTokens ?? false : + next === 'shortAllianceVictory' ? lobby?.shortAllianceVictory ?? false : lobby?.strongholdCards ?? false); if (next === 'addBot') setFaction(baseFactions.find(item => !lobby?.players.some(player => player.faction === item.id))?.id ?? 'atreides'); if (next === 'removeBot' || next === 'configureBot') selectTarget(lobby?.players.find(player => player.bot)?.id ?? ''); if (next === 'assignHost') setTarget(lobby?.players.find(player => player.hostEligible && player.id !== lobby.host)?.id ?? ''); } const action: AdminLobbyAction = kind === 'rules' ? { type: kind, advanced: enabled } : - kind === 'techTokens' || kind === 'strongholdCards' ? { type: kind, enabled } : + kind === 'techTokens' || kind === 'strongholdCards' || kind === 'shortAllianceVictory' ? { type: kind, enabled } : kind === 'addBot' ? { type: kind, faction, difficulty } : kind === 'configureBot' ? { type: kind, target, faction, difficulty, position } : { type: kind, target }; const selectedPlayer = lobby?.players.find(player => player.id === target); const availableFactions = baseFactions.filter(item => !lobby?.players.some(player => player.faction === item.id && (kind !== 'configureBot' || player.id !== target))); const actionable = lobby?.editable && (kind === 'rules' ? enabled !== lobby.advanced : kind === 'techTokens' ? enabled !== lobby.techTokens : kind === 'strongholdCards' ? enabled !== lobby.strongholdCards && (!enabled || lobby.advanced) : + kind === 'shortAllianceVictory' ? enabled !== lobby.shortAllianceVictory : kind === 'addBot' ? lobby.players.length < 6 && availableFactions.some(item => item.id === faction) : kind === 'assignHost' ? selectedPlayer?.hostEligible && target !== lobby.host : kind === 'removeBot' ? !!selectedPlayer?.bot : !!selectedPlayer?.bot && availableFactions.some(item => item.id === faction) && @@ -142,7 +144,7 @@ export function AdminLobbyControls({ accountId, code, canManage, onClose, onUpda
Current rules: {lobby.advanced ? 'Advanced preview' : 'Basic'} · Tech Tokens {lobby.techTokens ? 'on' : 'off'} · Stronghold Cards {lobby.strongholdCards ? 'on' : 'off'}.
+Current rules: {lobby.advanced ? 'Advanced preview' : 'Basic'} · Tech Tokens {lobby.techTokens ? 'on' : 'off'} · Stronghold Cards {lobby.strongholdCards ? 'on' : 'off'} · Three-stronghold alliance victory {lobby.shortAllianceVictory ? 'on' : 'off'}.
Advanced preview is unfinished. Players must review the warning and the host must explicitly start the preview.