diff options
author | Your Name <you@example.com> | 2021-04-20 12:40:37 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-04-20 12:40:37 -0400 |
commit | cd57ad6e208728bafcbc8c7d7b85d88603706978 (patch) | |
tree | 7cb0fc9511a0e8124e497d53edbe38d646dd8299 /parser/scrapeToJson.py | |
parent | 2cae1aa33f80ce0844fb54a84ce103146a7fe7ad (diff) | |
download | dmtool-cd57ad6e208728bafcbc8c7d7b85d88603706978.tar.gz dmtool-cd57ad6e208728bafcbc8c7d7b85d88603706978.tar.bz2 dmtool-cd57ad6e208728bafcbc8c7d7b85d88603706978.zip |
Updated natural armor and skills
Diffstat (limited to 'parser/scrapeToJson.py')
-rwxr-xr-x | parser/scrapeToJson.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/parser/scrapeToJson.py b/parser/scrapeToJson.py index 24980a1..0304d7b 100755 --- a/parser/scrapeToJson.py +++ b/parser/scrapeToJson.py @@ -46,7 +46,7 @@ def processMonster(data, weapons, armors, spells): return (desc['stats'][ability] - 10) // 2 desc['inventory'] = [] # Fill with weapons and armor # Modify ac stuff - desc['natural_armor'] = [] + desc['natural_armor'] = {'name': '', 'bonus': 0} correctAC = int(desc['ac'].split(' ')[0] if ' ' in desc['ac'] else desc['ac']) natural = '' armorBonus = 0 @@ -93,7 +93,7 @@ def processMonster(data, weapons, armors, spells): if armorBonus == 0 and not natural: # Got through all that and came up dry armorBonus = 10 + getBonus('dex') if natural: - desc['natural_armor'].append({'name': natural, 'bonus': correctAC - armorBonus}) + desc['natural_armor'] = {'name': natural, 'bonus': correctAC - armorBonus} elif armorBonus != correctAC: print('Got a bad result for {}: armor string is {}, but we calculated {}'.format(desc['name'], desc['ac'], armorBonus)) del desc['ac'] |