TeamFightTacticsBots / Alune

Mobile TFT Bot - Automate Teamfight Tactics in the mobile version through emulators, to farm pass exp and event tokens.
GNU Affero General Public License v3.0
55 stars 8 forks source link

feat: auto-surrend phase based #36

Closed Dampen59 closed 3 months ago

Dampen59 commented 3 months ago

Added a auto-surrend feature after a specified amount of time (configurable in config) Recommended absolute minimum is 600 secs (not code-locked for dev purposes) Recommended running value : at least 700 secs (default is 720) Feature is disabled by default Bumped YAML version to 3 Added a send_key method to ADB (more reliable to access settings, I have joined a link if later we do an enum) Added config entries for surrend feature Added some output when in DEBUG mode

This have been tested for 3 games with no issues. The bot automaticalluy queues again after surrender.

akshualy commented 3 months ago

Thanks for taking your time to review as I'm out of country @Kyrluckechuck , I agree with you. The ideal approach would be to expand the timer at the top and check which major round we're on. (it contracts again after a while so there needs to be a check for both states of the top round indicator)

Dampen59 commented 3 months ago

Hello, alright I will do the necessary

Dampen59 commented 3 months ago

rebased on main

Dampen59 commented 3 months ago

Work is done, the surrend system is now Phase based. Based upon reaching Phase 3-2

Removed old time-based surrend code Added Expand top bar button (retract was removed because it isn't needed as it auto retracts when going to fight or return to board) Added Image of the 3-2 phase Renamed confiig entries Kept the old "seconds" entry which now acts as a random delay if the user wants to

Locked by Pylint too-many-statements, maybe we should apply a disable flag on loop or take_game_decision nah ?

Dampen59 commented 3 months ago

Applied requested changes, better code organization and refactor