Skip to content

Shearing should not change the types of the objects in a flock #1

@Ciemaar

Description

@Ciemaar

def find_char(template, stats):
template['ExSeed'] = 0
passes_check = False
while not passes_check:
print('trying')
template.shear()
for sn, sv in stats.items():
stat = template['stats'][sn]
print(f'Checking {sn} {sv} vs {stat}')
if template['stats'][sn] < sv:
print('stepping')
template['ExSeed'] += 1
break
else:
passes_check = True
template['base_stats'] = template['base_stats'].shear()
return template
throws error:


AttributeError Traceback (most recent call last)
in ()
2 beastmaster['level'] = 5
3 beastmaster['bonuses']['racial']={'MA':ma_bonus,'PS':ps_bonus,'PE':pe_bonus}
----> 4 beastmaster = find_char(beastmaster,{'MA': 12, 'PS':10, 'PE':10})
5 beastmaster['Psionics'] = ['Animal Control']
6

in find_char(template, stats)
14 else:
15 passes_check = True
---> 16 template['base_stats'] = template['base_stats'].shear()
17 return template

AttributeError: 'collections.OrderedDict' object has no attribute 'shear'

but any dict added to a flock should have been converted to a flockDict.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions