1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-13 03:16:59 +08:00

1 Commits

Author SHA1 Message Date
sui-feng-cb
678aba2807 Opt: use LoggerUnlock in storage 2026-02-05 10:18:59 +08:00
70 changed files with 122 additions and 165 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -279,5 +279,3 @@ To add a new event, add a new row in here, and run `python -m module.config.conf
| 20260122 | coalition 20260122 | Light & Shadow Fashion Shoot! | 光影风尚-拍摄进行时 | Light & Shadow Fashion Shoot! | 特集写真-撮影進行中 | - |
| 20260122 | event 20220526 cn | Pledge of the Radiant Court | - | - | - | 泠誓光庭 |
| 20260129 | coalition 20260122 | Light & Shadow Fashion Shoot! | - | - | - | 光影風尚-拍攝進行時 |
| 20260205 | raid 20240328 | From Zero to Hero | 复刻从零开始的魔王讨伐之旅 | From Zero to Hero Rerun | ゼロから頑張る魔王討伐(復刻) | - |
| 20260212 | raid 20260212 | Spring Auction Adventure | 春宴怀玉香满庭 | Spring Auction Adventure | 新春玉逸品会 | - |

View File

@@ -124,8 +124,6 @@ class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatMan
return PAUSE_ShadowPuppetry
if PAUSE_MaidCafe.match_template_color(self.device.image, offset=(10, 10)):
return PAUSE_MaidCafe
if PAUSE_Ancient.match_template_color(self.device.image, offset=(10, 10)):
return PAUSE_Ancient
return False
def handle_combat_quit(self, offset=(20, 20), interval=3):

View File

@@ -5,7 +5,6 @@ from module.base.template import Template
# Don't modify it manually.
PAUSE = Button(area={'cn': (1158, 40, 1199, 58), 'en': (1155, 38, 1216, 51), 'jp': (1232, 36, 1240, 60), 'tw': (1217, 36, 1225, 59)}, color={'cn': (189, 190, 202), 'en': (164, 169, 181), 'jp': (244, 241, 246), 'tw': (247, 243, 247)}, button={'cn': (1157, 34, 1241, 61), 'en': (1136, 26, 1270, 63), 'jp': (1141, 38, 1220, 57), 'tw': (1157, 34, 1241, 61)}, file={'cn': './assets/cn/combat_ui/PAUSE.png', 'en': './assets/en/combat_ui/PAUSE.png', 'jp': './assets/jp/combat_ui/PAUSE.png', 'tw': './assets/tw/combat_ui/PAUSE.png'})
PAUSE_Ancient = Button(area={'cn': (1228, 36, 1245, 55), 'en': (1228, 36, 1245, 55), 'jp': (1228, 36, 1245, 55), 'tw': (1228, 36, 1245, 55)}, color={'cn': (172, 161, 144), 'en': (172, 161, 144), 'jp': (172, 161, 144), 'tw': (172, 161, 144)}, button={'cn': (1228, 36, 1245, 55), 'en': (1228, 36, 1245, 55), 'jp': (1228, 36, 1245, 55), 'tw': (1228, 36, 1245, 55)}, file={'cn': './assets/cn/combat_ui/PAUSE_Ancient.png', 'en': './assets/cn/combat_ui/PAUSE_Ancient.png', 'jp': './assets/cn/combat_ui/PAUSE_Ancient.png', 'tw': './assets/cn/combat_ui/PAUSE_Ancient.png'})
PAUSE_Christmas = Button(area={'cn': (1234, 35, 1250, 56), 'en': (1234, 35, 1250, 56), 'jp': (1234, 35, 1250, 56), 'tw': (1234, 35, 1250, 56)}, color={'cn': (158, 181, 210), 'en': (158, 181, 210), 'jp': (158, 181, 210), 'tw': (158, 181, 210)}, button={'cn': (1234, 35, 1250, 56), 'en': (1234, 35, 1250, 56), 'jp': (1234, 35, 1250, 56), 'tw': (1234, 35, 1250, 56)}, file={'cn': './assets/cn/combat_ui/PAUSE_Christmas.png', 'en': './assets/cn/combat_ui/PAUSE_Christmas.png', 'jp': './assets/cn/combat_ui/PAUSE_Christmas.png', 'tw': './assets/cn/combat_ui/PAUSE_Christmas.png'})
PAUSE_Cyber = Button(area={'cn': (1231, 32, 1253, 59), 'en': (1231, 32, 1253, 59), 'jp': (1231, 32, 1253, 59), 'tw': (1231, 32, 1253, 59)}, color={'cn': (40, 140, 157), 'en': (40, 140, 157), 'jp': (40, 140, 157), 'tw': (40, 140, 157)}, button={'cn': (1231, 32, 1253, 59), 'en': (1231, 32, 1253, 59), 'jp': (1231, 32, 1253, 59), 'tw': (1231, 32, 1253, 59)}, file={'cn': './assets/cn/combat_ui/PAUSE_Cyber.png', 'en': './assets/cn/combat_ui/PAUSE_Cyber.png', 'jp': './assets/cn/combat_ui/PAUSE_Cyber.png', 'tw': './assets/cn/combat_ui/PAUSE_Cyber.png'})
PAUSE_DOUBLE_CHECK = Button(area={'cn': (1226, 35, 1231, 60), 'en': (1226, 35, 1231, 61), 'jp': (1226, 35, 1230, 60), 'tw': (1226, 35, 1231, 60)}, color={'cn': (96, 104, 136), 'en': (83, 98, 118), 'jp': (97, 102, 120), 'tw': (96, 104, 136)}, button={'cn': (1226, 35, 1231, 60), 'en': (1226, 35, 1231, 61), 'jp': (1226, 35, 1230, 60), 'tw': (1226, 35, 1231, 60)}, file={'cn': './assets/cn/combat_ui/PAUSE_DOUBLE_CHECK.png', 'en': './assets/en/combat_ui/PAUSE_DOUBLE_CHECK.png', 'jp': './assets/jp/combat_ui/PAUSE_DOUBLE_CHECK.png', 'tw': './assets/tw/combat_ui/PAUSE_DOUBLE_CHECK.png'})

View File

@@ -2722,24 +2722,22 @@
"type": "state",
"value": "campaign_main",
"option": [
"raid_20250116",
"raid_20260212"
"raid_20250116"
],
"option_cn": [
"raid_20260212"
"raid_20250116"
],
"option_en": [
"raid_20260212"
"raid_20250116"
],
"option_jp": [
"raid_20260212"
"raid_20250116"
],
"option_tw": [
"raid_20250116"
],
"option_bold": [
"raid_20250116",
"raid_20260212"
"raid_20250116"
]
},
"Mode": {
@@ -6082,24 +6080,22 @@
"type": "state",
"value": "campaign_main",
"option": [
"raid_20250116",
"raid_20260212"
"raid_20250116"
],
"option_cn": [
"raid_20260212"
"raid_20250116"
],
"option_en": [
"raid_20260212"
"raid_20250116"
],
"option_jp": [
"raid_20260212"
"raid_20250116"
],
"option_tw": [
"raid_20250116"
],
"option_bold": [
"raid_20250116",
"raid_20260212"
"raid_20250116"
]
},
"Mode": {

View File

@@ -23,11 +23,11 @@
"page": "setting",
"tasks": [
"EventGeneral",
"Coalition",
"Event",
"Event2",
"Raid",
"Hospital",
"Coalition",
"MaritimeEscort",
"WarArchives"
]
@@ -36,13 +36,13 @@
"menu": "collapse",
"page": "setting",
"tasks": [
"CoalitionSp",
"EventA",
"EventB",
"EventC",
"EventD",
"EventSp",
"RaidDaily",
"CoalitionSp"
"RaidDaily"
]
},
"Reward": {

View File

@@ -71,6 +71,12 @@ Event:
EventGeneral:
- EventGeneral
- TaskBalancer
Coalition:
- Scheduler
- Campaign
- Coalition
- StopCondition
- Emotion
Event:
- Scheduler
- Campaign
@@ -100,12 +106,6 @@ Event:
- Hospital
- StopCondition
- Emotion
Coalition:
- Scheduler
- Campaign
- Coalition
- StopCondition
- Emotion
MaritimeEscort:
- Scheduler
- MaritimeEscort
@@ -126,6 +126,12 @@ EventDaily:
menu: 'collapse'
page: 'setting'
tasks:
CoalitionSp:
- Scheduler
- Campaign
- Coalition
- StopCondition
- Emotion
EventA:
- Scheduler
- EventDaily
@@ -181,12 +187,6 @@ EventDaily:
- Campaign
- StopCondition
- Emotion
CoalitionSp:
- Scheduler
- Campaign
- Coalition
- StopCondition
- Emotion
# ==================== Reward ====================

View File

@@ -66,6 +66,10 @@
"name": "Event General",
"help": ""
},
"Coalition": {
"name": "Light & Shadow Fashion Shoot",
"help": ""
},
"Event": {
"name": "Event",
"help": ""
@@ -82,10 +86,6 @@
"name": "Valley Hospital",
"help": ""
},
"Coalition": {
"name": "Light & Shadow Fashion Shoot",
"help": ""
},
"MaritimeEscort": {
"name": "Maritime Escort",
"help": ""
@@ -94,6 +94,10 @@
"name": "War Archives",
"help": "Due to the lack of maintenance of war archives, continuous clear may not work normally, if Alas runs abnormally, Please manually finish clearing and use auto search"
},
"CoalitionSp": {
"name": "Light & Shadow Fashion Shoot SP",
"help": ""
},
"EventA": {
"name": "Event Daily A",
"help": ""
@@ -118,10 +122,6 @@
"name": "Raid Daily",
"help": ""
},
"CoalitionSp": {
"name": "Light & Shadow Fashion Shoot SP",
"help": ""
},
"Commission": {
"name": "Commission",
"help": ""
@@ -773,9 +773,8 @@
"raid_20230118": "Winter Pathfinder",
"raid_20230629": "Reflections of the Oasis",
"raid_20240130": "Spring Festive Fiasco",
"raid_20240328": "From Zero to Hero Rerun",
"raid_20240328": "From Zero to Hero",
"raid_20250116": "Spring Fashion Festa",
"raid_20260212": "Spring Auction Adventure",
"war_archives_20180607_cn": "archives Ink Stained Steel Sakura",
"war_archives_20180726_cn": "archives Iris of Light and Dark",
"war_archives_20181020_en": "archives Strive Wish and Strategize",
@@ -1271,10 +1270,10 @@
"Mode": {
"name": "Raid Mode",
"help": "",
"easy": "Easy",
"normal": "Normal",
"hard": "Hard",
"ex": "EX"
"easy": "easy",
"normal": "normal",
"hard": "hard",
"ex": "ex"
},
"UseTicket": {
"name": "Use Ticket(s)",

View File

@@ -66,6 +66,10 @@
"name": "イベント共通設定",
"help": ""
},
"Coalition": {
"name": "特集写真-撮影進行中",
"help": ""
},
"Event": {
"name": "イベント海域",
"help": ""
@@ -82,10 +86,6 @@
"name": "病院探訪",
"help": ""
},
"Coalition": {
"name": "特集写真-撮影進行中",
"help": ""
},
"MaritimeEscort": {
"name": "Maritime Escort",
"help": ""
@@ -94,6 +94,10 @@
"name": "作戦履歴",
"help": ""
},
"CoalitionSp": {
"name": "特集写真-撮影進行中SP",
"help": ""
},
"EventA": {
"name": "毎日イベント海域A",
"help": ""
@@ -118,10 +122,6 @@
"name": "Raid Daily",
"help": ""
},
"CoalitionSp": {
"name": "特集写真-撮影進行中SP",
"help": ""
},
"Commission": {
"name": "委託",
"help": ""
@@ -773,9 +773,8 @@
"raid_20230118": "冬の案内人",
"raid_20230629": "緑地伽話",
"raid_20240130": "新春宴会狂騒曲",
"raid_20240328": "ゼロから頑張る魔王討伐(復刻)",
"raid_20240328": "ゼロから頑張る魔王討伐",
"raid_20250116": "新春華裳協奏曲",
"raid_20260212": "新春玉逸品会",
"war_archives_20180607_cn": "檔案 墨染まりし鋼の桜",
"war_archives_20180726_cn": "檔案 光と影のアイリス",
"war_archives_20181020_en": "檔案 努力希望と計画",

View File

@@ -66,6 +66,10 @@
"name": "活动通用设置",
"help": ""
},
"Coalition": {
"name": "光影风尚-拍摄进行时",
"help": ""
},
"Event": {
"name": "活动图",
"help": ""
@@ -82,10 +86,6 @@
"name": "深谷来信",
"help": ""
},
"Coalition": {
"name": "光影风尚-拍摄进行时",
"help": ""
},
"MaritimeEscort": {
"name": "商船护航",
"help": ""
@@ -94,6 +94,10 @@
"name": "作战档案",
"help": "由于作战档案缺少维护开荒功能不一定能正常使用如果发现Alas运行异常请手动完成开荒后使用自律寻敌功能"
},
"CoalitionSp": {
"name": "光影风尚-拍摄进行时SP",
"help": ""
},
"EventA": {
"name": "活动每日A图",
"help": ""
@@ -118,10 +122,6 @@
"name": "共斗活动每日",
"help": ""
},
"CoalitionSp": {
"name": "光影风尚-拍摄进行时SP",
"help": ""
},
"Commission": {
"name": "委托",
"help": ""
@@ -773,9 +773,8 @@
"raid_20230118": "冬日的寻路人",
"raid_20230629": "绿洲往事",
"raid_20240130": "寰昌宇定家事忙",
"raid_20240328": "复刻从零开始的魔王讨伐之旅",
"raid_20240328": "从零开始的魔王讨伐之旅",
"raid_20250116": "华裳巧展喜事长",
"raid_20260212": "春宴怀玉香满庭",
"war_archives_20180607_cn": "档案 墨染的钢铁之花",
"war_archives_20180726_cn": "档案 光与影的鸢尾之华",
"war_archives_20181020_en": "档案 努力希望和计划",
@@ -1274,7 +1273,7 @@
"easy": "简单",
"normal": "普通",
"hard": "困难",
"ex": "EX"
"ex": "ex"
},
"UseTicket": {
"name": "使用演习券",

View File

@@ -66,6 +66,10 @@
"name": "活動通用",
"help": ""
},
"Coalition": {
"name": "光影風尚-拍攝進行時",
"help": ""
},
"Event": {
"name": "活動圖",
"help": ""
@@ -82,10 +86,6 @@
"name": "深谷来信",
"help": ""
},
"Coalition": {
"name": "光影風尚-拍攝進行時",
"help": ""
},
"MaritimeEscort": {
"name": "商船護航",
"help": ""
@@ -94,6 +94,10 @@
"name": "作戰檔案",
"help": "由於作戰檔案缺少維護開荒功能不一定能正常使用如果發現Alas運行異常請手動完成開荒後使用自律尋敵功能"
},
"CoalitionSp": {
"name": "光影風尚-拍攝進行時SP",
"help": ""
},
"EventA": {
"name": "活動每日A圖",
"help": ""
@@ -118,10 +122,6 @@
"name": "共鬥活動每日",
"help": ""
},
"CoalitionSp": {
"name": "光影風尚-拍攝進行時SP",
"help": ""
},
"Commission": {
"name": "委託",
"help": ""
@@ -775,7 +775,6 @@
"raid_20240130": "寰昌宇定家事忙",
"raid_20240328": "從零開始的魔王討伐之旅",
"raid_20250116": "華裳巧展喜事長",
"raid_20260212": "Spring Auction Adventure",
"war_archives_20180607_cn": "檔案 墨染的鋼鐵之花",
"war_archives_20180726_cn": "檔案 光與影的鳶尾之華",
"war_archives_20181020_en": "檔案 努力希望和計劃",
@@ -1274,7 +1273,7 @@
"easy": "簡單",
"normal": "普通",
"hard": "困難",
"ex": "EX"
"ex": "ex"
},
"UseTicket": {
"name": "使用演習券",

View File

@@ -76,7 +76,6 @@ class HpDaemon(ModuleBase):
PAUSE_Ninja,
PAUSE_ShadowPuppetry,
PAUSE_MaidCafe,
PAUSE_Ancient,
]:
self.attacker_hp = self._calculate_hp(image, area=ATTACKER_HP_AREA_New.area, reverse=True)
self.defender_hp = self._calculate_hp(image, area=DEFENDER_HP_AREA_New.area, reverse=True)

View File

@@ -21,6 +21,7 @@ class OpsiVoucher(OSMap):
self._os_voucher_enter()
VoucherShop(self.config, self.device).run()
self._os_voucher_exit()
self.logger_use()
next_reset = get_os_next_reset()
logger.info('OS voucher finished, delay to next reset')

View File

@@ -80,6 +80,7 @@ STRATEGIC_SEARCH_ZONEMODE_REPEAT = Button(area={'cn': (548, 335, 568, 349), 'en'
TEMPLATE_STORAGE_ABYSSAL = Template(file={'cn': './assets/cn/os_handler/TEMPLATE_STORAGE_ABYSSAL.png', 'en': './assets/en/os_handler/TEMPLATE_STORAGE_ABYSSAL.png', 'jp': './assets/jp/os_handler/TEMPLATE_STORAGE_ABYSSAL.png', 'tw': './assets/tw/os_handler/TEMPLATE_STORAGE_ABYSSAL.png'})
TEMPLATE_STORAGE_COMBAT = Template(file={'cn': './assets/cn/os_handler/TEMPLATE_STORAGE_COMBAT.png', 'en': './assets/en/os_handler/TEMPLATE_STORAGE_COMBAT.png', 'jp': './assets/jp/os_handler/TEMPLATE_STORAGE_COMBAT.png', 'tw': './assets/tw/os_handler/TEMPLATE_STORAGE_COMBAT.png'})
TEMPLATE_STORAGE_LOGGER = Template(file={'cn': './assets/cn/os_handler/TEMPLATE_STORAGE_LOGGER.gif', 'en': './assets/en/os_handler/TEMPLATE_STORAGE_LOGGER.gif', 'jp': './assets/jp/os_handler/TEMPLATE_STORAGE_LOGGER.gif', 'tw': './assets/tw/os_handler/TEMPLATE_STORAGE_LOGGER.gif'})
TEMPLATE_STORAGE_LOGGER_UNLOCK = Template(file={'cn': './assets/cn/os_handler/TEMPLATE_STORAGE_LOGGER_UNLOCK.png', 'en': './assets/en/os_handler/TEMPLATE_STORAGE_LOGGER_UNLOCK.png', 'jp': './assets/jp/os_handler/TEMPLATE_STORAGE_LOGGER_UNLOCK.png', 'tw': './assets/tw/os_handler/TEMPLATE_STORAGE_LOGGER_UNLOCK.png'})
TEMPLATE_STORAGE_OBSCURE = Template(file={'cn': './assets/cn/os_handler/TEMPLATE_STORAGE_OBSCURE.png', 'en': './assets/en/os_handler/TEMPLATE_STORAGE_OBSCURE.png', 'jp': './assets/jp/os_handler/TEMPLATE_STORAGE_OBSCURE.png', 'tw': './assets/tw/os_handler/TEMPLATE_STORAGE_OBSCURE.png'})
TEMPLATE_STORAGE_OFFENSE = Template(file={'cn': './assets/cn/os_handler/TEMPLATE_STORAGE_OFFENSE.png', 'en': './assets/en/os_handler/TEMPLATE_STORAGE_OFFENSE.png', 'jp': './assets/jp/os_handler/TEMPLATE_STORAGE_OFFENSE.png', 'tw': './assets/tw/os_handler/TEMPLATE_STORAGE_OFFENSE.png'})
TEMPLATE_STORAGE_QUALITY_COMBAT = Template(file={'cn': './assets/cn/os_handler/TEMPLATE_STORAGE_QUALITY_COMBAT.png', 'en': './assets/en/os_handler/TEMPLATE_STORAGE_QUALITY_COMBAT.png', 'jp': './assets/jp/os_handler/TEMPLATE_STORAGE_QUALITY_COMBAT.png', 'tw': './assets/tw/os_handler/TEMPLATE_STORAGE_QUALITY_COMBAT.png'})

View File

@@ -7,6 +7,7 @@ from module.logger import logger
from module.os.globe_operation import GlobeOperation
from module.os.globe_zone import ZoneManager
from module.os_handler.assets import *
from module.storage.assets import BOX_USE
from module.ui.scroll import Scroll
SCROLL_STORAGE = Scroll(STORATE_SCROLL, color=(247, 211, 66))
@@ -80,6 +81,10 @@ class StorageHandler(GlobeOperation, ZoneManager):
if self.appear_then_click(STORAGE_USE, offset=(180, 30), interval=5):
self.interval_reset(STORAGE_CHECK)
continue
if self.appear_then_click(BOX_USE, offset=(180, 30), interval=5):
self.interval_reset(STORAGE_CHECK)
success = True
continue
if self.appear_then_click(GET_ITEMS_1, interval=5):
self.interval_reset(STORAGE_CHECK)
success = True
@@ -92,6 +97,8 @@ class StorageHandler(GlobeOperation, ZoneManager):
self.device.click(CLICK_SAFE_AREA)
success = True
continue
if self.handle_story_skip():
continue
# Use item
if self.appear(STORAGE_CHECK, offset=(20, 20), interval=5):
self.device.click(button)
@@ -114,6 +121,7 @@ class StorageHandler(GlobeOperation, ZoneManager):
image = rgb2gray(self.device.image)
items = TEMPLATE_STORAGE_LOGGER.match_multi(image, similarity=0.5)
items.extend(TEMPLATE_STORAGE_LOGGER_UNLOCK.match_multi(image, similarity=0.5))
logger.attr('Storage_logger', len(items))
if len(items):
@@ -123,6 +131,12 @@ class StorageHandler(GlobeOperation, ZoneManager):
logger.info('All loggers in storage have been used')
break
def logger_use(self):
logger.hr('Logger use')
self.storage_enter()
self.storage_logger_use_all()
self.storage_quit()
def storage_sample_use_all(self):
"""
Pages:

View File

@@ -17,15 +17,6 @@ BRISTOL_OCR_REMAIN_NORMAL = Button(area={'cn': (1089, 414, 1148, 432), 'en': (10
BRISTOL_RAID_EASY = Button(area={'cn': (1151, 490, 1203, 528), 'en': (1155, 504, 1197, 524), 'jp': (1152, 491, 1203, 528), 'tw': (1151, 490, 1204, 519)}, color={'cn': (141, 164, 177), 'en': (145, 167, 177), 'jp': (126, 151, 166), 'tw': (117, 142, 159)}, button={'cn': (1151, 490, 1203, 528), 'en': (1155, 504, 1197, 524), 'jp': (1152, 491, 1203, 528), 'tw': (1151, 490, 1204, 519)}, file={'cn': './assets/cn/raid/BRISTOL_RAID_EASY.png', 'en': './assets/en/raid/BRISTOL_RAID_EASY.png', 'jp': './assets/jp/raid/BRISTOL_RAID_EASY.png', 'tw': './assets/tw/raid/BRISTOL_RAID_EASY.png'})
BRISTOL_RAID_HARD = Button(area={'cn': (1167, 246, 1220, 285), 'en': (1156, 259, 1231, 278), 'jp': (1159, 250, 1229, 285), 'tw': (1170, 249, 1217, 275)}, color={'cn': (136, 160, 173), 'en': (133, 156, 168), 'jp': (145, 168, 181), 'tw': (100, 126, 145)}, button={'cn': (1167, 246, 1220, 285), 'en': (1156, 259, 1231, 278), 'jp': (1159, 250, 1229, 285), 'tw': (1170, 249, 1217, 275)}, file={'cn': './assets/cn/raid/BRISTOL_RAID_HARD.png', 'en': './assets/en/raid/BRISTOL_RAID_HARD.png', 'jp': './assets/jp/raid/BRISTOL_RAID_HARD.png', 'tw': './assets/tw/raid/BRISTOL_RAID_HARD.png'})
BRISTOL_RAID_NORMAL = Button(area={'cn': (1098, 367, 1150, 404), 'en': (1089, 380, 1158, 396), 'jp': (1099, 368, 1149, 404), 'tw': (1097, 367, 1151, 393)}, color={'cn': (129, 152, 165), 'en': (131, 153, 164), 'jp': (119, 146, 163), 'tw': (121, 144, 159)}, button={'cn': (1098, 367, 1150, 404), 'en': (1089, 380, 1158, 396), 'jp': (1099, 368, 1149, 404), 'tw': (1097, 367, 1151, 393)}, file={'cn': './assets/cn/raid/BRISTOL_RAID_NORMAL.png', 'en': './assets/en/raid/BRISTOL_RAID_NORMAL.png', 'jp': './assets/jp/raid/BRISTOL_RAID_NORMAL.png', 'tw': './assets/tw/raid/BRISTOL_RAID_NORMAL.png'})
CHANGWU_OCR_PT = Button(area={'cn': (1174, 603, 1280, 632), 'en': (1174, 603, 1280, 632), 'jp': (1174, 603, 1280, 632), 'tw': (1174, 603, 1280, 632)}, color={'cn': (183, 118, 101), 'en': (183, 118, 101), 'jp': (183, 118, 101), 'tw': (183, 118, 101)}, button={'cn': (1174, 603, 1280, 632), 'en': (1174, 603, 1280, 632), 'jp': (1174, 603, 1280, 632), 'tw': (1174, 603, 1280, 632)}, file={'cn': './assets/cn/raid/CHANGWU_OCR_PT.png', 'en': './assets/en/raid/CHANGWU_OCR_PT.png', 'jp': './assets/jp/raid/CHANGWU_OCR_PT.png', 'tw': './assets/tw/raid/CHANGWU_OCR_PT.png'})
CHANGWU_OCR_REMAIN_EASY = Button(area={'cn': (1057, 565, 1116, 585), 'en': (1057, 565, 1116, 585), 'jp': (1057, 565, 1116, 585), 'tw': (1057, 565, 1116, 585)}, color={'cn': (96, 83, 81), 'en': (96, 83, 81), 'jp': (96, 83, 81), 'tw': (96, 83, 81)}, button={'cn': (1057, 565, 1116, 585), 'en': (1057, 565, 1116, 585), 'jp': (1057, 565, 1116, 585), 'tw': (1057, 565, 1116, 585)}, file={'cn': './assets/cn/raid/CHANGWU_OCR_REMAIN_EASY.png', 'en': './assets/en/raid/CHANGWU_OCR_REMAIN_EASY.png', 'jp': './assets/jp/raid/CHANGWU_OCR_REMAIN_EASY.png', 'tw': './assets/tw/raid/CHANGWU_OCR_REMAIN_EASY.png'})
CHANGWU_OCR_REMAIN_EX = Button(area={'cn': (1138, 26, 1185, 49), 'en': (1138, 26, 1185, 49), 'jp': (1138, 26, 1185, 49), 'tw': (1138, 26, 1185, 49)}, color={'cn': (213, 128, 103), 'en': (213, 128, 103), 'jp': (213, 128, 103), 'tw': (213, 128, 103)}, button={'cn': (1138, 26, 1185, 49), 'en': (1138, 26, 1185, 49), 'jp': (1138, 26, 1185, 49), 'tw': (1138, 26, 1185, 49)}, file={'cn': './assets/cn/raid/CHANGWU_OCR_REMAIN_EX.png', 'en': './assets/en/raid/CHANGWU_OCR_REMAIN_EX.png', 'jp': './assets/jp/raid/CHANGWU_OCR_REMAIN_EX.png', 'tw': './assets/tw/raid/CHANGWU_OCR_REMAIN_EX.png'})
CHANGWU_OCR_REMAIN_HARD = Button(area={'cn': (1169, 409, 1229, 429), 'en': (1169, 409, 1229, 429), 'jp': (1169, 409, 1229, 429), 'tw': (1169, 409, 1229, 429)}, color={'cn': (100, 86, 82), 'en': (100, 86, 82), 'jp': (100, 86, 82), 'tw': (100, 86, 82)}, button={'cn': (1169, 409, 1229, 429), 'en': (1169, 409, 1229, 429), 'jp': (1169, 409, 1229, 429), 'tw': (1169, 409, 1229, 429)}, file={'cn': './assets/cn/raid/CHANGWU_OCR_REMAIN_HARD.png', 'en': './assets/en/raid/CHANGWU_OCR_REMAIN_HARD.png', 'jp': './assets/jp/raid/CHANGWU_OCR_REMAIN_HARD.png', 'tw': './assets/tw/raid/CHANGWU_OCR_REMAIN_HARD.png'})
CHANGWU_OCR_REMAIN_NORMAL = Button(area={'cn': (1112, 487, 1170, 506), 'en': (1112, 487, 1170, 506), 'jp': (1112, 487, 1170, 506), 'tw': (1112, 487, 1170, 506)}, color={'cn': (100, 87, 84), 'en': (100, 87, 84), 'jp': (100, 87, 84), 'tw': (100, 87, 84)}, button={'cn': (1112, 487, 1170, 506), 'en': (1112, 487, 1170, 506), 'jp': (1112, 487, 1170, 506), 'tw': (1112, 487, 1170, 506)}, file={'cn': './assets/cn/raid/CHANGWU_OCR_REMAIN_NORMAL.png', 'en': './assets/en/raid/CHANGWU_OCR_REMAIN_NORMAL.png', 'jp': './assets/jp/raid/CHANGWU_OCR_REMAIN_NORMAL.png', 'tw': './assets/tw/raid/CHANGWU_OCR_REMAIN_NORMAL.png'})
CHANGWU_RAID_EASY = Button(area={'cn': (976, 559, 1032, 590), 'en': (976, 559, 1032, 590), 'jp': (976, 559, 1032, 590), 'tw': (976, 559, 1032, 590)}, color={'cn': (144, 130, 122), 'en': (144, 130, 122), 'jp': (144, 130, 122), 'tw': (144, 130, 122)}, button={'cn': (976, 559, 1032, 590), 'en': (976, 559, 1032, 590), 'jp': (976, 559, 1032, 590), 'tw': (976, 559, 1032, 590)}, file={'cn': './assets/cn/raid/CHANGWU_RAID_EASY.png', 'en': './assets/en/raid/CHANGWU_RAID_EASY.png', 'jp': './assets/jp/raid/CHANGWU_RAID_EASY.png', 'tw': './assets/tw/raid/CHANGWU_RAID_EASY.png'})
CHANGWU_RAID_EX = Button(area={'cn': (1135, 296, 1209, 331), 'en': (1135, 296, 1209, 331), 'jp': (1135, 296, 1209, 331), 'tw': (1135, 296, 1209, 331)}, color={'cn': (151, 138, 125), 'en': (151, 138, 125), 'jp': (151, 138, 125), 'tw': (151, 138, 125)}, button={'cn': (1135, 296, 1209, 331), 'en': (1135, 296, 1209, 331), 'jp': (1135, 296, 1209, 331), 'tw': (1135, 296, 1209, 331)}, file={'cn': './assets/cn/raid/CHANGWU_RAID_EX.png', 'en': './assets/en/raid/CHANGWU_RAID_EX.png', 'jp': './assets/jp/raid/CHANGWU_RAID_EX.png', 'tw': './assets/tw/raid/CHANGWU_RAID_EX.png'})
CHANGWU_RAID_HARD = Button(area={'cn': (1087, 403, 1146, 433), 'en': (1087, 403, 1146, 433), 'jp': (1087, 403, 1146, 433), 'tw': (1087, 403, 1146, 433)}, color={'cn': (154, 139, 130), 'en': (154, 139, 130), 'jp': (154, 139, 130), 'tw': (154, 139, 130)}, button={'cn': (1087, 403, 1146, 433), 'en': (1087, 403, 1146, 433), 'jp': (1087, 403, 1146, 433), 'tw': (1087, 403, 1146, 433)}, file={'cn': './assets/cn/raid/CHANGWU_RAID_HARD.png', 'en': './assets/en/raid/CHANGWU_RAID_HARD.png', 'jp': './assets/jp/raid/CHANGWU_RAID_HARD.png', 'tw': './assets/tw/raid/CHANGWU_RAID_HARD.png'})
CHANGWU_RAID_NORMAL = Button(area={'cn': (1032, 480, 1091, 511), 'en': (1032, 480, 1091, 511), 'jp': (1032, 480, 1091, 511), 'tw': (1032, 480, 1091, 511)}, color={'cn': (144, 130, 122), 'en': (144, 130, 122), 'jp': (144, 130, 122), 'tw': (144, 130, 122)}, button={'cn': (1032, 480, 1091, 511), 'en': (1032, 480, 1091, 511), 'jp': (1032, 480, 1091, 511), 'tw': (1032, 480, 1091, 511)}, file={'cn': './assets/cn/raid/CHANGWU_RAID_NORMAL.png', 'en': './assets/en/raid/CHANGWU_RAID_NORMAL.png', 'jp': './assets/jp/raid/CHANGWU_RAID_NORMAL.png', 'tw': './assets/tw/raid/CHANGWU_RAID_NORMAL.png'})
CHIENWU_OCR_PT = Button(area={'cn': (1166, 604, 1279, 632), 'en': (1166, 604, 1279, 632), 'jp': (1166, 604, 1279, 632), 'tw': (1166, 604, 1279, 632)}, color={'cn': (126, 40, 47), 'en': (126, 40, 47), 'jp': (126, 40, 47), 'tw': (126, 40, 47)}, button={'cn': (1166, 604, 1279, 632), 'en': (1166, 604, 1279, 632), 'jp': (1166, 604, 1279, 632), 'tw': (1166, 604, 1279, 632)}, file={'cn': './assets/cn/raid/CHIENWU_OCR_PT.png', 'en': './assets/cn/raid/CHIENWU_OCR_PT.png', 'jp': './assets/cn/raid/CHIENWU_OCR_PT.png', 'tw': './assets/cn/raid/CHIENWU_OCR_PT.png'})
CHIENWU_OCR_REMAIN_EASY = Button(area={'cn': (1111, 528, 1163, 549), 'en': (1111, 528, 1163, 549), 'jp': (1111, 528, 1163, 549), 'tw': (1111, 528, 1163, 549)}, color={'cn': (174, 153, 133), 'en': (174, 153, 133), 'jp': (174, 153, 133), 'tw': (174, 153, 133)}, button={'cn': (1111, 528, 1163, 549), 'en': (1111, 528, 1163, 549), 'jp': (1111, 528, 1163, 549), 'tw': (1111, 528, 1163, 549)}, file={'cn': './assets/cn/raid/CHIENWU_OCR_REMAIN_EASY.png', 'en': './assets/cn/raid/CHIENWU_OCR_REMAIN_EASY.png', 'jp': './assets/cn/raid/CHIENWU_OCR_REMAIN_EASY.png', 'tw': './assets/cn/raid/CHIENWU_OCR_REMAIN_EASY.png'})
CHIENWU_OCR_REMAIN_EX = Button(area={'cn': (1086, 16, 1152, 44), 'en': (1086, 16, 1152, 44), 'jp': (1086, 16, 1152, 44), 'tw': (1086, 16, 1152, 44)}, color={'cn': (90, 39, 34), 'en': (90, 39, 34), 'jp': (90, 39, 34), 'tw': (90, 39, 34)}, button={'cn': (1086, 16, 1152, 44), 'en': (1086, 16, 1152, 44), 'jp': (1086, 16, 1152, 44), 'tw': (1086, 16, 1152, 44)}, file={'cn': './assets/cn/raid/CHIENWU_OCR_REMAIN_EX.png', 'en': './assets/cn/raid/CHIENWU_OCR_REMAIN_EX.png', 'jp': './assets/cn/raid/CHIENWU_OCR_REMAIN_EX.png', 'tw': './assets/cn/raid/CHIENWU_OCR_REMAIN_EX.png'})
@@ -77,13 +68,12 @@ KUYBYSHEY_RAID_HARD = Button(area={'cn': (1073, 345, 1125, 371), 'en': (1074, 34
KUYBYSHEY_RAID_NORMAL = Button(area={'cn': (1045, 423, 1097, 451), 'en': (1036, 424, 1099, 449), 'jp': (1048, 427, 1091, 448), 'tw': (1044, 423, 1096, 452)}, color={'cn': (86, 95, 109), 'en': (81, 92, 105), 'jp': (131, 143, 154), 'tw': (86, 95, 109)}, button={'cn': (1045, 423, 1097, 451), 'en': (1036, 424, 1099, 449), 'jp': (1048, 427, 1091, 448), 'tw': (1044, 423, 1096, 452)}, file={'cn': './assets/cn/raid/KUYBYSHEY_RAID_NORMAL.png', 'en': './assets/en/raid/KUYBYSHEY_RAID_NORMAL.png', 'jp': './assets/jp/raid/KUYBYSHEY_RAID_NORMAL.png', 'tw': './assets/tw/raid/KUYBYSHEY_RAID_NORMAL.png'})
RAID_FLEET_PREPARATION = Button(area={'cn': (983, 577, 1181, 638), 'en': (1041, 592, 1121, 631), 'jp': (983, 579, 1180, 635), 'tw': (983, 577, 1181, 638)}, color={'cn': (236, 188, 115), 'en': (236, 184, 117), 'jp': (235, 183, 103), 'tw': (236, 188, 115)}, button={'cn': (983, 577, 1181, 638), 'en': (1041, 592, 1121, 631), 'jp': (983, 579, 1180, 635), 'tw': (983, 577, 1181, 638)}, file={'cn': './assets/cn/raid/RAID_FLEET_PREPARATION.png', 'en': './assets/en/raid/RAID_FLEET_PREPARATION.png', 'jp': './assets/jp/raid/RAID_FLEET_PREPARATION.png', 'tw': './assets/tw/raid/RAID_FLEET_PREPARATION.png'})
RAID_REWARDS = Button(area={'cn': (836, 127, 900, 169), 'en': (836, 127, 900, 169), 'jp': (836, 127, 900, 169), 'tw': (836, 127, 900, 169)}, color={'cn': (217, 103, 98), 'en': (217, 103, 98), 'jp': (217, 103, 98), 'tw': (217, 103, 98)}, button={'cn': (836, 127, 900, 169), 'en': (836, 127, 900, 169), 'jp': (836, 127, 900, 169), 'tw': (836, 127, 900, 169)}, file={'cn': './assets/cn/raid/RAID_REWARDS.png', 'en': './assets/en/raid/RAID_REWARDS.png', 'jp': './assets/jp/raid/RAID_REWARDS.png', 'tw': './assets/tw/raid/RAID_REWARDS.png'})
RPG_BACK = Button(area={'cn': (40, 30, 59, 57), 'en': (40, 30, 59, 57), 'jp': (40, 30, 59, 57), 'tw': (40, 30, 59, 57)}, color={'cn': (154, 127, 105), 'en': (154, 127, 105), 'jp': (154, 127, 105), 'tw': (154, 127, 105)}, button={'cn': (40, 30, 59, 57), 'en': (40, 30, 59, 57), 'jp': (40, 30, 59, 57), 'tw': (40, 30, 59, 57)}, file={'cn': './assets/cn/raid/RPG_BACK.png', 'en': './assets/en/raid/RPG_BACK.png', 'jp': './assets/jp/raid/RPG_BACK.png', 'tw': './assets/tw/raid/RPG_BACK.png'})
RPG_GOTO_STAGE = Button(area={'cn': (55, 495, 80, 520), 'en': (55, 495, 80, 520), 'jp': (55, 495, 80, 520), 'tw': (55, 495, 80, 520)}, color={'cn': (174, 168, 160), 'en': (174, 168, 160), 'jp': (174, 168, 160), 'tw': (174, 168, 160)}, button={'cn': (55, 495, 80, 520), 'en': (55, 495, 80, 520), 'jp': (55, 495, 80, 520), 'tw': (55, 495, 80, 520)}, file={'cn': './assets/cn/raid/RPG_GOTO_STAGE.png', 'en': './assets/en/raid/RPG_GOTO_STAGE.png', 'jp': './assets/jp/raid/RPG_GOTO_STAGE.png', 'tw': './assets/tw/raid/RPG_GOTO_STAGE.png'})
RPG_GOTO_STORY = Button(area={'cn': (59, 491, 84, 516), 'en': (59, 491, 84, 516), 'jp': (59, 491, 84, 516), 'tw': (59, 491, 84, 516)}, color={'cn': (182, 122, 105), 'en': (182, 122, 105), 'jp': (182, 122, 105), 'tw': (182, 122, 105)}, button={'cn': (59, 491, 84, 516), 'en': (59, 491, 84, 516), 'jp': (59, 491, 84, 516), 'tw': (59, 491, 84, 516)}, file={'cn': './assets/cn/raid/RPG_GOTO_STORY.png', 'en': './assets/en/raid/RPG_GOTO_STORY.png', 'jp': './assets/jp/raid/RPG_GOTO_STORY.png', 'tw': './assets/tw/raid/RPG_GOTO_STORY.png'})
RPG_HOME = Button(area={'cn': (1222, 29, 1240, 51), 'en': (1222, 29, 1240, 51), 'jp': (1222, 29, 1240, 51), 'tw': (1222, 29, 1240, 51)}, color={'cn': (197, 181, 158), 'en': (197, 181, 158), 'jp': (197, 181, 158), 'tw': (197, 181, 158)}, button={'cn': (1222, 29, 1240, 51), 'en': (1222, 29, 1240, 51), 'jp': (1222, 29, 1240, 51), 'tw': (1222, 29, 1240, 51)}, file={'cn': './assets/cn/raid/RPG_HOME.png', 'en': './assets/en/raid/RPG_HOME.png', 'jp': './assets/jp/raid/RPG_HOME.png', 'tw': './assets/tw/raid/RPG_HOME.png'})
RPG_LEAVE_CITY = Button(area={'cn': (688, 642, 711, 664), 'en': (688, 642, 711, 664), 'jp': (688, 642, 711, 664), 'tw': (688, 642, 711, 664)}, color={'cn': (158, 130, 109), 'en': (158, 130, 109), 'jp': (158, 130, 109), 'tw': (158, 130, 109)}, button={'cn': (688, 642, 711, 664), 'en': (688, 642, 711, 664), 'jp': (688, 642, 711, 664), 'tw': (688, 642, 711, 664)}, file={'cn': './assets/cn/raid/RPG_LEAVE_CITY.png', 'en': './assets/en/raid/RPG_LEAVE_CITY.png', 'jp': './assets/jp/raid/RPG_LEAVE_CITY.png', 'tw': './assets/tw/raid/RPG_LEAVE_CITY.png'})
RPG_RAID_EASY = Button(area={'cn': (149, 561, 179, 591), 'en': (149, 561, 179, 591), 'jp': (149, 561, 179, 591), 'tw': (149, 561, 179, 591)}, color={'cn': (152, 57, 59), 'en': (152, 57, 59), 'jp': (152, 57, 59), 'tw': (152, 57, 59)}, button={'cn': (149, 561, 179, 591), 'en': (149, 561, 179, 591), 'jp': (149, 561, 179, 591), 'tw': (149, 561, 179, 591)}, file={'cn': './assets/cn/raid/RPG_RAID_EASY.png', 'en': './assets/en/raid/RPG_RAID_EASY.png', 'jp': './assets/jp/raid/RPG_RAID_EASY.png', 'tw': './assets/tw/raid/RPG_RAID_EASY.png'})
RPG_RAID_EX = Button(area={'cn': (979, 223, 999, 258), 'en': (979, 223, 999, 258), 'jp': (979, 223, 999, 258), 'tw': (979, 223, 999, 258)}, color={'cn': (231, 198, 84), 'en': (231, 198, 84), 'jp': (231, 198, 84), 'tw': (231, 198, 84)}, button={'cn': (979, 223, 999, 258), 'en': (979, 223, 999, 258), 'jp': (979, 223, 999, 258), 'tw': (979, 223, 999, 258)}, file={'cn': './assets/cn/raid/RPG_RAID_EX.png', 'en': './assets/en/raid/RPG_RAID_EX.png', 'jp': './assets/jp/raid/RPG_RAID_EX.png', 'tw': './assets/tw/raid/RPG_RAID_EX.png'})
RPG_RAID_EX = Button(area={'cn': (949, 518, 976, 565), 'en': (949, 518, 976, 565), 'jp': (949, 518, 976, 565), 'tw': (949, 518, 976, 565)}, color={'cn': (166, 66, 69), 'en': (166, 66, 69), 'jp': (166, 66, 69), 'tw': (166, 66, 69)}, button={'cn': (949, 518, 976, 565), 'en': (949, 518, 976, 565), 'jp': (949, 518, 976, 565), 'tw': (949, 518, 976, 565)}, file={'cn': './assets/cn/raid/RPG_RAID_EX.png', 'en': './assets/en/raid/RPG_RAID_EX.png', 'jp': './assets/jp/raid/RPG_RAID_EX.png', 'tw': './assets/tw/raid/RPG_RAID_EX.png'})
RPG_RAID_HARD = Button(area={'cn': (475, 108, 505, 138), 'en': (475, 108, 505, 138), 'jp': (475, 108, 505, 138), 'tw': (475, 108, 505, 138)}, color={'cn': (97, 59, 59), 'en': (97, 59, 59), 'jp': (97, 59, 59), 'tw': (97, 59, 59)}, button={'cn': (475, 108, 505, 138), 'en': (475, 108, 505, 138), 'jp': (475, 108, 505, 138), 'tw': (475, 108, 505, 138)}, file={'cn': './assets/cn/raid/RPG_RAID_HARD.png', 'en': './assets/en/raid/RPG_RAID_HARD.png', 'jp': './assets/jp/raid/RPG_RAID_HARD.png', 'tw': './assets/tw/raid/RPG_RAID_HARD.png'})
RPG_RAID_NORMAL = Button(area={'cn': (313, 259, 343, 289), 'en': (313, 259, 343, 289), 'jp': (313, 259, 343, 289), 'tw': (313, 259, 343, 289)}, color={'cn': (147, 61, 62), 'en': (147, 61, 62), 'jp': (147, 61, 62), 'tw': (147, 61, 62)}, button={'cn': (313, 259, 343, 289), 'en': (313, 259, 343, 289), 'jp': (313, 259, 343, 289), 'tw': (313, 259, 343, 289)}, file={'cn': './assets/cn/raid/RPG_RAID_NORMAL.png', 'en': './assets/en/raid/RPG_RAID_NORMAL.png', 'jp': './assets/jp/raid/RPG_RAID_NORMAL.png', 'tw': './assets/tw/raid/RPG_RAID_NORMAL.png'})
RPG_STATUS_POPUP = Button(area={'cn': (1120, 97, 1144, 121), 'en': (1120, 97, 1144, 121), 'jp': (1120, 97, 1144, 121), 'tw': (1120, 97, 1144, 121)}, color={'cn': (158, 165, 176), 'en': (158, 165, 176), 'jp': (158, 165, 176), 'tw': (158, 165, 176)}, button={'cn': (1120, 97, 1144, 121), 'en': (1120, 97, 1144, 121), 'jp': (1120, 97, 1144, 121), 'tw': (1120, 97, 1144, 121)}, file={'cn': './assets/cn/raid/RPG_STATUS_POPUP.png', 'en': './assets/en/raid/RPG_STATUS_POPUP.png', 'jp': './assets/jp/raid/RPG_STATUS_POPUP.png', 'tw': './assets/tw/raid/RPG_STATUS_POPUP.png'})

View File

@@ -2,10 +2,11 @@ import cv2
import numpy as np
import module.config.server as server
from module.base.decorator import run_once
from module.base.timer import Timer
from module.campaign.campaign_event import CampaignEvent
from module.combat.assets import *
from module.exception import ScriptError
from module.exception import OilExhausted, ScriptError
from module.logger import logger
from module.map.map_operation import MapOperation
from module.ocr.ocr import Digit, DigitCounter
@@ -82,8 +83,6 @@ def raid_name_shorten(name):
return "RPG"
elif name == 'raid_20250116':
return 'CHIENWU'
elif name == 'raid_20260212':
return 'CHANGWU'
else:
raise ScriptError(f'Unknown raid name: {name}')
@@ -159,11 +158,6 @@ def raid_ocr(raid, mode):
return Digit(button, letter=(247, 223, 222), threshold=128)
else:
return DigitCounter(button, letter=(0, 0, 0), threshold=128)
elif raid == 'CHANGWU':
if mode == 'ex':
return Digit(button, letter=(255, 239, 215), threshold=128)
else:
return DigitCounter(button, lang='cnocr', letter=(154, 148, 133), threshold=128)
def pt_ocr(raid):
@@ -193,44 +187,9 @@ def pt_ocr(raid):
return HuanChangPtOcr(button, letter=(23, 20, 6), threshold=128)
elif raid == 'CHIENWU':
return Digit(button, letter=(255, 231, 231), threshold=128)
elif raid == 'CHANGWU':
return Digit(button, letter=(255, 239, 215), threshold=128)
class Raid(MapOperation, RaidCombat, CampaignEvent):
@property
def _raid_has_oil_icon(self):
"""
Game devs are too asshole to drop oil display for UI design
https://github.com/LmeSzinc/AzurLaneAutoScript/issues/5214
"""
return False
def triggered_stop_condition(self, oil_check=False, pt_check=False, coin_check=False):
"""
Returns:
bool: If triggered a stop condition.
"""
# Oil limit
if oil_check:
if self.get_oil() < max(500, self.config.StopCondition_OilLimit):
logger.hr('Triggered stop condition: Oil limit')
self.config.task_delay(minute=(120, 240))
return True
# Event limit
if pt_check:
if self.event_pt_limit_triggered():
logger.hr('Triggered stop condition: Event PT limit')
return True
# TaskBalancer
if coin_check:
if self.config.TaskBalancer_Enable and self.triggered_task_balancer():
logger.hr('Triggered stop condition: Coin limit')
self.handle_task_balancer()
return True
return False
def combat_preparation(self, balance_hp=False, emotion_reduce=False, auto='combat_auto', fleet_index=1):
"""
Args:
@@ -240,20 +199,32 @@ class Raid(MapOperation, RaidCombat, CampaignEvent):
fleet_index (int):
"""
logger.info('Combat preparation.')
skip_first_screenshot = True
# No need, already waited in `raid_execute_once()`
# if emotion_reduce:
# self.emotion.wait(fleet_index)
checked = False
@run_once
def check_oil():
if self.get_oil() < max(500, self.config.StopCondition_OilLimit):
logger.hr('Triggered oil limit')
raise OilExhausted
@run_once
def check_coin():
if self.config.TaskBalancer_Enable and self.triggered_task_balancer():
logger.hr('Triggered stop condition: Coin limit')
self.handle_task_balancer()
return True
for _ in self.loop():
if self.appear(BATTLE_PREPARATION, offset=(30, 20)):
if self.handle_combat_automation_set(auto=auto == 'combat_auto'):
continue
if not checked and self._raid_has_oil_icon:
checked = True
if self.triggered_stop_condition(oil_check=True, coin_check=True):
self.config.task_stop()
check_oil()
check_coin()
if self.handle_raid_ticket_use():
continue
if self.handle_retirement():
@@ -310,7 +281,7 @@ class Raid(MapOperation, RaidCombat, CampaignEvent):
if self.appear(entrance, offset=(10, 10), interval=5):
# Items appear from right
# Check PT when entrance appear
if self.triggered_stop_condition(pt_check=True):
if self.event_pt_limit_triggered():
self.config.task_stop()
self.device.click(entrance)
continue

View File

@@ -1,17 +1,17 @@
from module.base.timer import Timer
from module.campaign.campaign_event import CampaignEvent
from module.exception import ScriptEnd, ScriptError
from module.exception import OilExhausted, ScriptEnd, ScriptError
from module.logger import logger
from module.raid.assets import RAID_REWARDS
from module.raid.raid import Raid, raid_ocr
from module.ui.page import page_campaign_menu, page_raid, page_rpg_stage
from module.ui.page import page_raid, page_rpg_stage
class RaidRun(Raid, CampaignEvent):
run_count: int
run_limit: int
def triggered_stop_condition(self, oil_check=False, pt_check=False, coin_check=False):
def triggered_stop_condition(self):
"""
Returns:
bool: If triggered a stop condition.
@@ -23,7 +23,7 @@ class RaidRun(Raid, CampaignEvent):
self.config.Scheduler_Enable = False
return True
return super().triggered_stop_condition(oil_check=oil_check, pt_check=pt_check, coin_check=coin_check)
return False
def get_remain(self, mode, skip_first_screenshot=True):
"""
@@ -93,11 +93,9 @@ class RaidRun(Raid, CampaignEvent):
else:
logger.info(f'Count: {self.run_count}')
# UI switches
if not self._raid_has_oil_icon:
self.ui_goto(page_campaign_menu)
if self.triggered_stop_condition(oil_check=True, coin_check=True):
break
# End
if self.triggered_stop_condition():
break
# UI ensure
self.device.stuck_record_clear()
@@ -110,7 +108,7 @@ class RaidRun(Raid, CampaignEvent):
self.disable_event_on_raid()
# End for mode EX
if mode == 'ex' and not self.is_raid_rpg():
if mode == 'ex':
if not self.get_remain(mode):
logger.info('Triggered stop condition: Zero '
'raid tickets to do EX mode')
@@ -125,6 +123,10 @@ class RaidRun(Raid, CampaignEvent):
self.device.click_record_clear()
try:
self.raid_execute_once(mode=mode, raid=name)
except OilExhausted:
logger.hr('Triggered stop condition: Oil limit')
self.config.task_delay(minute=(120, 240))
break
except ScriptEnd as e:
logger.hr('Script end')
logger.info(str(e))

View File

@@ -215,16 +215,10 @@ page_main.link(button=MAIN_GOTO_EVENT_LIST, destination=page_event_list)
page_main_white.link(button=MAIN_GOTO_EVENT_LIST_WHITE, destination=page_event_list)
# Raid
# before
# page_raid = Page(RAID_CHECK)
# page_raid.link(button=GOTO_MAIN, destination=page_main)
# page_main.link(button=MAIN_GOTO_RAID, destination=page_raid)
# page_main_white.link(button=MAIN_GOTO_RAID_WHITE, destination=page_raid)
# after 2026.02.12
page_raid = Page(RAID_CHECK)
page_raid.link(button=GOTO_MAIN, destination=page_main)
page_raid.link(button=BACK_ARROW, destination=page_campaign_menu)
page_campaign_menu.link(button=CAMPAIGN_MENU_GOTO_EVENT, destination=page_raid)
page_main.link(button=MAIN_GOTO_RAID, destination=page_raid)
page_main_white.link(button=MAIN_GOTO_RAID_WHITE, destination=page_raid)
# Dock
page_dock = Page(DOCK_CHECK)
@@ -334,10 +328,8 @@ page_rpg_stage = Page(RPG_GOTO_STORY)
page_rpg_story = Page(RPG_GOTO_STAGE)
page_rpg_stage.link(button=RPG_GOTO_STORY, destination=page_rpg_story)
page_rpg_stage.link(button=RPG_HOME, destination=page_main)
page_rpg_stage.link(button=RPG_BACK, destination=page_campaign_menu)
page_rpg_story.link(button=RPG_GOTO_STAGE, destination=page_rpg_stage)
page_rpg_story.link(button=RPG_HOME, destination=page_main)
page_rpg_story.link(button=RPG_BACK, destination=page_campaign_menu)
page_campaign_menu.link(button=CAMPAIGN_MENU_GOTO_EVENT, destination=page_rpg_stage)
# page_main.link(button=MAIN_GOTO_RAID, destination=page_rpg_stage)

View File

@@ -560,10 +560,10 @@ class UI(InfoHandler):
# return True
# Neon city (coalition_20250626)
# FASHION (coalition_20260122) reuse NEONCITY
# if self.appear(NEONCITY_FLEET_PREPARATION, offset=(20, 20), interval=3):
# logger.info(f'{NEONCITY_FLEET_PREPARATION} -> {NEONCITY_PREPARATION_EXIT}')
# self.device.click(NEONCITY_PREPARATION_EXIT)
# return True
if self.appear(NEONCITY_FLEET_PREPARATION, offset=(20, 20), interval=3):
logger.info(f'{NEONCITY_FLEET_PREPARATION} -> {NEONCITY_PREPARATION_EXIT}')
self.device.click(NEONCITY_PREPARATION_EXIT)
return True
# DATE A LANE (coalition_20251120)
# if self.appear_then_click(DAL_DIFFICULTY_EXIT, offset=(20, 20), interval=3):
# return True

View File

@@ -30,7 +30,7 @@ TEMPLATE_NORTHERN_OVERTURE = Template(file={'cn': './assets/cn/war_archives/TEMP
TEMPLATE_PARALLEL_SUPERIMPOSITION = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_PARALLEL_SUPERIMPOSITION.png', 'en': './assets/cn/war_archives/TEMPLATE_PARALLEL_SUPERIMPOSITION.png', 'jp': './assets/cn/war_archives/TEMPLATE_PARALLEL_SUPERIMPOSITION.png', 'tw': './assets/cn/war_archives/TEMPLATE_PARALLEL_SUPERIMPOSITION.png'})
TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT.png', 'en': './assets/cn/war_archives/TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT.png', 'jp': './assets/cn/war_archives/TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT.png', 'tw': './assets/cn/war_archives/TEMPLATE_PLEDGE_OF_THE_RADIANT_COURT.png'})
TEMPLATE_PRELUDE_UNDER_THE_MOON = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_PRELUDE_UNDER_THE_MOON.png', 'en': './assets/cn/war_archives/TEMPLATE_PRELUDE_UNDER_THE_MOON.png', 'jp': './assets/cn/war_archives/TEMPLATE_PRELUDE_UNDER_THE_MOON.png', 'tw': './assets/cn/war_archives/TEMPLATE_PRELUDE_UNDER_THE_MOON.png'})
TEMPLATE_REVELATIONS_OF_DUST = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_REVELATIONS_OF_DUST.png', 'en': './assets/en/war_archives/TEMPLATE_REVELATIONS_OF_DUST.png', 'jp': './assets/cn/war_archives/TEMPLATE_REVELATIONS_OF_DUST.png', 'tw': './assets/cn/war_archives/TEMPLATE_REVELATIONS_OF_DUST.png'})
TEMPLATE_REVELATIONS_OF_DUST = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_REVELATIONS_OF_DUST.png', 'en': './assets/cn/war_archives/TEMPLATE_REVELATIONS_OF_DUST.png', 'jp': './assets/cn/war_archives/TEMPLATE_REVELATIONS_OF_DUST.png', 'tw': './assets/cn/war_archives/TEMPLATE_REVELATIONS_OF_DUST.png'})
TEMPLATE_RONDO_AT_RAINBOWS_END = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_RONDO_AT_RAINBOWS_END.png', 'en': './assets/en/war_archives/TEMPLATE_RONDO_AT_RAINBOWS_END.png', 'jp': './assets/cn/war_archives/TEMPLATE_RONDO_AT_RAINBOWS_END.png', 'tw': './assets/cn/war_archives/TEMPLATE_RONDO_AT_RAINBOWS_END.png'})
TEMPLATE_SCHERZO_OF_IRON_AND_BLOOD = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_SCHERZO_OF_IRON_AND_BLOOD.png', 'en': './assets/en/war_archives/TEMPLATE_SCHERZO_OF_IRON_AND_BLOOD.png', 'jp': './assets/cn/war_archives/TEMPLATE_SCHERZO_OF_IRON_AND_BLOOD.png', 'tw': './assets/cn/war_archives/TEMPLATE_SCHERZO_OF_IRON_AND_BLOOD.png'})
TEMPLATE_SKYBOUND_ORATORIO = Template(file={'cn': './assets/cn/war_archives/TEMPLATE_SKYBOUND_ORATORIO.png', 'en': './assets/en/war_archives/TEMPLATE_SKYBOUND_ORATORIO.png', 'jp': './assets/cn/war_archives/TEMPLATE_SKYBOUND_ORATORIO.png', 'tw': './assets/cn/war_archives/TEMPLATE_SKYBOUND_ORATORIO.png'})