mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-07 13:15:53 +02:00
Added some content, and now restores the TEXINPUTS environmental after building.
This commit is contained in:
@@ -360,6 +360,18 @@ class InsightfulFighting(Feature):
|
|||||||
source = "Rogue (Inquisitive)"
|
source = "Rogue (Inquisitive)"
|
||||||
|
|
||||||
|
|
||||||
|
# Optional class feature from *Tasha's Guide to Everything*
|
||||||
|
class SteadyAim(Feature):
|
||||||
|
"""As a bonus action, you give yourself advantage on your next attack
|
||||||
|
roll on the current turn. You can use this bonus action only if
|
||||||
|
you haven't moved during this turn, and after you use the bonus
|
||||||
|
action, your speed is 0 until the end of the current turn.
|
||||||
|
|
||||||
|
"""
|
||||||
|
name = "Steady Aim"
|
||||||
|
source = "Rogue (3rd level, optional)"
|
||||||
|
|
||||||
|
|
||||||
class SteadyEye(Feature):
|
class SteadyEye(Feature):
|
||||||
"""Starting at 9th level, you have advantage on any Wisdom (Perception) or
|
"""Starting at 9th level, you have advantage on any Wisdom (Perception) or
|
||||||
Intelligence (Investigation) check if you move no more than half your speed
|
Intelligence (Investigation) check if you move no more than half your speed
|
||||||
|
|||||||
@@ -72,11 +72,15 @@ def create_latex_pdf(
|
|||||||
module_root = Path(__file__).parent / "modules/"
|
module_root = Path(__file__).parent / "modules/"
|
||||||
module_dirs = [module_root / mdir for mdir in ["DND-5e-LaTeX-Template"]]
|
module_dirs = [module_root / mdir for mdir in ["DND-5e-LaTeX-Template"]]
|
||||||
log.debug(f"Loading additional modules from {module_dirs}.")
|
log.debug(f"Loading additional modules from {module_dirs}.")
|
||||||
environment['TEXINPUTS'] = f".:{':'.join(str(d) for d in module_dirs)}:" + tex_env
|
texinputs = f".:{':'.join(str(d) for d in module_dirs)}:{module_root}:{tex_env}"
|
||||||
|
environment['TEXINPUTS'] = texinputs
|
||||||
passes = 2 if use_dnd_decorations else 1
|
passes = 2 if use_dnd_decorations else 1
|
||||||
log.debug(tex_command_line)
|
log.debug(tex_command_line)
|
||||||
log.debug("LaTeX command: %s" % " ".join(tex_command_line))
|
log.debug("LaTeX command: %s" % " ".join(tex_command_line))
|
||||||
log.debug("LaTeX environ: %s" % environment)
|
log.debug("LaTeX TEXINPUTS: %s" % texinputs)
|
||||||
|
log.debug("LaTeX environ:")
|
||||||
|
for key, val in environment.items():
|
||||||
|
log.debug(" %s: %s" % (key, val))
|
||||||
try:
|
try:
|
||||||
for i in range(passes):
|
for i in range(passes):
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
@@ -99,6 +103,8 @@ def create_latex_pdf(
|
|||||||
for line in tex_error_msg.split("\n"):
|
for line in tex_error_msg.split("\n"):
|
||||||
log.error(line)
|
log.error(line)
|
||||||
raise exceptions.LatexError(err_msg)
|
raise exceptions.LatexError(err_msg)
|
||||||
|
finally:
|
||||||
|
environment['TEXINPUTS'] = tex_env
|
||||||
|
|
||||||
|
|
||||||
def tex_error(logfile: Path) -> str:
|
def tex_error(logfile: Path) -> str:
|
||||||
|
|||||||
@@ -102,7 +102,29 @@ class RingOfProtection(MagicItem):
|
|||||||
item_type = "Ring"
|
item_type = "Ring"
|
||||||
|
|
||||||
|
|
||||||
|
class CloakOfTheBat(MagicItem):
|
||||||
|
"""While wearing this cloak, you have advantage on Dexterity (Stealth)
|
||||||
|
checks. In an area of dim light or darkness, you can grip the
|
||||||
|
edges of the cloak with both hands and use it to fly at a speed of
|
||||||
|
40 feet. If you ever fail to grip the cloak's edges while flying
|
||||||
|
in this way, or if you are no longer in dim light or darkness, you
|
||||||
|
lose this flying speed.
|
||||||
|
|
||||||
|
While wearing the cloak in an area of dim light or darkness, you
|
||||||
|
can use your action to cast polymorph on yourself, transforming
|
||||||
|
into a bat. While you are in the form of the bat, you retain your
|
||||||
|
Intelligence, Wisdom, and Charisma scores. The cloak can't be used
|
||||||
|
this way again until the next dawn.
|
||||||
|
|
||||||
|
"""
|
||||||
|
requires_attunement = True
|
||||||
|
name = "Cloak of the Bat"
|
||||||
|
item_type = "Cloak"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class DecanterOfEndlessWater(MagicItem):
|
class DecanterOfEndlessWater(MagicItem):
|
||||||
|
|
||||||
"""This stoppered flask sloshes when shaken, as if it contains water. The
|
"""This stoppered flask sloshes when shaken, as if it contains water. The
|
||||||
decanter weighs 2 pounds.
|
decanter weighs 2 pounds.
|
||||||
|
|
||||||
@@ -321,3 +343,104 @@ class PearlOfPower(MagicItem):
|
|||||||
|
|
||||||
requires_attunement = True
|
requires_attunement = True
|
||||||
name = "Pearl of Power"
|
name = "Pearl of Power"
|
||||||
|
|
||||||
|
|
||||||
|
class PotionOfHealing(MagicItem):
|
||||||
|
"""You regain hit points when you drink this potion. The number of hit
|
||||||
|
points depends on the potion’s rarity, as shown in the Potions of
|
||||||
|
Healing table. Whatever its potency, the potion’s red liquid
|
||||||
|
glimmers when agitated.
|
||||||
|
|
||||||
|
**Potions of Healing**
|
||||||
|
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
| Potion of ... | Rarity | HP Regained |
|
||||||
|
+=================+===========+=============+
|
||||||
|
|Healing | Common | 2d4 + 2 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|Greater healing | Uncommon | 4d4 + 4 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|Superior healing | Rare | 8d4 + 8 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|Supreme healing | Very rare | 10d4 + 20 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|
||||||
|
"""
|
||||||
|
rarity = "common"
|
||||||
|
name = "Potion of Healing"
|
||||||
|
item_type = "Potion"
|
||||||
|
|
||||||
|
|
||||||
|
class PotionOfGreaterHealing(PotionOfHealing):
|
||||||
|
"""You regain hit points when you drink this potion. The number of hit
|
||||||
|
points depends on the potion’s rarity, as shown in the Potions of
|
||||||
|
Healing table. Whatever its potency, the potion’s red liquid
|
||||||
|
glimmers when agitated.
|
||||||
|
|
||||||
|
**Potions of Healing**
|
||||||
|
|
||||||
|
+-----------------+-----------+-----------------+
|
||||||
|
| Potion of ... | Rarity | HP Regained |
|
||||||
|
+=================+===========+=================+
|
||||||
|
|Healing | Common | ``2d4 + 2`` |
|
||||||
|
+-----------------+-----------+-----------------+
|
||||||
|
|Greater healing | Uncommon | ``4d4 + 4`` |
|
||||||
|
+-----------------+-----------+-----------------+
|
||||||
|
|Superior healing | Rare | ``8d4 + 8`` |
|
||||||
|
+-----------------+-----------+-----------------+
|
||||||
|
|Supreme healing | Very rare | ``10d4 + 20`` |
|
||||||
|
+-----------------+-----------+-----------------+
|
||||||
|
|
||||||
|
"""
|
||||||
|
name = "Potion of Greater Healing"
|
||||||
|
rarity = "uncommon"
|
||||||
|
|
||||||
|
|
||||||
|
class PotionOfSuperiorHealing(PotionOfHealing):
|
||||||
|
"""You regain hit points when you drink this potion. The number of hit
|
||||||
|
points depends on the potion’s rarity, as shown in the Potions of
|
||||||
|
Healing table. Whatever its potency, the potion’s red liquid
|
||||||
|
glimmers when agitated.
|
||||||
|
|
||||||
|
**Potions of Healing**
|
||||||
|
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
| Potion of ... | Rarity | HP Regained |
|
||||||
|
+=================+===========+=============+
|
||||||
|
|Healing | Common | 2d4 + 2 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|Greater healing | Uncommon | 4d4 + 4 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|Superior healing | Rare | 8d4 + 8 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|Supreme healing | Very rare | 10d4 + 20 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|
||||||
|
"""
|
||||||
|
name = "Potion of Superior Healing"
|
||||||
|
rarity = "rare"
|
||||||
|
|
||||||
|
|
||||||
|
class PotionOfSupremeHealing(PotionOfHealing):
|
||||||
|
"""You regain hit points when you drink this potion. The number of hit
|
||||||
|
points depends on the potion’s rarity, as shown in the Potions of
|
||||||
|
Healing table. Whatever its potency, the potion’s red liquid
|
||||||
|
glimmers when agitated.
|
||||||
|
|
||||||
|
**Potions of Healing**
|
||||||
|
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
| Potion of ... | Rarity | HP Regained |
|
||||||
|
+=================+===========+=============+
|
||||||
|
|Healing | Common | 2d4 + 2 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|Greater healing | Uncommon | 4d4 + 4 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|Superior healing | Rare | 8d4 + 8 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|Supreme healing | Very rare | 10d4 + 20 |
|
||||||
|
+-----------------+-----------+-------------+
|
||||||
|
|
||||||
|
"""
|
||||||
|
name = "Potion of Supreme Healing"
|
||||||
|
rarity = "very rare"
|
||||||
|
|||||||
Reference in New Issue
Block a user