예제 #1
0
 def check(
     self,
     caller: AbstractSkillWrapper,
     reference_graph: NameIndexedGraph,
     context=None,
 ) -> bool:
     return reference_graph.get_element(self._checking_element_name).is_usable()
예제 #2
0
 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
예제 #3
0
 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
예제 #4
0
파일: rules.py 프로젝트: k5van/GMS_dpm_calc
 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
         ],
     )
예제 #5
0
파일: rules.py 프로젝트: k5van/GMS_dpm_calc
 def get_related_elements(
         self, reference_graph: NameIndexedGraph) -> List[GraphElement]:
     return [reference_graph.get_element(self._state_element_name)]
예제 #6
0
파일: rules.py 프로젝트: k5van/GMS_dpm_calc
 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))
예제 #7
0
파일: rules.py 프로젝트: k5van/GMS_dpm_calc
 def get_related_elements(self, reference_graph: NameIndexedGraph):
     return [reference_graph.get_element(self.target_element)]