diff --git a/assets/jp/base/popup/AP_EXCEED.BUTTON.png b/assets/jp/base/popup/AP_EXCEED.BUTTON.png new file mode 100644 index 0000000..ff27aae Binary files /dev/null and b/assets/jp/base/popup/AP_EXCEED.BUTTON.png differ diff --git a/assets/jp/base/popup/AP_EXCEED.png b/assets/jp/base/popup/AP_EXCEED.png new file mode 100644 index 0000000..662c298 Binary files /dev/null and b/assets/jp/base/popup/AP_EXCEED.png differ diff --git a/assets/jp/base/popup/ITEM_EXPIRED.BUTTON.png b/assets/jp/base/popup/ITEM_EXPIRED.BUTTON.png new file mode 100644 index 0000000..40a515d Binary files /dev/null and b/assets/jp/base/popup/ITEM_EXPIRED.BUTTON.png differ diff --git a/assets/jp/base/popup/ITEM_EXPIRED.png b/assets/jp/base/popup/ITEM_EXPIRED.png new file mode 100644 index 0000000..53841f9 Binary files /dev/null and b/assets/jp/base/popup/ITEM_EXPIRED.png differ diff --git a/tasks/base/assets/assets_base_popup.py b/tasks/base/assets/assets_base_popup.py index 5289ebc..8dfb836 100644 --- a/tasks/base/assets/assets_base_popup.py +++ b/tasks/base/assets/assets_base_popup.py @@ -13,6 +13,16 @@ AFFECTION_LEVEL_UP = ButtonWrapper( button=(882, 244, 1176, 476), ), ) +AP_EXCEED = ButtonWrapper( + name='AP_EXCEED', + jp=Button( + file='./assets/jp/base/popup/AP_EXCEED.png', + area=(610, 124, 669, 153), + search=(590, 104, 689, 173), + color=(139, 153, 168), + button=(535, 494, 746, 565), + ), +) DAILY_NEWS = ButtonWrapper( name='DAILY_NEWS', jp=Button( @@ -63,6 +73,16 @@ GET_REWARD_SKIP = ButtonWrapper( button=(1137, 34, 1243, 65), ), ) +ITEM_EXPIRED = ButtonWrapper( + name='ITEM_EXPIRED', + jp=Button( + file='./assets/jp/base/popup/ITEM_EXPIRED.png', + area=(612, 147, 668, 175), + search=(592, 127, 688, 195), + color=(131, 145, 162), + button=(537, 487, 742, 553), + ), +) NETWORK_RECONNECT = ButtonWrapper( name='NETWORK_RECONNECT', jp=Button( diff --git a/tasks/base/popup.py b/tasks/base/popup.py index aef828d..1807798 100644 --- a/tasks/base/popup.py +++ b/tasks/base/popup.py @@ -87,3 +87,15 @@ class PopupHandler(ModuleBase): return True return False + + def handle_ap_exceed(self, interval=5) -> bool: + if self.appear_then_click(AP_EXCEED, interval=interval): + return True + + return False + + def handle_item_expired(self, interval=5) -> bool: + if self.appear_then_click(ITEM_EXPIRED, interval=interval): + return True + + return False diff --git a/tasks/base/ui.py b/tasks/base/ui.py index 5ba0119..2d28fa7 100644 --- a/tasks/base/ui.py +++ b/tasks/base/ui.py @@ -343,6 +343,10 @@ class UI(MainPage): return True if self.handle_new_student(): return True + if self.handle_ap_exceed(): + return True + if self.handle_item_expired(): + return True return False