Example #1
0
 def check(self, event):
     if self.defeat_popup:
         if not screen.is_defeat_popup(event):
             time.sleep(6)
             return True
         return False
     elif screen.is_defeat_popup(event):
         print("DEFEAT POPUP")
         self.defeat_popup = True
     elif self.get_hunter().is_hunting_timeout():
         print("HUNTING TIMEOUT")
         return True
     time.sleep(0.01)
     return False
Example #2
0
 def check(self, event):
     if screen.is_defeat_popup(event):
         time.sleep(6)
         return False
     elif screen.is_search_popup(event):
         return True
     return False
Example #3
0
 def check(self, event):
     if screen.is_defeat_popup(event):
         time.sleep(6)
         return False
     elif screen.army_is_back(self.get_hunter().get_capture(), event):
         self.done = True
     winkey.send_key(winkey.VK_CODE['esc'])
     time.sleep(1)
     return True
Example #4
0
 def do(self, event):
     if screen.is_defeat_popup(event):
         time.sleep(6)
         return False
     elif screen.is_mine_found(event):
         winkey.send_key(winkey.VK_CODE['h'])
         time.sleep(1)
     else:
         winkey.send_key(winkey.VK_CODE['d'])
         time.sleep(1)
         return False
     return True