Classes | |
class | Die |
Object for simulating a set of an m-numbered set of n-sided dice. More... | |
class | Attack |
An object for simulating a single RPG attack. More... | |
class | Character |
An object that describes an individual character. More... | |
class | Encounter |
An object that describes a combat encounter between two parties. More... | |
Functions | |
def | assert_positive_integer |
Verifies that a value is a positive integer or zero. | |
def | abil_to_mod |
Converts an ability score to its modifier. | |
def | roll_new_character |
Creates a new random character. | |
def | load_file |
Loads a single object from a save file in pickle format. | |
def | save_file |
Saves an object to a pickle file obj An object or variable to save out in pickle format filename The path to a file to save to (overwrite). |
def 0.1.5::wyckedsceptre::wyckedsceptre::abil_to_mod | ( | ability_score | ) |
Converts an ability score to its modifier.
Negative modifiers are possible
ability_score |
def 0.1.5::wyckedsceptre::wyckedsceptre::assert_positive_integer | ( | val_to_test, | ||
val_name = 'Value' | ||||
) |
Verifies that a value is a positive integer or zero.
val_to_test | Value to test if it is a positive integer or zero | |
val_name | A string name to describe that variable, to be used in the exception text if raised ValueError If val_to_test is < 0 or not an integer |
def 0.1.5::wyckedsceptre::wyckedsceptre::load_file | ( | filename | ) |
Loads a single object from a save file in pickle format.
filename | the string path to a file in pickle format |
def 0.1.5::wyckedsceptre::wyckedsceptre::roll_new_character | ( | new_name, | ||
new_class | ||||
) |
Creates a new random character.
NewName | A string that names the character | |
NewClass | A string that is the class of the character |
def 0.1.5::wyckedsceptre::wyckedsceptre::save_file | ( | obj, | ||
filename | ||||
) |
Saves an object to a pickle file obj An object or variable to save out in pickle format filename The path to a file to save to (overwrite).