From 79ddaf6dff68a59a4f88b934c1936a9a6056e0fe Mon Sep 17 00:00:00 2001 From: syntaxaire Date: Sun, 19 Mar 2023 13:38:21 -0400 Subject: [PATCH] Add back mod bonuses to support newstyle character codes --- hagadias/character_codes.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hagadias/character_codes.py b/hagadias/character_codes.py index c5c446f..e07a3bc 100644 --- a/hagadias/character_codes.py +++ b/hagadias/character_codes.py @@ -8,6 +8,13 @@ no_comments_parser = et.XMLParser(remove_comments=True) # don't read XML comments as elements STAT_NAMES = ("Strength", "Agility", "Toughness", "Intelligence", "Willpower", "Ego") +# these are not available from XML: +MOD_BONUSES = { + "Double-muscled": [2, 0, 0, 0, 0, 0], + "Triple-jointed": [0, 2, 0, 0, 0, 0], + "Two-hearted": [0, 0, 2, 0, 0, 0], + "Beak": [0, 0, 0, 0, 0, 1], +} def read_gamedata(xmlroot: Path) -> dict: @@ -37,6 +44,7 @@ def read_gamedata(xmlroot: Path) -> dict: "class_bonuses": bonuses, "class_skills": skills, "class_tiles": tiles, + "mod_bonuses": MOD_BONUSES, }