Combat

Turn-based combat with D&D 5e mechanics, monster claiming, aggro chaining, and AI narration.

Combat in a20n is turn-based, following D&D 5e rules. The AI narrates every blow, spell, and dodge, but the engine rolls the dice and enforces the outcomes. No fudging, no shortcuts.

Starting a Fight

To engage a monster, use the attack button in the Location Tab or type /attack <target> in chat. This claims the monster for you and enters combat mode. Only the monster you target is claimed -- other monsters in the room remain unclaimed and available for other players.

If a monster respawns nearby while you're resting, wounded, or low-level, it may attack you on sight. In that case, combat starts automatically and the monster gets the first strike.

Monster Claiming

In a shared world, the claiming system prevents two players from fighting the same monster at the same time:

  • One claim per engagement. When you attack a monster, you claim it. Other players see it as "Engaged by [your name]" and can't target it.
  • Claims release on death, flee, or disconnect. If you die or flee, the monster becomes available again (and heals to full if you abandoned mid-fight).
  • Stale claims expire. If a player goes inactive for 60 seconds during combat, their claims are released automatically.

You can see which monsters are claimed in the Location Tab -- claimed monsters show who's fighting them and their current HP.

Initiative

When combat begins, everyone rolls d20 + Finesse modifier. Turn order is global for the entire room -- combat is shared, not instanced.

Action Economy

Each turn you get:

  • Action -- Your main move. Attack, Cast a Spell, Dash, Disengage, Dodge, Help, Hide, Ready, Search, or Use an Object.
  • Bonus Action -- Quick abilities, off-hand attacks, or certain spells.
  • Reaction -- One per round, triggered by specific events (opportunity attacks, certain spells).
  • Movement -- Move up to your speed in feet. Can be split before and after your action.
  • Free Object Interaction -- One small interaction like drawing a weapon or opening a door.

Room Aggro

When you're fighting a claimed monster, other unclaimed monsters in the room can hear the battle. Each round, there's a chance a nearby monster notices and becomes aggressive:

  • Aggro'd monsters strike mid-combat. Even before you formally engage them, they'll take swings at you between rounds. You'll see messages like "A nearby Skeleton lashes out at you for 4 damage!"
  • Aggro'd monsters don't consume your turn. Their strikes happen automatically -- you still get your normal action against your claimed target.
  • Only one unclaimed monster aggros at a time. The room doesn't dogpile you all at once (unless you use AOE).

Aggro is the bridge between single-target claiming and the reality of a room full of enemies. You're always fighting one, but the others aren't just standing there watching.

Combat Chaining

When you kill your claimed monster and another monster in the room has aggro'd on you, combat chains automatically:

  • No victory screen. No loot phase interruption. You seamlessly transition into fighting the next threat.
  • Loot from the killed monster is deferred -- saved up and presented all at once when the final fight ends.
  • If the aggro'd monster was claimed by another player in the meantime (they engaged it while you were busy), the chain breaks cleanly and you get your normal victory and loot.

When no unclaimed monster has aggro'd, combat ends normally with the victory screen and loot phase.

Example

You walk into The Bone Clearing. Two skeletons stand guard. You attack one -- combat starts with that skeleton claimed. Mid-fight, the second skeleton aggros and starts hitting you. You kill the first skeleton and combat rolls straight into the second. Kill that one too, and then you see the combined loot from both fights.

Turn Timer

Combat turns have a 3-second timer. When it's your turn and the clock runs out:

Not yet engaged (e.g., a monster jumped you while resting):

  • The monster attacks again
  • You get a taunt to remind you it's your turn
  • It's still your turn -- the game won't auto-attack until you've made your first move

Already engaged (you've attacked, dodged, or used an item):

  • You auto-attack with your equipped weapon
  • Monster takes its turn
  • Next round begins

This keeps combat flowing at a fast pace while giving you a moment to react when ambushed.

Shared Combat

Combat happens in the open. It is not instanced or private. Other players in the same room can:

  • Engage different monsters -- Each player claims their own target.
  • Watch -- Observe without participating.
  • See the fight -- Player presence messages show who's fighting what.

XP from kills is awarded to the player who claimed and defeated the monster.

Death and Dying

When you hit 0 HP, you fall unconscious and begin making death saving throws:

  • Each turn, roll a d20. 10 or higher is a success, 9 or lower is a failure.
  • 3 successes -- You stabilize at 0 HP (unconscious but no longer dying).
  • 3 failures -- You die.
  • Natural 20 -- You regain 1 HP and wake up.
  • Natural 1 -- Counts as two failures.
  • Any healing while at 0 HP resets all your death saves and brings you back.
  • Melee attacks against an unconscious target within 5 feet are automatic critical hits, which inflict 2 death save failures.

On death, you respawn at your home location after a timeout. Monster claims are released so other players can fight them.

Loot

When combat ends in victory, defeated monsters drop loot based on their loot tables. You have 3 minutes to claim items from the loot screen:

  • Claim all -- Take everything.
  • Claim specific items -- Pick what you want.
  • Exit -- Unclaimed loot is lost.

If combat chained through multiple monsters, all loot is combined into a single loot phase at the end.

Monsters

The world contains 26 monster types drawn from the SRD, each with unique stat blocks and behaviors. Monsters use one of four AI personalities that determine their targeting decisions -- some focus the weakest target, others go for whoever hit them last, and some pick fights strategically.

Monsters respawn on real-time intervals with a d20 dice roll check. Common enemies respawn in minutes; tougher enemies take longer. Entering and leaving a room doesn't reset spawns.

Conditions

15 SRD conditions are fully enforced by the engine: Blinded, Charmed, Deafened, Frightened, Grappled, Incapacitated, Invisible, Paralyzed, Petrified, Poisoned, Prone, Restrained, Stunned, Unconscious, and Exhaustion (6 levels). The AI describes the effects narratively, but the mechanical penalties are applied automatically.