Exemplo n.º 1
0
    def defensive_items(self):
        if "defensive_items" in self.__cache:
            return self.__cache["defensive_items"]

        items = [x for x in self.items if x["item_id"]
                 in ItemTags.get_item_set(ItemTags.defensive)]

        self.__cache.update({"defensive_items": items})
        return items
Exemplo n.º 2
0
    def offensive_items(self):
        if "offensive_items" in self.__cache:
            return self.__cache["offensive_items"]

        off = [x for x in self.items if x["item_id"]
               in ItemTags.get_item_set(ItemTags.offensive)]

        self.__cache.update({"offensive_items": off})
        return off
Exemplo n.º 3
0
    def consumables(self):
        if "consumables" in self.__cache:
            return self.__cache["consumables"]

        consumables = [x for x in self.items if x["item_id"]
                       in ItemTags.get_item_set(ItemTags.consumable)]

        self.__cache.update({"consumables": consumables})

        return consumables
Exemplo n.º 4
0
    def defensive_items(self):
        if "defensive_items" in self.__cache:
            return self.__cache["defensive_items"]

        items = [
            x for x in self.items
            if x["item_id"] in ItemTags.get_item_set(ItemTags.defensive)
        ]

        self.__cache.update({"defensive_items": items})
        return items
Exemplo n.º 5
0
    def offensive_items(self):
        if "offensive_items" in self.__cache:
            return self.__cache["offensive_items"]

        off = [
            x for x in self.items
            if x["item_id"] in ItemTags.get_item_set(ItemTags.offensive)
        ]

        self.__cache.update({"offensive_items": off})
        return off
Exemplo n.º 6
0
    def consumables(self):
        if "consumables" in self.__cache:
            return self.__cache["consumables"]

        consumables = [
            x for x in self.items
            if x["item_id"] in ItemTags.get_item_set(ItemTags.consumable)
        ]

        self.__cache.update({"consumables": consumables})

        return consumables