# Path: roglick/engine/file_obj.py
# class FileObj(object):
# class MultiFileObj(FileObj):
#     def __init__(self, conf_file, obj_key=None):
#     def keys(self):
#     def random(self, rand=None):
#     def _load_file(self, conf_file, obj_key=None):
#     def _make_key(self, item):
#     def _process_data(self, data):
#     def _process_item(self, item):
#     def __getitem__(self, key):
#     def __getattr__(self, key):
#     def __len__(self):
#     def __iter__(self):
#     def __contains__(self, item):
#     def _load_file(self, file_pattern, obj_key=None):


from roglick.engine import file_obj

    @property
    def attr(self):
        return self._attr

    @property
    def parent(self):
        if self._parent is None:
            return None
        else:
            return skill_tree[self._parent]

    def __repr__(self):
        return "{cls}({skill})".format(
                cls=self.__class__.__name__,
                skill=self.name)


class SkillTree(file_obj.FileObj):
    def __init__(self):
        super().__init__('data/skills.json')

    def _process_data(self, skills, parent_key=None):
        for skill in skills:
            key = self._make_key(skill, parent_key)
            node = SkillTreeNode(
                    name=skill['name'],
                    key=key,
                    attr=skill['attr'],
                    parent=parent_key)

# Path: roglick/engine/file_obj.py
# class FileObj(object):
# class MultiFileObj(FileObj):
#     def __init__(self, conf_file, obj_key=None):
#     def keys(self):
#     def random(self, rand=None):
#     def _load_file(self, conf_file, obj_key=None):
#     def _make_key(self, item):
#     def _process_data(self, data):
#     def _process_item(self, item):
#     def __getitem__(self, key):
#     def __getattr__(self, key):
#     def __len__(self):
#     def __iter__(self):
#     def __contains__(self, item):
#     def _load_file(self, file_pattern, obj_key=None):


# Path: roglick/skills.py
from roglick.engine import file_obj


    @property
    def attr(self):
        return self._attr

    @property
    def parent(self):
        if self._parent is None:
            return None
        else:
            return skill_tree[self._parent]

    def __repr__(self):
        return "{cls}({skill})".format(
                cls=self.__class__.__name__,
                skill=self.name)


class SkillTree(file_obj.FileObj):
    def __init__(self):
        super().__init__('data/skills.json')

    def _process_data(self, skills, parent_key=None):
        for skill in skills:
            key = self._make_key(skill, parent_key)
            node = SkillTreeNode(
                    name=skill['name'],
                    key=key,
                    attr=skill['attr'],
                    parent=parent_key)

            yield key,node