← back to hollowmist.me
🎲

Attack Roller

A Java Swing GUI for resolving D&D 5e multi-attack turns, picks the number of attacks, the target's AC, and seven per-damage-type resistances, then rolls everything and prints a per-attack breakdown of what hit, what crit, and how much each damage type contributed.

Java / Swing D&D 5e Desktop App
About

I built this for one specific D&D 5e character, a high-level martial with a teetering stack of damage-type procs (slashing base + fire / radiant / lightning / thunder / poison / force riders, all rolling at once on every successful hit). Working out an Extra-Attack-heavy turn against an enemy with mixed resistances was tedious to do by hand: roll d20×N, check each against AC, then for every hit roll seven separate damage dice and apply each one's resistance multiplier.

This dumps the whole sequence into a single click. It opens with one window of sliders, and on roll it pops a second window with the full per-attack log, every d20, every damage roll, every resistance multiplier, ending with the total.

What it does
Attack count
Slider 1–16. Each attack rolls its own d20.
Target AC
Slider 1–40. Hit bonus is fixed at +17.
Crit handling
Natural 20 counts as two successful hits, so all damage dice double for that attack.
Seven damage types
Slashing, Force, Fire, Radiant, Lightning, Thunder, Poison, each with its own slider.
Resistance toggles
Per type: Vulnerable (×2), Normal (×1), Resistant (×0.5), Immune (×0).
Output log
Second window shows every roll, every resistance multiplier, and a running total. "Clear Text" button at the bottom.
The hard-coded build

Because it was made for one character, the to-hit bonus and damage formulas are baked in. Per successful hit, it rolls:

Damage typeFormula
Slashing1d10 + 11
Force1d4 + 3
Fire1d4 + 3
Radiant1d4 + 3
Lightning1d4 + 3
Thunder1d4 + 3
Poison1d4 + 3

Every damage die that rolls a 1 or 2 is re-rolled once, Great Weapon Fighting style. Each result gets multiplied by its damage-type slider's value (×2 / ×1 / ×0.5 / ×0), floored, and added to the running total. To re-tune for a different character, edit the constants in Main.java (the attackBonus = 17 on line 86 and the per-type formulas inside getDamage()) and rebuild the JAR.

Running it

Built against Java 11. The JAR ships with a Main-Class entry, so on systems with a .jar association it should open with a double-click.

Or from a terminal
java -jar AttackRoller.jar
Headless server / no JRE? You'll need a Java Runtime Environment (Java 8 or later) installed. Adoptium is a clean source for one if you don't already have Java set up.