Expand description
Deterministic, bounded fight simulation engine.
Combat owns its scheduling: delayed combat events and the FightProgress
heartbeat live in the FightClock inside OverlordLogic,
not in the System delayed/cron plugins. The live game loop drains the
clock through OverlordLogic::collect_due_scheduled; this engine
drains the same clock directly. Both paths therefore run identical
combat machinery — the only difference is the driver.
Engine properties:
FightEngine::runexecutes at mostmax_game_tickssteps and always returns — there is no wall-clock timeout and no way to loop forever. A fight that doesn’t finish within the budget isFightResult::Undecided.- No DB, no async, no
System, noPureEventHandler: callers are PvP precalculation, balance simulations, and tests. EndFightis the fight boundary: the outcome is taken from the event and it is not processed, so progression side effects (rating, vassals, chapter advance) never run inside a simulation.
Structs§
- Fight
Clock - Fight
Engine - Bounded, deterministic driver for fight simulations.
- Fight
Outcome - Fight
Sim - A self-contained fight in progress. The scheduled work lives in the
engine handler’s
FightClock; the sim carries the simulated state and logical time.
Enums§
Constants§
- DEFAULT_
CASCADE_ MAX_ DEPTH - Default cap on events processed within a single step’s cascade. The same
wall the live
Systemapplies per root event — shared so the engine can never silently diverge from live combat on cascade depth. - GAME_
TICK_ TICKS - Ticker units per fight step. The system ticker counts milliseconds
(
TICKER_UNIT_DURATION_MS = 1), and the live game loop advances the ticker by 100 units per 100ms game tick — one step equals one game tick.