Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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