def check( self, caller: AbstractSkillWrapper, reference_graph: NameIndexedGraph, context=None, ) -> bool: return reference_graph.get_element(self._checking_element_name).is_usable()
def check( self, caller: AbstractSkillWrapper, reference_graph: NameIndexedGraph, context=None, ) -> bool: if not reference_graph.get_element(self._state_element_name).is_usable(): return True return False
def check( self, caller: AbstractSkillWrapper, reference_graph: NameIndexedGraph, context=None, ) -> bool: timer: AbstractSkillWrapper = reference_graph.get_element(self._timer_element) if not timer.is_not_active(): if not timer.is_time_left(self.time, self.direction): if not timer.is_time_left(caller.skill.cooltime, 1): return False return True
def check( self, caller: AbstractSkillWrapper, reference_graph: NameIndexedGraph, context=None, ) -> bool: return self._check_function( caller, *[ reference_graph.get_element(name) for name in self._checking_element_names ], )
def get_related_elements( self, reference_graph: NameIndexedGraph) -> List[GraphElement]: return [reference_graph.get_element(self._state_element_name)]
def get_related_elements( self, reference_graph: NameIndexedGraph) -> List[GraphElement]: return reference_graph.filter_elements(lambda x: isinstance( x, BuffSkillWrapper)) + reference_graph.filter_elements( lambda x: isinstance(x, SummonSkillWrapper))
def get_related_elements(self, reference_graph: NameIndexedGraph): return [reference_graph.get_element(self.target_element)]