mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-03 19:38:30 +02:00
Added subclass descriptions
This commit is contained in:
@@ -83,3 +83,17 @@ class Feature():
|
||||
return -100
|
||||
|
||||
|
||||
class FeatureSelector(Feature):
|
||||
"""
|
||||
A feature with multiple possible choices.
|
||||
"""
|
||||
options = dict()
|
||||
|
||||
def __init__(self, selection=None):
|
||||
keep_source = self.source
|
||||
# Transform into selected feature
|
||||
if selection.lower() in self.options():
|
||||
new_feat = self.options[selection.lower()]
|
||||
self.__dict__.update(new_feat.__dict__)
|
||||
new_feat.__init__(self)
|
||||
self.source = keep_source
|
||||
|
||||
Reference in New Issue
Block a user