Esempio n. 1
0
 def get_action(self):
     keyboard = keyboards.form_keyboard()
     for target in self.targets():
         if target in self.unit.team.actors:
             if target.alive() and target != self.unit:
                 keyboard.add(self.special_button(target))
         else:
             keyboard.add(keyboards.AttackButton(self.unit, target))
     self.create_menu(keyboard)
Esempio n. 2
0
 def get_action(self):
     keyboard = keyboards.form_keyboard()
     for target in self.targets():
         keyboard.add(keyboards.AttackButton(self.unit, target), self.special_button(target=target)) if \
             self.special_available(target=target) else keyboard.add(keyboards.AttackButton(self.unit, target))
     self.create_menu(keyboard)
Esempio n. 3
0
 def attack_buttons(self):
     return [keyboards.AttackButton(self.unit, target) for target in self.targets()] if self.loaded else []
Esempio n. 4
0
 def attack_buttons(self):
     return [
         keyboards.AttackButton(self.unit, target)
         for target in self.targets()
     ] if self.available() else []