Added 'Rival Intern' background, fixed bugs, and findattr now removes '/'.

This commit is contained in:
Mark Wolfman
2021-06-09 23:06:48 -05:00
parent bd895c4efc
commit b432e67a35
7 changed files with 41 additions and 6 deletions
+21
View File
@@ -96,6 +96,27 @@ class Outlander(Background):
features = (feats.Wanderer,)
class RivalIntern(Background):
"""You were an intern at a rival of Acquisitions Incorporated, and you
gained a healthy respect for nocjusc the job and the franchising
opportunities. but for the ruth- less and efficient way
Acquisitions Incorporated goes about its business. Why deal with
the rest, when you can work for the best?
Perhaps the rival did not treat you as well as you were hoping, or
you washed out of that organization. Maybe you hope to leverage
the knowledge you gained there for an advantage at Acquisitions
Incorporated. Either way, you're now bringing your talents to the
company, ready to put your skills lo use.
"""
name = "Rival Intern"
skill_proficiencies = ("history", "investigation")
proficiencies_text = "One type of artisan's tools"
languages = ("[choose one]",)
features = (feats.InsideInformant,)
class Sage(Background):
name = "Sage"
skill_proficiencies = ("arcana", "history")
+10
View File
@@ -338,6 +338,16 @@ class Inheritance(Feature):
source = "Background (Inheritor)"
class InsideInformant(Feature):
"""You have connections to your previous employer or other groups you
dealt with during your previous employment. You can communicate
with your contacts, gaining information at the DM's discretion.
"""
name = "Inside Informant"
source = "Background (Rival Intern)"
class KnightlyRegard(Feature):
"""You receive shelter and succor from members of your knightly order and those
who are sympathetic to its aims. If your order is a religious one, you can
@@ -77,6 +77,7 @@
\vspace{0.2cm}
\begin{description}
[% if monster.skills != "" %]\item [Skills:] [[ monster.skills ]][% endif %]
\item [Senses:] [% if monster.senses != "" %][[ monster.senses ]][% else %]--[% endif %]
\item [Languages:] [% if monster.languages != "" %][[ monster.languages ]][% else %]--[% endif %]
[% if monster.damage_resistances != "" %]\item [Damage Resistances:] [[ monster.damage_resistances ]][% endif %]
+1 -1
View File
@@ -297,7 +297,7 @@ class Enlargereduce(Spell):
below 1).
"""
name = "Enlargereduce"
name = "Enlarge/Reduce"
level = 2
casting_time = "1 action"
casting_range = "30 feet"
+1 -1
View File
@@ -41,7 +41,7 @@ def findattr(obj, name):
bonus = i
name = name.replace(f"+{i}", "").replace(f"+ {i}", "")
break
py_name = name.replace("-", "_").replace(" ", "_").replace("'", "")
py_name = name.replace("-", "_").replace(" ", "_").replace("'", "").replace("/", "")
camel_case = "".join([s.capitalize() for s in py_name.split("_")])
if hasattr(obj, py_name):
# Direct lookup
+4 -4
View File
@@ -153,10 +153,10 @@ class TexCreatorTestCase(unittest.TestCase):
self.assertIn(r"55 swim", tex)
self.assertIn(r"65 burrow", tex)
self.assertIn(r"petrified", tex)
self.assertIn(r"Saves:", tex)
self.assertIn(r"Dam. Immun.:", tex)
self.assertIn(r"Dam. Res.:", tex)
self.assertIn(r"Dam. Vuln.:", tex)
self.assertIn(r"Saving Throws:", tex)
self.assertIn(r"Damage Immunities:", tex)
self.assertIn(r"Damage Resistances:", tex)
self.assertIn(r"Damage Vulnerabilities:", tex)
self.assertIn(r"Senses:", tex)
self.assertIn(r"Challenge:", tex)
self.assertIn(r"Languages:", tex)
+3
View File
@@ -95,3 +95,6 @@ class TestStats(TestCase):
# Swapping spaces for capitalization
self.assertEqual(stats.findattr(test_class, "my attr"), test_class.my_attr)
self.assertEqual(stats.findattr(test_class, "your attr"), test_class.YourAttr)
# Check for extra functuation
self.assertEqual(stats.findattr(test_class, "my attr"), test_class.my_attr)
self.assertEqual(stats.findattr(test_class, "Your/Attr"), test_class.YourAttr)