Ejemplo n.º 1
0
 def enter_fight(self, fight, team_id):
     """ Вход в битву.
         Не изменяет саму битву, только изменяет параметры пользователя.
     """
     self["fight"] = {"id": fight.id, "team_id": team_id}
     self["prev_loc"] = self["loc"]
     anim_key = "anim_" + self.id
     app.data[anim_key] = 0  # сбрасываем анимацию
     self.go("fight")
     Chat.unsubscribe_special(self.name, "$fight$")
     Chat.subscribe(self.name, fight.channel())