def read_damage_reduction(data: Dict, items: List[ItemResourceInfo]) -> DamageReduction: return DamageReduction( find_resource_info_with_id(items, data["name"], ResourceType.ITEM) if data["name"] is not None else None, data["multiplier"])
def get_by_type_and_index(self, resource_type: ResourceType, name: str) -> ResourceInfo: return search.find_resource_info_with_id( self.get_by_type(resource_type), name, resource_type)
def get_by_type_and_index(self, resource_type: ResourceType, index: int) -> ResourceInfo: return find_resource_info_with_id(self.get_by_type(resource_type), index, resource_type)
def read_damage_reduction(data: Dict, items: List[ItemResourceInfo]) -> DamageReduction: return DamageReduction(find_resource_info_with_id(items, data["index"], ResourceType.ITEM), data["multiplier"])