|
@@ -29,9 +29,54 @@ class Summon(BaseTask, SummonAssets):
|
|
|
case _: target_swipe = self.S_RANDOM_SWIPE_1
|
|
case _: target_swipe = self.S_RANDOM_SWIPE_1
|
|
|
self.swipe(target_swipe, interval=0.5)
|
|
self.swipe(target_swipe, interval=0.5)
|
|
|
|
|
|
|
|
|
|
+ def summon_mystery_pattern(self):
|
|
|
|
|
+ """
|
|
|
|
|
+ 每月神秘图案
|
|
|
|
|
+ :return:
|
|
|
|
|
+ """
|
|
|
|
|
+ # 目前只测试了7月的,其他月份的我是根据截图描的,可能需要调整
|
|
|
|
|
+ # 一月
|
|
|
|
|
+ jan = [(400, 119), (406, 525), (862, 123), (864, 521), (402, 121)]
|
|
|
|
|
+ # 二月、八月
|
|
|
|
|
+ febAndAug = [(471, 119), (467, 525)]
|
|
|
|
|
+ # 三月、九月
|
|
|
|
|
+ marAndSep = [(390, 304), (886, 302)]
|
|
|
|
|
+ # 四月、十月
|
|
|
|
|
+ aprAndOct = [(402, 526), (862, 125)]
|
|
|
|
|
+ # 五月、十一月
|
|
|
|
|
+ mayAndNov = [(414, 207), (648, 550), (870, 209)]
|
|
|
|
|
+ # 六月、十二月
|
|
|
|
|
+ junAndDec = [(413, 138), (850, 133), (856, 226), (415, 239), (416, 140), (531, 136), (535, 590), (791, 586),
|
|
|
|
|
+ (760, 131)]
|
|
|
|
|
+ # 七月
|
|
|
|
|
+ jul = [(418, 124), (421, 504), (853, 511), (855, 128)]
|
|
|
|
|
+ # 月份字典
|
|
|
|
|
+ month_dict = {
|
|
|
|
|
+ 1: jan,
|
|
|
|
|
+ 2: febAndAug,
|
|
|
|
|
+ 3: marAndSep,
|
|
|
|
|
+ 4: aprAndOct,
|
|
|
|
|
+ 5: mayAndNov,
|
|
|
|
|
+ 6: junAndDec,
|
|
|
|
|
+ 7: jul,
|
|
|
|
|
+ 8: febAndAug,
|
|
|
|
|
+ 9: marAndSep,
|
|
|
|
|
+ 10: aprAndOct,
|
|
|
|
|
+ 11: mayAndNov,
|
|
|
|
|
+ 12: junAndDec
|
|
|
|
|
+ }
|
|
|
|
|
+ # 获取当前月份
|
|
|
|
|
+ current_month = time.localtime().tm_mon
|
|
|
|
|
+ current_pattern = month_dict.get(current_month, None)
|
|
|
|
|
+ if current_pattern is None:
|
|
|
|
|
+ logger.warning(f'不支持的月份: {current_month}')
|
|
|
|
|
+ return
|
|
|
|
|
+ self.screenshot()
|
|
|
|
|
+ self.device.draw_adb(current_pattern)
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
- def summon_one(self):
|
|
|
|
|
|
|
+ def summon_one(self,draw_mystery_pattern=False):
|
|
|
"""
|
|
"""
|
|
|
确保在召唤界面,每日召唤一次
|
|
确保在召唤界面,每日召唤一次
|
|
|
召唤结束后回到 召唤主界面
|
|
召唤结束后回到 召唤主界面
|
|
@@ -81,7 +126,10 @@ class Summon(BaseTask, SummonAssets):
|
|
|
# 某些时候会点击到 “语言召唤”
|
|
# 某些时候会点击到 “语言召唤”
|
|
|
if self.appear_then_click(self.I_UI_CANCEL, interval=0.8):
|
|
if self.appear_then_click(self.I_UI_CANCEL, interval=0.8):
|
|
|
continue
|
|
continue
|
|
|
- self.summon()
|
|
|
|
|
|
|
+ if draw_mystery_pattern:
|
|
|
|
|
+ self.summon_mystery_pattern()
|
|
|
|
|
+ else:
|
|
|
|
|
+ self.summon()
|
|
|
continue
|
|
continue
|
|
|
logger.info('Summon one success')
|
|
logger.info('Summon one success')
|
|
|
|
|
|