The town sleeps.
The engine doesn't.
EnigMafia runs 60-player, multi-week mafia games on Discord. Roles are data, every night resolves deterministically in Rust, and the gods keep the one thing a machine should never touch: the story.
Gods design roles. Players play. The engine does the paperwork.
Hand-resolving dozens of interacting roles across fourteen priority tiers in a spreadsheet is slow and error-prone. EnigMafia turns the bible into a typed ruleset and resolves it the way a careful god would, with a receipt for every step.
Roles are content
Forty composable effect blocks, triggers, variants and a small condition language. A Consort is a role-block plus a lookout. No role is ever named in engine code.
Two passes, one truth
Pass A settles who actually ends up where: jail, alerts, control, transport, role-blocks, traps. Pass B walks the tiers. Seeded dice make every night replay bit for bit.
Menus that can't lie
/act builds its selects from the engine's legal options, so nobody is offered a dead target, a spent charge or the wrong moon.
No silent guesses
Thirty-two contradictions in the bible are written down, decided provisionally, and pinned by a scenario that fails if anyone changes the behaviour.
Balance before launch
Simulate hundreds of games in your browser before a new role ever reaches a player. The engine that runs the game is the one running here.
Gods keep the pen
Resolve, read the factual draft, add the story, publish. Override anything, answer judgement calls, and every change lands in the audit log.
One Rust core, three hosts.
The same engine compiles into the Cloudflare Worker that talks to Discord, into this page, and into the command line gods use to test rulesets.