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:
- My game uses success "thresholds", which,
- when I'm rolling dice (it was a pen-n-paper game, but, handling the dice rolls takes forever), takes the results -
- compares it to a range of numbers, and tells you how well you failed/succeeded.
Desired flow:
- 1-100 is rolled.
- [ignored for this question]: if a 96+ is rolled, roll again and add the results.
- List/Array/Dictionary/Whatever (later DataBase) is checked and the appropriate type of success is generated.
What I don't know are:
- How do I build this list? Should this be a dictionary, a list, or a tuple?
- What do I do once I have generated a random number? What do I do with that number in order to evaluate my list of thresholds?
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.