Ejemplo 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
Ejemplo 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
Ejemplo 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
Ejemplo 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
Ejemplo 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
Ejemplo 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