Skip to content

Commit 34611fb

Browse files
authored
Merge pull request #5092 from LmeSzinc/dev
Bug fix
2 parents b8cdbcf + b911e53 commit 34611fb

7 files changed

Lines changed: 110 additions & 19 deletions

File tree

module/config/argument/args.json

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,6 +1657,9 @@
16571657
],
16581658
"option_tw": [
16591659
"event_20250814_cn"
1660+
],
1661+
"option_bold": [
1662+
"event_20250814_cn"
16601663
]
16611664
},
16621665
"Mode": {
@@ -1916,7 +1919,7 @@
19161919
"value": "12-4"
19171920
},
19181921
"Event": {
1919-
"type": "select",
1922+
"type": "state",
19201923
"value": "campaign_main",
19211924
"option": [
19221925
"event_20250814_cn"
@@ -1932,6 +1935,9 @@
19321935
],
19331936
"option_tw": [
19341937
"event_20250814_cn"
1938+
],
1939+
"option_bold": [
1940+
"event_20250814_cn"
19351941
]
19361942
},
19371943
"Mode": {
@@ -2306,7 +2312,7 @@
23062312
"value": "12-4"
23072313
},
23082314
"Event": {
2309-
"type": "select",
2315+
"type": "state",
23102316
"value": "campaign_main",
23112317
"option": [
23122318
"event_20250814_cn"
@@ -2322,6 +2328,9 @@
23222328
],
23232329
"option_tw": [
23242330
"event_20250814_cn"
2331+
],
2332+
"option_bold": [
2333+
"event_20250814_cn"
23252334
]
23262335
},
23272336
"Mode": {
@@ -2713,7 +2722,7 @@
27132722
"display": "hide"
27142723
},
27152724
"Event": {
2716-
"type": "select",
2725+
"type": "state",
27172726
"value": "campaign_main",
27182727
"option": [
27192728
"raid_20250116"
@@ -2729,6 +2738,9 @@
27292738
],
27302739
"option_tw": [
27312740
"raid_20250116"
2741+
],
2742+
"option_bold": [
2743+
"raid_20250116"
27322744
]
27332745
},
27342746
"Mode": {
@@ -3109,7 +3121,7 @@
31093121
"display": "hide"
31103122
},
31113123
"Event": {
3112-
"type": "select",
3124+
"type": "state",
31133125
"value": "campaign_main",
31143126
"option": [
31153127
"coalition_20240627",
@@ -3126,6 +3138,10 @@
31263138
],
31273139
"option_tw": [
31283140
"coalition_20240627"
3141+
],
3142+
"option_bold": [
3143+
"coalition_20240627",
3144+
"coalition_20250626"
31293145
]
31303146
},
31313147
"Mode": {
@@ -3999,7 +4015,7 @@
39994015
"display": "hide"
40004016
},
40014017
"Event": {
4002-
"type": "select",
4018+
"type": "state",
40034019
"value": "campaign_main",
40044020
"option": [
40054021
"event_20250814_cn"
@@ -4015,6 +4031,9 @@
40154031
],
40164032
"option_tw": [
40174033
"event_20250814_cn"
4034+
],
4035+
"option_bold": [
4036+
"event_20250814_cn"
40184037
]
40194038
},
40204039
"Mode": {
@@ -4406,7 +4425,7 @@
44064425
"display": "hide"
44074426
},
44084427
"Event": {
4409-
"type": "select",
4428+
"type": "state",
44104429
"value": "campaign_main",
44114430
"option": [
44124431
"event_20250814_cn"
@@ -4422,6 +4441,9 @@
44224441
],
44234442
"option_tw": [
44244443
"event_20250814_cn"
4444+
],
4445+
"option_bold": [
4446+
"event_20250814_cn"
44254447
]
44264448
},
44274449
"Mode": {
@@ -4813,7 +4835,7 @@
48134835
"display": "hide"
48144836
},
48154837
"Event": {
4816-
"type": "select",
4838+
"type": "state",
48174839
"value": "campaign_main",
48184840
"option": [
48194841
"event_20250814_cn"
@@ -4829,6 +4851,9 @@
48294851
],
48304852
"option_tw": [
48314853
"event_20250814_cn"
4854+
],
4855+
"option_bold": [
4856+
"event_20250814_cn"
48324857
]
48334858
},
48344859
"Mode": {
@@ -5220,7 +5245,7 @@
52205245
"display": "hide"
52215246
},
52225247
"Event": {
5223-
"type": "select",
5248+
"type": "state",
52245249
"value": "campaign_main",
52255250
"option": [
52265251
"event_20250814_cn"
@@ -5236,6 +5261,9 @@
52365261
],
52375262
"option_tw": [
52385263
"event_20250814_cn"
5264+
],
5265+
"option_bold": [
5266+
"event_20250814_cn"
52395267
]
52405268
},
52415269
"Mode": {
@@ -5617,7 +5645,7 @@
56175645
"display": "hide"
56185646
},
56195647
"Event": {
5620-
"type": "select",
5648+
"type": "state",
56215649
"value": "campaign_main",
56225650
"option": [
56235651
"event_20250814_cn"
@@ -5633,6 +5661,9 @@
56335661
],
56345662
"option_tw": [
56355663
"event_20250814_cn"
5664+
],
5665+
"option_bold": [
5666+
"event_20250814_cn"
56365667
]
56375668
},
56385669
"Mode": {
@@ -6021,7 +6052,7 @@
60216052
"display": "hide"
60226053
},
60236054
"Event": {
6024-
"type": "select",
6055+
"type": "state",
60256056
"value": "campaign_main",
60266057
"option": [
60276058
"raid_20250116"
@@ -6037,6 +6068,9 @@
60376068
],
60386069
"option_tw": [
60396070
"raid_20250116"
6071+
],
6072+
"option_bold": [
6073+
"raid_20250116"
60406074
]
60416075
},
60426076
"Mode": {
@@ -6245,7 +6279,7 @@
62456279
"display": "hide"
62466280
},
62476281
"Event": {
6248-
"type": "select",
6282+
"type": "state",
62496283
"value": "campaign_main",
62506284
"option": [
62516285
"coalition_20240627",
@@ -6262,6 +6296,10 @@
62626296
],
62636297
"option_tw": [
62646298
"coalition_20240627"
6299+
],
6300+
"option_bold": [
6301+
"coalition_20240627",
6302+
"coalition_20250626"
62656303
]
62666304
},
62676305
"Mode": {

module/config/argument/override.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ GemsFarming:
5252
Event:
5353
Campaign:
5454
Mode: normal
55+
Event:
56+
type: state
5557
AmbushEvade: true
5658
Event2:
5759
Campaign:
5860
Mode: normal
61+
Event:
62+
type: state
5963
AmbushEvade: true
6064
EventA:
6165
Scheduler:
@@ -64,6 +68,8 @@ EventA:
6468
ServerUpdate: 00:00
6569
Campaign:
6670
Name: dynamic
71+
Event:
72+
type: state
6773
Mode: normal
6874
Use2xBook: false
6975
AmbushEvade: true
@@ -80,6 +86,8 @@ EventB:
8086
ServerUpdate: 00:00
8187
Campaign:
8288
Name: dynamic
89+
Event:
90+
type: state
8391
Mode: normal
8492
Use2xBook: false
8593
AmbushEvade: true
@@ -96,6 +104,8 @@ EventC:
96104
ServerUpdate: 00:00
97105
Campaign:
98106
Name: dynamic
107+
Event:
108+
type: state
99109
Mode: normal
100110
Use2xBook: false
101111
AmbushEvade: true
@@ -112,6 +122,8 @@ EventD:
112122
ServerUpdate: 00:00
113123
Campaign:
114124
Name: dynamic
125+
Event:
126+
type: state
115127
Mode: normal
116128
Use2xBook: false
117129
AmbushEvade: true
@@ -128,6 +140,8 @@ EventSp:
128140
ServerUpdate: 00:00
129141
Campaign:
130142
Name: sp
143+
Event:
144+
type: state
131145
Mode: normal
132146
Use2xBook: false
133147
AmbushEvade: true
@@ -142,6 +156,8 @@ EventSp:
142156
Raid:
143157
Campaign:
144158
Name: dynamic
159+
Event:
160+
type: state
145161
Mode: normal
146162
UseClearMode: true
147163
UseFleetLock: true
@@ -182,6 +198,8 @@ RaidDaily:
182198
ServerUpdate: 00:00
183199
Campaign:
184200
Name: dynamic
201+
Event:
202+
type: state
185203
Mode: normal
186204
UseClearMode: true
187205
UseFleetLock: true
@@ -211,6 +229,8 @@ Coalition:
211229
FailureInterval: 30
212230
ServerUpdate: 00:00
213231
Campaign:
232+
Event:
233+
type: state
214234
Name: dynamic
215235
Mode: normal
216236
UseClearMode: true
@@ -239,6 +259,8 @@ CoalitionSp:
239259
ServerUpdate: 00:00
240260
Campaign:
241261
Name: sp
262+
Event:
263+
type: state
242264
Mode: normal
243265
UseClearMode: true
244266
UseFleetLock: true

module/config/config_updater.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ def insert(key):
466466
latest[server] = deep_get(self.args, keys=f'{task}.Campaign.Event.option_{server}', default=[])
467467
options = set().union(*latest.values())
468468
options = sorted([option for option in options if option != 'campaign_main'])
469+
if task not in WAR_ARCHIVES:
470+
deep_set(self.args, keys=f'{task}.Campaign.Event.option_bold', value=options)
469471
deep_set(self.args, keys=f'{task}.Campaign.Event.option', value=options)
470472

471473
@staticmethod

module/ocr/ocr.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ class Digit(Ocr):
143143
Method ocr() returns int, or a list of int.
144144
"""
145145

146-
def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789IDSB',
146+
def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789IDSBL',
147147
name=None):
148148
super().__init__(buttons, lang=lang, letter=letter, threshold=threshold, alphabet=alphabet, name=name)
149149

150150
def after_process(self, result):
151151
result = super().after_process(result)
152152
result = result.replace('I', '1').replace('D', '0').replace('S', '5')
153-
result = result.replace('B', '8')
153+
result = result.replace('B', '8').replace('L', '1')
154154

155155
prev = result
156156
result = int(result) if result else 0
@@ -166,14 +166,14 @@ class DigitYuv(Digit, OcrYuv):
166166

167167

168168
class DigitCounter(Ocr):
169-
def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789/IDSB',
169+
def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789/IDSBL',
170170
name=None):
171171
super().__init__(buttons, lang=lang, letter=letter, threshold=threshold, alphabet=alphabet, name=name)
172172

173173
def after_process(self, result):
174174
result = super().after_process(result)
175175
result = result.replace('I', '1').replace('D', '0').replace('S', '5')
176-
result = result.replace('B', '8')
176+
result = result.replace('B', '8').replace('L', '1')
177177
return result
178178

179179
def ocr(self, image, direct_ocr=False):
@@ -207,14 +207,14 @@ class DigitCounterYuv(DigitCounter, OcrYuv):
207207

208208

209209
class Duration(Ocr):
210-
def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789:IDSB',
210+
def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789:IDSBL',
211211
name=None):
212212
super().__init__(buttons, lang=lang, letter=letter, threshold=threshold, alphabet=alphabet, name=name)
213213

214214
def after_process(self, result):
215215
result = super().after_process(result)
216216
result = result.replace('I', '1').replace('D', '0').replace('S', '5')
217-
result = result.replace('B', '8')
217+
result = result.replace('B', '8').replace('L', '1')
218218
return result
219219

220220
def ocr(self, image, direct_ocr=False):

module/os_combat/combat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ def _os_combat_expected_end(self):
157157

158158
def combat_status(self, drop=None, expected_end=None):
159159
self.__os_combat_drop = drop
160-
super().combat_status(drop=drop, expected_end=self._os_combat_expected_end)
160+
if expected_end is None:
161+
expected_end = self._os_combat_expected_end
162+
super().combat_status(drop=drop, expected_end=expected_end)
161163

162164
def combat(self, *args, save_get_items=False, **kwargs):
163165
"""

0 commit comments

Comments
 (0)