View Source ExRPG.RuleSystems.RuleSystem (ExRPG v0.2.1)
Module for handling a specific Rule System
Link to this section Summary
Functions
Loads a RuleSystem struct from a json string representation
Generates a set of ability scores assigned to the rule systems abilities using the system's default assignment method .
Generates an unassigned set of ability scores using the system's default assignment method.
Link to this section Functions
Loads a RuleSystem struct from a json string representation
examples
Examples
iex> ExRPG.RuleSystems.RuleSystem.from_json!("a json string")
%ExRPG.RuleSystems.RuleSystem{}
Generates a set of ability scores assigned to the rule systems abilities using the system's default assignment method .
examples
Examples
iex> RuleSystem.gen_ability_scores()
%{
charisma: [4, 3, 1],
constitution: [5, 6, 3],
dexterity: [5, 3, 1],
intellegence: [4, 3, 3],
strength: [4, 1, 5],
wisdom: [1, 5, 6]
}
Generates an unassigned set of ability scores using the system's default assignment method.
examples
Examples
iex> RuleSystem.gen_ability_scores(%RuleSystem{})
[[1, 6, 6], [3, 3, 2], [3, 6, 3], [4, 2, 1], [6, 5, 1], [6, 4, 6]]