Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 1023 Bytes

design.md

File metadata and controls

17 lines (13 loc) · 1023 Bytes

Just some random thoughts to get to our object model more easily...

The game holds a list of players and a list of creatures. The game also holds a combat log, which is a chronologically ordered list of battle actions. Every attack, heal action, or attack modifier is a combat action.

Each of the creatures attacks one or several times per round. For an attack, the players roll one or several dies to determine the attack damage, as well as one D20 hit die against the target's AC. If D20 > AC, the attack succeeds. Each attack has one or several targets. The attack's targets reduce their HP based on the damage, resistances, and weaknesses. If the damage type is one of a target's resistances/weaknesses, the damage is halved-and-floored, or doubled. The targets then reduce their HP by the resulting damage.

Heal actions and attack modifiers are conducted similarly to attacks, but neither resistances nor weaknesses apply, obviously.