Srd.Rules.Check (srd_5e v0.2.0)

Copy Markdown View Source

Ability check rules

Summary

Types

t()

The result of an ability check: whether it met the DC, plus the values behind the outcome. A check is a d20 test against a difficulty class, with no critical semantics.

Functions

Resolve an ability check against a difficulty class

Types

t()

@type t() :: %Srd.Rules.Check{
  dc: integer(),
  margin: integer(),
  natural: 1..20,
  success?: boolean(),
  total: integer()
}

The result of an ability check: whether it met the DC, plus the values behind the outcome. A check is a d20 test against a difficulty class, with no critical semantics.

Functions

resolve(roll, list)

@spec resolve(Srd.Dice.Roll.t(), [{:dc, integer()}]) :: t()

Resolve an ability check against a difficulty class