Skip to content

Commit

Permalink
Fix: exiting combat status properly using MAP_SWITCHING
Browse files Browse the repository at this point in the history
  • Loading branch information
guoh064 committed Nov 29, 2024
1 parent bc5e6ed commit bc6017d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Binary file added assets/cn/os/MAP_SWITCHING.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions module/os/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
MAP_GOTO_GLOBE = Button(area={'cn': (1069, 641, 1260, 695), 'en': (1069, 641, 1260, 691), 'jp': (1064, 636, 1265, 699), 'tw': (1069, 641, 1260, 694)}, color={'cn': (212, 140, 140), 'en': (212, 140, 140), 'jp': (207, 132, 132), 'tw': (213, 143, 143)}, button={'cn': (1069, 641, 1260, 695), 'en': (1069, 641, 1260, 691), 'jp': (1064, 636, 1265, 699), 'tw': (1069, 641, 1260, 694)}, file={'cn': './assets/cn/os/MAP_GOTO_GLOBE.png', 'en': './assets/en/os/MAP_GOTO_GLOBE.png', 'jp': './assets/jp/os/MAP_GOTO_GLOBE.png', 'tw': './assets/tw/os/MAP_GOTO_GLOBE.png'})
MAP_GOTO_GLOBE_FOG = Button(area={'cn': (1074, 644, 1114, 691), 'en': (1074, 644, 1114, 691), 'jp': (1074, 644, 1114, 691), 'tw': (1074, 644, 1114, 691)}, color={'cn': (50, 34, 32), 'en': (50, 34, 32), 'jp': (50, 34, 32), 'tw': (50, 34, 32)}, button={'cn': (1074, 644, 1114, 691), 'en': (1074, 644, 1114, 691), 'jp': (1074, 644, 1114, 691), 'tw': (1074, 644, 1114, 691)}, file={'cn': './assets/cn/os/MAP_GOTO_GLOBE_FOG.png', 'en': './assets/en/os/MAP_GOTO_GLOBE_FOG.png', 'jp': './assets/jp/os/MAP_GOTO_GLOBE_FOG.png', 'tw': './assets/tw/os/MAP_GOTO_GLOBE_FOG.png'})
MAP_NAME = Button(area={'cn': (120, 9, 400, 41), 'en': (116, 6, 549, 39), 'jp': (115, 14, 421, 41), 'tw': (120, 9, 400, 41)}, color={'cn': (60, 66, 77), 'en': (43, 50, 60), 'jp': (94, 104, 120), 'tw': (60, 66, 77)}, button={'cn': (120, 9, 400, 41), 'en': (116, 6, 549, 39), 'jp': (115, 14, 421, 41), 'tw': (120, 9, 400, 41)}, file={'cn': './assets/cn/os/MAP_NAME.png', 'en': './assets/en/os/MAP_NAME.png', 'jp': './assets/jp/os/MAP_NAME.png', 'tw': './assets/tw/os/MAP_NAME.png'})
MAP_SWITCHING = Button(area={'cn': (773, 305, 833, 365), 'en': (773, 305, 833, 365), 'jp': (773, 305, 833, 365), 'tw': (773, 305, 833, 365)}, color={'cn': (85, 130, 164), 'en': (85, 130, 164), 'jp': (85, 130, 164), 'tw': (85, 130, 164)}, button={'cn': (773, 305, 833, 365), 'en': (773, 305, 833, 365), 'jp': (773, 305, 833, 365), 'tw': (773, 305, 833, 365)}, file={'cn': './assets/cn/os/MAP_SWITCHING.png', 'en': './assets/cn/os/MAP_SWITCHING.png', 'jp': './assets/cn/os/MAP_SWITCHING.png', 'tw': './assets/cn/os/MAP_SWITCHING.png'})
MEOWFFICER_SEARCHING = Button(area={'cn': (172, 606, 220, 619), 'en': (172, 607, 221, 616), 'jp': (173, 606, 220, 619), 'tw': (173, 605, 221, 619)}, color={'cn': (67, 131, 149), 'en': (75, 132, 150), 'jp': (76, 138, 158), 'tw': (78, 152, 173)}, button={'cn': (172, 606, 220, 619), 'en': (172, 607, 221, 616), 'jp': (173, 606, 220, 619), 'tw': (173, 605, 221, 619)}, file={'cn': './assets/cn/os/MEOWFFICER_SEARCHING.png', 'en': './assets/en/os/MEOWFFICER_SEARCHING.png', 'jp': './assets/jp/os/MEOWFFICER_SEARCHING.png', 'tw': './assets/tw/os/MEOWFFICER_SEARCHING.png'})
MEOWFFICER_SEARCHING_PERCENTAGE = Button(area={'cn': (144, 621, 223, 623), 'en': (144, 621, 223, 623), 'jp': (144, 621, 223, 623), 'tw': (144, 621, 223, 623)}, color={'cn': (52, 167, 190), 'en': (52, 167, 190), 'jp': (52, 167, 190), 'tw': (52, 167, 190)}, button={'cn': (144, 621, 223, 623), 'en': (144, 621, 223, 623), 'jp': (144, 621, 223, 623), 'tw': (144, 621, 223, 623)}, file={'cn': './assets/cn/os/MEOWFFICER_SEARCHING_PERCENTAGE.png', 'en': './assets/en/os/MEOWFFICER_SEARCHING_PERCENTAGE.png', 'jp': './assets/jp/os/MEOWFFICER_SEARCHING_PERCENTAGE.png', 'tw': './assets/tw/os/MEOWFFICER_SEARCHING_PERCENTAGE.png'})
SELECT_ABYSSAL = Button(area={'cn': (89, 251, 167, 269), 'en': (93, 254, 161, 268), 'jp': (89, 251, 167, 269), 'tw': (88, 250, 167, 270)}, color={'cn': (107, 110, 112), 'en': (100, 103, 104), 'jp': (115, 118, 119), 'tw': (98, 101, 102)}, button={'cn': (89, 251, 167, 269), 'en': (93, 254, 161, 268), 'jp': (89, 251, 167, 269), 'tw': (88, 250, 167, 270)}, file={'cn': './assets/cn/os/SELECT_ABYSSAL.png', 'en': './assets/en/os/SELECT_ABYSSAL.png', 'jp': './assets/jp/os/SELECT_ABYSSAL.png', 'tw': './assets/tw/os/SELECT_ABYSSAL.png'})
Expand Down
4 changes: 3 additions & 1 deletion module/os_handler/enemy_searching.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from module.handler.enemy_searching import \
EnemySearchingHandler as EnemySearchingHandler_
from module.logger import logger
from module.os.assets import MAP_GOTO_GLOBE_FOG
from module.os.assets import MAP_GOTO_GLOBE_FOG, MAP_SWITCHING
from module.os_handler.assets import AUTO_SEARCH_REWARD, IN_MAP, ORDER_ENTER


Expand All @@ -12,6 +12,8 @@ def is_in_map(self):
return True
if self.appear(MAP_GOTO_GLOBE_FOG, offset=(5, 5)) and MAP_GOTO_GLOBE_FOG.match_appear_on(self.device.image):
return True
if self.appear(MAP_SWITCHING, offset=(5, 5)) and MAP_SWITCHING.match_appear_on(self.device.image):
return True

return False

Expand Down

0 comments on commit bc6017d

Please sign in to comment.