Srd.Rules.Save (srd_5e v0.2.0)

Copy Markdown View Source

Saving throw rules

Summary

Types

t()

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

Functions

Resolve a saving throw against a difficulty class

Types

t()

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

The result of a saving throw: whether it met the DC, plus the values behind the outcome. A save 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 a saving throw against a difficulty class