Combat specification#
Real-time tactical battles: open-field fights and castle sieges.
Scope#
- Battle initialization and teardown
- Figure slots, movement, and melee/ranged resolution
- Siege map (80×80 destructible tiles, gates, walls, boiling oil)
- Unit types 0–10 and formation tiers
- Projectile handling and casualties
- Auto-battle calculation (quick resolve) when battles are not played tactically
- NPC / group-order battle AI (shared engine for all sides)
Evidence#
../../architecture/combat/MODULE.md— battle tick, figure handlers, siege../../structs/lotr2_battle_figure.md— 0x1b0-byte figure slot../../structs/lotr2_battle_group.md— 0x34-byte group slot../../structs/lotr2_battle_tile.md— siege tile occupancy../../structs/lotr2_projectile.md— projectile slot layout
First spec targets#
- Battle setup —
lotr2_combat_init_battle_state: figure/projectile slot clearing, formation thresholds, tile placement rules. - Figure lifecycle — slot allocation, movement steps, melee hit application (
lotr2_combat_apply_melee_hit), removal and casualty accounting.