mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-07 13:15:53 +02:00
added multiclass with multiple spellcasting classes
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
Add multiclass proficiencies to classes
|
||||
Add multiclass spell slots
|
||||
|
||||
Add subclasses
|
||||
Add features
|
||||
|
||||
@@ -15,6 +15,30 @@ from .armor import Armor, NoArmor, Shield, NoShield
|
||||
|
||||
dice_re = re.compile('(\d+)d(\d+)')
|
||||
|
||||
multiclass_spellslots_by_level = {
|
||||
# char_lvl: (cantrips, 1st, 2nd, 3rd, ...)
|
||||
1: (0, 2, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
2: (0, 3, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
3: (0, 4, 2, 0, 0, 0, 0, 0, 0, 0),
|
||||
4: (0, 4, 3, 0, 0, 0, 0, 0, 0, 0),
|
||||
5: (0, 4, 3, 2, 0, 0, 0, 0, 0, 0),
|
||||
6: (0, 4, 3, 3, 0, 0, 0, 0, 0, 0),
|
||||
7: (0, 4, 3, 3, 1, 0, 0, 0, 0, 0),
|
||||
8: (0, 4, 3, 3, 2, 0, 0, 0, 0, 0),
|
||||
9: (0, 4, 3, 3, 3, 1, 0, 0, 0, 0),
|
||||
10: (0, 4, 3, 3, 3, 2, 0, 0, 0, 0),
|
||||
11: (0, 4, 3, 3, 3, 2, 1, 0, 0, 0),
|
||||
12: (0, 4, 3, 3, 3, 2, 1, 0, 0, 0),
|
||||
13: (0, 4, 3, 3, 3, 2, 1, 1, 0, 0),
|
||||
14: (0, 4, 3, 3, 3, 2, 1, 1, 0, 0),
|
||||
15: (0, 4, 3, 3, 3, 2, 1, 1, 1, 0),
|
||||
16: (0, 4, 3, 3, 3, 2, 1, 1, 1, 0),
|
||||
17: (0, 4, 3, 3, 3, 2, 1, 1, 1, 1),
|
||||
18: (0, 4, 3, 3, 3, 3, 1, 1, 1, 1),
|
||||
19: (0, 4, 3, 3, 3, 3, 2, 1, 1, 1),
|
||||
20: (0, 4, 3, 3, 3, 3, 2, 2, 1, 1),
|
||||
}
|
||||
|
||||
|
||||
class Character():
|
||||
"""A generic player character.
|
||||
@@ -170,7 +194,24 @@ class Character():
|
||||
|
||||
def spell_slots(self, spell_level):
|
||||
# TODO: Update this for Multiclassing
|
||||
if len(self.spellcasting_classes) == 1:
|
||||
return self.spellcasting_classes[0].spell_slots(spell_level)
|
||||
else:
|
||||
if spell_level == 0:
|
||||
return sum([c.spell_slots(0)
|
||||
for c in self.spellcasting_classes])
|
||||
else:
|
||||
# compute effective level from PHB pg 164
|
||||
eff_level = 0
|
||||
for c in self.spellcasting_classes:
|
||||
if type(c) in [classes.Bard, classes.Cleric, classes.Druid,
|
||||
classes.Sorceror, classes.Wizard]:
|
||||
eff_level += c.class_level
|
||||
elif type(c) in [classes.Paladin, classes.Ranger]:
|
||||
eff_level += c.class_level // 2
|
||||
elif type(c) in [classes.Fighter, classes.Rogue]:
|
||||
eff_level += c.class_level // 3
|
||||
return multiclass_spellslots_by_level[eff_level][spell_level]
|
||||
|
||||
def set_attrs(self, **attrs):
|
||||
"""Bulk setting of attributes. Useful for loading a character from a
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
__all__ = ['load_character_file']
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
+10
-6
@@ -1,12 +1,14 @@
|
||||
all: multiclass wizard druid rogue warlock
|
||||
all: multiclass multiclass_2 wizard druid rogue warlock
|
||||
|
||||
clobber:
|
||||
rm -f multiclass.pdf wizard.pdf rogue.pdf warlock.pdf druid.pdf
|
||||
rm -f multiclass.pdf multiclass_2.pdf wizard.pdf rogue.pdf warlock.pdf druid.pdf
|
||||
|
||||
redo: clobber all
|
||||
|
||||
multiclass: multiclass.pdf
|
||||
|
||||
multiclass_2: multiclass_2.pdf
|
||||
|
||||
wizard: wizard.pdf
|
||||
|
||||
rogue: rogue.pdf
|
||||
@@ -18,15 +20,17 @@ druid: druid.pdf
|
||||
multiclass.pdf: multiclass.py
|
||||
makesheets multiclass.py
|
||||
|
||||
multiclass_2.pdf: multiclass_2.py
|
||||
makesheets multiclass_2.py
|
||||
|
||||
wizard.pdf: wizard.py
|
||||
makesheets wizard.py
|
||||
|
||||
druid.pdf: druid.py
|
||||
makesheets druid.py
|
||||
|
||||
rogue.pdf: rogue.py
|
||||
makesheets rogue.py
|
||||
|
||||
warlock.pdf: warlock.py
|
||||
makesheets warlock.py
|
||||
|
||||
druid.pdf: druid.py
|
||||
makesheets druid.py
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,117 @@
|
||||
dungeonsheets_version = "0.4.2"
|
||||
|
||||
# Basic information
|
||||
name = 'Inara Serradon'
|
||||
# classes_levels: specify class and level or, if multiclass, specify as list
|
||||
# example:
|
||||
# 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', 'druid 2'] # 4th level total
|
||||
subclasses = ['Necromancer', 'moon']
|
||||
circle = 'moon'
|
||||
|
||||
player_name = 'Mark'
|
||||
background = "Acolyte"
|
||||
race = "High-Elf"
|
||||
# level = 3 # no longer used
|
||||
alignment = "Chaotic good"
|
||||
xp = 2190
|
||||
hp_max = 16
|
||||
|
||||
# Ability Scores
|
||||
strength = 10
|
||||
dexterity = 15
|
||||
constitution = 14
|
||||
intelligence = 16
|
||||
wisdom = 12
|
||||
charisma = 8
|
||||
|
||||
# Proficiencies and languages
|
||||
skill_proficiencies = [
|
||||
'arcana',
|
||||
'insight',
|
||||
'investigation',
|
||||
'perception',
|
||||
'religion',
|
||||
]
|
||||
languages = "Common, Elvish, Draconic, Dwarvish, Goblin."
|
||||
|
||||
# Inventory
|
||||
cp = 316
|
||||
sp = 283
|
||||
ep = 28
|
||||
gp = 125
|
||||
pp = 0
|
||||
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),
|
||||
component pouch, spellbook, backpack, bottle of ink, ink pen, 10
|
||||
sheets of parchment, small knife, tome of historical lore, holy
|
||||
symbol, prayer book, set of common clothes, pouch.""")
|
||||
|
||||
wild_shapes = ["wolf", "crocodile", "giant eagle", 'ape', 'ankylosaurus']
|
||||
|
||||
druid_spells_prepared = ('shillelagh', 'poison spray', 'druidcraft',
|
||||
'speak with animals', 'entangle', 'cure wounds',
|
||||
'create or destroy water')
|
||||
# List of known spells
|
||||
spells = ('blindness deafness', 'burning hands', 'detect magic',
|
||||
'false life', 'mage armor', 'mage hand', 'magic missile',
|
||||
'prestidigitation', 'ray of frost', 'ray of sickness', 'shield',
|
||||
'shocking grasp', 'sleep',) + druid_spells_prepared
|
||||
|
||||
# Which spells have been prepared (not including cantrips)
|
||||
spells_prepared = ('blindness deafness', 'false life', 'mage armor',
|
||||
'ray of sickness', 'shield', 'sleep',) + druid_spells_prepared
|
||||
|
||||
# Backstory
|
||||
personality_traits = """I use polysyllabic words that convey the impression of
|
||||
erudition. Also, I’ve spent so long in the temple that I have little
|
||||
experience dealing with people on a casual basis."""
|
||||
|
||||
ideals = """Knowledge. The path to power and self-improvement is through
|
||||
knowledge."""
|
||||
|
||||
bonds = """The tome I carry with me is the record of my life’s work so far,
|
||||
and no vault is secure enough to keep it safe."""
|
||||
|
||||
flaws = """I’ll do just about anything to uncover historical secrets that
|
||||
would add to my research."""
|
||||
|
||||
features_and_traits = (
|
||||
"""Spellcasting Ability: Intelligence is your spellcasting ability for
|
||||
your spells. The saving throw DC to resist a spell you cast is
|
||||
13. Your attack bonus when you make an attack with a spell is
|
||||
+5. See the rulebook for rules on casting your spells.
|
||||
|
||||
Arcane Recovery: You can regain some of your magical energy by
|
||||
studying your spellbook. Once per day during a short rest, you can
|
||||
choose to recover expended spell slots with a combined level equal
|
||||
to or less than half your wizard level (rounded up).
|
||||
|
||||
Darkvision: You see in dim light within a 60-foot radius of you as
|
||||
if it were bright light, and in darkness in that radius as if it
|
||||
were dim light. You can’t discern color in darkness, only shades
|
||||
of gray.
|
||||
|
||||
Fey Ancestry: You have advantage on saving throws against being
|
||||
charmed, and magic can’t put you to sleep.
|
||||
|
||||
Trance: Elves don’t need to sleep. They meditate deeply, remaining
|
||||
semiconscious, for 4 hours a day and gain the same benefit a human
|
||||
does from 8 hours of sleep.
|
||||
|
||||
Shelter of the Faithful: As a servant of Oghma, you command the
|
||||
respect of those who share your faith, and you can perform the
|
||||
rites of Oghma. You and your companions can expect to receive free
|
||||
healing and care at a temple, shrine, or other established
|
||||
presence of Oghma’s faith. Those who share your religion will
|
||||
support you (and only you) at a modest lifestyle. You also have
|
||||
ties to the temple of Oghma in Neverwinter, where you have a
|
||||
residence. When you are in Neverwinter, you can call upon the
|
||||
priests there for assistance that won’t endanger them.""")
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user