View Source ExTTRPGDev.RuleSystems.Abilities (ExTTRPGDev v0.3.0)

Root module for rule system ability tools

Link to this section Summary

Functions

Generates ability scores, assigned to abilities

Generates scores to be assigned to abilities

Returns the spec for the given spec name

Link to this section Functions

Generates ability scores, assigned to abilities

examples

Examples

iex> ExTTRPGDev.RuleSystems.Abilities.gen_scores(%ExTTRPGDev.RuleSystems.Abilities)
%{
  charisma: [4, 3, 1],
  constitution: [5, 6, 3],
  dexterity: [5, 3, 1],
  intellegence: [4, 3, 3],
  strength: [4, 1, 5],
  wisdom: [1, 5, 6]
}
Link to this function

gen_scores_unassigned(abilities)

View Source

Generates scores to be assigned to abilities

examples

Examples

iex> ExTTRPGDev.RuleSystems.Abilities.gen_scores_unassigned(%Abilities{})
[[1, 6, 6], [3, 3, 2], [3, 6, 3], [4, 2, 1], [6, 5, 1], [6, 4, 6]]
Link to this function

get_spec_by_name(abilities, spec_name)

View Source

Returns the spec for the given spec name

examples

Examples

iex> ExTTRPGDev.RuleSystems.Abilities.get_spec_by_name(abilities, spec_name)
%Spec{}