/DMsPredictor

Combat results predictor for DMs for Dungeons & Dragons 5th Edition

Primary LanguageScalaGNU General Public License v3.0GPL-3.0

DMsPredictor Scala Steward badge

Combat results predictor for DMs for Dungeons & Dragons 5th Edition.

Classes

Monsters

This list only includes monsters with README's

Spellbook

Requests

This simulator implements what is available in the Systems Reference Document (SRD) provide by Wizards of the Coast.

If a spell or anything else is not present in the simulator that you would like to use, please raise an Issue requesting this, or contribute yourself via a Pull Request!

Assumptions:

Resources will be exhausted

The simulation is designed around a single encounter, therefore abilities such as spellcasting are prioritised per class and will be used starting from the highest spell slot to the lowest as well as using other abilities (e.g. a Sorceror's twinned spell).

Proficiency with used weapons and armour

The simulation assumes that players have proficiency with the equipment they use.

Ability Score Increases

Ability score increases received at levels 4, 8, etc are not modelled and are assumed to be included in the characters stats upon submission to the simulator. The same is true of racial bonuses. Racial abilities are not currently implemented. These will be done after all classes.

No validation against a Creature's Stats are made.

For example:

A Fighter could have BaseStats(1, 1, 1, 1, 1, 1) or BaseStats(24, 24, 24, 24, 24, 24).

Running the project locally:

The simulation is configured via JSON:

NOTE: that the maximum number of simulations is currently set to 10,000.

sbt 'run "{\"simulationName\":\"Rogue vs Goblins\"........

{
 "simulationName": "Wizard vs Goblin",
 "simulations": 10,
 "focus": "LowestFirst",
 "players": [
   {
    "name": "Weston",
    "class": "wizard",
    "level": 4,
    "stats": "10,10,14,14,14,10",
    "weapon": "Shortsword",
    "armour": "none",
    "offHand": "none",
    "skills": "1,1"
   }
 ],
 "monsters": [
  {
    "monster": "goblin",
    "name": "TestGoblin"
  }
 ]
}

Otherwise you can create your players and monsters in the Main class to save having to fiddle with JSON.

Example debug logs

DEBUG i.g.t.d.monsters.vampire.Vampire - Vampire regenerated health
DEBUG i.g.t.d.monsters.MonsterAbilities$ - Vampire used Multi attack (Monster): 2 attacks
DEBUG i.g.t.d.m.vampire.VampireAbilities$ - Vampire used Unarmed Strike (Vampire)
DEBUG i.g.t.dmspredictor.model.Actions$ - D20.roll() of 16
DEBUG i.g.t.d.m.vampire.VampireAbilities$ - Vampire grapples Cleric
DEBUG i.g.t.d.m.vampire.VampireAbilities$ - Vampire used Bite (Vampire)
DEBUG i.g.t.dmspredictor.model.Actions$ - D20.roll() of 3
DEBUG i.g.t.d.model.AdjustedDamage$ - Cleric took 0 (adjusted) Piercing damage
DEBUG i.g.t.d.m.vampire.VampireAbilities$ - Bite (Vampire) deals 0 necrotic damage
DEBUG i.g.t.d.classes.CoreAbilities$ - Barbarian used Extra Attack
DEBUG i.g.t.d.c.b.BaseBarbarianAbilities$ - Barbarian is recklessly attacking
DEBUG i.g.t.dmspredictor.model.Actions$ - D20.roll() of 19
DEBUG i.g.t.d.model.AdjustedDamage$ - Vampire took 5 (adjusted) Slashing damage
DEBUG i.g.t.d.c.b.BaseBarbarianAbilities$ - Barbarian is recklessly attacking
DEBUG i.g.t.dmspredictor.model.Actions$ - D20.roll() of 17
DEBUG i.g.t.d.model.AdjustedDamage$ - Vampire took 5 (adjusted) Slashing damage
DEBUG i.g.t.d.model.condition.Grappled - Cleric is still Grappled
DEBUG i.g.t.d.c.c.BaseClericAbilities$ - Cleric used Destroy Undead
DEBUG i.g.t.d.simulation.BasicSimulation - pc: Barbarian - hp=40
DEBUG i.g.t.d.simulation.BasicSimulation - pc: Cleric - hp=28
DEBUG i.g.t.d.simulation.BasicSimulation - mob: Vampire - hp=134