Beispiel #1
0
 def remove_global_status(self, s_id, gameStateObj=None):
     if not any(status.id == s_id for status in self.status_effects):
         return  # Must have the right status to remove
     status_obj = [status for status in self.status_effects if status.id == s_id][0]
     self.status_effects.discard(status_obj)
     if gameStateObj:
         for unit in gameStateObj.allunits:
             if unit.position:
                 StatusObject.HandleStatusRemoval(status_obj, unit, gameStateObj)
 def remove(self, unit, gameStateObj):
     if unit.id in self.children:
         StatusObject.HandleStatusRemoval(self.child_status, unit, gameStateObj)
Beispiel #3
0
 def remove_global_status(self, s_id, gameStateObj=None):
     self.status_effects.discard(s_id)
     if gameStateObj:
         for unit in gameStateObj.allunits:
             if unit.position:
                 StatusObject.HandleStatusRemoval(s_id, unit, gameStateObj)