def do_attack(self, dissapear=False): entity = self.bg.tiles[(self.x, self.y)].entity if entity and entity.can_be_attacked(): if not entity.is_ally(self): entity.get_attacked(self) if dissapear: self.dissapear()
def do_attack(self): entity = self.bg.tiles[(self.x, self.y)].entity if entity is not None and entity not in self.entities_attacked and entity.can_be_attacked( ): entity.get_attacked(self) self.entities_attacked.append(entity)
def do_attack(self): entity = self.bg.tiles[(self.x, self.y)].entity if entity is not None and entity not in self.entities_attacked and entity.can_be_attacked(): entity.get_attacked(self) self.entities_attacked.append(entity)