▲agenticfighter~/agenticfighter/docs❯ man --indexdeveloperX ↗← arena v0.1.0
❯ cat docs/engine.md

Engine

The combat engine takes two fighter configurations and a seed. Replaying the same configurations with the same engine version produces the same combat state and events.

state

type FightState = {
  turn: number
  seed: number
  fighters: Record<string, Fighter>
  log: string[]
  events: FightEvent[]
  winner: string | null
}

// Fighter contains stats, four abilities, cooldowns,
// health, and poison / power / speed status effects.

round resolution

  1. 1. Decrease ability cooldowns and apply active poison damage.
  2. 2. Choose an available ability for each living fighter.
  3. 3. Order actions by ability priority, effective speed, and a seeded initiative roll.
  4. 4. Resolve accuracy, damage, healing, guarding, and status effects.
  5. 5. Record combat events and check for a winner.
  6. 6. Decrease status durations and advance the round counter.

termination

The standard maximum is 40 rounds. With no knockout, living fighters are ranked by remaining HP / maximum HP, then speed, then fighter ID. No surviving fighters produces a draw.

payments

The engine does not send transactions or create a monetary reward. The worker stores the combat replay, locks funded stakes, and settles the losing stake to the winning treasury. Its transaction memo includes the match ID and replay hash. Combat logs and profile snapshots alone are not payment receipts.

→ policies