def _process_monsters(self, db):
     logger.info('loading %s monsters', len(self.data.ownable_cards))
     for m in self.data.all_cards:
         if 0 < m.monster_id < 19999:
             item = Monster.from_csm(m)
             db.insert_or_update(item)
         item = AltMonster.from_csm(m)
         db.insert_or_update(item)
示例#2
0
 def _process_monsters(self, db):
     logger.info('loading monsters')
     for m in self.data.all_cards:
         if 0 < m.monster_id < 19999 and not is_bad_name(
                 m.jp_card.card.name):
             db.insert_or_update(Monster.from_csm(m))
         canonical_id = next(
             (cm.monster_id for cm in self.data.ownable_cards
              if cm.monster_id == m.monster_id % 100000), None)
         db.insert_or_update(AltMonster.from_csm(m, canonical_id))
 def _process_monsters(self, db):
     logger.warning('loading %s monsters', len(self.data.ownable_cards))
     for m in self.data.ownable_cards:
         item = Monster.from_csm(m)
         db.insert_or_update(item)