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