Hot Arena Combat — engine

Hot Arena Combat — C# engine

A C# implementation of the Sanguis et Harena / Hot Arena Combat rules, plus simulators that hunt for broken mechanics. It implements the current design rules (v0.3.19 plus the rulings of 2026-10-18: glory on success, second wind, center +1), with the printed v0.3.19 rulebook available as RuleOptions.V0319.

Project What it is
HotArena.Rules The rules engine. Pure C#, net10.0, no I/O, trimmable and AOT-compatible, with a deterministic RNG. Verified to publish and run in a Blazor WebAssembly app. Includes AI opponents (Ai/) and a HumanController for UIs (Interactive/).
HotArena.Sim CLI for bulk simulation: probe, duel, log.
HotArena.Web Blazor WebAssembly app styled after the printed cards, mat and arena. Watch AI-vs-AI bouts card by card (pause, step, speed), or Play against the AI as a playtester.
HotArena.Rules.Tests xUnit tests (60): geometry, cards, combat, economy, flow, determinism, and the interactive controller.

Other docs:

Build, test, simulate

dotnet test engine/HotArena.slnx
dotnet run -c Release --project engine/HotArena.Sim -- probe --scale 10 --seed 2026
dotnet run -c Release --project engine/HotArena.Sim -- duel --a statue:cassius:murmillo --b duelist:cassius:murmillo --games 2000
dotnet run -c Release --project engine/HotArena.Sim -- log --a duelist:rufus:murmillo --b brawler:vela:thraex --seed 7

engine/HotArena.slnx builds from the command line. The projects are also in HAC/HAC.slnx for Visual Studio, but that solution's Wikidown project type only builds inside VS.

The web app (watch and play)

Live: https://hotarenacombat.com/demo/. The site workflow (.github/workflows/publish-wiki.yml) publishes the wiki at /, this app at /demo/, and these engine docs at /engine/ on every push to main that touches them. Deep links such as /demo/play go through the site's 404.html (HotArena.Web/deploy/404.html), which hands the route back to the app.

To run it locally:

dotnet run --project engine/HotArena.Web --launch-profile http

Then open http://localhost:5284.

Card art comes from the printed card PNGs in assets/, shrunk to WebP by HotArena.Web/tools/make-card-images.py (about 0.9 MB in total). Re-run it after the cards are recomposed:

python engine/HotArena.Web/tools/make-card-images.py

.claude/launch.json has a hotarena-web configuration for the Claude desktop preview.

Using the engine (e.g. from Blazor WebAssembly)

using HotArena.Rules;
using HotArena.Rules.Ai;
using HotArena.Rules.Interactive;

var human = new HumanController();
human.DecisionRequested += _ => InvokeAsync(StateHasChanged);   // re-render when input is needed

var engine = new GameEngine(RuleOptions.Basic,          // current rules; or AdvancedRules, V0319, or `with { ... }` variants
[
    new FighterSetup("You", Champions.Drusa, Loadout.Standard["murmillo"], human),
    new FighterSetup("Rufus", Champions.Rufus, Loadout.Standard["thraex"], new HeuristicAi(Personality.Duelist, seed: 1)),
], seed: 42);

engine.EventRaised += e => log.Add(EventText.Describe(e, engine.State));   // play-by-play
_ = engine.RunAsync();

Layout

HotArena.Rules/
  Hex.cs, Board.cs           axial hex math, arena sizes, start corners
  Cards.cs, Gear.cs,         the printed v0.3.0 card, gear and champion data
  Champions.cs
  RuleOptions.cs             defaults = current rules; V0319 preset; variants and proposed fixes
  GameState.cs               fighters, tracks, gear state
  Actions.cs                 TurnAction / DefenseChoice records
  GameEngine.cs              the round/second loop, legality, combat, burn
  Reach.cs                   geometry helpers
  Events.cs, EventText.cs    event records and one-line descriptions
  Ai/                        RandomAi, HeuristicAi + Personality presets
  Interactive/               HumanController for UIs
HotArena.Web/
  Session/                   GameSession (engine + controllers + log), Pacer (watch speed), ActionText, Art
  Components/                ArenaBoard (SVG arena), PlayerMat, Track, CardView, ArenaView (table + human prompts), SetupPanel
  Pages/                     Home, Watch, Play
  tools/make-card-images.py  web copies of the printed card art