aboutsummaryrefslogtreecommitdiff
path: root/parser/scrapeToJson.py
diff options
context:
space:
mode:
Diffstat (limited to 'parser/scrapeToJson.py')
-rwxr-xr-xparser/scrapeToJson.py4
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']