Srd.Rules.Attack (srd_5e v0.2.0)

Copy Markdown View Source

Attack rules

Summary

Types

t()

Represents the results of evaluating an attack rule

Functions

Resolve a single attack based on a dice roll and the target's AC

Types

t()

@type t() :: %Srd.Rules.Attack{
  critical?: boolean(),
  hit?: boolean(),
  natural: pos_integer(),
  target_ac: pos_integer(),
  total: pos_integer()
}

Represents the results of evaluating an attack rule

Functions

resolve(roll, list)

Resolve a single attack based on a dice roll and the target's AC