Skip to content

Commit

Permalink
Add back mod bonuses to support newstyle character codes
Browse files Browse the repository at this point in the history
  • Loading branch information
syntaxaire committed Mar 19, 2023
1 parent 54d0dc7 commit 79ddaf6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hagadias/character_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -37,6 +44,7 @@ def read_gamedata(xmlroot: Path) -> dict:
"class_bonuses": bonuses,
"class_skills": skills,
"class_tiles": tiles,
"mod_bonuses": MOD_BONUSES,
}


Expand Down

0 comments on commit 79ddaf6

Please sign in to comment.