From 27cbd7c8a243082dcfbe1b7940683b43f62b04a8 Mon Sep 17 00:00:00 2001 From: Mark Wolfman Date: Thu, 1 Jul 2021 22:13:53 -0500 Subject: [PATCH] Foundry reader now properly read max HP (formerly read current HP). --- dungeonsheets/readers.py | 2 +- examples/bard3_foundry.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dungeonsheets/readers.py b/dungeonsheets/readers.py index 658b52f..052bad9 100644 --- a/dungeonsheets/readers.py +++ b/dungeonsheets/readers.py @@ -529,7 +529,7 @@ class FoundryCharacterReader(JSONCharacterReader): char_props["_proficiencies_text"] = tool_profs # Combat stats char_props["hp_max"] = self.as_int( - json_data["data"]["attributes"]["hp"]["value"] + json_data["data"]["attributes"]["hp"]["max"] ) # Equipment currency = json_data["data"]["currency"] diff --git a/examples/bard3_foundry.json b/examples/bard3_foundry.json index 3bf571a..8fae3f3 100644 --- a/examples/bard3_foundry.json +++ b/examples/bard3_foundry.json @@ -53,7 +53,7 @@ "min": 0 }, "hp": { - "value": 47, + "value": 33, "min": 0, "max": 47, "temp": null, @@ -3049,4 +3049,4 @@ "tint": "" } ] -} \ No newline at end of file +}