BlueGit

projects-timfalken-com microchess

Files

microchess / web / lib / game-config.php

game-config.php

feat: scaffold Synhex hex tactics on the Microchess lobby shell
timfa project_86226080_bot_b6e0858ac0a12dc6d49a8d25b3b0be9b · pushed by timfa · 2 months ago
24f20754 History
game-config.php 3.0 KiB Download Raw
1<?php
2/**
3 * Synhex game balance and board tunables.
4 *
5 * OAuth secrets stay in the generated (gitignored) data/config.php.
6 * Keys here can be overridden by the same name in data/config.php.
7 *
8 * Board: odd-r offset coordinates, pointy-top hexes.
9 * Size 17 columns × 14 rows (238 hexes) — substantially larger than Microchess 4×5.
10 * Axial (q, r) is used internally: q = col - floor(row / 2), r = row.
11 */
12return [
13 // --- Board ---
14 'grid_cols' => 17,
15 'grid_rows' => 14,
16 'hex_orientation' => 'pointy',
17 'hex_offset' => 'odd-r',
18 'wall_density' => 0.14,
19 'wall_clear_radius' => 2,
20 'wall_gen_attempts' => 24,
21
22 // --- Movement / time ---
23 'walk_range' => 5,
24 'act_duration_ms' => 3000,
25 'sim_tick_ms' => 50,
26
27 // --- Vision ---
28 // Forward hex direction + two adjacent directions, and hexes between them → 120° cone.
29 'vision_cone_half_deg' => 60,
30 'vision_range' => 18,
31 'see_enemies_at_match_start' => true,
32 'see_enemies_when_firing' => true,
33
34 // --- Combat ---
35 'base_accuracy' => 15,
36 'accuracy_cap' => 95,
37 'accuracy_bonus_shooter_stationary' => 8,
38 'accuracy_bonus_target_forward' => 12,
39 'accuracy_bonus_target_close' => 8,
40 'accuracy_bonus_shotgun_close_extra' => 8,
41 'accuracy_bonus_target_not_shooting_this' => 6,
42 'accuracy_bonus_still_previous_act' => 8,
43 'accuracy_bonus_same_or_no_target_previous_act' => 5,
44 'accuracy_bonus_friendly_focus_fire' => 10,
45 'accuracy_bonus_target_no_cover_wall' => 6,
46 'accuracy_bonus_target_stationary' => 8,
47 'accuracy_bonus_nobody_shooting_at_shooter' => 8,
48 'close_range_hexes' => 3,
49 'shot_range' => 18,
50 'friendly_fire' => true,
51
52 'weapon_pistol_rof_ms' => 1200,
53 'weapon_smg_rof_ms' => 350,
54 'weapon_shotgun_rof_ms' => 1100,
55 'weapon_shotgun_pellets' => 5,
56 'weapon_shotgun_spread' => 2,
57
58 // Strength shown on the tile bar (VIP is more valuable).
59 'unit_bar_vip' => 3,
60 'unit_bar_soldier' => 1,
61
62 // --- Spawns (odd-r col,row). White/west faces east (dir 0); Black/east faces west (dir 3). ---
63 // Directions: 0 E, 1 NE, 2 NW, 3 W, 4 SW, 5 SE.
64 'spawn' => [
65 'w' => [
66 ['id' => 'vip', 'role' => 'vip', 'weapon' => 'pistol', 'col' => 1, 'row' => 6, 'facing' => 0],
67 ['id' => 'smg-1', 'role' => 'soldier', 'weapon' => 'smg', 'col' => 1, 'row' => 4, 'facing' => 0],
68 ['id' => 'smg-2', 'role' => 'soldier', 'weapon' => 'smg', 'col' => 1, 'row' => 8, 'facing' => 0],
69 ['id' => 'shot', 'role' => 'soldier', 'weapon' => 'shotgun', 'col' => 2, 'row' => 6, 'facing' => 0],
70 ],
71 'b' => [
72 ['id' => 'vip', 'role' => 'vip', 'weapon' => 'pistol', 'col' => 15, 'row' => 6, 'facing' => 3],
73 ['id' => 'smg-1', 'role' => 'soldier', 'weapon' => 'smg', 'col' => 15, 'row' => 4, 'facing' => 3],
74 ['id' => 'smg-2', 'role' => 'soldier', 'weapon' => 'smg', 'col' => 15, 'row' => 8, 'facing' => 3],
75 ['id' => 'shot', 'role' => 'soldier', 'weapon' => 'shotgun', 'col' => 14, 'row' => 6, 'facing' => 3],
76 ],
77 ],
78];