View Source ExTTRPGDev.RuleSystems.Abilities.Assignment (ExTTRPGDev v0.3.0)
This module handles the different ways of assigning ability scores
Link to this section Summary
Functions
Applies a method special to the rolled values
Returns the default assignment method for the defined assignment methods
Generates an ability score using the Assignment.RollingMethod
Link to this section Functions
Applies a method special to the rolled values
examples
Examples
iex> Assignment.apply_method_special!([4, 3, 2, 1], "drop_lowest")
[2, 3, 4]
Returns the default assignment method for the defined assignment methods
examples
Examples
iex> Assignment.default_assignment()
Generates an ability score using the Assignment.RollingMethod
examples
Examples
# Although not necessary, let's seed the random algorithm
iex> :rand.seed(:exsplus, 1337)
iex> Assignment.roll_via_method!(%Assignment.RollingMethod{dice: "3d6"})
[6, 2, 3]