<?php
/**
 * Synhex game balance and board tunables.
 *
 * OAuth secrets stay in the generated (gitignored) data/config.php.
 * Keys here can be overridden by the same name in data/config.php.
 *
 * Board: odd-r offset coordinates, pointy-top hexes.
 * Size 17 columns × 14 rows (238 hexes) — substantially larger than Microchess 4×5.
 * Axial (q, r) is used internally: q = col - floor(row / 2), r = row.
 */
return [
    // --- Board ---
    'grid_cols' => 17,
    'grid_rows' => 14,
    'hex_orientation' => 'pointy',
    'hex_offset' => 'odd-r',
    'wall_density' => 0.14,
    'wall_clear_radius' => 2,
    'wall_gen_attempts' => 24,

    // --- Movement / time ---
    'walk_range' => 5,
    'act_duration_ms' => 3000,
    'sim_tick_ms' => 50,

    // --- Vision ---
    // Forward hex direction + two adjacent directions, and hexes between them → 120° cone.
    'vision_cone_half_deg' => 60,
    'vision_range' => 18,
    'see_enemies_at_match_start' => true,
    'see_enemies_when_firing' => true,

    // --- Combat ---
    'base_accuracy' => 15,
    'accuracy_cap' => 95,
    'accuracy_bonus_shooter_stationary' => 8,
    'accuracy_bonus_target_forward' => 12,
    'accuracy_bonus_target_close' => 8,
    'accuracy_bonus_shotgun_close_extra' => 8,
    'accuracy_bonus_target_not_shooting_this' => 6,
    'accuracy_bonus_still_previous_act' => 8,
    'accuracy_bonus_same_or_no_target_previous_act' => 5,
    'accuracy_bonus_friendly_focus_fire' => 10,
    'accuracy_bonus_target_no_cover_wall' => 6,
    'accuracy_bonus_target_stationary' => 8,
    'accuracy_bonus_nobody_shooting_at_shooter' => 8,
    'close_range_hexes' => 3,
    'shot_range' => 18,
    'friendly_fire' => true,

    'weapon_pistol_rof_ms' => 1200,
    'weapon_smg_rof_ms' => 350,
    'weapon_shotgun_rof_ms' => 1100,
    'weapon_shotgun_pellets' => 5,
    'weapon_shotgun_spread' => 2,

    // Strength shown on the tile bar (VIP is more valuable).
    'unit_bar_vip' => 3,
    'unit_bar_soldier' => 1,

    // --- Spawns (odd-r col,row). White/west faces east (dir 0); Black/east faces west (dir 3). ---
    // Directions: 0 E, 1 NE, 2 NW, 3 W, 4 SW, 5 SE.
    'spawn' => [
        'w' => [
            ['id' => 'vip', 'role' => 'vip', 'weapon' => 'pistol', 'col' => 1, 'row' => 6, 'facing' => 0],
            ['id' => 'smg-1', 'role' => 'soldier', 'weapon' => 'smg', 'col' => 1, 'row' => 4, 'facing' => 0],
            ['id' => 'smg-2', 'role' => 'soldier', 'weapon' => 'smg', 'col' => 1, 'row' => 8, 'facing' => 0],
            ['id' => 'shot', 'role' => 'soldier', 'weapon' => 'shotgun', 'col' => 2, 'row' => 6, 'facing' => 0],
        ],
        'b' => [
            ['id' => 'vip', 'role' => 'vip', 'weapon' => 'pistol', 'col' => 15, 'row' => 6, 'facing' => 3],
            ['id' => 'smg-1', 'role' => 'soldier', 'weapon' => 'smg', 'col' => 15, 'row' => 4, 'facing' => 3],
            ['id' => 'smg-2', 'role' => 'soldier', 'weapon' => 'smg', 'col' => 15, 'row' => 8, 'facing' => 3],
            ['id' => 'shot', 'role' => 'soldier', 'weapon' => 'shotgun', 'col' => 14, 'row' => 6, 'facing' => 3],
        ],
    ],
];
