diff --git a/assets/share/combat/interact/MAP_LOADING.SEARCH.png b/assets/share/combat/interact/MAP_LOADING.SEARCH.png new file mode 100644 index 000000000..9a1c84aa5 Binary files /dev/null and b/assets/share/combat/interact/MAP_LOADING.SEARCH.png differ diff --git a/assets/share/combat/interact/MAP_LOADING.png b/assets/share/combat/interact/MAP_LOADING.png new file mode 100644 index 000000000..c8b993d63 Binary files /dev/null and b/assets/share/combat/interact/MAP_LOADING.png differ diff --git a/tasks/combat/assets/assets_combat_interact.py b/tasks/combat/assets/assets_combat_interact.py index 0feaece7e..5b575ed58 100644 --- a/tasks/combat/assets/assets_combat_interact.py +++ b/tasks/combat/assets/assets_combat_interact.py @@ -13,3 +13,13 @@ DUNGEON_COMBAT_INTERACT = ButtonWrapper( button=(750, 411, 997, 448), ), ) +MAP_LOADING = ButtonWrapper( + name='MAP_LOADING', + share=Button( + file='./assets/share/combat/interact/MAP_LOADING.png', + area=(644, 367, 662, 389), + search=(639, 347, 667, 394), + color=(159, 141, 149), + button=(644, 367, 662, 389), + ), +) diff --git a/tasks/combat/interact.py b/tasks/combat/interact.py index d2521cae0..5d60b3c1c 100644 --- a/tasks/combat/interact.py +++ b/tasks/combat/interact.py @@ -1,5 +1,7 @@ +from module.base.utils import color_similar, get_color from tasks.base.ui import UI -from tasks.combat.assets.assets_combat_interact import DUNGEON_COMBAT_INTERACT +from tasks.combat.assets.assets_combat_interact import DUNGEON_COMBAT_INTERACT, MAP_LOADING +from tasks.map.assets.assets_map_control import A_BUTTON class CombatInteract(UI): @@ -12,3 +14,15 @@ class CombatInteract(UI): return True return False + + def is_map_loading(self): + if self.appear(MAP_LOADING, similarity=0.75): + return True + + return False + + def is_map_loading_black(self): + color = get_color(self.device.image, A_BUTTON.area) + if color_similar(color, (0, 0, 0)): + return True + return False diff --git a/tasks/rogue/assets/assets_rogue_reward.py b/tasks/rogue/assets/assets_rogue_reward.py index 29aa8d2cf..77c5494af 100644 --- a/tasks/rogue/assets/assets_rogue_reward.py +++ b/tasks/rogue/assets/assets_rogue_reward.py @@ -10,6 +10,6 @@ ROGUE_REPORT = ButtonWrapper( area=(1198, 19, 1223, 42), search=(1178, 0, 1243, 62), color=(203, 165, 119), - button=(382, 645, 894, 700), + button=(1198, 19, 1223, 42), ), )