Beispiel #1
0
 def __init__(self, filename, monstats, superuniques, superuniques2):
     D2Data.__init__(self, filename, 'Id')
     # build monster_id -> [level_id] map
     norm_cols = ['mon'+str(i) for i in range(1,11)]
     nmh_cols = ['n'+s for s in norm_cols]
     self.monstats = monstats
     self.superuniques = superuniques
     self.superuniques2 = superuniques2
     self.norm_monmap = {}
     self.nmh_monmap = {}
     self.make_monmap(self.norm_monmap, norm_cols)
     self.make_monmap(self.nmh_monmap, nmh_cols)
Beispiel #2
0
 def __init__(self, filename):
     D2Data.__init__(self, filename, 'Treasure_Class')
     self.group_map = {}
     for tc in self.data['Treasure_Class']:
         if tc:
             group = self.get_data(tc, 'group')
             if group > 0:
                 if group not in self.group_map:
                     self.group_map[group] = []
                 self.group_map[group].append({'Treasure_Class': tc, 'level': self.get_data(tc, 'level')})
     # make sure each group list is sorted by level
     for group, tcs in self.group_map.items():
         tcs.sort(key=lambda x: x['level'])
Beispiel #3
0
 def __init__(self, filename):
     D2Data.__init__(self, filename, 'constant_desc', usecols=['constant_desc', 'constants'])
Beispiel #4
0
 def __init__(self, filename):
     D2Data.__init__(self, filename, 'Superunique')
Beispiel #5
0
 def __init__(self, filename):
     D2Data.__init__(self, filename, 'Id')
Beispiel #6
0
 def __init__(self, filename):
     D2Data.__init__(self, filename, 'Level')