Skip to content

Commit

Permalink
maybe ok icon appears while battle resume. add ct count avoid skip re…
Browse files Browse the repository at this point in the history
…ward results failed.
  • Loading branch information
smallbomb committed Nov 13, 2021
1 parent 6769f40 commit 676401e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _skip_award_result(bot):
logging.info(f'loop_count({kirafan.loop_count}) less than or equal to 0')
bot.stop()

ct = 12
ct = 16
while bot.is_running():
kirafan.objects['center_left'].click(ct)
if kirafan.icons['again'].click():
Expand All @@ -125,7 +125,7 @@ def _skip_award_result(bot):
bot.stop()
elif kirafan.icons['tojiru'].click(adb_update_cache=False):
logging.debug('icon: tojiru icon found. (Is character\'s crea mission?)')
ct = 8
ct = 12
else:
logging.error('icon: again.png not found...')
bot.stop()
Expand All @@ -147,11 +147,15 @@ def _ck_move_to_next_battle(bot) -> bool:
def _battle_resume(bot):
logging.warning('try to resume battle...')
kirafan.objects['center'].click_sec(100)
while True:
if kirafan.icons['ok'].click():
sleep(2)
continue
break
if kirafan.icons['hai'].click():
logging.info('resume battle')
kirafan.reset_crash_detection()
kirafan.wave_id -= 1

else:
logging.error('resume battle failed')
bot.stop()
Expand Down

0 comments on commit 676401e

Please sign in to comment.