From cd57ad6e208728bafcbc8c7d7b85d88603706978 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 20 Apr 2021 12:40:37 -0400 Subject: Updated natural armor and skills --- parser/scrapeToJson.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parser/scrapeToJson.py') 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'] -- cgit v1.2.3