April 10, 2026

Counterspell this comment storm

Model-Based Testing for Dungeons & Dragons

Turning D&D into code: cheers, memes, and “It’s not a video game”

TLDR: A coder modeled D&D’s messy combat—interrupts, counterspells, and all—into a formal rules engine. Fans split: some celebrate bug-hunting wizardry and clearer rulings, while purists cry “don’t code my fun,” sparking a meme-fest about peasant railguns and whether tabletop storytelling should ever feel like software testing.

A developer just turned chaotic Dungeons & Dragons combat into a formal rules engine using Quint, modeling wild interrupt chains like Counterspell vs. Counterspell and mid-swing Shield casts. The demo shows spells stacking like an UNO Reverse pile, and the internet instantly rolled a natural 20 on drama. Supporters are thrilled: one fan calls it “an obvious next step,” saying formal rules help catch weird edge cases and even double as a smart check for AI. Another’s already planning a weekend of tinkering because, well, nerd joy.

But the backlash is loud and spicy. A purist slammed the brakes with, “It’s not a video game,” arguing that tabletop fun is vibes, story, and improv—not spreadsheets and state machines. Cue a classic culture clash: rules wizards vs. theater-of-the-mind bards. In the middle, a rules nerd dropped meme-fuel—“Grapple Leapfrog” and the legendary “peasant railgun”—to argue that real-time reactions aren’t the same as in-game timing, so the order of events is the true boss monster.

The result? A hilarious, heated party split: some want to QA test dragons; others just want to roll dice and tell chaotic stories. Either way, this project proves D&D’s combat is as dramatic under the hood as it is at the table—and the comments are the final boss.

Key Points

  • The project expands a prior 6,000-line Quint spec of a single D&D creature to include full combat interactions.
  • Complex interactions modeled include Counterspell chains, Shield interrupts, readied spells with concentration, Legendary Resistance, and opportunity attacks.
  • The model now covers all 12 classes, 14 conditions, legendary creature reactions, player characters, monsters, and stat blocks.
  • Interrupt windows are explicitly modeled across attack and spellcasting phases, with reactions that can alter outcomes mid-resolution.
  • Spell interrupts are represented using a stack structure, and a demo replays a scripted arcane battle step by step (e.g., Fireball, Counterspell chains).

Hottest takes

“Moving them to a formal specification language (Quint) was an obvious next step” — Firfi
“‘Grapple Leapfrog’ is like the peasant railgun” — randallsquared
“It’s not a fucking video game” — weregiraffe
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.