/** * Tunables for the Call for Fire versus mode (head-to-head artillery duel). * Pure and client-safe: no Payload or Node imports. */ import type { GridPoint } from "@/lib/minigames/call-for-fire"; /** Board is size x size cells; one cell is one 50m grid square (see the CFF lib). */ export const VERSUS_BOARD_SIZE = 10; /** Seconds a player has to call their next fire mission before the turn is skipped. */ export const VERSUS_TURN_SECONDS = 60; export const VERSUS_TURN_TIMEOUT_MS = VERSUS_TURN_SECONDS * 1000; /** Safety cap on rounds each player may fire before the match ends on points. */ export const VERSUS_MAX_SHOTS_PER_PLAYER = 40; /** Live matches: registry cap and idle expiry (mirrors the blackjack registry). */ export const VERSUS_MAX_MATCHES = 20; export const VERSUS_MATCH_EXPIRY_MS = 5 * 60_000; export const VERSUS_SWEEP_INTERVAL_MS = 30_000; /** Longest match name accepted by the rename/create path. */ export const VERSUS_MAX_NAME_LENGTH = 40; /** Sentinel userId for the empty seat in a waiting match (never a real user). */ export const VERSUS_WAITING_USER_ID = 0; export interface FobDefinition { readonly id: string; readonly label: string; /** Occupied cells when placed, laid out in a straight line. */ readonly size: number; } /** * The emplacement fleet each player hides. A shorter list keeps a duel brisk; * total occupied cells are 8 of 100, so rounds matter without dragging. */ export const FOB_FLEET: readonly FobDefinition[] = [ { id: "command-post", label: "Command Post", size: 3 }, { id: "ammo-depot", label: "Ammo Depot", size: 2 }, { id: "radar-site", label: "Radar Site", size: 2 }, { id: "fob", label: "Forward Operating Base", size: 1 }, ]; export type FobOrientation = "h" | "v"; export interface FobPlacement { readonly assetId: string; readonly origin: GridPoint; readonly orientation: FobOrientation; } /** Scoring: emplacements destroyed dominate; cells struck break ties. */ export const VERSUS_SCORE_PER_FOB = 100; export const VERSUS_SCORE_PER_CELL = 1; /** XP payout on match completion. */ export const VERSUS_XP_WIN = 40; export const VERSUS_XP_LOSS = 10; export const VERSUS_XP_PER_FOB = 5;