mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-07 13:15:53 +02:00
add artificer class
Work still in progress, at now just basics.
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
from collections import defaultdict
|
||||
|
||||
from dungeonsheets import exceptions, features, monsters, weapons
|
||||
from dungeonsheets.classes.classes import CharClass, SubClass
|
||||
from dungeonsheets.stats import findattr
|
||||
|
||||
|
||||
class Alchemist(SubClass):
|
||||
"""An Alchemist is an expert at combining reagents to produce mystical
|
||||
effects. Alchemists use their creations to give life and to leech it away.
|
||||
Alchemy is the oldest of artificer traditions, and its versatility has
|
||||
long been valued during times of war and peace.
|
||||
"""
|
||||
|
||||
name = "Alchemist"
|
||||
features_by_level = defaultdict(list)
|
||||
features_by_level[3] = [features.ToolProficiency]
|
||||
features_by_level[5] = [features.AlchemicalSavant]
|
||||
features_by_level[9] = [features.RestorativeReagents]
|
||||
features_by_level[15] = [features.ChemicalMastery]
|
||||
|
||||
|
||||
class Artificer(CharClass):
|
||||
name = "Artificer"
|
||||
hit_dice_faces = 8
|
||||
subclass_select_level = 3
|
||||
saving_throw_proficiencies = ('intelligence', 'constitution')
|
||||
primary_abilities = ('intelligence',)
|
||||
_proficiencies_text = (
|
||||
'Light armor', 'Medium armor', 'Shields', 'Simple weapons',
|
||||
'Thieve\'s tools', 'Tinker\'s tools',
|
||||
'One type of artisan\'s tools of your choice')
|
||||
weapon_proficiencies = (weapon.SimpleWeapon)
|
||||
class_skill_choices = ('Arcana', 'History', 'Investigation', 'Medicine',
|
||||
'Nature', 'Perception', 'Sleight of Hand')
|
||||
features_by_level = defaultdict(list)
|
||||
features_by_level[1] = [features.MagicalTinkering]
|
||||
features_by_level[2] = [features.InfuseItem]
|
||||
features_by_level[3] = [features.TheRightToolForTheJob]
|
||||
features_by_level[6] = [features.ToolExpertise]
|
||||
features_by_level[7] = [features.FlashOfGenius]
|
||||
features_by_level[10] = [features.MagicItemAdept]
|
||||
features_by_level[11] = [features.SpellStoringItem]
|
||||
features_by_level[14] = [features.MagicItemSavant]
|
||||
features_by_level[18] = [features.MagicItemMaster]
|
||||
features_by_level[20] = [features.SoulOfArtifice]
|
||||
subclasses_available = (Alchemist, Artillerist, BattleSmith)
|
||||
spellcasting_ability = 'intelligence'
|
||||
spell_slots_by_level = {
|
||||
1: (2, 2, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
2: (2, 2, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
3: (2, 3, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
4: (2, 3, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
5: (2, 4, 2, 0, 0, 0, 0, 0, 0, 0),
|
||||
6: (2, 4, 2, 0, 0, 0, 0, 0, 0, 0),
|
||||
7: (2, 4, 3, 0, 0, 0, 0, 0, 0, 0),
|
||||
8: (2, 4, 3, 0, 0, 0, 0, 0, 0, 0),
|
||||
9: (2, 4, 3, 2, 0, 0, 0, 0, 0, 0),
|
||||
10: (3, 4, 3, 2, 0, 0, 0, 0, 0, 0),
|
||||
11: (3, 4, 3, 3, 0, 0, 0, 0, 0, 0),
|
||||
12: (3, 4, 3, 3, 0, 0, 0, 0, 0, 0),
|
||||
13: (3, 4, 3, 3, 1, 0, 0, 0, 0, 0),
|
||||
14: (4, 4, 3, 3, 1, 0, 0, 0, 0, 0),
|
||||
15: (4, 4, 3, 3, 2, 0, 0, 0, 0, 0),
|
||||
16: (4, 4, 3, 3, 2, 0, 0, 0, 0, 0),
|
||||
17: (4, 4, 3, 3, 3, 1, 0, 0, 0, 0),
|
||||
18: (4, 4, 3, 3, 3, 1, 0, 0, 0, 0),
|
||||
19: (4, 4, 3, 3, 3, 2, 0, 0, 0, 0),
|
||||
20: (4, 4, 3, 3, 3, 2, 0, 0, 0, 0),
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
from dungeonsheets import spells
|
||||
from dungeonsheets.features.features import Feature, FeatureSelector
|
||||
|
||||
class ToolProficiency(Feature):
|
||||
"""At 3rd level, you choose the type of specialist you are: Alchemist,
|
||||
Artillerist, or Battle Smith, each of which is detailed at the end of the
|
||||
class's description. Your choice grants you features at 5th level and again
|
||||
at 9th and 15th level.
|
||||
"""
|
||||
|
||||
name = "Tool Proficiency"
|
||||
source = "Artificer (Alchemist)"
|
||||
|
||||
|
||||
class AlchemicalSavant(Feature):
|
||||
"""At 5th level, you develop masterful command of magical chemicals,
|
||||
enhancing the healing and damage you create through them. Whenever you
|
||||
cast a spell using your alchemist's supplies as the spellcasting focus, you
|
||||
gain a bonus to one roll of the spell. That roll must restore hit points or
|
||||
be a damage roll that deals acid, fire, necrotic, or poison damage, and the
|
||||
bonus equals your Intelligence modifier (minimum of +1).
|
||||
"""
|
||||
|
||||
name = "Alchemical Savant"
|
||||
source = "Artificer (Alchemist)"
|
||||
|
||||
|
||||
class RestorativeReagents(Feature):
|
||||
"""Starting at 9th level, you can incorporate
|
||||
restorative reagents into some of your works:
|
||||
- Whenever a creature drinks an experimental elixir you created, the
|
||||
creature gains temporary hit points equal to 2d6 +your Intelligence
|
||||
modifier (minimum of 1 temporary hit point).
|
||||
- You can cast lesser restoration without expending a spell slot and
|
||||
without preparing the spell, provided you use alchemist's supplies as the
|
||||
spellcasting focus. You can do so a number of times equal to your
|
||||
Intelligence modifier (minimum of once), and you regain all expended uses
|
||||
when you finish a long rest.
|
||||
"""
|
||||
|
||||
name = "Restorative Reagents"
|
||||
source = "Artificer (Alchemist)"
|
||||
|
||||
|
||||
class ChemicalMastery(Feature):
|
||||
"""By 15th level, you have been exposed to so many chemicals that they
|
||||
pose little risk to you, and you can use them to quickly end certain
|
||||
ailments:
|
||||
- You gain resistance to acid damage and poison damage, and you are immune
|
||||
to the poisoned condition.
|
||||
- You can cast greater restoration and heal without expending a spell
|
||||
slot, without preparing the spell, and without material components,
|
||||
provided you use alchemist's supplies as the spellcasting focus. Once
|
||||
you cast either spell with this feature, you can't cast that spell with
|
||||
it again until you finish a long rest.
|
||||
"""
|
||||
|
||||
name = "Chemical Mastery"
|
||||
source = "Artificer (Alchemist)"
|
||||
|
||||
|
||||
class MagicalTinkering(Feature):
|
||||
"""At 1st level, you learn how to invest a spark of magic into mundane
|
||||
objects. To use this ability, you must have tinker's tools or other
|
||||
artisan's tools in hand. You then touch a Tiny nonmagical object as an
|
||||
action and give it one of the following magical properties of your choice:
|
||||
- The object sheds bright light in a 5-foot radius and dim light for an
|
||||
additional 5 fe et.
|
||||
- Whenever tapped by a creature, the object emits a recorded message that
|
||||
can be heard up to 10 feet away. You utter the message when you bestow
|
||||
this property on the object, and the recording can be no more than 6
|
||||
seconds long.
|
||||
- The object continuously emits your choice of an odor or a nonverbal sound
|
||||
(wind, waves, chirping, or the like). The chosen phenomenon is
|
||||
perceivable up to 10 feet away.
|
||||
- A static visual effect appears on one of the object's surfaces. This
|
||||
effect can be a picture, up to 25 words of text, lines and shapes, or a
|
||||
mixture of these elements, as you like. The chosen property lasts
|
||||
indefinitely. As an action, you can touch the object and end the property
|
||||
early. You can bestow magic on multiple objects, touching one object each
|
||||
time you use this feature, though a single object can only bear one
|
||||
property at a time. The maximum number of objects you can affect with
|
||||
this feature at one time is equal to your Intelligence modifier (minimum
|
||||
of one object). If you try to exceed your maximum, the oldest property
|
||||
immediately ends, and then the new property applies.
|
||||
"""
|
||||
|
||||
name = "Magical Tinkering"
|
||||
source = "Artificer"
|
||||
|
||||
|
||||
class InfuseItem(Feature):
|
||||
"""At 2nd level, you gain the ability to imbue mundane items with certain
|
||||
magical infusions. The magic items you create with this feature are
|
||||
effectively prototypes of permanent items.
|
||||
|
||||
INFUSIONS KNOWN
|
||||
When you gain this feature, pick four artificer infusions
|
||||
to learn, choosing from the "Artificer Infusions" section at the end of the
|
||||
class's description. You learn additional infusions of your choice when you
|
||||
reach certain levels in this class, as shown in the Infusions Known column
|
||||
of the Artificer table. Whenever you gain a level in this class, you can
|
||||
replace one of the artificer infusions you learned with a new one.
|
||||
|
||||
INFUSING AN ITEM
|
||||
Whenever you finish a long rest, you can touch a nonmagical object and
|
||||
imbue it with one of your artificer infusions, turning it into a magic
|
||||
item. An infusion works on only certain kinds of objects, as specified in
|
||||
the infusion's description. If the item requires attunement, you can
|
||||
attune yourself to it the instant you infuse the item. If you decide to
|
||||
attune to the item later, you must do so using the normal process for
|
||||
attunement (see "Attunement" in chapter 7 of the Dungeon Master's Guide).
|
||||
Your infusion remains in an item indefinitely, but when you die, the
|
||||
infusion vanishes after a number of days have passed equal to your
|
||||
Intelligence modifier (minimum of 1 day). The infusion also vanishes if you
|
||||
give up your knowledge of the infusion for another one. You can infuse more
|
||||
than one nonmagical object at the end of a long rest; the maximum number of
|
||||
objects appears in the Infused Items column of the Artificer table. You
|
||||
must touch each of the objects, and each of your infusions can be in only
|
||||
one object at a time. Moreover, no object can bear more than one of your
|
||||
infusions at a time. If you try to exceed your maximum number of
|
||||
infusions, the oldest infusion immediately ends, and then the new
|
||||
infusion applies.
|
||||
"""
|
||||
|
||||
name = "Infuse Item"
|
||||
source = "Artificer"
|
||||
|
||||
|
||||
class TheRightToolForTheJob(Feature):
|
||||
"""At 3rd level, you learn how to produce exactly the tool you need: with
|
||||
tinker's tools in hand, you can magically create one set of artisan's tools
|
||||
in an unoccupied space within 5 feet of you. This creation requires 1
|
||||
hour of uninterrupted work, which can coincide with a short or long rest.
|
||||
Though the product of magic, the tools are nonmagical, and they vanish when
|
||||
you use this feature again.
|
||||
"""
|
||||
|
||||
name = "The Right Tool For The Job"
|
||||
source = "Artificer"
|
||||
|
||||
|
||||
class ToolExpertise(Feature):
|
||||
"""Starting at 6th level, your proficiency bonus is doubled for any ability
|
||||
check you make that uses your proficiency with a tool.
|
||||
"""
|
||||
|
||||
name = "Tool Expertise"
|
||||
source = "Artificer"
|
||||
|
||||
|
||||
class FlashOfGenius(Feature):
|
||||
"""Starting at 7th level, you gain the ability to come up with solutions
|
||||
under pressure. When you or another creature you can see within 30 feet of
|
||||
you makes an ability check or a saving throw, you can use your reaction to
|
||||
add your Intelligence modifier to the roll. You can use this feature a
|
||||
number of times equal to your Intelligence modifier (minimum of once). You
|
||||
regain all expended uses when you finish a long rest.
|
||||
"""
|
||||
|
||||
name = "Flash Of Genius"
|
||||
source = "Arificer"
|
||||
|
||||
|
||||
class MagicItemAdept(Feature):
|
||||
"""When you reach 10th level, you achieve a profound understanding of how
|
||||
to use and make magic items:
|
||||
- You can attune to up to four magic items at once.
|
||||
- If you craft a magic item with a rarity of common or uncommon, it takes
|
||||
you a quarter of the normal time, and it costs you half as much of the
|
||||
usual gold.
|
||||
"""
|
||||
|
||||
name = "Magic Item Adept"
|
||||
source = "Artificer"
|
||||
|
||||
|
||||
class SpellStoringItem(Feature):
|
||||
"""At 11th level, you learn how to store a spell in an object. Whenever you
|
||||
finish a long rest, you can touch one simple or martial weapon or one item
|
||||
that you can use as a spellcasting focus, and you store a spell in it,
|
||||
choosing a 1st- or 2nd-level spell from the artificer spell list that
|
||||
requires 1 action to cast (you needn't have it prepared).
|
||||
|
||||
While holding the object, a creature can take an action to produce the
|
||||
spell's effect from it, using your spellcasting ability modifier. If the
|
||||
spell requires concentration, the creature must concentrate. The spell
|
||||
stays in the object until it's been used a number of times equal to twice
|
||||
your Intelligence modifier (minimum of twice) or until you use this fe
|
||||
ature again to store a spell in an object.
|
||||
"""
|
||||
|
||||
name = "Spell-Storing Item"
|
||||
source = "Artificer"
|
||||
|
||||
|
||||
class MagicItemSavant(Feature):
|
||||
"""At 14th level, your skill with magic items deepens more:
|
||||
- You can attune to up to five magic items at once.
|
||||
- You ignore all class, race, spell, and level requirements on attuning to
|
||||
or using a magic item.
|
||||
"""
|
||||
|
||||
name = "Magic Item Savant"
|
||||
source = "Artificer"
|
||||
|
||||
|
||||
class MagicItemMaster(Feature):
|
||||
"""Starting at 18th level, you can attune to up to six magic items at
|
||||
once.
|
||||
"""
|
||||
|
||||
name = "Magic Item Master"
|
||||
source = "Artificer"
|
||||
|
||||
|
||||
class SoulOfArtifice(Feature):
|
||||
"""At 20th level, you develop a mystical connection to your magic items,
|
||||
which you can draw on for protection:
|
||||
- You gain a +1 bonus to all saving throws per magic item you are currently
|
||||
attuned to.
|
||||
- If you're reduced to 0 hit points but not killed outright, you can use
|
||||
your reaction to end one of your artificer infusions, causing you to drop
|
||||
to 1 hit point instead of 0.
|
||||
"""
|
||||
|
||||
name = "Soul Of Artifice"
|
||||
source = "Artificer"
|
||||
Reference in New Issue
Block a user