1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-04-08 04:41:45 +08:00

Merge branch 'LmeSzinc:bug_fix' into bug_fix

This commit is contained in:
Alexan-ded
2023-03-10 00:06:45 +03:00
committed by GitHub
19 changed files with 314 additions and 120 deletions

View File

@@ -133,3 +133,5 @@ To add a new event, add a new row in here, and run `python -m module.config.conf
| 20230202 | event 20200806 cn | The Enigma and the Shark | - | - | - | 復刻最重要的寶物 | | 20230202 | event 20200806 cn | The Enigma and the Shark | - | - | - | 復刻最重要的寶物 |
| 20230216 | event 20220224 cn | Abyssal Refrain | - | - | - | 深度回音 | | 20230216 | event 20220224 cn | Abyssal Refrain | - | - | - | 深度回音 |
| 20230223 | event 20230223 cn | Revelations of Dust | 湮烬尘墟 | Revelations of Dust | 黙示の遺構 | - | | 20230223 | event 20230223 cn | Revelations of Dust | 湮烬尘墟 | Revelations of Dust | 黙示の遺構 | - |
| 20230309 | event 20210624 cn | Swirling Cherry Blossoms | - | - | - | 復刻-浮櫻影華
| 20230309 | event 20210422 cn | Daedalian Hymn | 复刻复兴的赞美诗 | Daedalian Hymn Rerun | 讃える復興の迷路(復刻) | - |

View File

@@ -53,6 +53,19 @@ class Config:
MAP_HAS_AMBUSH = False MAP_HAS_AMBUSH = False
# ===== End of generated config ===== # ===== End of generated config =====
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 33),
'width': (0.9, 10),
'prominence': 10,
'distance': 35,
}
EDGE_LINES_FIND_PEAKS_PARAMETERS = {
'height': (255 - 33, 255),
'prominence': 10,
'distance': 50,
# 'width': (0, 7),
'wlen': 1000
}
MAP_SWIPE_MULTIPLY = 1.676 MAP_SWIPE_MULTIPLY = 1.676
MAP_SWIPE_MULTIPLY_MINITOUCH = 1.621 MAP_SWIPE_MULTIPLY_MINITOUCH = 1.621
MAP_ENEMY_GENRE_DETECTION_SCALING = { MAP_ENEMY_GENRE_DETECTION_SCALING = {

View File

@@ -58,6 +58,19 @@ class Config:
MAP_HAS_AMBUSH = False MAP_HAS_AMBUSH = False
# ===== End of generated config ===== # ===== End of generated config =====
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 33),
'width': (0.9, 10),
'prominence': 10,
'distance': 35,
}
EDGE_LINES_FIND_PEAKS_PARAMETERS = {
'height': (255 - 33, 255),
'prominence': 10,
'distance': 50,
# 'width': (0, 7),
'wlen': 1000
}
MAP_HAS_MAZE = True MAP_HAS_MAZE = True
MAP_SWIPE_MULTIPLY = 1.844 MAP_SWIPE_MULTIPLY = 1.844
MAP_SWIPE_MULTIPLY_MINITOUCH = 1.783 MAP_SWIPE_MULTIPLY_MINITOUCH = 1.783

View File

@@ -152,14 +152,18 @@
"MaaInfrast": { "MaaInfrast": {
"Facility": "Mfg > Trade > Power > Control > Reception > Office > Dorm", "Facility": "Mfg > Trade > Power > Control > Reception > Office > Dorm",
"Drones": "Money", "Drones": "Money",
"Threshold": 0.3, "WorkThreshold": 12,
"ShiftThreshold": 4,
"Notstationed": true, "Notstationed": true,
"Trust": true, "Trust": true,
"Replenish": false "Replenish": false
}, },
"MaaCustomInfrast": { "MaaCustomInfrast": {
"Enable": false, "Enable": false,
"Filename": null "BuiltinConfig": "custom",
"Filename": null,
"CustomPeriod": "16, 4, 4",
"PlanIndex": 0
}, },
"Storage": { "Storage": {
"Storage": {} "Storage": {}
@@ -178,8 +182,8 @@
"CreditFight": false, "CreditFight": false,
"Shopping": true, "Shopping": true,
"ForceShoppingIfCreditFull": false, "ForceShoppingIfCreditFull": false,
"BuyFirst": "招聘许可 > 龙门币", "BuyFirst": "招聘许可",
"BlackList": "碳 > 家具" "BlackList": "碳 > 家具 > 加急许可"
}, },
"Storage": { "Storage": {
"Storage": {} "Storage": {}

View File

@@ -1599,6 +1599,8 @@
"value": "campaign_main", "value": "campaign_main",
"option": [ "option": [
"campaign_main", "campaign_main",
"event_20210422_cn",
"event_20210624_cn",
"event_20230223_cn", "event_20230223_cn",
"event_20220224_cn", "event_20220224_cn",
"event_20200806_cn", "event_20200806_cn",
@@ -1627,7 +1629,6 @@
"event_20220428_cn", "event_20220428_cn",
"event_20220414_cn", "event_20220414_cn",
"event_20220407_tw", "event_20220407_tw",
"event_20210422_cn",
"event_20220310_tw", "event_20220310_tw",
"event_20200603_cn", "event_20200603_cn",
"event_20220210_cn", "event_20220210_cn",
@@ -1636,7 +1637,6 @@
"event_20210722_cn", "event_20210722_cn",
"event_20210819_cn", "event_20210819_cn",
"event_20200723_cn", "event_20200723_cn",
"event_20210624_cn",
"event_20210624_tw", "event_20210624_tw",
"event_20210527_tw", "event_20210527_tw",
"event_20210429_tw", "event_20210429_tw",
@@ -1656,10 +1656,10 @@
"event_20200227_cn" "event_20200227_cn"
], ],
"display": "hide", "display": "hide",
"cn": "event_20230223_cn", "cn": "event_20210422_cn",
"en": "event_20230223_cn", "en": "event_20210422_cn",
"jp": "event_20230223_cn", "jp": "event_20210422_cn",
"tw": "event_20220224_cn" "tw": "event_20210624_cn"
}, },
"Mode": { "Mode": {
"type": "select", "type": "select",
@@ -2319,6 +2319,8 @@
"type": "select", "type": "select",
"value": "campaign_main", "value": "campaign_main",
"option": [ "option": [
"event_20210422_cn",
"event_20210624_cn",
"event_20230223_cn", "event_20230223_cn",
"event_20220224_cn", "event_20220224_cn",
"event_20200806_cn", "event_20200806_cn",
@@ -2347,7 +2349,6 @@
"event_20220428_cn", "event_20220428_cn",
"event_20220414_cn", "event_20220414_cn",
"event_20220407_tw", "event_20220407_tw",
"event_20210422_cn",
"event_20220310_tw", "event_20220310_tw",
"event_20200603_cn", "event_20200603_cn",
"event_20220210_cn", "event_20220210_cn",
@@ -2356,7 +2357,6 @@
"event_20210722_cn", "event_20210722_cn",
"event_20210819_cn", "event_20210819_cn",
"event_20200723_cn", "event_20200723_cn",
"event_20210624_cn",
"event_20210624_tw", "event_20210624_tw",
"event_20210527_tw", "event_20210527_tw",
"event_20210429_tw", "event_20210429_tw",
@@ -2376,10 +2376,10 @@
"event_20200227_cn" "event_20200227_cn"
], ],
"display": "disabled", "display": "disabled",
"cn": "event_20230223_cn", "cn": "event_20210422_cn",
"en": "event_20230223_cn", "en": "event_20210422_cn",
"jp": "event_20230223_cn", "jp": "event_20210422_cn",
"tw": "event_20220224_cn" "tw": "event_20210624_cn"
}, },
"Mode": { "Mode": {
"type": "select", "type": "select",
@@ -2752,6 +2752,8 @@
"type": "select", "type": "select",
"value": "campaign_main", "value": "campaign_main",
"option": [ "option": [
"event_20210422_cn",
"event_20210624_cn",
"event_20230223_cn", "event_20230223_cn",
"event_20220224_cn", "event_20220224_cn",
"event_20200806_cn", "event_20200806_cn",
@@ -2780,7 +2782,6 @@
"event_20220428_cn", "event_20220428_cn",
"event_20220414_cn", "event_20220414_cn",
"event_20220407_tw", "event_20220407_tw",
"event_20210422_cn",
"event_20220310_tw", "event_20220310_tw",
"event_20200603_cn", "event_20200603_cn",
"event_20220210_cn", "event_20220210_cn",
@@ -2789,7 +2790,6 @@
"event_20210722_cn", "event_20210722_cn",
"event_20210819_cn", "event_20210819_cn",
"event_20200723_cn", "event_20200723_cn",
"event_20210624_cn",
"event_20210624_tw", "event_20210624_tw",
"event_20210527_tw", "event_20210527_tw",
"event_20210429_tw", "event_20210429_tw",
@@ -2809,10 +2809,10 @@
"event_20200227_cn" "event_20200227_cn"
], ],
"display": "disabled", "display": "disabled",
"cn": "event_20230223_cn", "cn": "event_20210422_cn",
"en": "event_20230223_cn", "en": "event_20210422_cn",
"jp": "event_20230223_cn", "jp": "event_20210422_cn",
"tw": "event_20220224_cn" "tw": "event_20210624_cn"
}, },
"Mode": { "Mode": {
"type": "select", "type": "select",
@@ -3196,6 +3196,8 @@
"type": "select", "type": "select",
"value": "campaign_main", "value": "campaign_main",
"option": [ "option": [
"event_20210422_cn",
"event_20210624_cn",
"event_20230223_cn", "event_20230223_cn",
"event_20220224_cn", "event_20220224_cn",
"event_20200806_cn", "event_20200806_cn",
@@ -3224,7 +3226,6 @@
"event_20220428_cn", "event_20220428_cn",
"event_20220414_cn", "event_20220414_cn",
"event_20220407_tw", "event_20220407_tw",
"event_20210422_cn",
"event_20220310_tw", "event_20220310_tw",
"event_20200603_cn", "event_20200603_cn",
"event_20220210_cn", "event_20220210_cn",
@@ -3233,7 +3234,6 @@
"event_20210722_cn", "event_20210722_cn",
"event_20210819_cn", "event_20210819_cn",
"event_20200723_cn", "event_20200723_cn",
"event_20210624_cn",
"event_20210624_tw", "event_20210624_tw",
"event_20210527_tw", "event_20210527_tw",
"event_20210429_tw", "event_20210429_tw",
@@ -3253,10 +3253,10 @@
"event_20200227_cn" "event_20200227_cn"
], ],
"display": "disabled", "display": "disabled",
"cn": "event_20230223_cn", "cn": "event_20210422_cn",
"en": "event_20230223_cn", "en": "event_20210422_cn",
"jp": "event_20230223_cn", "jp": "event_20210422_cn",
"tw": "event_20220224_cn" "tw": "event_20210624_cn"
}, },
"Mode": { "Mode": {
"type": "select", "type": "select",
@@ -3646,6 +3646,8 @@
"type": "select", "type": "select",
"value": "campaign_main", "value": "campaign_main",
"option": [ "option": [
"event_20210422_cn",
"event_20210624_cn",
"event_20230223_cn", "event_20230223_cn",
"event_20220224_cn", "event_20220224_cn",
"event_20200806_cn", "event_20200806_cn",
@@ -3674,7 +3676,6 @@
"event_20220428_cn", "event_20220428_cn",
"event_20220414_cn", "event_20220414_cn",
"event_20220407_tw", "event_20220407_tw",
"event_20210422_cn",
"event_20220310_tw", "event_20220310_tw",
"event_20200603_cn", "event_20200603_cn",
"event_20220210_cn", "event_20220210_cn",
@@ -3683,7 +3684,6 @@
"event_20210722_cn", "event_20210722_cn",
"event_20210819_cn", "event_20210819_cn",
"event_20200723_cn", "event_20200723_cn",
"event_20210624_cn",
"event_20210624_tw", "event_20210624_tw",
"event_20210527_tw", "event_20210527_tw",
"event_20210429_tw", "event_20210429_tw",
@@ -3703,10 +3703,10 @@
"event_20200227_cn" "event_20200227_cn"
], ],
"display": "disabled", "display": "disabled",
"cn": "event_20230223_cn", "cn": "event_20210422_cn",
"en": "event_20230223_cn", "en": "event_20210422_cn",
"jp": "event_20230223_cn", "jp": "event_20210422_cn",
"tw": "event_20220224_cn" "tw": "event_20210624_cn"
}, },
"Mode": { "Mode": {
"type": "select", "type": "select",
@@ -4096,6 +4096,8 @@
"type": "select", "type": "select",
"value": "campaign_main", "value": "campaign_main",
"option": [ "option": [
"event_20210422_cn",
"event_20210624_cn",
"event_20230223_cn", "event_20230223_cn",
"event_20220224_cn", "event_20220224_cn",
"event_20200806_cn", "event_20200806_cn",
@@ -4124,7 +4126,6 @@
"event_20220428_cn", "event_20220428_cn",
"event_20220414_cn", "event_20220414_cn",
"event_20220407_tw", "event_20220407_tw",
"event_20210422_cn",
"event_20220310_tw", "event_20220310_tw",
"event_20200603_cn", "event_20200603_cn",
"event_20220210_cn", "event_20220210_cn",
@@ -4133,7 +4134,6 @@
"event_20210722_cn", "event_20210722_cn",
"event_20210819_cn", "event_20210819_cn",
"event_20200723_cn", "event_20200723_cn",
"event_20210624_cn",
"event_20210624_tw", "event_20210624_tw",
"event_20210527_tw", "event_20210527_tw",
"event_20210429_tw", "event_20210429_tw",
@@ -4153,10 +4153,10 @@
"event_20200227_cn" "event_20200227_cn"
], ],
"display": "disabled", "display": "disabled",
"cn": "event_20230223_cn", "cn": "event_20210422_cn",
"en": "event_20230223_cn", "en": "event_20210422_cn",
"jp": "event_20230223_cn", "jp": "event_20210422_cn",
"tw": "event_20220224_cn" "tw": "event_20210624_cn"
}, },
"Mode": { "Mode": {
"type": "select", "type": "select",
@@ -4546,6 +4546,8 @@
"type": "select", "type": "select",
"value": "campaign_main", "value": "campaign_main",
"option": [ "option": [
"event_20210422_cn",
"event_20210624_cn",
"event_20230223_cn", "event_20230223_cn",
"event_20220224_cn", "event_20220224_cn",
"event_20200806_cn", "event_20200806_cn",
@@ -4574,7 +4576,6 @@
"event_20220428_cn", "event_20220428_cn",
"event_20220414_cn", "event_20220414_cn",
"event_20220407_tw", "event_20220407_tw",
"event_20210422_cn",
"event_20220310_tw", "event_20220310_tw",
"event_20200603_cn", "event_20200603_cn",
"event_20220210_cn", "event_20220210_cn",
@@ -4583,7 +4584,6 @@
"event_20210722_cn", "event_20210722_cn",
"event_20210819_cn", "event_20210819_cn",
"event_20200723_cn", "event_20200723_cn",
"event_20210624_cn",
"event_20210624_tw", "event_20210624_tw",
"event_20210527_tw", "event_20210527_tw",
"event_20210429_tw", "event_20210429_tw",
@@ -4603,10 +4603,10 @@
"event_20200227_cn" "event_20200227_cn"
], ],
"display": "disabled", "display": "disabled",
"cn": "event_20230223_cn", "cn": "event_20210422_cn",
"en": "event_20230223_cn", "en": "event_20210422_cn",
"jp": "event_20230223_cn", "jp": "event_20210422_cn",
"tw": "event_20220224_cn" "tw": "event_20210624_cn"
}, },
"Mode": { "Mode": {
"type": "select", "type": "select",
@@ -4986,6 +4986,8 @@
"type": "select", "type": "select",
"value": "campaign_main", "value": "campaign_main",
"option": [ "option": [
"event_20210422_cn",
"event_20210624_cn",
"event_20230223_cn", "event_20230223_cn",
"event_20220224_cn", "event_20220224_cn",
"event_20200806_cn", "event_20200806_cn",
@@ -5014,7 +5016,6 @@
"event_20220428_cn", "event_20220428_cn",
"event_20220414_cn", "event_20220414_cn",
"event_20220407_tw", "event_20220407_tw",
"event_20210422_cn",
"event_20220310_tw", "event_20220310_tw",
"event_20200603_cn", "event_20200603_cn",
"event_20220210_cn", "event_20220210_cn",
@@ -5023,7 +5024,6 @@
"event_20210722_cn", "event_20210722_cn",
"event_20210819_cn", "event_20210819_cn",
"event_20200723_cn", "event_20200723_cn",
"event_20210624_cn",
"event_20210624_tw", "event_20210624_tw",
"event_20210527_tw", "event_20210527_tw",
"event_20210429_tw", "event_20210429_tw",
@@ -5043,10 +5043,10 @@
"event_20200227_cn" "event_20200227_cn"
], ],
"display": "disabled", "display": "disabled",
"cn": "event_20230223_cn", "cn": "event_20210422_cn",
"en": "event_20230223_cn", "en": "event_20210422_cn",
"jp": "event_20230223_cn", "jp": "event_20210422_cn",
"tw": "event_20220224_cn" "tw": "event_20210624_cn"
}, },
"Mode": { "Mode": {
"type": "select", "type": "select",

View File

@@ -639,6 +639,8 @@
"name": "Event Name", "name": "Event Name",
"help": "Automatically selects to the latest event", "help": "Automatically selects to the latest event",
"campaign_main": "campaign_main", "campaign_main": "campaign_main",
"event_20210422_cn": "Daedalian Hymn Rerun",
"event_20210624_cn": "Swirling Cherry Blossoms Rerun",
"event_20230223_cn": "Revelations of Dust", "event_20230223_cn": "Revelations of Dust",
"event_20220224_cn": "Abyssal Refrain", "event_20220224_cn": "Abyssal Refrain",
"event_20200806_cn": "The Enigma and the Shark Rerun", "event_20200806_cn": "The Enigma and the Shark Rerun",
@@ -673,7 +675,6 @@
"event_20220428_cn": "Rondo at Rainbows End", "event_20220428_cn": "Rondo at Rainbows End",
"event_20220414_cn": "Aurora Noctis Rerun", "event_20220414_cn": "Aurora Noctis Rerun",
"event_20220407_tw": "蒼紅的迴響(復刻)", "event_20220407_tw": "蒼紅的迴響(復刻)",
"event_20210422_cn": "Daedalian Hymn",
"event_20220310_tw": "復刻斯圖爾特的硝煙", "event_20220310_tw": "復刻斯圖爾特的硝煙",
"event_20200603_cn": "Counterattack Within the Fjord Rerun", "event_20200603_cn": "Counterattack Within the Fjord Rerun",
"event_20220210_cn": "Northern Overture Rerun", "event_20220210_cn": "Northern Overture Rerun",
@@ -682,7 +683,6 @@
"event_20210722_cn": "Azur Anthem", "event_20210722_cn": "Azur Anthem",
"event_20210819_cn": "Microlayer Medley Rerun", "event_20210819_cn": "Microlayer Medley Rerun",
"event_20200723_cn": "Aurora Noctis", "event_20200723_cn": "Aurora Noctis",
"event_20210624_cn": "Swirling Cherry Blossoms Rerun",
"event_20210624_tw": "穹頂下的聖詠曲", "event_20210624_tw": "穹頂下的聖詠曲",
"event_20210527_tw": "微層混合", "event_20210527_tw": "微層混合",
"event_20210429_tw": "復刻墨染的鋼鐵之花", "event_20210429_tw": "復刻墨染的鋼鐵之花",

View File

@@ -639,6 +639,8 @@
"name": "Campaign.Event.name", "name": "Campaign.Event.name",
"help": "Campaign.Event.help", "help": "Campaign.Event.help",
"campaign_main": "campaign_main", "campaign_main": "campaign_main",
"event_20210422_cn": "讃える復興の迷路(復刻)",
"event_20210624_cn": "翳りし満ちる影の華(復刻)",
"event_20230223_cn": "黙示の遺構", "event_20230223_cn": "黙示の遺構",
"event_20220224_cn": "鳴動せし星霜の淵", "event_20220224_cn": "鳴動せし星霜の淵",
"event_20200806_cn": "鉄血鮫とエニグマ(復刻)", "event_20200806_cn": "鉄血鮫とエニグマ(復刻)",
@@ -673,7 +675,6 @@
"event_20220428_cn": "吟ずる瑠璃の楽章", "event_20220428_cn": "吟ずる瑠璃の楽章",
"event_20220414_cn": "極夜照らす幻光(復刻)", "event_20220414_cn": "極夜照らす幻光(復刻)",
"event_20220407_tw": "蒼紅的迴響(復刻)", "event_20220407_tw": "蒼紅的迴響(復刻)",
"event_20210422_cn": "讃える復興の迷路",
"event_20220310_tw": "復刻斯圖爾特的硝煙", "event_20220310_tw": "復刻斯圖爾特的硝煙",
"event_20200603_cn": "峡湾間の反撃(復刻)", "event_20200603_cn": "峡湾間の反撃(復刻)",
"event_20220210_cn": "凍絶の北海(復刻)", "event_20220210_cn": "凍絶の北海(復刻)",
@@ -682,7 +683,6 @@
"event_20210722_cn": "海に響くアイドルの歌", "event_20210722_cn": "海に響くアイドルの歌",
"event_20210819_cn": "闇靄払う銀翼(復刻)", "event_20210819_cn": "闇靄払う銀翼(復刻)",
"event_20200723_cn": "極夜照らす幻光", "event_20200723_cn": "極夜照らす幻光",
"event_20210624_cn": "翳りし満ちる影の華(復刻)",
"event_20210624_tw": "穹頂下的聖詠曲", "event_20210624_tw": "穹頂下的聖詠曲",
"event_20210527_tw": "微層混合", "event_20210527_tw": "微層混合",
"event_20210429_tw": "復刻墨染的鋼鐵之花", "event_20210429_tw": "復刻墨染的鋼鐵之花",

View File

@@ -639,6 +639,8 @@
"name": "活动名称", "name": "活动名称",
"help": "自动选择至最新的活动", "help": "自动选择至最新的活动",
"campaign_main": "主线图", "campaign_main": "主线图",
"event_20210422_cn": "复刻复兴的赞美诗",
"event_20210624_cn": "复刻浮樱影华",
"event_20230223_cn": "湮烬尘墟", "event_20230223_cn": "湮烬尘墟",
"event_20220224_cn": "深度回音", "event_20220224_cn": "深度回音",
"event_20200806_cn": "复刻最重要的宝物", "event_20200806_cn": "复刻最重要的宝物",
@@ -673,7 +675,6 @@
"event_20220428_cn": "虹彩的终幕曲", "event_20220428_cn": "虹彩的终幕曲",
"event_20220414_cn": "复刻永夜幻光", "event_20220414_cn": "复刻永夜幻光",
"event_20220407_tw": "蒼紅的迴響(復刻)", "event_20220407_tw": "蒼紅的迴響(復刻)",
"event_20210422_cn": "复兴的赞美诗",
"event_20220310_tw": "復刻斯圖爾特的硝煙", "event_20220310_tw": "復刻斯圖爾特的硝煙",
"event_20200603_cn": "复刻峡湾间的反击", "event_20200603_cn": "复刻峡湾间的反击",
"event_20220210_cn": "复刻北境序曲", "event_20220210_cn": "复刻北境序曲",
@@ -682,7 +683,6 @@
"event_20210722_cn": "响彻碧海的偶像歌", "event_20210722_cn": "响彻碧海的偶像歌",
"event_20210819_cn": "复刻微层混合", "event_20210819_cn": "复刻微层混合",
"event_20200723_cn": "永夜幻光", "event_20200723_cn": "永夜幻光",
"event_20210624_cn": "复刻浮樱影华",
"event_20210624_tw": "穹頂下的聖詠曲", "event_20210624_tw": "穹頂下的聖詠曲",
"event_20210527_tw": "微層混合", "event_20210527_tw": "微層混合",
"event_20210429_tw": "復刻墨染的鋼鐵之花", "event_20210429_tw": "復刻墨染的鋼鐵之花",

View File

@@ -639,6 +639,8 @@
"name": "活動名稱", "name": "活動名稱",
"help": "自動選擇至最新的活動圖", "help": "自動選擇至最新的活動圖",
"campaign_main": "主線圖", "campaign_main": "主線圖",
"event_20210422_cn": "復興的讚美詩",
"event_20210624_cn": "復刻-浮櫻影華",
"event_20230223_cn": "Revelations of Dust", "event_20230223_cn": "Revelations of Dust",
"event_20220224_cn": "深度回音", "event_20220224_cn": "深度回音",
"event_20200806_cn": "復刻最重要的寶物", "event_20200806_cn": "復刻最重要的寶物",
@@ -673,7 +675,6 @@
"event_20220428_cn": "Rondo at Rainbows End", "event_20220428_cn": "Rondo at Rainbows End",
"event_20220414_cn": "Aurora Noctis Rerun", "event_20220414_cn": "Aurora Noctis Rerun",
"event_20220407_tw": "蒼紅的迴響(復刻)", "event_20220407_tw": "蒼紅的迴響(復刻)",
"event_20210422_cn": "復興的讚美詩",
"event_20220310_tw": "復刻斯圖爾特的硝煙", "event_20220310_tw": "復刻斯圖爾特的硝煙",
"event_20200603_cn": "峽灣間的反擊", "event_20200603_cn": "峽灣間的反擊",
"event_20220210_cn": "Northern Overture Rerun", "event_20220210_cn": "Northern Overture Rerun",
@@ -682,7 +683,6 @@
"event_20210722_cn": "響徹碧海的偶像歌", "event_20210722_cn": "響徹碧海的偶像歌",
"event_20210819_cn": "Microlayer Medley Rerun", "event_20210819_cn": "Microlayer Medley Rerun",
"event_20200723_cn": "永夜幻光", "event_20200723_cn": "永夜幻光",
"event_20210624_cn": "Swirling Cherry Blossoms Rerun",
"event_20210624_tw": "穹頂下的聖詠曲", "event_20210624_tw": "穹頂下的聖詠曲",
"event_20210527_tw": "微層混合", "event_20210527_tw": "微層混合",
"event_20210429_tw": "復刻墨染的鋼鐵之花", "event_20210429_tw": "復刻墨染的鋼鐵之花",

View File

@@ -50,11 +50,15 @@ class ArknightsAutoScript(AzurLaneAutoScript):
logger.info(f'MAA安装路径{self.config.MaaEmulator_MaaPath}') logger.info(f'MAA安装路径{self.config.MaaEmulator_MaaPath}')
try: try:
incremental_path = None incremental_path = [os.path.join(self.config.MaaEmulator_MaaPath, './cache')]
if self.config.MaaEmulator_PackageName in ["YoStarEN", "YoStarJP", "YoStarKR", "txwy"]: if self.config.MaaEmulator_PackageName in ["YoStarEN", "YoStarJP", "YoStarKR", "txwy"]:
incremental_path = os.path.join( incremental_path.append(os.path.join(
self.config.MaaEmulator_MaaPath, self.config.MaaEmulator_MaaPath,
'./resource/global/' + self.config.MaaEmulator_PackageName './resource/global/' + self.config.MaaEmulator_PackageName)
)
incremental_path.append(os.path.join(
self.config.MaaEmulator_MaaPath,
'./cache/resource/global/' + self.config.MaaEmulator_PackageName)
) )
AssistantHandler.load(self.config.MaaEmulator_MaaPath, incremental_path) AssistantHandler.load(self.config.MaaEmulator_MaaPath, incremental_path)
except ModuleNotFoundError: except ModuleNotFoundError:

View File

@@ -21,7 +21,7 @@ class Asst:
""" """
@staticmethod @staticmethod
def load(path: Union[pathlib.Path, str], incremental_path: Optional[Union[pathlib.Path, str]] = None, def load(path: Union[pathlib.Path, str], incremental_path: Optional[Union[pathlib.Path, str, list]] = None,
user_dir: Optional[Union[pathlib.Path, str]] = None) -> bool: user_dir: Optional[Union[pathlib.Path, str]] = None) -> bool:
""" """
加载 dll 及资源 加载 dll 及资源
@@ -46,17 +46,18 @@ class Asst:
'environ_var': 'LD_LIBRARY_PATH' 'environ_var': 'LD_LIBRARY_PATH'
} }
} }
lib_import_func = None
platform_type = platform.system().lower() platform_type = platform.system().lower()
if platform_type == 'windows': if platform_type == 'windows':
lib_import_func = ctypes.WinDLL lib_import_func = ctypes.WinDLL
# Todo: MAA v4.12.0正式版更新之后删除
# 手动加载onnxruntime.dll以避免部分版本的python错误地从System32加载旧版本 # 手动加载onnxruntime.dll以避免部分版本的python错误地从System32加载旧版本
try: try:
lib_import_func(str(pathlib.Path(path) / 'onnxruntime.dll')) lib_import_func(str(pathlib.Path(path) / 'onnxruntime.dll'))
except Exception as e: except Exception as e:
print(e) print(e)
pass pass
# Todo
else: else:
lib_import_func = ctypes.CDLL lib_import_func = ctypes.CDLL
@@ -74,8 +75,13 @@ class Asst:
ret &= Asst.__lib.AsstLoadResource(str(path).encode('utf-8')) ret &= Asst.__lib.AsstLoadResource(str(path).encode('utf-8'))
if incremental_path: if incremental_path:
ret &= Asst.__lib.AsstLoadResource( if isinstance(incremental_path, list):
str(incremental_path).encode('utf-8')) for i_path in incremental_path:
ret &= Asst.__lib.AsstLoadResource(
str(i_path).encode('utf-8'))
else:
ret &= Asst.__lib.AsstLoadResource(
str(incremental_path).encode('utf-8'))
return ret return ret

View File

@@ -667,9 +667,13 @@
"Chip" "Chip"
] ]
}, },
"Threshold": { "WorkThreshold": {
"type": "input", "type": "input",
"value": 0.3 "value": 12
},
"ShiftThreshold": {
"type": "input",
"value": 4
}, },
"Notstationed": { "Notstationed": {
"type": "checkbox", "type": "checkbox",
@@ -689,9 +693,29 @@
"type": "checkbox", "type": "checkbox",
"value": false "value": false
}, },
"BuiltinConfig": {
"type": "select",
"value": "custom",
"option": [
"custom",
"153-3",
"243-3",
"243-4",
"252-3",
"333-3"
]
},
"Filename": { "Filename": {
"type": "textarea", "type": "textarea",
"value": null "value": null
},
"CustomPeriod": {
"type": "input",
"value": "16, 4, 4"
},
"PlanIndex": {
"type": "input",
"value": 0
} }
}, },
"Storage": { "Storage": {
@@ -750,11 +774,11 @@
}, },
"BuyFirst": { "BuyFirst": {
"type": "textarea", "type": "textarea",
"value": "招聘许可 > 龙门币" "value": "招聘许可"
}, },
"BlackList": { "BlackList": {
"type": "textarea", "type": "textarea",
"value": "碳 > 家具" "value": "碳 > 家具 > 加急许可"
} }
}, },
"Storage": { "Storage": {

View File

@@ -111,25 +111,31 @@ MaaInfrast:
Drones: Drones:
value: Money value: Money
option: [_NotUse, Money, SyntheticJade, CombatRecord, PureGold, OriginStone, Chip] option: [_NotUse, Money, SyntheticJade, CombatRecord, PureGold, OriginStone, Chip]
Threshold: 0.3 WorkThreshold: 12
ShiftThreshold: 4
Notstationed: true Notstationed: true
Trust: true Trust: true
Replenish: false Replenish: false
MaaCustomInfrast: MaaCustomInfrast:
Enable: false Enable: false
BuiltinConfig:
value: custom
option: [custom, 153-3, 243-3, 243-4, 252-3, 333-3]
Filename: Filename:
value: null value: null
type: textarea type: textarea
CustomPeriod: 16, 4, 4
PlanIndex: 0
MaaMall: MaaMall:
CreditFight: false CreditFight: false
Shopping: true Shopping: true
ForceShoppingIfCreditFull: false ForceShoppingIfCreditFull: false
BuyFirst: BuyFirst:
value: 招聘许可 > 龙门币 value: 招聘许可
type: textarea type: textarea
BlackList: BlackList:
value: 碳 > 家具 value: 碳 > 家具 > 加急许可
type: textarea type: textarea
MaaRoguelike: MaaRoguelike:

View File

@@ -71,21 +71,25 @@ class GeneratedConfig:
# Group `MaaInfrast` # Group `MaaInfrast`
MaaInfrast_Facility = 'Mfg > Trade > Power > Control > Reception > Office > Dorm' MaaInfrast_Facility = 'Mfg > Trade > Power > Control > Reception > Office > Dorm'
MaaInfrast_Drones = 'Money' # _NotUse, Money, SyntheticJade, CombatRecord, PureGold, OriginStone, Chip MaaInfrast_Drones = 'Money' # _NotUse, Money, SyntheticJade, CombatRecord, PureGold, OriginStone, Chip
MaaInfrast_Threshold = 0.3 MaaInfrast_WorkThreshold = 12
MaaInfrast_ShiftThreshold = 4
MaaInfrast_Notstationed = True MaaInfrast_Notstationed = True
MaaInfrast_Trust = True MaaInfrast_Trust = True
MaaInfrast_Replenish = False MaaInfrast_Replenish = False
# Group `MaaCustomInfrast` # Group `MaaCustomInfrast`
MaaCustomInfrast_Enable = False MaaCustomInfrast_Enable = False
MaaCustomInfrast_BuiltinConfig = 'custom' # custom, 153-3, 243-3, 243-4, 252-3, 333-3
MaaCustomInfrast_Filename = None MaaCustomInfrast_Filename = None
MaaCustomInfrast_CustomPeriod = '16, 4, 4'
MaaCustomInfrast_PlanIndex = 0
# Group `MaaMall` # Group `MaaMall`
MaaMall_CreditFight = False MaaMall_CreditFight = False
MaaMall_Shopping = True MaaMall_Shopping = True
MaaMall_ForceShoppingIfCreditFull = False MaaMall_ForceShoppingIfCreditFull = False
MaaMall_BuyFirst = '招聘许可 > 龙门币' MaaMall_BuyFirst = '招聘许可'
MaaMall_BlackList = '碳 > 家具' MaaMall_BlackList = '碳 > 家具 > 加急许可'
# Group `MaaRoguelike` # Group `MaaRoguelike`
MaaRoguelike_Theme = 'Phantom' # Phantom, Mizuki MaaRoguelike_Theme = 'Phantom' # Phantom, Mizuki

View File

@@ -391,9 +391,13 @@
"OriginStone": "OriginStone", "OriginStone": "OriginStone",
"Chip": "Chip" "Chip": "Chip"
}, },
"Threshold": { "WorkThreshold": {
"name": "MaaInfrast.Threshold.name", "name": "MaaInfrast.WorkThreshold.name",
"help": "MaaInfrast.Threshold.help" "help": "MaaInfrast.WorkThreshold.help"
},
"ShiftThreshold": {
"name": "MaaInfrast.ShiftThreshold.name",
"help": "MaaInfrast.ShiftThreshold.help"
}, },
"Notstationed": { "Notstationed": {
"name": "MaaInfrast.Notstationed.name", "name": "MaaInfrast.Notstationed.name",
@@ -417,9 +421,27 @@
"name": "MaaCustomInfrast.Enable.name", "name": "MaaCustomInfrast.Enable.name",
"help": "MaaCustomInfrast.Enable.help" "help": "MaaCustomInfrast.Enable.help"
}, },
"BuiltinConfig": {
"name": "MaaCustomInfrast.BuiltinConfig.name",
"help": "MaaCustomInfrast.BuiltinConfig.help",
"custom": "custom",
"153-3": "153-3",
"243-3": "243-3",
"243-4": "243-4",
"252-3": "252-3",
"333-3": "333-3"
},
"Filename": { "Filename": {
"name": "MaaCustomInfrast.Filename.name", "name": "MaaCustomInfrast.Filename.name",
"help": "MaaCustomInfrast.Filename.help" "help": "MaaCustomInfrast.Filename.help"
},
"CustomPeriod": {
"name": "MaaCustomInfrast.CustomPeriod.name",
"help": "MaaCustomInfrast.CustomPeriod.help"
},
"PlanIndex": {
"name": "MaaCustomInfrast.PlanIndex.name",
"help": "MaaCustomInfrast.PlanIndex.help"
} }
}, },
"MaaMall": { "MaaMall": {

View File

@@ -391,9 +391,13 @@
"OriginStone": "OriginStone", "OriginStone": "OriginStone",
"Chip": "Chip" "Chip": "Chip"
}, },
"Threshold": { "WorkThreshold": {
"name": "MaaInfrast.Threshold.name", "name": "MaaInfrast.WorkThreshold.name",
"help": "MaaInfrast.Threshold.help" "help": "MaaInfrast.WorkThreshold.help"
},
"ShiftThreshold": {
"name": "MaaInfrast.ShiftThreshold.name",
"help": "MaaInfrast.ShiftThreshold.help"
}, },
"Notstationed": { "Notstationed": {
"name": "MaaInfrast.Notstationed.name", "name": "MaaInfrast.Notstationed.name",
@@ -417,9 +421,27 @@
"name": "MaaCustomInfrast.Enable.name", "name": "MaaCustomInfrast.Enable.name",
"help": "MaaCustomInfrast.Enable.help" "help": "MaaCustomInfrast.Enable.help"
}, },
"BuiltinConfig": {
"name": "MaaCustomInfrast.BuiltinConfig.name",
"help": "MaaCustomInfrast.BuiltinConfig.help",
"custom": "custom",
"153-3": "153-3",
"243-3": "243-3",
"243-4": "243-4",
"252-3": "252-3",
"333-3": "333-3"
},
"Filename": { "Filename": {
"name": "MaaCustomInfrast.Filename.name", "name": "MaaCustomInfrast.Filename.name",
"help": "MaaCustomInfrast.Filename.help" "help": "MaaCustomInfrast.Filename.help"
},
"CustomPeriod": {
"name": "MaaCustomInfrast.CustomPeriod.name",
"help": "MaaCustomInfrast.CustomPeriod.help"
},
"PlanIndex": {
"name": "MaaCustomInfrast.PlanIndex.name",
"help": "MaaCustomInfrast.PlanIndex.help"
} }
}, },
"MaaMall": { "MaaMall": {

View File

@@ -391,9 +391,13 @@
"OriginStone": "制造站-源石碎片", "OriginStone": "制造站-源石碎片",
"Chip": "制造站-芯片组" "Chip": "制造站-芯片组"
}, },
"Threshold": { "WorkThreshold": {
"name": "基建工作心情阈值", "name": "基建工作心情阈值",
"help": "取值范围0 - 1.0" "help": "低于工作心情阈值的干员会在换班的时候被换下,取值范围0 - 24"
},
"ShiftThreshold": {
"name": "基建换班心情阈值",
"help": "有干员低于换班心情阈值时会启用基建换班任务取值范围0 - 24\n必须小于基建工作心情阈值"
}, },
"Notstationed": { "Notstationed": {
"name": "不将已进驻的干员放入宿舍", "name": "不将已进驻的干员放入宿舍",
@@ -417,9 +421,27 @@
"name": "使用自定义基建配置", "name": "使用自定义基建配置",
"help": "" "help": ""
}, },
"BuiltinConfig": {
"name": "内置配置",
"help": "内置配置需要非常高的练度要求,使用前请检查自己是否符合作业要求",
"custom": "自定义",
"153-3": "153 一天3换",
"243-3": "243 一天3换",
"243-4": "243 一天4换",
"252-3": "252 一天3换",
"333-3": "333 一天3换"
},
"Filename": { "Filename": {
"name": "自定义配置路径", "name": "自定义配置路径",
"help": "" "help": "自定义基建排班制作器https://yituliu.site/riicCal/"
},
"CustomPeriod": {
"name": "自定义换班周期",
"help": "仅用于没有内置换班周期的作业,手动设置每一班的工作时间,以小时为单位,使用逗号分隔"
},
"PlanIndex": {
"name": "当前方案序号",
"help": "仅用于没有内置换班周期的作业,每次启动都会换到下一班"
} }
}, },
"MaaMall": { "MaaMall": {

View File

@@ -391,9 +391,13 @@
"OriginStone": "OriginStone", "OriginStone": "OriginStone",
"Chip": "Chip" "Chip": "Chip"
}, },
"Threshold": { "WorkThreshold": {
"name": "MaaInfrast.Threshold.name", "name": "MaaInfrast.WorkThreshold.name",
"help": "MaaInfrast.Threshold.help" "help": "MaaInfrast.WorkThreshold.help"
},
"ShiftThreshold": {
"name": "MaaInfrast.ShiftThreshold.name",
"help": "MaaInfrast.ShiftThreshold.help"
}, },
"Notstationed": { "Notstationed": {
"name": "MaaInfrast.Notstationed.name", "name": "MaaInfrast.Notstationed.name",
@@ -417,9 +421,27 @@
"name": "MaaCustomInfrast.Enable.name", "name": "MaaCustomInfrast.Enable.name",
"help": "MaaCustomInfrast.Enable.help" "help": "MaaCustomInfrast.Enable.help"
}, },
"BuiltinConfig": {
"name": "MaaCustomInfrast.BuiltinConfig.name",
"help": "MaaCustomInfrast.BuiltinConfig.help",
"custom": "custom",
"153-3": "153-3",
"243-3": "243-3",
"243-4": "243-4",
"252-3": "252-3",
"333-3": "333-3"
},
"Filename": { "Filename": {
"name": "MaaCustomInfrast.Filename.name", "name": "MaaCustomInfrast.Filename.name",
"help": "MaaCustomInfrast.Filename.help" "help": "MaaCustomInfrast.Filename.help"
},
"CustomPeriod": {
"name": "MaaCustomInfrast.CustomPeriod.name",
"help": "MaaCustomInfrast.CustomPeriod.help"
},
"PlanIndex": {
"name": "MaaCustomInfrast.PlanIndex.name",
"help": "MaaCustomInfrast.PlanIndex.help"
} }
}, },
"MaaMall": { "MaaMall": {

View File

@@ -324,52 +324,82 @@ class AssistantHandler:
args = { args = {
"facility": self.split_filter(self.config.MaaInfrast_Facility), "facility": self.split_filter(self.config.MaaInfrast_Facility),
"drones": self.config.MaaInfrast_Drones, "drones": self.config.MaaInfrast_Drones,
"threshold": self.config.MaaInfrast_Threshold, "threshold": self.config.MaaInfrast_WorkThreshold,
"replenish": self.config.MaaInfrast_Replenish, "replenish": self.config.MaaInfrast_Replenish,
"dorm_notstationed_enabled": self.config.MaaInfrast_Notstationed, "dorm_notstationed_enabled": self.config.MaaInfrast_Notstationed,
"dorm_trust_enabled": self.config.MaaInfrast_Trust "dorm_trust_enabled": self.config.MaaInfrast_Trust
} }
end_time = datetime.datetime.now() + datetime.timedelta(minutes=30)
if self.config.MaaCustomInfrast_Enable: if self.config.MaaCustomInfrast_Enable:
infrast_dict = {
'153-3': r'resource\custom_infrast\153_layout_3_times_a_day.json',
'243-3': r'resource\custom_infrast\243_layout_3_times_a_day.json',
'243-4': r'resource\custom_infrast\243_layout_4_times_a_day.json',
'252-3': r'resource\custom_infrast\252_layout_3_times_a_day.json',
'333-3': r'resource\custom_infrast\333_layout_for_Orundum_3_times_a_day.json'
}
if self.config.MaaCustomInfrast_BuiltinConfig != 'custom':
self.config.MaaCustomInfrast_Filename = os.path.join(
self.config.MaaEmulator_MaaPath,
infrast_dict[self.config.MaaCustomInfrast_BuiltinConfig]
)
args['mode'] = 10000 args['mode'] = 10000
args['filename'] = self.config.MaaCustomInfrast_Filename args['filename'] = self.config.MaaCustomInfrast_Filename
end_time = datetime.datetime.now() + datetime.timedelta(minutes=30)
plans = deep_get(read_file(self.config.MaaCustomInfrast_Filename), keys='plans') plans = deep_get(read_file(self.config.MaaCustomInfrast_Filename), keys='plans')
for i in range(len(plans)): periods = deep_get(plans[0], keys='period')
periods = deep_get(plans[i], keys='period')
if periods is None: if periods is None:
if self.config.MaaCustomInfrast_CustomPeriod == 'null':
logger.critical('无法找到配置文件中的排班周期,请检查文件是否有效') logger.critical('无法找到配置文件中的排班周期,请检查文件是否有效')
raise RequestHumanTakeover raise RequestHumanTakeover
for j, period in enumerate(periods): else:
start_time = datetime.datetime.combine( args['plan_index'] = self.config.MaaCustomInfrast_PlanIndex
datetime.date.today(), else:
datetime.datetime.strptime(period[0], '%H:%M').time() for i in range(len(plans)):
) periods = deep_get(plans[i], keys='period')
end_time = datetime.datetime.combine( for j, period in enumerate(periods):
datetime.date.today(), start_time = datetime.datetime.combine(
datetime.datetime.strptime(period[1], '%H:%M').time() datetime.date.today(),
) datetime.datetime.strptime(period[0], '%H:%M').time()
now_time = datetime.datetime.now() )
if start_time <= now_time <= end_time: end_time = datetime.datetime.combine(
args['plan_index'] = i datetime.date.today(),
# 处理跨天的情形 datetime.datetime.strptime(period[1], '%H:%M').time()
# 如:"period": [["22:00", "23:59"], ["00:00","06:00"]] )
if j != len(periods) - 1 and period[1] == '23:59' and periods[j + 1][0] == '00:00': now_time = datetime.datetime.now()
end_time = datetime.datetime.combine( if start_time <= now_time <= end_time:
datetime.date.today() + datetime.timedelta(days=1), args['plan_index'] = i
datetime.datetime.strptime(periods[j + 1][1], '%H:%M').time() # 处理跨天的情形
) # 如:"period": [["22:00", "23:59"], ["00:00","06:00"]]
if j != len(periods) - 1 and period[1] == '23:59' and periods[j + 1][0] == '00:00':
end_time = datetime.datetime.combine(
datetime.date.today() + datetime.timedelta(days=1),
datetime.datetime.strptime(periods[j + 1][1], '%H:%M').time()
)
break
if 'plan_index' in args:
break break
if 'plan_index' in args:
break
self.maa_start('Infrast', args) self.maa_start('Infrast', args)
if self.config.MaaCustomInfrast_Enable: if periods is None:
self.config.task_delay(target=end_time + datetime.timedelta(minutes=1)) custom_period = self.config.MaaCustomInfrast_CustomPeriod.replace('', ',').split(',')
custom_period = [int(x) for x in custom_period]
self.config.task_delay(minute=60 * custom_period[self.config.MaaCustomInfrast_PlanIndex])
self.config.MaaCustomInfrast_PlanIndex = (self.config.MaaCustomInfrast_PlanIndex + 1) % len(plans)
else:
self.config.task_delay(target=end_time + datetime.timedelta(minutes=1))
else: else:
if self.config.MaaInfrast_WorkThreshold <= self.config.MaaInfrast_ShiftThreshold:
logger.warning('基建换班心情阈值必须小于基建工作心情阈值,请调整基建设置')
raise RequestHumanTakeover
self.maa_start('Infrast', args)
# 根据心情阈值计算下次换班时间 # 根据心情阈值计算下次换班时间
# 心情阈值 * 24 / 0.75 * 60 # (基建工作心情阈值 - 基建换班心情阈值) / 0.75 * 60
self.config.task_delay(minute=self.config.MaaInfrast_Threshold * 1920) t = (self.config.MaaInfrast_WorkThreshold - self.config.MaaInfrast_ShiftThreshold) * 80
self.config.task_delay(minute=t)
def mall(self): def mall(self):
buy_first = self.split_filter(self.config.MaaMall_BuyFirst) buy_first = self.split_filter(self.config.MaaMall_BuyFirst)