I am using Python3.
I am trying to evaluate "skill checks" for my game, and I want to create a function, that can be evluated for all, standard skill rolls.
I'm only at the most basic level for now, so, I'm just trying to create the function itself, then later, I want to use my database, but for now:
Desired flow:
What I don't know are:
Thresholds and their Ranges:
Total Failure: 1-25,
Partial Failure: 26-49,
Partial Success: 50-74,
Success: 75-100,
Significant Success: 101-149,
Astounding Success: 150-199,
Epic Success: 200-249,
Legendary: 250+
I would not use a data structure but a function.
def type_of_success(n):
# input: integer random number rolled
# output: string
if not isinstance(n, int) or n < 1:
raise Exception('Not a valid number')
if n < 26:
return 'Total Failure'
elif n < 51:
return 'Partial Failure'
# etc