mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-07 13:15:53 +02:00
first multiclass character works
This commit is contained in:
@@ -104,6 +104,10 @@ class Character():
|
||||
self.all_wild_shapes = c.all_wild_shapes
|
||||
self.wild_shapes = c.wild_shapes
|
||||
self.can_assume_shape = c.can_assume_shape
|
||||
# instantiate any spells not listed properly
|
||||
for S in self.spells_prepared:
|
||||
if S not in [type(spl) for spl in self.spells]:
|
||||
self.spells += (S(),)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@@ -183,7 +187,7 @@ class Character():
|
||||
self.race = MyRace()
|
||||
elif attr == 'background':
|
||||
MyBackground = findattr(background, val)
|
||||
self.race = MyBackground()
|
||||
self.background = MyBackground()
|
||||
elif attr == 'armor':
|
||||
self.wear_armor(val)
|
||||
elif attr == 'shield':
|
||||
@@ -208,6 +212,7 @@ class Character():
|
||||
# Instantiate them all for the spells list
|
||||
self.spells = tuple(S() for S in _spells)
|
||||
else:
|
||||
# this is a list of spell classes
|
||||
self.spells_prepared = tuple(_spells)
|
||||
else:
|
||||
if not hasattr(self, attr):
|
||||
@@ -394,7 +399,7 @@ class Character():
|
||||
'classes_levels not properly formatted. Each entry should '
|
||||
'be formatted \"class level\", but got {:s}'.format(cl))
|
||||
try:
|
||||
this_class = getattr(classes, c)
|
||||
this_class = getattr(classes, c.capitalize())
|
||||
this_level = int(lvl)
|
||||
except AttributeError:
|
||||
raise AttributeError(
|
||||
|
||||
@@ -287,6 +287,10 @@ class Fighter(CharClass):
|
||||
_proficiencies_text = ('All armor', 'shields', 'simple weapons',
|
||||
'martial weapons')
|
||||
weapon_proficiencies = weapons.simple_weapons + weapons.martial_weapons
|
||||
multiclass_weapon_proficiencies = weapon_proficiencies
|
||||
_multiclass_proficiencies_text = ('light armor', 'medium armor',
|
||||
'shields', 'simple weapons',
|
||||
'martial weapons')
|
||||
class_skill_choices = ('Acrobatics', 'Animal Handling',
|
||||
'Athletics', 'History', 'Insight', 'Intimidation',
|
||||
'Perception', 'Survival')
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
\noindent
|
||||
\textbf{Casting Time:} [[ spl.casting_time ]] \\
|
||||
\textbf{Range:} [[ spl.casting_range ]] \\
|
||||
\textbf{Components:} [[ spl.component_string() ]] \\
|
||||
\textbf{Components:} [[ spl.component_string ]] \\
|
||||
\textbf{Duration:} [[ spl.duration ]]
|
||||
|
||||
[[ spl.__doc__|rst_to_latex ]]
|
||||
|
||||
@@ -43,7 +43,8 @@ class Spell():
|
||||
|
||||
def __repr__(self):
|
||||
return f'<{self.name}>'
|
||||
|
||||
|
||||
@property
|
||||
def component_string(self):
|
||||
s = f'{", ".join(self.components)}'
|
||||
if "M" in self.components:
|
||||
|
||||
Binary file not shown.
+4
-2
@@ -50,8 +50,10 @@ wild_shapes = ["wolf", "crocodile", "giant eagle", 'ape', 'ankylosaurus']
|
||||
|
||||
# List of known spells
|
||||
# Which spells have been prepared (including cantrips)
|
||||
spells_prepared = ('shillelagh', 'poison spray', 'druidcraft','speak with animals', 'entangle', 'cure wounds', 'create or destroy water')
|
||||
|
||||
spells_prepared = ('shillelagh', 'poison spray', 'druidcraft',
|
||||
'speak with animals', 'entangle', 'cure wounds',
|
||||
'create or destroy water')
|
||||
# spells = spells_prepared
|
||||
# Backstory
|
||||
# TODO: Describe your backstory here
|
||||
personality_traits = """I am a leaf on the wind,
|
||||
|
||||
+7
-2
@@ -1,10 +1,12 @@
|
||||
all: wizard druid rogue warlock
|
||||
all: multiclass wizard druid rogue warlock
|
||||
|
||||
clobber:
|
||||
rm -f wizard.pdf rogue.pdf warlock.pdf druid.pdf
|
||||
rm -f multiclass.pdf wizard.pdf rogue.pdf warlock.pdf druid.pdf
|
||||
|
||||
redo: clobber all
|
||||
|
||||
multiclass: multiclass.pdf
|
||||
|
||||
wizard: wizard.pdf
|
||||
|
||||
rogue: rogue.pdf
|
||||
@@ -13,6 +15,9 @@ warlock: warlock.pdf
|
||||
|
||||
druid: druid.pdf
|
||||
|
||||
multiclass.pdf: multiclass.py
|
||||
makesheets multiclass.py
|
||||
|
||||
wizard.pdf: wizard.py
|
||||
makesheets wizard.py
|
||||
|
||||
|
||||
Binary file not shown.
@@ -4,14 +4,14 @@ dungeonsheets_version = "0.4.2"
|
||||
name = 'Inara Serradon'
|
||||
# classes_levels: specify class and level or, if multiclass, specify as list
|
||||
# example:
|
||||
classes_levels = ['figher 2'] # 2nd level fighter
|
||||
subclasses = [None]
|
||||
# classes_levels = ['wizard 3'] # 3rd level wizard
|
||||
# subclasses = [None]
|
||||
# also accepted, as long as only one class
|
||||
# classes_levels = 'fighter 2'
|
||||
# subclasses = None
|
||||
# multiclass example
|
||||
# classes_levels = ['wizard 3', 'fighter 1', 'rogue 1'] # 5th level total
|
||||
subclasses = ['necromancer', None, None]
|
||||
classes_levels = ['wizard 3', 'fighter 1', 'rogue 1'] # 5th level total
|
||||
subclasses = ['Necromancer', None, None]
|
||||
player_name = 'Mark'
|
||||
background = "Acolyte"
|
||||
race = "High-Elf"
|
||||
@@ -44,7 +44,7 @@ sp = 283
|
||||
ep = 28
|
||||
gp = 125
|
||||
pp = 0
|
||||
weapons = ('shortsword', 'longsword')
|
||||
weapons = ('greatsword', 'longsword')
|
||||
equipment = (
|
||||
"""Gallon of ale, red cloak, shortsword, longsword, jar of salt, vodka
|
||||
(500mL), potion of vitality, wand of magic missiles (7/7),
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user