Пример #1
0
def apply_attribute_table(character):
    if 'Attribute_Bonuses' not in character:
        character['Attribute_Bonuses'] = FlockDict()
    for (attribute, bonus), table in get_attribute_table().items():
        character['Attribute_Bonuses'][bonus] = lookup(character, attribute, table)
    character['base_bonuses'] = {'Spell Points Multiple': {'General': 1}}
    character['bonuses'] = FlockAggregator([character['Attribute_Bonuses'], character['base_bonuses']], cross_total)
Пример #2
0
def apply_attribute_table(character):
    if 'Attribute_Bonuses' not in character:
        character['Attribute_Bonuses'] = FlockDict()
    for (attribute, bonus), table in get_attribute_table().items():
        character['Attribute_Bonuses'][bonus] = lookup(character, attribute,
                                                       table)
    character['base_bonuses'] = {'Spell Points Multiple': {'General': 1}}
    character['bonuses'] = FlockAggregator(
        [character['Attribute_Bonuses'], character['base_bonuses']],
        cross_total)
Пример #3
0
 def test_lookup(self):
     probe = uuid.uuid4()
     table_row = 5
     base_dict = {'x': table_row}
     table = {table_row: probe}
     assert probe is lookup(base_dict, 'x', table)()
Пример #4
0
 def test_lookup(self):
     probe = uuid.uuid4()
     table_row = 5
     base_dict = {'x': table_row}
     table = {table_row: probe}
     assert probe is lookup(base_dict, 'x', table)()