From 2f26cbd9515c9f3c59b1200ae14919fd22366bd7 Mon Sep 17 00:00:00 2001 From: Mark Wolfman Date: Sat, 12 Jun 2021 14:07:39 -0500 Subject: [PATCH] Tweaked inspiration, and added example of cascading sheets. --- dungeonsheets/character.py | 2 +- dungeonsheets/fill_pdf_template.py | 6 +++--- examples/fighter2.py | 2 +- examples/gm.py | 16 ---------------- 4 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 examples/gm.py diff --git a/dungeonsheets/character.py b/dungeonsheets/character.py index fe9d59a..0494b44 100644 --- a/dungeonsheets/character.py +++ b/dungeonsheets/character.py @@ -146,7 +146,7 @@ class Character(Entity): xp = 0 # Extra hit points info, for characters only hp_current = None - hp_temp = None + hp_temp = 0 # Base stats (ability scores) inspiration = False attacks_and_spellcasting = "" diff --git a/dungeonsheets/fill_pdf_template.py b/dungeonsheets/fill_pdf_template.py index f991b6d..6eea028 100644 --- a/dungeonsheets/fill_pdf_template.py +++ b/dungeonsheets/fill_pdf_template.py @@ -39,7 +39,7 @@ def create_character_pdf_template(character, basename, flatten=False): "Race ": str(character.race), "Alignment": character.alignment, "XP": str(character.xp), - "Inspiration": str("Yes" if character.inspiration else "No"), + "Inspiration": str("Yes" if character.inspiration else ""), # Abilities "ProfBonus": mod_str(character.proficiency_bonus), "STRmod": str(character.strength.value), @@ -87,8 +87,8 @@ def create_character_pdf_template(character, basename, flatten=False): # Hit points "HDTotal": character.hit_dice, "HPMax": str(character.hp_max), - "HPCurrent": str(character.hp_current), - "HPTemp": str(character.hp_temp), + "HPCurrent": str(character.hp_current) if character.hp_current is not None else "", + "HPTemp": str(character.hp_temp) if character.hp_temp > 0 else "", # Personality traits and other features "PersonalityTraits ": text_box(character.personality_traits), "Ideals": text_box(character.ideals), diff --git a/examples/fighter2.py b/examples/fighter2.py index 1277f22..341145c 100644 --- a/examples/fighter2.py +++ b/examples/fighter2.py @@ -23,7 +23,7 @@ alignment = "Lawful evil" xp = 0 hp_max = 54 -inspiration = 0 # integer inspiration value +inspiration = True # integer inspiration value # Ability Scores strength = 15 diff --git a/examples/gm.py b/examples/gm.py deleted file mode 100644 index f0ce8d8..0000000 --- a/examples/gm.py +++ /dev/null @@ -1,16 +0,0 @@ -"""This file describes game-manager notes. - -It's used for creating notes for the GM to keep track of various -monsters, etc. - -""" - -dungeonsheets_version = "0.14.0" - -sheet_type = "gm" - -session_title = "Objects in Space" - -party = ["rogue1.py", "paladin2.py"] - -monsters = ["aboleth", "wolf", "giant eagle", "Vashta Nerada"]