mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-06 21:01:26 +02:00
Ran flake8 and black linters, and other cleanup-related fixes.
Project now passes flake8 and black linter (also including more rst cleanup). Moved latex related things to dedicated ``latex.py`` module, and removed the ``makesheets -dF`` call from travis.
This commit is contained in:
@@ -8,30 +8,25 @@ class _SpecialistSpells(Feature):
|
||||
Spells table. These spells count as artificer spells for you, but they
|
||||
don't count against the number of artificer spells you prepare.
|
||||
"""
|
||||
|
||||
_name = "Select One"
|
||||
source = "Artificer"
|
||||
_spells = {
|
||||
3: [],
|
||||
5: [],
|
||||
9: [],
|
||||
13: [],
|
||||
17: []
|
||||
}
|
||||
_spells = {3: [], 5: [], 9: [], 13: [], 17: []}
|
||||
spells_known = []
|
||||
spells_prepared = []
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return "{:s} Spells".format(self._name)
|
||||
return "{:s} Spells".format(self._name)
|
||||
|
||||
def __init__(self, owner=None):
|
||||
if owner is not None:
|
||||
level = owner.Artificer.level
|
||||
for lvl, spl in self._spells.items():
|
||||
if level >= lvl:
|
||||
self.spells_known.extend(spl)
|
||||
self.spells_prepared.extend(spl)
|
||||
super().__init__(owner=owner)
|
||||
if owner is not None:
|
||||
level = owner.Artificer.level
|
||||
for lvl, spl in self._spells.items():
|
||||
if level >= lvl:
|
||||
self.spells_known.extend(spl)
|
||||
self.spells_prepared.extend(spl)
|
||||
super().__init__(owner=owner)
|
||||
|
||||
|
||||
# Alchemist
|
||||
@@ -52,6 +47,7 @@ class ArtificerSpellcasting(Feature):
|
||||
After you gain the Infuse Item feature at 2nd level, you can also use any
|
||||
item bearing one of your infusions as a spellcasting focus.
|
||||
"""
|
||||
|
||||
name = "Spellcasting"
|
||||
source = "Artificer"
|
||||
|
||||
@@ -60,6 +56,7 @@ class ArtificerRitualCasting(Feature):
|
||||
"""You can cast an artificer spell as a ritual if that spell has the ritual
|
||||
tag and you have the spell prepared.
|
||||
"""
|
||||
|
||||
name = "Ritual Casting"
|
||||
source = "Artificer"
|
||||
|
||||
@@ -71,6 +68,7 @@ class FirearmProficiency(Feature):
|
||||
your artificer has been exposed to the operation of such weapons, your
|
||||
artificer is proficient with them.
|
||||
"""
|
||||
|
||||
name = "Optional Rule: Firearm Proficiency"
|
||||
source = "Artificer"
|
||||
|
||||
@@ -81,7 +79,7 @@ class MagicalTinkering(Feature):
|
||||
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 feet.
|
||||
- Whenever tapped by a creature, the object emits a recorded
|
||||
@@ -105,6 +103,7 @@ class MagicalTinkering(Feature):
|
||||
applies.
|
||||
|
||||
"""
|
||||
|
||||
name = "Magical Tinkering"
|
||||
source = "Artificer"
|
||||
|
||||
@@ -113,7 +112,7 @@ 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
|
||||
@@ -143,39 +142,40 @@ class InfuseItem(Feature):
|
||||
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"
|
||||
_infusions = {
|
||||
# level: (infusions known, infused items)
|
||||
2: (4, 2),
|
||||
3: (4, 2),
|
||||
4: (4, 2),
|
||||
5: (4, 2),
|
||||
6: (6, 3),
|
||||
7: (6, 3),
|
||||
8: (6, 3),
|
||||
9: (6, 3),
|
||||
10: (8, 4),
|
||||
11: (8, 4),
|
||||
12: (8, 4),
|
||||
13: (8, 4),
|
||||
14: (10, 5),
|
||||
15: (10, 5),
|
||||
16: (10, 5),
|
||||
17: (10, 5),
|
||||
18: (12, 6),
|
||||
19: (12, 6),
|
||||
20: (12, 6),
|
||||
}
|
||||
# level: (infusions known, infused items)
|
||||
2: (4, 2),
|
||||
3: (4, 2),
|
||||
4: (4, 2),
|
||||
5: (4, 2),
|
||||
6: (6, 3),
|
||||
7: (6, 3),
|
||||
8: (6, 3),
|
||||
9: (6, 3),
|
||||
10: (8, 4),
|
||||
11: (8, 4),
|
||||
12: (8, 4),
|
||||
13: (8, 4),
|
||||
14: (10, 5),
|
||||
15: (10, 5),
|
||||
16: (10, 5),
|
||||
17: (10, 5),
|
||||
18: (12, 6),
|
||||
19: (12, 6),
|
||||
20: (12, 6),
|
||||
}
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
known_infusions = self._infusions[self.owner.Artificer.level][0]
|
||||
infused_items = self._infusions[self.owner.Artificer.level][1]
|
||||
name_ext = " ({:d} Infusions Known, {:d} Infused Items)"
|
||||
return self._name + name_ext.format(known_infusions, infused_items)
|
||||
known_infusions = self._infusions[self.owner.Artificer.level][0]
|
||||
infused_items = self._infusions[self.owner.Artificer.level][1]
|
||||
name_ext = " ({:d} Infusions Known, {:d} Infused Items)"
|
||||
return self._name + name_ext.format(known_infusions, infused_items)
|
||||
|
||||
|
||||
class ArtificerSpecialist(Feature):
|
||||
@@ -184,6 +184,7 @@ class ArtificerSpecialist(Feature):
|
||||
class's description. Your choice grants you features at 5th level and again
|
||||
at 9th and 15th level.
|
||||
"""
|
||||
|
||||
name = "Artificer Specialist"
|
||||
source = "Artificer"
|
||||
|
||||
@@ -196,6 +197,7 @@ class TheRightToolForTheJob(Feature):
|
||||
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"
|
||||
|
||||
@@ -204,6 +206,7 @@ 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"
|
||||
|
||||
@@ -214,12 +217,13 @@ class FlashOfGenius(Feature):
|
||||
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 = "Artificer"
|
||||
|
||||
@@ -227,13 +231,14 @@ class FlashOfGenius(Feature):
|
||||
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"
|
||||
|
||||
@@ -245,7 +250,7 @@ class SpellStoringItem(Feature):
|
||||
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
|
||||
@@ -254,18 +259,20 @@ class SpellStoringItem(Feature):
|
||||
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"
|
||||
|
||||
@@ -274,6 +281,7 @@ class MagicItemMaster(Feature):
|
||||
"""Starting at 18th level, you can attune to up to six magic items at
|
||||
once.
|
||||
"""
|
||||
|
||||
name = "Magic Item Master"
|
||||
source = "Artificer"
|
||||
|
||||
@@ -281,14 +289,15 @@ class MagicItemMaster(Feature):
|
||||
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"
|
||||
|
||||
@@ -299,6 +308,7 @@ class AlchemistToolProficiency(Feature):
|
||||
with alchemist's supplies. If you already have this proficiency, you gain
|
||||
proficiency with one other type of artisan's tools of your choice.
|
||||
"""
|
||||
|
||||
name = "Tool Proficiency"
|
||||
source = "Artificer (Alchemist)"
|
||||
|
||||
@@ -309,14 +319,15 @@ class AlchemistSpells(_SpecialistSpells):
|
||||
table. These spells count as artificer spells for you, but they don't count
|
||||
against the number of artificer spells you prepare.
|
||||
"""
|
||||
|
||||
_name = "Alchemist"
|
||||
_spells = {
|
||||
3: [spells.HealingWord, spells.RayOfSickness],
|
||||
5: [spells.FlamingSphere, spells.MelfsAcidArrow],
|
||||
9: [spells.GaseousForm, spells.MassHealingWord],
|
||||
13: [spells.Blight, spells.DeathWard],
|
||||
17: [spells.Cloudkill, spells.RaiseDead]
|
||||
}
|
||||
3: [spells.HealingWord, spells.RayOfSickness],
|
||||
5: [spells.FlamingSphere, spells.MelfsAcidArrow],
|
||||
9: [spells.GaseousForm, spells.MassHealingWord],
|
||||
13: [spells.Blight, spells.DeathWard],
|
||||
17: [spells.Cloudkill, spells.RaiseDead],
|
||||
}
|
||||
|
||||
|
||||
class ExperimentalElixir(Feature):
|
||||
@@ -361,6 +372,7 @@ class ExperimentalElixir(Feature):
|
||||
alter self spell. The drinker determines the transformation caused by the
|
||||
spell, the effects of which last for 10 minutes.
|
||||
"""
|
||||
|
||||
name = "Experimental Elixir"
|
||||
source = "Artificer (Alchemist)"
|
||||
|
||||
@@ -373,6 +385,7 @@ class AlchemicalSavant(Feature):
|
||||
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)"
|
||||
|
||||
@@ -380,7 +393,7 @@ class AlchemicalSavant(Feature):
|
||||
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).
|
||||
@@ -389,8 +402,9 @@ class RestorativeReagents(Feature):
|
||||
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)"
|
||||
|
||||
@@ -399,7 +413,7 @@ 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
|
||||
@@ -408,8 +422,9 @@ class ChemicalMastery(Feature):
|
||||
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)"
|
||||
|
||||
@@ -421,14 +436,15 @@ class ArtilleristSpells(_SpecialistSpells):
|
||||
Spells table. These spells count as artificer spells for you, but they
|
||||
don't count against the number of artificer spells you prepare.
|
||||
"""
|
||||
|
||||
_name = "Artillerist"
|
||||
_spells = {
|
||||
3: [spells.Shield, spells.Thunderwave],
|
||||
5: [spells.ScorchingRay, spells.Shatter],
|
||||
9: [spells.Fireball, spells.WindWall],
|
||||
13: [spells.IceStorm, spells.WallOfFire],
|
||||
17: [spells.ConeOfCold, spells.WallOfForce]
|
||||
}
|
||||
3: [spells.Shield, spells.Thunderwave],
|
||||
5: [spells.ScorchingRay, spells.Shatter],
|
||||
9: [spells.Fireball, spells.WindWall],
|
||||
13: [spells.IceStorm, spells.WallOfFire],
|
||||
17: [spells.ConeOfCold, spells.WallOfForce],
|
||||
}
|
||||
|
||||
|
||||
class ArtilleristToolProficiency(Feature):
|
||||
@@ -436,6 +452,7 @@ class ArtilleristToolProficiency(Feature):
|
||||
with woodcarver's tools. If you already have this proficiency, you gain
|
||||
proficiency with one other type of artisan's tools of your choice.
|
||||
"""
|
||||
|
||||
name = "Tool Proficiency"
|
||||
source = "Artificer (Artillerist)"
|
||||
|
||||
@@ -485,6 +502,7 @@ class EldritchCannon(Feature):
|
||||
number of temporary hit points equal to 1d8 + your Intelligence modifier
|
||||
(minimum of +1)
|
||||
"""
|
||||
|
||||
name = "Eldritch Cannon"
|
||||
source = "Artificer (Artillerist)"
|
||||
|
||||
@@ -497,13 +515,14 @@ class ArcaneFirearm(Feature):
|
||||
your arcane firearm. The sigils disappear from the object if you
|
||||
later carve them on a different item. The sigils otherwise last
|
||||
indefinitely.
|
||||
|
||||
|
||||
You can use your arcane firearm as a spellcasting focus for your
|
||||
artificer spells. When you cast an artificer spell through the
|
||||
firearm, roll a d8, and you gain a bonus to one of the spell's
|
||||
damage rolls equal to the number rolled.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
name = "Arcane Firearm"
|
||||
source = "Artificer (Artillerist)"
|
||||
|
||||
@@ -511,15 +530,16 @@ class ArcaneFirearm(Feature):
|
||||
class ExplosiveCannon(Feature):
|
||||
"""Starting at 9th level, every eldritch cannon you create is more
|
||||
destructive:
|
||||
|
||||
|
||||
- The cannon's damage rolls all increase by 1d8.
|
||||
- As an action, you can command the cannon to detonate if you are
|
||||
within 60 feet of it. Doing so destroys the cannon and forces
|
||||
each creature within 20 feet of it to make a Dexterity saving
|
||||
throw against your spell save DC, taking 3d8 force damage on a
|
||||
failed save or half as much damage on a successful one.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
name = "Explosive Cannon"
|
||||
source = "Artificer (Artillerist)"
|
||||
|
||||
@@ -527,7 +547,7 @@ class ExplosiveCannon(Feature):
|
||||
class FortifiedPosition(Feature):
|
||||
"""Starting at 15th level, you're a master at forming well-defended
|
||||
emplacements using Eldritch Cannon:
|
||||
|
||||
|
||||
- You and your allies have half cover while within 10 feet of a
|
||||
cannon you create with Eldritch Cannon, as a result of a
|
||||
shimmering field of magical protection that the cannon emits.
|
||||
@@ -536,8 +556,9 @@ class FortifiedPosition(Feature):
|
||||
can activate both of them with the same bonus action. You
|
||||
determine whether the cannons are identical to each other or
|
||||
different. You can't create a third cannon while you have two.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
name = "Fortified Position"
|
||||
source = "Artificer (Artillerist)"
|
||||
|
||||
@@ -549,16 +570,17 @@ class BattleSmithSpells(_SpecialistSpells):
|
||||
Battle Smith Spells table. These spells count as artificer spells
|
||||
for you, but they don't count against the number of artificer
|
||||
spells you prepare.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
_name = "Battle Smith"
|
||||
_spells = {
|
||||
3: [spells.Heroism, spells.Shield],
|
||||
5: [spells.BrandingSmite, spells.WardingBond],
|
||||
9: [spells.AuraOfVitality, spells.ConjureBarrage],
|
||||
13: [spells.AuraOfPurity, spells.FireShield],
|
||||
17: [spells.BanishingSmite, spells.MassCureWounds]
|
||||
}
|
||||
3: [spells.Heroism, spells.Shield],
|
||||
5: [spells.BrandingSmite, spells.WardingBond],
|
||||
9: [spells.AuraOfVitality, spells.ConjureBarrage],
|
||||
13: [spells.AuraOfPurity, spells.FireShield],
|
||||
17: [spells.BanishingSmite, spells.MassCureWounds],
|
||||
}
|
||||
|
||||
|
||||
class BattleSmithToolProficiency(Feature):
|
||||
@@ -566,8 +588,9 @@ class BattleSmithToolProficiency(Feature):
|
||||
proficiency with smith's tools. If you already have this
|
||||
proficiency, you gain proficiency with one other type of artisan's
|
||||
tools of your choice.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
name = "Tool Proficiency"
|
||||
source = "Artificer (Battle Smith)"
|
||||
|
||||
@@ -575,13 +598,14 @@ class BattleSmithToolProficiency(Feature):
|
||||
class BattleReady(Feature):
|
||||
"""When you reach 3rd level, your combat training and your experiments with
|
||||
magic have paid off in two ways:
|
||||
|
||||
|
||||
- You gain proficiency with martial weapons.
|
||||
- When you attack with a magic weapon, you can use your
|
||||
Intelligence modifier, instead of Strength or Dexterity
|
||||
modifier, for the attack and damage rolls.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
name = "Battle Ready"
|
||||
source = "Artificer (Battle Smith)"
|
||||
|
||||
@@ -593,26 +617,27 @@ class SteelDefender(Feature):
|
||||
steel defender stat block. You determine the creature's appearance
|
||||
and whether it has two legs or four; your choice has no effect on
|
||||
its game statistics.
|
||||
|
||||
|
||||
In combat, the steel defender shares your initiative count, but it
|
||||
takes its turn immediately after yours. It can move and use its
|
||||
reaction on its own, but the only action it takes on its turn is
|
||||
the Dodge action, unless you take a bonus action on your turn to
|
||||
command it to take one of the actions in its stat block or the
|
||||
Dash, Disengage, Help, Hide, or Search action.
|
||||
|
||||
|
||||
If the *mending* spell is cast on it, it regains 2d6 hit
|
||||
points. If it has died within the last hour, you can use your
|
||||
smith's tools as an action to revive it, provided you are within 5
|
||||
feet of it and you expend a spell slot of 1st level or higher. The
|
||||
steel defender returns to life after 1 minute with all its hit
|
||||
points restored.
|
||||
|
||||
|
||||
At the end of a long rest, you can create a new steel defender if
|
||||
you have your smith's tools with you. If you already have a steel
|
||||
defender from this feature, the first one immediately perishes.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
name = "Steel Defender"
|
||||
source = "Artificer (Battle Smith)"
|
||||
|
||||
@@ -620,8 +645,9 @@ class SteelDefender(Feature):
|
||||
class ExtraAttackBattleSmith(Feature):
|
||||
"""Starting at 5th level, you can attack twice, rather than once,
|
||||
whenever you take the Attack action on your turn.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
name = "Extra Attack"
|
||||
source = "Artificer (Battle Smith)"
|
||||
|
||||
@@ -631,7 +657,7 @@ class ArcaneJolt(Feature):
|
||||
or heal. When either you hit a target with a magic weapon attack
|
||||
or your steel defender hits a target, you can channel magical
|
||||
energy through the strike to create one of the following effects:
|
||||
|
||||
|
||||
- The target takes an extra 2d6 force damage.
|
||||
- Choose one creature or object you can see within 30 feet of the
|
||||
target. Healing energy flows into the chosen recipient,
|
||||
@@ -639,8 +665,9 @@ class ArcaneJolt(Feature):
|
||||
of times equal to your Intelligence modifier (minimum of once),
|
||||
but you can do so no more than once on a turn. You regain all
|
||||
expended uses when you finish a long rest
|
||||
|
||||
|
||||
"""
|
||||
|
||||
name = "Arcane Jolt"
|
||||
source = "Artificer (Battle Smith)"
|
||||
|
||||
@@ -648,14 +675,15 @@ class ArcaneJolt(Feature):
|
||||
class ImprovedDefender(Feature):
|
||||
"""At 15th level, your Arcane jolt and steel defender become more
|
||||
powerful:
|
||||
|
||||
|
||||
- The extra damage and the healing of your Arcane jolt both
|
||||
increase to 4d6.
|
||||
- Your steel defender gains a +2 bonus to Armor Class.
|
||||
- Whenever your steel defender uses its Deflect Attack, the
|
||||
attacker takes force damage equal to 1d4 +your Intelligence
|
||||
modifier.
|
||||
|
||||
|
||||
"""
|
||||
|
||||
name = "Improved Defender"
|
||||
source = "Artificer (Battle Smith)"
|
||||
|
||||
Reference in New Issue
Block a user