Stronghold stuck after fleet defeated, visual debuff prevent detect of usual assets
Before you asking
- [X] I have searched the existing issues
- [X] I spend at least 5 minutes for thinking and preparing
- [X] I checked Frequently Asked Questions (FAQ) in Wiki page
- [X] I am using the latest version of Alas
Describe the bug
Seemingly exclusive to stronghold, defeat may afflict a visual debuff and ALAS unable to detect its current screen anymore.
As a result it will time out and no longer resume the next fleet on queue to take its place. Not continuing until the next stronghold iteration.
To Reproduce
It is unclear what the conditions are this visual debuff to be afflicted but this seems to only happen for stronghold.
So best to allow auto search run and continue until loss. May not always occur.
Expected behavior
After detecting loss, I believe the normal operations are to move to globe and go to a zone or port. This seems to remove the visual debuff having exited the stronghold.
Then re-enter the stronghold and swap to the next available fleet to continue assault on stronghold.
Relevant log output
2022-08-04 12:20:37.118 | WARNING | Battle Status C
2022-08-04 12:20:37.532 | INFO | Click (1027, 649) @ BATTLE_STATUS_C
2022-08-04 12:20:38.228 | WARNING | Battle Status C
2022-08-04 12:20:38.597 | INFO | Click (1034, 658) @ BATTLE_STATUS_C
2022-08-04 12:20:57.158 | INFO | Screenshot interval set to 0.3s
2022-08-04 12:20:57.162 | INFO | Combat end.
2022-08-04 12:20:57.166 | WARNING | Fleet died, stop auto search
2022-08-04 12:21:01.359 | INFO | Click ( 656, 617) @ AUTO_SEARCH_REWARD
2022-08-04 12:22:02.138 | WARNING | Wait too long
2022-08-04 12:22:02.145 | WARNING | Waiting for {'STORAGE_CHECK', 'IN_MAP', 'GET_MEOWFFICER_ITEMS_2',
'GUILD_POPUP_CONFIRM', 'POPUP_CONFIRM', 'GAME_TIPS', 'GET_ITEMS_2', 'STORY_LETTERS_ONLY', 'STORY_SKIP',
'GLOBE_GOTO_MAP', 'GET_ADAPTABILITY', 'GET_ITEMS_1', 'AUTO_SEARCH_REWARD', 'MISSION_CHECK', 'MAP_ARCHIVES',
'OS_GAME_TIPS', 'MAP_WORLD', 'GET_MEOWFFICER_ITEMS_1', 'GET_ITEMS_3', 'GET_MISSION', 'STORY_LETTER_BLACK'}
2022-08-04 12:22:04.452 | INFO | [u2.Device] Device(atx_agent_url=http://127.0.0.1:50654)
2022-08-04 12:22:04.526 | INFO | [Package_name] com.YoStarEN.AzurLane
2022-08-04 12:22:04.533 | ERROR | GameStuckError: Wait too long
2022-08-04 12:22:04.541 | WARNING | Saving error: ./log/error/1659630124541
Another time this occurred, happens after returning from the above error and cannot detect in map due to visual debuff
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
OPSISTRONGHOLD
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
═══════════════════════════════════════════════════════ OS INIT ═══════════════════════════════════════════════════════
2022-08-04 11:51:15.347 | INFO | OS INIT
2022-08-04 11:51:15.383 | INFO | <<< UI ENSURE >>>
2022-08-04 11:51:15.389 | INFO | UI get current page
2022-08-04 11:51:15.416 | INFO | [UI] page_commission
2022-08-04 11:51:15.424 | INFO | Goto page_os
2022-08-04 11:51:15.429 | INFO | <<< UI GOTO PAGE_OS >>>
2022-08-04 11:51:15.442 | INFO | Page switch: page_commission -> page_main
2022-08-04 11:51:15.446 | INFO | Click (1229, 34) @ GOTO_MAIN
2022-08-04 11:51:16.535 | INFO | Page switch: page_main -> page_campaign_menu
2022-08-04 11:51:16.544 | INFO | Click (1109, 354) @ MAIN_GOTO_CAMPAIGN
2022-08-04 11:51:20.867 | INFO | Page switch: page_campaign_menu -> page_os
2022-08-04 11:51:20.876 | INFO | Click ( 752, 425) @ CAMPAIGN_MENU_GOTO_OS
2022-08-04 11:51:36.798 | INFO | Page arrive: page_os
2022-08-04 11:51:36.995 | INFO | [MAP_NAME 0.189s] west continental shefD-sren controled z
2022-08-04 11:51:37.005 | INFO | Map name processed: westcontinentalshefd
2022-08-04 11:51:37.483 | INFO | [MAP_NAME 0.158s] west continental shefD-sren controled z
2022-08-04 11:51:37.491 | INFO | Map name processed: westcontinentalshefd
2022-08-04 11:51:38.045 | INFO | [MAP_NAME 0.180s] west continental shefD-sren controled z
2022-08-04 11:51:38.053 | INFO | Map name processed: westcontinentalshefd
2022-08-04 11:51:38.651 | INFO | [MAP_NAME 0.168s] west continental shefD-sren controled z
2022-08-04 11:51:38.660 | INFO | Map name processed: westcontinentalshefd
2022-08-04 11:51:39.232 | INFO | [MAP_NAME 0.151s] west continental shefD-sren controled z
2022-08-04 11:51:39.239 | INFO | Map name processed: westcontinentalshefd
2022-08-04 11:51:39.640 | WARNING | Zone init timeout
2022-08-04 11:51:39.645 | WARNING | Unable to get zone name, get current zone from globe map instead
2022-08-04 11:51:39.666 | INFO | Click (1175, 680) @ MAP_GOTO_GLOBE
2022-08-04 11:51:49.118 | INFO | Loading OS globe map
2022-08-04 11:51:49.532 | INFO | [homo_storage] ((4, 3), [(445, 180), (879, 180), (376, 497), (963, 497)])
2022-08-04 11:51:49.745 | INFO | globe_center: (469.0, 1088.0)
2022-08-04 11:51:49.748 | INFO | 0.207s similarity: 0.462
2022-08-04 11:51:49.751 | INFO | [Globe_center] 22
2022-08-04 11:51:49.754 | INFO | <<< UI CLICK >>>
2022-08-04 11:51:49.759 | INFO | Click ( 67, 48) @ GLOBE_GOTO_MAP
2022-08-04 11:52:50.033 | WARNING | Wait too long
2022-08-04 11:52:50.037 | WARNING | Waiting for {'GLOBE_GOTO_MAP', 'IN_MAP'}
2022-08-04 11:52:50.081 | INFO | [Package_name] com.YoStarEN.AzurLane
2022-08-04 11:52:50.084 | ERROR | GameStuckError: Wait too long
2022-08-04 11:52:50.086 | WARNING | Saving error: ./log/error/1659628370086
Screenshots
1st Error Log

2nd Error Log

Anything else?
I think I will try to tackle this myself but any assist or thoughts on how to approach will be helpful.
So far I think my plan might be to:
- Update
def is_in_mapand cut new asset of the same area with the visual debuff. Useorto detect if either in the debuff or clean state. - Update
def go_to_globeand cut new asset of the same area with the visual debuff. Allow click in that and transition to globe screen, the remainder of the function should be able to take care of the rest. I would imagine this would be the only area that would explicitly need to check for this visual debuff screen, others unlikely to come across it.
If there were way to detect saturated or darken colors of existing assets that might be alternative instead. But not confident how that would be done.