diff options
Diffstat (limited to 'parser/scrapeToJson.py')
-rwxr-xr-x | parser/scrapeToJson.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/parser/scrapeToJson.py b/parser/scrapeToJson.py index 9128190..c4627ea 100755 --- a/parser/scrapeToJson.py +++ b/parser/scrapeToJson.py @@ -48,6 +48,7 @@ def processMonster(data, weapons, armors, spells): def getBonus(ability): return (desc['stats'][ability] - 10) // 2 desc['inventory'] = [] # Fill with weapons and armor + desc['observant'] = False # maybe set to true later # Modify ac stuff desc['natural_armor'] = {'name': '', 'bonus': 0} correctAC = int(desc['ac'].split(' ')[0] if ' ' in desc['ac'] else desc['ac']) @@ -274,7 +275,10 @@ def processMonster(data, weapons, armors, spells): if 'Perception' in desc['skills']: shouldBe += desc['skills']['Perception'] * desc['prof'] if passivePercep != shouldBe: - print('Passive perception didn\'t come out right for {}: is {}, but should be {}'.format(desc['name'], passivePercep, shouldBe)) + if(passivePercep - 5 == shouldBe): + desc['observant'] = True + else: + print('Passive perception didn\'t come out right for {}: is {}, but should be {}'.format(desc['name'], passivePercep, shouldBe)) desc['senses'] = desc['senses'].split(', ')[:-1] return desc |