From 3d8b9987db435587182c0e468e308763fcf9d945 Mon Sep 17 00:00:00 2001 From: Mark Wolfman Date: Fri, 4 Jun 2021 11:36:35 -0500 Subject: [PATCH] Fixed broken test and cleaned up with flake8/black. --- .travis.yml | 4 ++-- dungeonsheets/character.py | 11 ++++----- dungeonsheets/dice.py | 2 +- dungeonsheets/features/bard.py | 2 +- dungeonsheets/make_sheets.py | 30 +++++++++++++----------- dungeonsheets/monsters/monsters.py | 7 +++--- dungeonsheets/monsters/monsters_a.py | 1 - dungeonsheets/monsters/monsters_b.py | 1 - dungeonsheets/monsters/monsters_c.py | 1 - dungeonsheets/monsters/monsters_d.py | 5 ++-- dungeonsheets/monsters/monsters_e.py | 1 - dungeonsheets/monsters/monsters_f.py | 1 - dungeonsheets/monsters/monsters_g.py | 34 ++++++++++++++++++---------- dungeonsheets/monsters/monsters_h.py | 1 - dungeonsheets/monsters/monsters_i.py | 1 - dungeonsheets/monsters/monsters_j.py | 1 - dungeonsheets/monsters/monsters_k.py | 6 +++-- dungeonsheets/monsters/monsters_l.py | 1 - dungeonsheets/monsters/monsters_m.py | 1 - dungeonsheets/monsters/monsters_n.py | 1 - dungeonsheets/monsters/monsters_o.py | 1 - dungeonsheets/monsters/monsters_p.py | 1 - dungeonsheets/monsters/monsters_q.py | 1 - dungeonsheets/monsters/monsters_r.py | 1 - dungeonsheets/monsters/monsters_s.py | 6 +++-- dungeonsheets/monsters/monsters_t.py | 1 - dungeonsheets/monsters/monsters_u.py | 1 - dungeonsheets/monsters/monsters_v.py | 1 - dungeonsheets/monsters/monsters_w.py | 1 - dungeonsheets/monsters/monsters_x.py | 1 - dungeonsheets/monsters/monsters_y.py | 1 - dungeonsheets/monsters/monsters_z.py | 11 +++++---- dungeonsheets/stats.py | 6 ++--- tests/test_make_sheets.py | 2 +- 34 files changed, 74 insertions(+), 73 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0f786a..2502e14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,8 +22,8 @@ script: - pytest --cov=dungeonsheets tests/ - flake8 dungeonsheets/ --exit-zero - cd examples/ - - makesheets -d - - makesheets -dF + - makesheets --debug + - makesheets --debug --fancy - cd ../ after_success: - coveralls \ No newline at end of file diff --git a/dungeonsheets/character.py b/dungeonsheets/character.py index 38891c8..87469ea 100644 --- a/dungeonsheets/character.py +++ b/dungeonsheets/character.py @@ -22,7 +22,6 @@ from dungeonsheets import ( ) from dungeonsheets.stats import findattr from dungeonsheets.weapons import Weapon -from dungeonsheets.readers import read_sheet_file from dungeonsheets.entity import Entity @@ -882,26 +881,26 @@ class Character(Entity): return tuple([i.name for i in self.infusions]) else: return () - + @classmethod def load(Cls, char_props: MutableMapping): """Factory Creates a character from the character definition. - + Parameters ========== char_props Keys and values holding all the attributes of the character. E.g. ``char_props['strength'] = 16`` - + Returns ======= char The initialized ``Character`` object with associated parameters. - + """ # Parse the sheet type - char_props.pop('sheet_type', "") + char_props.pop("sheet_type", "") # Load classes classes = char_props.get("classes", []) # backwards compatability diff --git a/dungeonsheets/dice.py b/dungeonsheets/dice.py index 7abd567..623d185 100644 --- a/dungeonsheets/dice.py +++ b/dungeonsheets/dice.py @@ -30,4 +30,4 @@ def roll(a, b=None): if b is None: return random.randint(1, a) else: - return sum([random.randint(1, b) for _ in range(a)]) \ No newline at end of file + return sum([random.randint(1, b) for _ in range(a)]) diff --git a/dungeonsheets/features/bard.py b/dungeonsheets/features/bard.py index 09a1a76..5f2a251 100644 --- a/dungeonsheets/features/bard.py +++ b/dungeonsheets/features/bard.py @@ -252,7 +252,7 @@ class MantleOfInspiration(Feature): provoking opportunity attacks. The number of temporary hit points increases when you reach certain levels in this class, increasing to 8 at 5th level, 11 at 10th level, and 14 at 15th level. - + """ _name = "Mantle of Inspiration" diff --git a/dungeonsheets/make_sheets.py b/dungeonsheets/make_sheets.py index acd42ee..00e0944 100755 --- a/dungeonsheets/make_sheets.py +++ b/dungeonsheets/make_sheets.py @@ -115,10 +115,12 @@ def create_druid_shapes_tex( return template.render(character=character, use_dnd_decorations=use_dnd_decorations) -def make_sheet(sheet_file: File, - flatten: bool = False, - fancy_decorations: bool = False, - debug: bool = False): +def make_sheet( + sheet_file: File, + flatten: bool = False, + fancy_decorations: bool = False, + debug: bool = False, +): """Make a character or GM sheet into a PDF. Parameters ---------- @@ -140,16 +142,20 @@ def make_sheet(sheet_file: File, sheet_props = readers.read_sheet_file(sheet_file) # Create the sheet if sheet_props.get("sheet_type", "") == "gm": - ret = make_gm_sheet(basename=base_name, gm_props=sheet_props, - fancy_decorations=fancy_decorations, - debug=debug) + ret = make_gm_sheet( + basename=base_name, + gm_props=sheet_props, + fancy_decorations=fancy_decorations, + debug=debug, + ) else: ret = make_character_sheet( basename=base_name, character_props=sheet_props, flatten=flatten, fancy_decorations=fancy_decorations, - debug=debug) + debug=debug, + ) return ret @@ -177,7 +183,7 @@ def make_gm_sheet( tex = [ jinja_env.get_template("preamble.tex").render( use_dnd_decorations=fancy_decorations, - title=gm_props['session_title'], + title=gm_props["session_title"], ) ] # Add the monsters @@ -202,9 +208,7 @@ def make_gm_sheet( use_dnd_decorations=fancy_decorations, ) except exceptions.LatexNotFoundError: - log.warning( - f"``pdflatex`` not available. Skipping {basename}" - ) + log.warning(f"``pdflatex`` not available. Skipping {basename}") def make_character_sheet( @@ -304,7 +308,7 @@ def make_character_sheet( use_dnd_decorations=fancy_decorations ) ) - + # Typeset combined LaTeX file try: if len(tex) > 2: diff --git a/dungeonsheets/monsters/monsters.py b/dungeonsheets/monsters/monsters.py index 1e6fa04..9898ed8 100644 --- a/dungeonsheets/monsters/monsters.py +++ b/dungeonsheets/monsters/monsters.py @@ -4,7 +4,6 @@ shape forms. """ -from dungeonsheets.stats import Ability from dungeonsheets.entity import Entity @@ -15,7 +14,10 @@ class Monster(Entity): description = "" challenge_rating = 0 skills = "Perception +3, Stealth +4" - swim_speed = 0 # TODO: Consider refactoring stats.Speed to consider all of these just like we do stats.Ability + # TODO: Consider refactoring stats.Speed to consider all of these + # just like we do stats.Ability + + swim_speed = 0 fly_speed = 0 climb_speed = 0 hp_max = 10 @@ -28,4 +30,3 @@ class Monster(Entity): def is_beast(self): is_beast = "beast" in self.description.lower() return is_beast - diff --git a/dungeonsheets/monsters/monsters_a.py b/dungeonsheets/monsters/monsters_a.py index 2fbe80c..0b4859b 100644 --- a/dungeonsheets/monsters/monsters_a.py +++ b/dungeonsheets/monsters/monsters_a.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Aboleth(Monster): """ **Amphibious**: The aboleth can breathe air and water. diff --git a/dungeonsheets/monsters/monsters_b.py b/dungeonsheets/monsters/monsters_b.py index d6d1868..15d875d 100644 --- a/dungeonsheets/monsters/monsters_b.py +++ b/dungeonsheets/monsters/monsters_b.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Baboon(Monster): """ **Pack Tactics**: The baboon has advantage on an attack roll against a creature if at least one of the baboon's allies is within 5 ft. of the creature and the ally isn't incapacitated. diff --git a/dungeonsheets/monsters/monsters_c.py b/dungeonsheets/monsters/monsters_c.py index 9340537..e5a4182 100644 --- a/dungeonsheets/monsters/monsters_c.py +++ b/dungeonsheets/monsters/monsters_c.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Camel(Monster): """ **Bite**: Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 2 (1d4) bludgeoning damage. diff --git a/dungeonsheets/monsters/monsters_d.py b/dungeonsheets/monsters/monsters_d.py index 67e016c..d623276 100644 --- a/dungeonsheets/monsters/monsters_d.py +++ b/dungeonsheets/monsters/monsters_d.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Darkmantle(Monster): """ **Echolocation**: The darkmantle can't use its blindsight while deafened. @@ -368,7 +367,9 @@ class Dretch(Monster): armor_class = 11 skills = "" senses = "Darkvision 60 ft., Passive Perception 9" - languages = "Abyssal, telepathy 60 ft. (works only with creatures that understand Abyssal)" + languages = ( + "Abyssal, telepathy 60 ft. (works only with creatures that understand Abyssal)" + ) strength = Ability(11) dexterity = Ability(11) constitution = Ability(12) diff --git a/dungeonsheets/monsters/monsters_e.py b/dungeonsheets/monsters/monsters_e.py index be0e4f5..ffd4d39 100644 --- a/dungeonsheets/monsters/monsters_e.py +++ b/dungeonsheets/monsters/monsters_e.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Eagle(Monster): """ **Keen Sight**: The eagle has advantage on Wisdom (Perception) checks that rely on sight. diff --git a/dungeonsheets/monsters/monsters_f.py b/dungeonsheets/monsters/monsters_f.py index aa1e154..8b1b7f6 100644 --- a/dungeonsheets/monsters/monsters_f.py +++ b/dungeonsheets/monsters/monsters_f.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class FireElemental(Monster): """ **Fire Form**: The elemental can move through a space as narrow as 1 inch wide without squeezing. A creature that touches the elemental or hits it with a melee attack while within 5 ft. of it takes 5 (1d10) fire damage. In addition, the elemental can enter a hostile creature's space and stop there. The first time it enters a creature's space on a turn, that creature takes 5 (1d10) fire damage and catches fire; until someone takes an action to douse the fire, the creature takes 5 (1d10) fire damage at the start of each of its turns. diff --git a/dungeonsheets/monsters/monsters_g.py b/dungeonsheets/monsters/monsters_g.py index 813f55b..ad5fcef 100644 --- a/dungeonsheets/monsters/monsters_g.py +++ b/dungeonsheets/monsters/monsters_g.py @@ -8,16 +8,19 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Gargoyle(Monster): - """ - **False Appearance**: While the gargoyle remains motion less, it is indistinguishable from an inanimate statue. + """**False Appearance**: While the gargoyle remains motion less, it is + indistinguishable from an inanimate statue. - **Multiattack**: The gargoyle makes two attacks: one with its bite and one with its claws. + **Multiattack**: The gargoyle makes two attacks: one with its bite + and one with its claws. - **Bite**: Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) piercing damage. + **Bite**: Melee Weapon Attack: +4 to hit, reach 5 ft., one + target. Hit: 5 (1d6 + 2) piercing damage. + + **Claws**: Melee Weapon Attack: +4 to hit, reach 5 ft., one + target. Hit: 5 (1d6 + 2) slashing damage. - **Claws**: Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) slashing damage. """ name = "Gargoyle" @@ -413,14 +416,18 @@ class GiantCrocodile(Monster): class GiantEagle(Monster): - """ - **Keen Sight**: The eagle has advantage on Wisdom (Perception) checks that rely on sight. + """**Keen Sight**: The eagle has advantage on Wisdom (Perception) + checks that rely on sight. - **Multiattack**: The eagle makes two attacks: one with its beak and one with its talons. + **Multiattack**: The eagle makes two attacks: one with its beak + and one with its talons. - **Beak**: Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 6 (1d6 + 3) piercing damage. + **Beak**: Melee Weapon Attack: +5 to hit, reach 5 ft., one + target. Hit: 6 (1d6 + 3) piercing damage. + + **Talons**: Melee Weapon Attack: +5 to hit, reach 5 ft., one + target. Hit: 10 (2d6 + 3) slashing damage. - **Talons**: Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 10 (2d6 + 3) slashing damage. """ name = "Giant Eagle" @@ -1491,7 +1498,10 @@ class Grimlock(Monster): challenge_rating = 0.25 armor_class = 11 skills = "Athletics +5, Perception +3, Stealth +3" - senses = "Blindsight 30 ft. or 10 ft. while deafened (blind beyond this radius), Passive Perception 13" + senses = ( + "Blindsight 30 ft. or 10 ft. while deafened (blind beyond this radius), Passive" + " Perception 13" + ) languages = "Undercommon" strength = Ability(16) dexterity = Ability(12) diff --git a/dungeonsheets/monsters/monsters_h.py b/dungeonsheets/monsters/monsters_h.py index 32189e9..cb59c73 100644 --- a/dungeonsheets/monsters/monsters_h.py +++ b/dungeonsheets/monsters/monsters_h.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class HalfRedDragonVeteran(Monster): """ **Multiattack**: The veteran makes two longsword attacks. If it has a shortsword drawn, it can also make a shortsword attack. diff --git a/dungeonsheets/monsters/monsters_i.py b/dungeonsheets/monsters/monsters_i.py index 0dcb73f..1d4a900 100644 --- a/dungeonsheets/monsters/monsters_i.py +++ b/dungeonsheets/monsters/monsters_i.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class IceDevil(Monster): """ **Devil's Sight**: Magical darkness doesn't impede the devil's darkvision. diff --git a/dungeonsheets/monsters/monsters_j.py b/dungeonsheets/monsters/monsters_j.py index 9fde725..0ef05c1 100644 --- a/dungeonsheets/monsters/monsters_j.py +++ b/dungeonsheets/monsters/monsters_j.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Jackal(Monster): """ **Keen Hearing and Smell**: The jackal has advantage on Wisdom (Perception) checks that rely on hearing or smell. diff --git a/dungeonsheets/monsters/monsters_k.py b/dungeonsheets/monsters/monsters_k.py index 4dff268..5cbe875 100644 --- a/dungeonsheets/monsters/monsters_k.py +++ b/dungeonsheets/monsters/monsters_k.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class KillerWhale(Monster): """ **Echolocation**: The whale can't use its blindsight while deafened. @@ -132,7 +131,10 @@ class Kraken(Monster): armor_class = 18 skills = "" senses = "Truesight 120 ft., Passive Perception 14" - languages = "understands Abyssal, Celestial, Infernal, and Primordial but can't speak, telepathy 120 ft." + languages = ( + "understands Abyssal, Celestial, Infernal, and Primordial but can't speak," + " telepathy 120 ft." + ) strength = Ability(30) dexterity = Ability(11) constitution = Ability(25) diff --git a/dungeonsheets/monsters/monsters_l.py b/dungeonsheets/monsters/monsters_l.py index 5447200..b22aee1 100644 --- a/dungeonsheets/monsters/monsters_l.py +++ b/dungeonsheets/monsters/monsters_l.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Lamia(Monster): """ **Innate Spellcasting**: The lamia's innate spellcasting ability is Charisma (spell save DC 13). It can innately cast the following spells, requiring no material components. At will: disguise self (any humanoid form), major image 3/day each: charm person, mirror image, scrying, suggestion 1/day: geas diff --git a/dungeonsheets/monsters/monsters_m.py b/dungeonsheets/monsters/monsters_m.py index 80f2d33..8b3affe 100644 --- a/dungeonsheets/monsters/monsters_m.py +++ b/dungeonsheets/monsters/monsters_m.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Mage(Monster): """ **Spellcasting**: The mage is a 9th-level spellcaster. Its spellcasting ability is Intelligence (spell save DC 14, +6 to hit with spell attacks). The mage has the following wizard spells prepared: diff --git a/dungeonsheets/monsters/monsters_n.py b/dungeonsheets/monsters/monsters_n.py index e091bb6..9058ab1 100644 --- a/dungeonsheets/monsters/monsters_n.py +++ b/dungeonsheets/monsters/monsters_n.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Nalfeshnee(Monster): """ **Magic Resistance**: The nalfeshnee has advantage on saving throws against spells and other magical effects. diff --git a/dungeonsheets/monsters/monsters_o.py b/dungeonsheets/monsters/monsters_o.py index 4de5c16..e11b40b 100644 --- a/dungeonsheets/monsters/monsters_o.py +++ b/dungeonsheets/monsters/monsters_o.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class OchreJelly(Monster): """ **Amorphous**: The jelly can move through a space as narrow as 1 inch wide without squeezing. diff --git a/dungeonsheets/monsters/monsters_p.py b/dungeonsheets/monsters/monsters_p.py index e15aa15..8a56f2c 100644 --- a/dungeonsheets/monsters/monsters_p.py +++ b/dungeonsheets/monsters/monsters_p.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Panther(Monster): """ **Keen Smell**: The panther has advantage on Wisdom (Perception) checks that rely on smell. diff --git a/dungeonsheets/monsters/monsters_q.py b/dungeonsheets/monsters/monsters_q.py index 47c4751..da1d604 100644 --- a/dungeonsheets/monsters/monsters_q.py +++ b/dungeonsheets/monsters/monsters_q.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Quasit(Monster): """ **Shapechanger**: The quasit can use its action to polymorph into a beast form that resembles a bat (speed 10 ft. fly 40 ft.), a centipede (40 ft., climb 40 ft.), or a toad (40 ft., swim 40 ft.), or back into its true form . Its statistics are the same in each form, except for the speed changes noted. Any equipment it is wearing or carrying isn't transformed . It reverts to its true form if it dies. diff --git a/dungeonsheets/monsters/monsters_r.py b/dungeonsheets/monsters/monsters_r.py index 0e62052..c91f1b4 100644 --- a/dungeonsheets/monsters/monsters_r.py +++ b/dungeonsheets/monsters/monsters_r.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Rakshasa(Monster): """ **Limited Magic Immunity**: The rakshasa can't be affected or detected by spells of 6th level or lower unless it wishes to be. It has advantage on saving throws against all other spells and magical effects. diff --git a/dungeonsheets/monsters/monsters_s.py b/dungeonsheets/monsters/monsters_s.py index d800810..11d34c4 100644 --- a/dungeonsheets/monsters/monsters_s.py +++ b/dungeonsheets/monsters/monsters_s.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class SaberToothedTiger(Monster): """ **Keen Smell**: The tiger has advantage on Wisdom (Perception) checks that rely on smell. @@ -645,7 +644,10 @@ class Spy(Monster): description = "Medium humanoid, any alignment" challenge_rating = 1 armor_class = 12 - skills = "Deception +5, Insight +4, Investigation +5, Perception +6, Persuasion +5, Stealth +4" + skills = ( + "Deception +5, Insight +4, Investigation +5, Perception +6, Persuasion +5," + " Stealth +4" + ) senses = "Passive Perception 16" languages = "any two languages" strength = Ability(10) diff --git a/dungeonsheets/monsters/monsters_t.py b/dungeonsheets/monsters/monsters_t.py index d58e78a..abf1db4 100644 --- a/dungeonsheets/monsters/monsters_t.py +++ b/dungeonsheets/monsters/monsters_t.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Tarrasque(Monster): """ **Legendary Resistance**: If the tarrasque fails a saving throw, it can choose to succeed instead. diff --git a/dungeonsheets/monsters/monsters_u.py b/dungeonsheets/monsters/monsters_u.py index 1f0a104..287feed 100644 --- a/dungeonsheets/monsters/monsters_u.py +++ b/dungeonsheets/monsters/monsters_u.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Unicorn(Monster): """ **Charge**: If the unicorn moves at least 20 ft. straight toward a target and then hits it with a horn attack on the same turn, the target takes an extra 9 (2d8) piercing damage. If the target is a creature, it must succeed on a DC 15 Strength saving throw or be knocked prone. diff --git a/dungeonsheets/monsters/monsters_v.py b/dungeonsheets/monsters/monsters_v.py index fa21b06..b4619a6 100644 --- a/dungeonsheets/monsters/monsters_v.py +++ b/dungeonsheets/monsters/monsters_v.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Vampire(Monster): """ **Shapechanger**: If the vampire isn't in sun light or running water, it can use its action to polymorph into a Tiny bat or a Medium cloud of mist, or back into its true form. diff --git a/dungeonsheets/monsters/monsters_w.py b/dungeonsheets/monsters/monsters_w.py index 5d6ee4c..e95e37d 100644 --- a/dungeonsheets/monsters/monsters_w.py +++ b/dungeonsheets/monsters/monsters_w.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Warhorse(Monster): """ **Trampling Charge**: If the horse moves at least 20 ft. straight toward a creature and then hits it with a hooves attack on the same turn, that target must succeed on a DC 14 Strength saving throw or be knocked prone. If the target is prone, the horse can make another attack with its hooves against it as a bonus action. diff --git a/dungeonsheets/monsters/monsters_x.py b/dungeonsheets/monsters/monsters_x.py index e70e431..33dd193 100644 --- a/dungeonsheets/monsters/monsters_x.py +++ b/dungeonsheets/monsters/monsters_x.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Xorn(Monster): """ **Earth Glide**: The xorn can burrow through nonmagical, unworked earth and stone. While doing so, the xorn doesn't disturb the material it moves through. diff --git a/dungeonsheets/monsters/monsters_y.py b/dungeonsheets/monsters/monsters_y.py index 38b1784..0367297 100644 --- a/dungeonsheets/monsters/monsters_y.py +++ b/dungeonsheets/monsters/monsters_y.py @@ -8,7 +8,6 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class YoungBlackDragon(Monster): """ **Amphibious**: The dragon can breathe air and water. diff --git a/dungeonsheets/monsters/monsters_z.py b/dungeonsheets/monsters/monsters_z.py index 3f792f1..3ac4534 100644 --- a/dungeonsheets/monsters/monsters_z.py +++ b/dungeonsheets/monsters/monsters_z.py @@ -8,12 +8,15 @@ from dungeonsheets.monsters.monsters import Monster from dungeonsheets.stats import Ability - class Zombie(Monster): - """ - **Undead Fortitude**: If damage reduces the zombie to 0 hit points, it must make a Constitution saving throw with a DC of 5+the damage taken, unless the damage is radiant or from a critical hit. On a success, the zombie drops to 1 hit point instead. + """**Undead Fortitude**: If damage reduces the zombie to 0 hit points, + it must make a Constitution saving throw with a DC of 5+the damage + taken, unless the damage is radiant or from a critical hit. On a + success, the zombie drops to 1 hit point instead. + + **Slam**: Melee Weapon Attack: +3 to hit, reach 5 ft., one + target. Hit: 4 (1d6 + 1) bludgeoning damage. - **Slam**: Melee Weapon Attack: +3 to hit, reach 5 ft., one target. Hit: 4 (1d6 + 1) bludgeoning damage. """ name = "Zombie" diff --git a/dungeonsheets/stats.py b/dungeonsheets/stats.py index 0f51cd0..60f7d9c 100644 --- a/dungeonsheets/stats.py +++ b/dungeonsheets/stats.py @@ -220,9 +220,9 @@ class NumericalInitiative: ini += entity.charisma.modifier has_advantage = ( - entity.has_feature(NaturalExplorerRevised) - or entity.has_feature(FeralInstinct) - or entity.has_feature(AmbushMaster) + entity.has_feature(NaturalExplorerRevised) + or entity.has_feature(FeralInstinct) + or entity.has_feature(AmbushMaster) ) return ini, has_advantage diff --git a/tests/test_make_sheets.py b/tests/test_make_sheets.py index c1a98dc..5c934a2 100644 --- a/tests/test_make_sheets.py +++ b/tests/test_make_sheets.py @@ -127,4 +127,4 @@ class TexCreatorTestCase(unittest.TestCase): def test_create_monsters_tex(self): monsters_ = [monsters.GiantEagle()] tex = make_sheets.create_monsters_tex(monsters=monsters_) - self.assertIn(r"Giant eagle", tex) + self.assertIn(r"Giant Eagle", tex)