-
Notifications
You must be signed in to change notification settings - Fork 1
Combat System
Edoardo BAROLO edited this page Jun 16, 2026
·
3 revisions
Full documentation (part of 3,193-line technical analysis) in docs/TECHNICAL_ANALYSIS.md.
Turn-based tactical combat on a 12×24 grid with:
- 24 unit slots: 4 player mechs + 8 enemy infantry + 12 enemy mechs
- 8-direction movement: Tile cost-based, skill-gated LoS
- 2D6 to-hit: Modified by skill, terrain, heat, story state
- Line of Sight: Ray-cast using 8-direction vectors
- Fog of War: Twin 12×24 grids with LoS clearing
- Heat system: Pool-based, cap 30, penalty at threshold
- Ammo: 10 bins per mech, per-missile for LRM/SRM
- Init: Populate enemies, zero fog grid, set mode flag
- Turn loop: Iterate 24 unit slots
- AI target selection: Scan story state properties for valid targets
- Movement: Pathfind toward target
- Fire phase: LoS check → to-hit roll → hit location → damage → cleanup
- Post-combat: Story state update, mode transition
TN = 4 + terrain_mod + heat_penalty + skill_mod + range_mod + cover_mod
Roll 2D6 ≥ TN to hit. Damage grouped for cluster weapons. Hit location via lookup table.
- Preference table for target selection
- Stage counter dispatch
- Validates story state bytes for engagement logic
The combat system is Phase 4 in the Godot rebuild — implemented (June 2026). See BattleTechCHI/Scripts/Combat/ for the C# implementation, and Rebuild-Progress for details.
BattleTech: The Crescent Hawk's Inception — Reverse Engineering Project. RE status: 95%. Godot rebuild: Phase 6 (Combat ANM + map cursor ANM + emulator startup fix).