From e47e6136384def2c5b332d0b4a9baccef5d5ce7d Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Fri, 11 Feb 2022 22:38:41 +0800 Subject: [PATCH] Add: Event PT and time limit - Fix: Auto update events in GemsFarming --- assets/cn/campaign/OCR_EVENT_PT.png | Bin 0 -> 7559 bytes assets/en/campaign/OCR_EVENT_PT.png | Bin 0 -> 7040 bytes assets/jp/campaign/OCR_EVENT_PT.png | Bin 0 -> 7559 bytes assets/tw/campaign/OCR_EVENT_PT.png | Bin 0 -> 7559 bytes module/campaign/assets.py | 1 + module/campaign/campaign_event.py | 140 ++++++++++++++++++++++++++++ module/campaign/campaign_ui.py | 4 +- module/campaign/run.py | 7 ++ module/config/config.py | 4 +- module/config/config_updater.py | 5 + module/event/maritime_escort.py | 6 +- module/raid/run.py | 5 +- 12 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 assets/cn/campaign/OCR_EVENT_PT.png create mode 100644 assets/en/campaign/OCR_EVENT_PT.png create mode 100644 assets/jp/campaign/OCR_EVENT_PT.png create mode 100644 assets/tw/campaign/OCR_EVENT_PT.png create mode 100644 module/campaign/campaign_event.py diff --git a/assets/cn/campaign/OCR_EVENT_PT.png b/assets/cn/campaign/OCR_EVENT_PT.png new file mode 100644 index 0000000000000000000000000000000000000000..f02801fb595a625cbebbafc70e6a902ab541f0ff GIT binary patch literal 7559 zcmeI0_g53o*T)wSX#xsL6r@N~1Vt$-y@_;!Aiad%LQ_fzU9clHKqL@~G?AwC8c+m; z(53elVt^2OAQZp&`6r&|2j}dbJ7@RI&U;?>&OLkQt%1G007Kdnhy;DfcCUY z-A_+_YLt1ksZI@pkEXdV05Gxty{Q0H`eguM)N@l)Gca)V_Vf02_4eV@Qd8sedFJix z=HUbYffHyWm>Gi1p*Tx+Vl`16+xUv~cn`-5ZN&W2*=2yi)~Lp+O`f@o@C85uc7f>V@~QMqFSMPFViv z4#*h3l$RajjRR}`=xmChzN9&KhVT3`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U6FOB^?%PY|FwSv{t@^`;2(j11pX2DN8taGz+T!P Z9sr&?jnndZ8U9y@mb(7KQdQf?{{fOU@L2!= literal 0 HcmV?d00001 diff --git a/assets/en/campaign/OCR_EVENT_PT.png b/assets/en/campaign/OCR_EVENT_PT.png new file mode 100644 index 0000000000000000000000000000000000000000..634502426b320223b84081a3e4294eaeafe4b820 GIT binary patch literal 7040 zcmeH~_cz>6xW_+8qD2W|gD)#u2q9V`$`TTmXd!y<(M4HSPeddkdWkO4vaDW~RTJIn zy%UxVi&er#zjE(Caev61Gv}EzbLKqHdChy~%=?43rV0%eD-{3$G^)@iIskC>a!5Kv zL3$Y!z-lCyfzktNc_i;NnJ7bkiGsrH==!-qJHDbcDaB(!a@cBLk|} z{$`vCn)!Y?hriC@@yGYZk$R?5+u*svnjn9|*4D}7Nh2-;cRBzcqzk>lz!$gn)d_f{ z6D}(~1&+~zw)ZrJk}^S;u5i+?VSYGV?ErusGPqx`ce(s2Ntru93V4hQ^DuP%ya+>U z^BDk~aljH61CE*`RtM-7e$jms=)MJ%>sHxP0f_+M0uNN=0*YvW&EKk!tH2Z@VGaaL zefQu$SQNEI3YOTE`RLZq!ffE=U(m++O=Qj$=kS}_&U(59;ZEZQ)ZPQelg zO;r@?130Bf0VNK`elkvVvYh)PElUUskMKGu3DAm3>Q8w#B7U|mI2Xe2j<4s=JMLVN+q;YB zjZvgm0D8?q!i>f0>I9ib7fHEKi!;Imn9&DbE*_bQ&r;?XQw{kaMZ%>{6*#iKXm`u9 z|3^hly~S(&rRn}kB;-Q;r~6W5@Zsg^`KS_*<8BH@tJ~7=Z&*i9aSc#_QlqbM zSwSV@L-RP--`{-B)zR&lM~YB%iZg?9@7?pf`RJ3W!g1_uH>cRg(~pfRqKU67pOcM| z`Y6hzEMD_Fw2T%BP#)Tzc&sMXZQfWh zRccjd=q&VJo^Bpwgx)bjoev-D+OvSAs0>ANro^FQ>0-6wPkP$0sGHIq@0Zmnzw+qh zB{HZ<+R3k8$;4jQg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z zF1gDAWogxT9@z}LvvJ5^%-C(m_=3`eLtNH)hE(jjmU*WE|1!JfrOF*9J?2i>&^f$f-t|Z(XT5y4|FwSv{t@^`;2(j11pX2DN8tYhf!4|Gi)%pX XPm`}pg@3;Ntw{B$=95xI%Qyc66m#3w literal 0 HcmV?d00001 diff --git a/assets/jp/campaign/OCR_EVENT_PT.png b/assets/jp/campaign/OCR_EVENT_PT.png new file mode 100644 index 0000000000000000000000000000000000000000..f02801fb595a625cbebbafc70e6a902ab541f0ff GIT binary patch literal 7559 zcmeI0_g53o*T)wSX#xsL6r@N~1Vt$-y@_;!Aiad%LQ_fzU9clHKqL@~G?AwC8c+m; z(53elVt^2OAQZp&`6r&|2j}dbJ7@RI&U;?>&OLkQt%1G007Kdnhy;DfcCUY z-A_+_YLt1ksZI@pkEXdV05Gxty{Q0H`eguM)N@l)Gca)V_Vf02_4eV@Qd8sedFJix z=HUbYffHyWm>Gi1p*Tx+Vl`16+xUv~cn`-5ZN&W2*=2yi)~Lp+O`f@o@C85uc7f>V@~QMqFSMPFViv z4#*h3l$RajjRR}`=xmChzN9&KhVT3`_PYyh8vtz3zyrhlz9=10m3afyfY0!4LAH+h zKT-7t!lnRU0x-wVhG(LRHw1p(e)97o@bfb8#i+uO5l8|64|s?wKk%6uSliK3qy@$b z5mO*w?Bmr!dLV`hNWGyUNUhue*cv}K6r*nW4rCQ8^WQ$xQc4wJUM-1eu5|}UnTxSogB_|oOEExNP4x-@?j+A*a zvJHO9b6;g-Vj>FJXE)thj8^<3Iqy9e9kzG+_GB_>19*y3PAzH4i8_92=M_+D7>mcA zQN8O$#tWQuybM2%6&YBN`f4S1>D{K;+gbyDy$*PtVZy^}oyiMqgm8&X-jrho1dJId zeg$sPucoWQdbEVCQ&C5=m<Ze0BHPu z+3HggNVlCH03K#NzxhRl?%cPF#Vsu9-?$rFK-6|;A1a>{Y>_{&dUh$|Dr5HL6qPGa zT4cx0RDGf0%({S@KVSLn?gM809GlhiRUgn<+shf>FE_qo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f6s+bPHsoFRQ2tcSf{5yLCJ4B3g5@tbK%>l zz85;l&en$`hBv3hPGg)jyc2veDRFmpN|tg%L@3iz{PfbwPlFRJ{V6sj(s_b~%i^Qy4~~uHX6utYkXhL_vi@z1H59^QV{j@LH=|!#c8mAvYCvz&fnSO* zvVmP=a?tTuvmwk8n!h9FZ51@vO#~lc{(_8)$~3Pd_suUJw1RlUmyA-UJL`1P5aDIb z4JU!ee7jNI_k4E`L&H$XQ3vQ*_f@*_;?%}bNQm5S)H0>nv%0zes{FoLW^SKz&yLa- z1?Dn)@LJGmyZPC1d&o|z^ZvfWZUHtjCT$uzI}>sUNo!)_@eEruJ%k+M0tOJl5K`Y( zljw2DACD7UM_Sw;`-&|cSQ^+XApDrvQ#1=U-1_Z64&T!VIsWULj+L@9Qb^8B#rW_s zml(1H71vnzsW{J3UR%ToV_xuUDC}vWUcLG^*LXELM1D8kUt-$pa3gYUuOH3rs!c)V zCdt}pxpjq9=zDohH@m?+h5rjnJaDA+1ojAbh;XSf-rHoVN7H(4#qTy)Q*sLlIw)&W zI8wUhbp8-~)^}BMi>rMG{m1XQU6FOB^?%PY|FwSv{t@^`;2(j11pX2DN8taGz+T!P Z9sr&?jnndZ8U9y@mb(7KQdQf?{{fOU@L2!= literal 0 HcmV?d00001 diff --git a/assets/tw/campaign/OCR_EVENT_PT.png b/assets/tw/campaign/OCR_EVENT_PT.png new file mode 100644 index 0000000000000000000000000000000000000000..f02801fb595a625cbebbafc70e6a902ab541f0ff GIT binary patch literal 7559 zcmeI0_g53o*T)wSX#xsL6r@N~1Vt$-y@_;!Aiad%LQ_fzU9clHKqL@~G?AwC8c+m; z(53elVt^2OAQZp&`6r&|2j}dbJ7@RI&U;?>&OLkQt%1G007Kdnhy;DfcCUY z-A_+_YLt1ksZI@pkEXdV05Gxty{Q0H`eguM)N@l)Gca)V_Vf02_4eV@Qd8sedFJix z=HUbYffHyWm>Gi1p*Tx+Vl`16+xUv~cn`-5ZN&W2*=2yi)~Lp+O`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f-rHoVN7H(4#qTy)Q*sLlIw)&W zI8wUhbp8-~)^}BMi>rMG{m1XQU6FOB^?%PY|FwSv{t@^`;2(j11pX2DN8taGz+T!P Z9sr&?jnndZ8U9y@mb(7KQdQf?{{fOU@L2!= literal 0 HcmV?d00001 diff --git a/module/campaign/assets.py b/module/campaign/assets.py index ea4596af4..986171304 100644 --- a/module/campaign/assets.py +++ b/module/campaign/assets.py @@ -7,6 +7,7 @@ from module.base.template import Template CHAPTER_NEXT = Button(area={'cn': (1216, 362, 1232, 388), 'en': (1216, 362, 1232, 388), 'jp': (1216, 362, 1232, 388), 'tw': (1216, 362, 1232, 388)}, color={'cn': (121, 150, 198), 'en': (121, 150, 198), 'jp': (121, 150, 198), 'tw': (121, 150, 198)}, button={'cn': (1216, 362, 1232, 388), 'en': (1216, 362, 1232, 388), 'jp': (1216, 362, 1232, 388), 'tw': (1216, 362, 1232, 388)}, file={'cn': './assets/cn/campaign/CHAPTER_NEXT.png', 'en': './assets/en/campaign/CHAPTER_NEXT.png', 'jp': './assets/jp/campaign/CHAPTER_NEXT.png', 'tw': './assets/tw/campaign/CHAPTER_NEXT.png'}) CHAPTER_PREV = Button(area={'cn': (42, 360, 58, 387), 'en': (42, 360, 58, 387), 'jp': (42, 360, 58, 387), 'tw': (42, 360, 58, 387)}, color={'cn': (105, 133, 169), 'en': (105, 133, 169), 'jp': (105, 133, 169), 'tw': (105, 133, 169)}, button={'cn': (42, 360, 58, 387), 'en': (42, 360, 58, 387), 'jp': (42, 360, 58, 387), 'tw': (42, 360, 58, 387)}, file={'cn': './assets/cn/campaign/CHAPTER_PREV.png', 'en': './assets/en/campaign/CHAPTER_PREV.png', 'jp': './assets/jp/campaign/CHAPTER_PREV.png', 'tw': './assets/tw/campaign/CHAPTER_PREV.png'}) COMMISSION_NOTICE_AT_CAMPAIGN = Button(area={'cn': (1077, 637, 1083, 643), 'en': (1077, 637, 1083, 643), 'jp': (1077, 637, 1083, 643), 'tw': (1077, 637, 1083, 643)}, color={'cn': (172, 72, 49), 'en': (172, 72, 49), 'jp': (172, 72, 49), 'tw': (172, 72, 49)}, button={'cn': (1077, 637, 1083, 643), 'en': (1077, 637, 1083, 643), 'jp': (1077, 637, 1083, 643), 'tw': (1077, 637, 1083, 643)}, file={'cn': './assets/cn/campaign/COMMISSION_NOTICE_AT_CAMPAIGN.png', 'en': './assets/en/campaign/COMMISSION_NOTICE_AT_CAMPAIGN.png', 'jp': './assets/jp/campaign/COMMISSION_NOTICE_AT_CAMPAIGN.png', 'tw': './assets/tw/campaign/COMMISSION_NOTICE_AT_CAMPAIGN.png'}) +OCR_EVENT_PT = Button(area={'cn': (1196, 109, 1280, 131), 'en': (1190, 109, 1280, 129), 'jp': (1196, 109, 1280, 131), 'tw': (1196, 109, 1280, 131)}, color={'cn': (121, 110, 59), 'en': (88, 78, 51), 'jp': (121, 110, 59), 'tw': (121, 110, 59)}, button={'cn': (1196, 109, 1280, 131), 'en': (1190, 109, 1280, 129), 'jp': (1196, 109, 1280, 131), 'tw': (1196, 109, 1280, 131)}, file={'cn': './assets/cn/campaign/OCR_EVENT_PT.png', 'en': './assets/en/campaign/OCR_EVENT_PT.png', 'jp': './assets/jp/campaign/OCR_EVENT_PT.png', 'tw': './assets/tw/campaign/OCR_EVENT_PT.png'}) OCR_OIL = Button(area={'cn': (614, 23, 714, 51), 'en': (614, 23, 714, 51), 'jp': (614, 23, 714, 51), 'tw': (614, 23, 714, 51)}, color={'cn': (64, 65, 79), 'en': (64, 65, 79), 'jp': (64, 65, 79), 'tw': (64, 65, 79)}, button={'cn': (614, 23, 714, 51), 'en': (614, 23, 714, 51), 'jp': (614, 23, 714, 51), 'tw': (614, 23, 714, 51)}, file={'cn': './assets/cn/campaign/OCR_OIL.png', 'en': './assets/en/campaign/OCR_OIL.png', 'jp': './assets/jp/campaign/OCR_OIL.png', 'tw': './assets/tw/campaign/OCR_OIL.png'}) SWITCH_1_HARD = Button(area={'cn': (82, 641, 148, 675), 'en': (87, 642, 148, 676), 'jp': (24, 645, 150, 697), 'tw': (82, 641, 148, 675)}, color={'cn': (233, 141, 128), 'en': (234, 139, 124), 'jp': (219, 116, 106), 'tw': (236, 159, 148)}, button={'cn': (82, 641, 148, 675), 'en': (87, 642, 148, 676), 'jp': (24, 645, 150, 697), 'tw': (82, 641, 148, 675)}, file={'cn': './assets/cn/campaign/SWITCH_1_HARD.png', 'en': './assets/en/campaign/SWITCH_1_HARD.png', 'jp': './assets/jp/campaign/SWITCH_1_HARD.png', 'tw': './assets/tw/campaign/SWITCH_1_HARD.png'}) SWITCH_1_NORMAL = Button(area={'cn': (80, 641, 148, 675), 'en': (73, 639, 149, 671), 'jp': (24, 644, 150, 697), 'tw': (79, 641, 148, 675)}, color={'cn': (157, 180, 227), 'en': (153, 177, 226), 'jp': (143, 169, 222), 'tw': (156, 179, 227)}, button={'cn': (80, 641, 148, 675), 'en': (73, 639, 149, 671), 'jp': (24, 644, 150, 697), 'tw': (79, 641, 148, 675)}, file={'cn': './assets/cn/campaign/SWITCH_1_NORMAL.png', 'en': './assets/en/campaign/SWITCH_1_NORMAL.png', 'jp': './assets/jp/campaign/SWITCH_1_NORMAL.png', 'tw': './assets/tw/campaign/SWITCH_1_NORMAL.png'}) diff --git a/module/campaign/campaign_event.py b/module/campaign/campaign_event.py new file mode 100644 index 000000000..4052064a4 --- /dev/null +++ b/module/campaign/campaign_event.py @@ -0,0 +1,140 @@ +import re +from datetime import datetime + +import cv2 +import numpy as np + +from module.base.decorator import cached_property +from module.campaign.assets import OCR_EVENT_PT +from module.logger import logger +from module.ocr.ocr import Ocr +from module.ui.ui import UI +from module.config.utils import deep_get + + +class PtOcr(Ocr): + def __init__(self, *args, **kwargs): + super().__init__(*args, lang='azur_lane', alphabet='X0123456789', **kwargs) + + def pre_process(self, image): + """ + Args: + image (np.ndarray): Shape (height, width, channel) + + Returns: + np.ndarray: Shape (width, height) + """ + # Use MAX(r, g, b) + r, g, b = cv2.split(cv2.subtract((255, 255, 255, 0), image)) + image = cv2.min(cv2.min(r, g), b) + # Remove background, 0-192 => 0-255 + image = cv2.multiply(image, 255 / 192) + + return image.astype(np.uint8) + + +class CampaignEvent(UI): + @cached_property + def campaign_pt_ocr(self): + return PtOcr(OCR_EVENT_PT) + + def get_event_pt(self): + """ + Returns: + int: PT amount, or 0 if unable to parse + """ + pt = self.campaign_pt_ocr.ocr(self.device.image) + + res = re.search('X(\d+)', pt) + if res: + pt = int(res.group(1)) + logger.attr('Event_PT', pt) + return pt + else: + logger.warning(f'Invalid pt result: {pt}') + return 0 + + def _disable_tasks(self, tasks): + """ + Args: + tasks (list[str]): Task name + """ + for task in tasks: + keys = f'{task}.Scheduler.Enable' + logger.info(f'Disable task `{task}`') + self.config.modified[keys] = False + + for task in ['GemsFarming']: + if deep_get(self.config.data, keys=f'{task}.Campaign.Event', default='campaign_main') != 'campaign_main': + logger.info(f'Reset GemsFarming to 2-4') + self.config.modified[f'{task}.Campaign.Name'] = '2-4' + self.config.modified[f'{task}.Campaign.Event'] = 'campaign_main' + + logger.info(f'Reset event time limit') + self.config.modified['EventGeneral.EventGeneral.TimeLimit'] = datetime(2020, 1, 1, 0, 0) + + self.config.update() + + def event_pt_limit_triggered(self): + """ + Returns: + bool: + + Pages: + in: page_event or page_sp + """ + limit = int(self.config.EventGeneral_PtLimit) + tasks = [ + 'Event', + 'EventAb', + 'EventCd', + 'EventSp', + 'GemsFarming', + ] + command = self.config.Scheduler_Command + if limit <= 0 or command not in tasks: + return False + if command == 'GemsFarming' and self.config.Campaign_Event == 'campaign_main': + return False + + pt = self.get_event_pt() + if pt >= limit: + logger.hr(f'Reach event PT limit: {limit}') + self._disable_tasks(tasks) + return True + else: + return False + + def event_time_limit_triggered(self): + """ + Returns: + bool: + + Pages: + in: page_event or page_sp + """ + limit = self.config.EventGeneral_TimeLimit + tasks = [ + 'Event', + 'EventAb', + 'EventCd', + 'EventSp', + 'GemsFarming', + 'Raid', + 'RaidDaily', + 'MaritimeEscort', + ] + command = self.config.Scheduler_Command + default = datetime(2020, 1, 1, 0, 0) + if command not in tasks or limit == default: + return False + if command == 'GemsFarming' and self.config.Campaign_Event == 'campaign_main': + return False + + now = datetime.now() + if now > limit: + logger.hr(f'Reach event time limit: {limit}') + self._disable_tasks(tasks) + return True + else: + return False diff --git a/module/campaign/campaign_ui.py b/module/campaign/campaign_ui.py index 58adc9def..ea3115df9 100644 --- a/module/campaign/campaign_ui.py +++ b/module/campaign/campaign_ui.py @@ -1,10 +1,10 @@ from module.campaign.assets import * +from module.campaign.campaign_event import CampaignEvent from module.campaign.campaign_ocr import CampaignOcr from module.exception import CampaignNameError, ScriptEnd from module.logger import logger from module.ui.assets import CAMPAIGN_CHECK from module.ui.switch import Switch -from module.ui.ui import UI MODE_SWITCH_1 = Switch('Mode_switch_1', offset=(30, 10)) MODE_SWITCH_1.add_status('normal', SWITCH_1_NORMAL) @@ -14,7 +14,7 @@ MODE_SWITCH_2.add_status('hard', SWITCH_2_HARD) MODE_SWITCH_2.add_status('ex', SWITCH_2_EX) -class CampaignUI(UI, CampaignOcr): +class CampaignUI(CampaignEvent, CampaignOcr): ENTRANCE = Button(area=(), color=(), button=(), name='default_button') def campaign_ensure_chapter(self, index): diff --git a/module/campaign/run.py b/module/campaign/run.py index 9737d15d1..f9667c073 100644 --- a/module/campaign/run.py +++ b/module/campaign/run.py @@ -98,6 +98,11 @@ class CampaignRun(UI): logger.hr('Triggered stop condition: Get new ship') self.config.Scheduler_Enable = False return True + # Event limit + if oil_check and self.campaign.event_pt_limit_triggered(): + logger.hr('Triggered stop condition: Event PT limit') + self.config.Scheduler_Enable = False + return True return False @@ -177,6 +182,8 @@ class CampaignRun(UI): # End if total and self.run_count >= total: break + if self.campaign.event_time_limit_triggered(): + self.config.task_stop() # Log logger.hr(name, level=1) diff --git a/module/config/config.py b/module/config/config.py index 23ba901da..a3d44ddf3 100644 --- a/module/config/config.py +++ b/module/config/config.py @@ -126,8 +126,10 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig): if isinstance(func, Function): func = func.command func_set = {func, 'General', 'Alas'} - if 'opsi' in func.lower(): + if func.startswith('Opsi'): func_set.add('OpsiGeneral') + if func.startswith('Event') or func.startswith('Raid') or func in ['MaritimeEscort', 'GemsFarming']: + func_set.add('EventGeneral') logger.info(f'Bind task {func_set}') # Bind arguments diff --git a/module/config/config_updater.py b/module/config/config_updater.py index ed3171304..cbf4a6579 100644 --- a/module/config/config_updater.py +++ b/module/config/config_updater.py @@ -424,6 +424,11 @@ class ConfigUpdater: deep_set(new, keys=f'{task}.Campaign.Event', value=deep_get(self.args, f'{task}.Campaign.Event.{server_}')) + for task in ['GemsFarming']: + if deep_get(new, keys=f'{task}.Campaign.Event', default='campaign_main') != 'campaign_main': + deep_set(new, + keys=f'{task}.Campaign.Event', + value=deep_get(self.args, f'{task}.Campaign.Event.{server_}')) # War archive does not allow campaign_main for task in ['WarArchives']: if deep_get(new, keys=f'{task}.Campaign.Event', default='campaign_main') == 'campaign_main': diff --git a/module/event/maritime_escort.py b/module/event/maritime_escort.py index a8f86c1b0..ba6dfa96b 100644 --- a/module/event/maritime_escort.py +++ b/module/event/maritime_escort.py @@ -1,3 +1,4 @@ +from module.campaign.campaign_event import CampaignEvent from module.event.assets import * from module.exception import CampaignEnd from module.logger import logger @@ -7,7 +8,7 @@ from module.ocr.ocr import DigitCounter OCR_REMAIN = DigitCounter(ESCORT_REMAIN, letter=(148, 255, 99), threshold=64) -class MaritimeEscort(MapOperation): +class MaritimeEscort(MapOperation, CampaignEvent): def is_in_escort(self): return self.appear(ESCORT_CHECK, offset=(20, 20)) @@ -39,6 +40,9 @@ class MaritimeEscort(MapOperation): logger.info('Maritime escort finished') def run(self): + if self.event_time_limit_triggered(): + self.config.task_stop() + self.ui_goto_main() self.ui_click(MAIN_GOTO_ESCORT, check_button=ESCORT_CHECK, offset=(20, 150), skip_first_screenshot=True) diff --git a/module/raid/run.py b/module/raid/run.py index ad14accc7..a96e4294d 100644 --- a/module/raid/run.py +++ b/module/raid/run.py @@ -1,10 +1,11 @@ +from module.campaign.campaign_event import CampaignEvent from module.exception import ScriptEnd, ScriptError from module.logger import logger from module.raid.raid import Raid, OilExhausted from module.ui.page import page_raid -class RaidRun(Raid): +class RaidRun(Raid, CampaignEvent): run_count: int run_limit: int @@ -40,6 +41,8 @@ class RaidRun(Raid): # End if total and self.run_count == total: break + if self.event_time_limit_triggered(): + self.config.task_stop() # Log logger.hr(f'{name}_{mode}', level=2)