-
Notifications
You must be signed in to change notification settings - Fork 0
/
class_picker.py
59 lines (51 loc) · 1.86 KB
/
class_picker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"""
needed for class to start:
define a grading rubric for class given ablility spread
match a class to a given ability spread
combine class and ability
add artificer? https://www.dndbeyond.com/classes/artificer
"""
class CharClass:
def __init__(self, name, hd, proficiency, spellAbility, numSkills, autolevel, armor, weapons, tools, wealth):
self.name = name
self.hit_die = hd
self.proficiency = proficiency
self.spell_ability = spellAbility
self.num_skills = numSkills
self.auto_level = autolevel
self.stats = (armor, weapons, tools, wealth)
def __str__(self):
return self.name
def grade_class_for_ability_spread(self, ability_obj):
"""
:param ability_obj: ABILITIES = {
'STR': 8,
'DEX': 8,
'CON': 8,
'INT': 8,
'WIS': 8,
'CHA': 8
}
:return: grade of 0-100
Considerations:
Saving throws
Spell casting
Attacks
Defense
Proficiencies available in areas w/high abilities (buf)
Proficiencies available in areas w/low abilities (mitigate)
Example of very good match!
Sorcerer
Pick 2 among [('Arcana', 'INT'), ('Deception', 'CHA'), ('Insight', 'WIS'), ('Intimidation', 'CHA'), ('Persuasion', 'CHA'), ('Religion', 'INT')]
Saves: ['Constitution', 'Charisma'] and Spells: Charisma
{'STR': 12, 'DEX': 14, 'CON': 12, 'INT': 9, 'WIS': 10, 'CHA': 15}
"""
spell_casting_grade = self.grade_spellcasting_match(ability_obj)
return 0
def grade_spellcasting_match(self, ability_obj):
skill_name_in_obj = self.spell_ability[:3].upper()
score = ability_obj[skill_name_in_obj]
value = score - 8 * (100 / (15 - 8))
return value
def produce_grade_sheet(self):
pass