From ceb49fcb14162508104462be37f71ee34ce29b08 Mon Sep 17 00:00:00 2001 From: guoh064 <50830808+guoh064@users.noreply.github.com> Date: Sat, 30 Aug 2025 00:28:22 +0800 Subject: [PATCH 1/6] Upd: [JP] digit ocr '1' mistaken as 'L' --- module/ocr/ocr.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/ocr/ocr.py b/module/ocr/ocr.py index 9dfd4f00c..b60418a90 100644 --- a/module/ocr/ocr.py +++ b/module/ocr/ocr.py @@ -143,14 +143,14 @@ class Digit(Ocr): Method ocr() returns int, or a list of int. """ - def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789IDSB', + def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789IDSBL', name=None): super().__init__(buttons, lang=lang, letter=letter, threshold=threshold, alphabet=alphabet, name=name) def after_process(self, result): result = super().after_process(result) result = result.replace('I', '1').replace('D', '0').replace('S', '5') - result = result.replace('B', '8') + result = result.replace('B', '8').replace('L', '1') prev = result result = int(result) if result else 0 @@ -166,14 +166,14 @@ class DigitYuv(Digit, OcrYuv): class DigitCounter(Ocr): - def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789/IDSB', + def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789/IDSBL', name=None): super().__init__(buttons, lang=lang, letter=letter, threshold=threshold, alphabet=alphabet, name=name) def after_process(self, result): result = super().after_process(result) result = result.replace('I', '1').replace('D', '0').replace('S', '5') - result = result.replace('B', '8') + result = result.replace('B', '8').replace('L', '1') return result def ocr(self, image, direct_ocr=False): @@ -207,14 +207,14 @@ class DigitCounterYuv(DigitCounter, OcrYuv): class Duration(Ocr): - def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789:IDSB', + def __init__(self, buttons, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='0123456789:IDSBL', name=None): super().__init__(buttons, lang=lang, letter=letter, threshold=threshold, alphabet=alphabet, name=name) def after_process(self, result): result = super().after_process(result) result = result.replace('I', '1').replace('D', '0').replace('S', '5') - result = result.replace('B', '8') + result = result.replace('B', '8').replace('L', '1') return result def ocr(self, image, direct_ocr=False): From 1feec35e4c76bc6867a6c8e86457dc4aa0dc60d2 Mon Sep 17 00:00:00 2001 From: guoh064 <50830808+guoh064@users.noreply.github.com> Date: Sat, 30 Aug 2025 00:28:57 +0800 Subject: [PATCH 2/6] Upd: [JP] shop_tab_250814 --- module/shop/ui.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/module/shop/ui.py b/module/shop/ui.py index f784cf4e0..0f8707069 100644 --- a/module/shop/ui.py +++ b/module/shop/ui.py @@ -121,6 +121,27 @@ class ShopUI(UI): inactive_color=(252, 252, 253), inactive_threshold=221, inactive_count=100, ) + @Config.when(SERVER='jp') + def shop_tab_250814(self): + """ + Set with `self.shop_tab.set(main=self, upper={index})` + - index + 1: General supply shops + 2: Monthly shops + 3: Event shops + """ + grids = ButtonGrid( + origin=(29, 436), delta=(0, 50), + button_shape=(74, 21), grid_shape=(1, 3), + name='SHOP_TAB') + return Navbar( + grids=grids, + # blue text active + active_color=(88, 186, 255), active_threshold=221, active_count=100, + # white text inactive + inactive_color=(38, 92, 121), inactive_threshold=221, inactive_count=100, + ) + @cached_property @Config.when(SERVER=None) def shop_tab_250814(self): From e1a4a06be79f1538ae8634ad51843a06ec451188 Mon Sep 17 00:00:00 2001 From: guoh064 <50830808+guoh064@users.noreply.github.com> Date: Sat, 30 Aug 2025 00:42:23 +0800 Subject: [PATCH 3/6] Upd: [JP] color of SHOP_OCR_BALANCE --- module/shop/shop_status.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/module/shop/shop_status.py b/module/shop/shop_status.py index ad2c13564..a26d068f0 100644 --- a/module/shop/shop_status.py +++ b/module/shop/shop_status.py @@ -8,7 +8,13 @@ if server.server != 'jp': else: OCR_SHOP_GEMS = Digit(SHOP_GEMS, letter=(190, 180, 82), name='OCR_SHOP_GEMS') # UI update in 20250814, but server TW is still old UI. -if server.server != 'tw': +if server.server == 'jp': + OCR_SHOP_GOLD_COINS = Digit(SHOP_OCR_BALANCE, letter=(110, 120, 130), name='OCR_SHOP_GOLD_COINS') + OCR_SHOP_MEDAL = Digit(SHOP_OCR_BALANCE, letter=(110, 120, 130), name='OCR_SHOP_MEDAL') + OCR_SHOP_MERIT = Digit(SHOP_OCR_BALANCE, letter=(110, 120, 130), name='OCR_SHOP_MERIT') + OCR_SHOP_GUILD_COINS = Digit(SHOP_OCR_BALANCE, letter=(110, 120, 130), name='OCR_SHOP_GUILD_COINS') + OCR_SHOP_CORE = Digit(SHOP_OCR_BALANCE, letter=(110, 120, 130), name='OCR_SHOP_CORE') +elif server.server != 'tw': OCR_SHOP_GOLD_COINS = Digit(SHOP_OCR_BALANCE, letter=(100, 100, 100), name='OCR_SHOP_GOLD_COINS') OCR_SHOP_MEDAL = Digit(SHOP_OCR_BALANCE, letter=(100, 100, 100), name='OCR_SHOP_MEDAL') OCR_SHOP_MERIT = Digit(SHOP_OCR_BALANCE, letter=(100, 100, 100), name='OCR_SHOP_MERIT') From 9ccf678ef338c6afbdea68dd278e0711264813ff Mon Sep 17 00:00:00 2001 From: guoh064 <50830808+guoh064@users.noreply.github.com> Date: Sat, 30 Aug 2025 22:06:27 +0800 Subject: [PATCH 4/6] Fix: OSDaemon.combat_status() should accept end 'no_searching' (#5066) --- module/os_combat/combat.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/os_combat/combat.py b/module/os_combat/combat.py index f29702e9a..461ec5ad0 100644 --- a/module/os_combat/combat.py +++ b/module/os_combat/combat.py @@ -157,7 +157,9 @@ class Combat(Combat_, MapEventHandler): def combat_status(self, drop=None, expected_end=None): self.__os_combat_drop = drop - super().combat_status(drop=drop, expected_end=self._os_combat_expected_end) + if expected_end is None: + expected_end = self._os_combat_expected_end + super().combat_status(drop=drop, expected_end=expected_end) def combat(self, *args, save_get_items=False, **kwargs): """ From 719f225316f4153912d8b3aa7c8664be67ceafcd Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sat, 30 Aug 2025 22:15:53 +0800 Subject: [PATCH 5/6] Gui: Show event as stored to prevent someone trying to select it --- module/config/argument/args.json | 102 ++++++++++++++++++++++++--- module/config/argument/override.yaml | 22 ++++++ module/config/config_updater.py | 1 + 3 files changed, 114 insertions(+), 11 deletions(-) diff --git a/module/config/argument/args.json b/module/config/argument/args.json index 12936ece7..b4b2ab159 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -1657,6 +1657,9 @@ ], "option_tw": [ "event_20250814_cn" + ], + "option_bold": [ + "event_20250814_cn" ] }, "Mode": { @@ -1916,7 +1919,7 @@ "value": "12-4" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "event_20250814_cn" @@ -1932,6 +1935,9 @@ ], "option_tw": [ "event_20250814_cn" + ], + "option_bold": [ + "event_20250814_cn" ] }, "Mode": { @@ -2306,7 +2312,7 @@ "value": "12-4" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "event_20250814_cn" @@ -2322,6 +2328,9 @@ ], "option_tw": [ "event_20250814_cn" + ], + "option_bold": [ + "event_20250814_cn" ] }, "Mode": { @@ -2713,7 +2722,7 @@ "display": "hide" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "raid_20250116" @@ -2729,6 +2738,9 @@ ], "option_tw": [ "raid_20250116" + ], + "option_bold": [ + "raid_20250116" ] }, "Mode": { @@ -3109,7 +3121,7 @@ "display": "hide" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "coalition_20240627", @@ -3126,6 +3138,10 @@ ], "option_tw": [ "coalition_20240627" + ], + "option_bold": [ + "coalition_20240627", + "coalition_20250626" ] }, "Mode": { @@ -3614,6 +3630,48 @@ "war_archives_20190321_en", "war_archives_20191031_en", "war_archives_20181020_en" + ], + "option_bold": [ + "war_archives_20180607_cn", + "war_archives_20180726_cn", + "war_archives_20181020_en", + "war_archives_20181026_en", + "war_archives_20181227_cn", + "war_archives_20190221_en", + "war_archives_20190314_en", + "war_archives_20190321_en", + "war_archives_20190620_en", + "war_archives_20190911_cn", + "war_archives_20191010_en", + "war_archives_20191031_en", + "war_archives_20200312_cn", + "war_archives_20200507_cn", + "war_archives_20200603_cn", + "war_archives_20200806_cn", + "war_archives_20200820_cn", + "war_archives_20200903_cn", + "war_archives_20200917_cn", + "war_archives_20201012_cn", + "war_archives_20201029_cn", + "war_archives_20201229_cn", + "war_archives_20210225_cn", + "war_archives_20210325_cn", + "war_archives_20210422_cn", + "war_archives_20210527_cn", + "war_archives_20210624_cn", + "war_archives_20210819_cn", + "war_archives_20210916_cn", + "war_archives_20211014_cn", + "war_archives_20211028_cn", + "war_archives_20211111_cn", + "war_archives_20211229_cn", + "war_archives_20220210_cn", + "war_archives_20220224_cn", + "war_archives_20220324_cn", + "war_archives_20220414_cn", + "war_archives_20220428_cn", + "war_archives_20220526_cn", + "war_archives_20220728_cn" ] }, "Mode": { @@ -3999,7 +4057,7 @@ "display": "hide" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "event_20250814_cn" @@ -4015,6 +4073,9 @@ ], "option_tw": [ "event_20250814_cn" + ], + "option_bold": [ + "event_20250814_cn" ] }, "Mode": { @@ -4406,7 +4467,7 @@ "display": "hide" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "event_20250814_cn" @@ -4422,6 +4483,9 @@ ], "option_tw": [ "event_20250814_cn" + ], + "option_bold": [ + "event_20250814_cn" ] }, "Mode": { @@ -4813,7 +4877,7 @@ "display": "hide" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "event_20250814_cn" @@ -4829,6 +4893,9 @@ ], "option_tw": [ "event_20250814_cn" + ], + "option_bold": [ + "event_20250814_cn" ] }, "Mode": { @@ -5220,7 +5287,7 @@ "display": "hide" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "event_20250814_cn" @@ -5236,6 +5303,9 @@ ], "option_tw": [ "event_20250814_cn" + ], + "option_bold": [ + "event_20250814_cn" ] }, "Mode": { @@ -5617,7 +5687,7 @@ "display": "hide" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "event_20250814_cn" @@ -5633,6 +5703,9 @@ ], "option_tw": [ "event_20250814_cn" + ], + "option_bold": [ + "event_20250814_cn" ] }, "Mode": { @@ -6021,7 +6094,7 @@ "display": "hide" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "raid_20250116" @@ -6037,6 +6110,9 @@ ], "option_tw": [ "raid_20250116" + ], + "option_bold": [ + "raid_20250116" ] }, "Mode": { @@ -6245,7 +6321,7 @@ "display": "hide" }, "Event": { - "type": "select", + "type": "state", "value": "campaign_main", "option": [ "coalition_20240627", @@ -6262,6 +6338,10 @@ ], "option_tw": [ "coalition_20240627" + ], + "option_bold": [ + "coalition_20240627", + "coalition_20250626" ] }, "Mode": { diff --git a/module/config/argument/override.yaml b/module/config/argument/override.yaml index ea33032e2..5e42dcd92 100644 --- a/module/config/argument/override.yaml +++ b/module/config/argument/override.yaml @@ -52,10 +52,14 @@ GemsFarming: Event: Campaign: Mode: normal + Event: + type: state AmbushEvade: true Event2: Campaign: Mode: normal + Event: + type: state AmbushEvade: true EventA: Scheduler: @@ -64,6 +68,8 @@ EventA: ServerUpdate: 00:00 Campaign: Name: dynamic + Event: + type: state Mode: normal Use2xBook: false AmbushEvade: true @@ -80,6 +86,8 @@ EventB: ServerUpdate: 00:00 Campaign: Name: dynamic + Event: + type: state Mode: normal Use2xBook: false AmbushEvade: true @@ -96,6 +104,8 @@ EventC: ServerUpdate: 00:00 Campaign: Name: dynamic + Event: + type: state Mode: normal Use2xBook: false AmbushEvade: true @@ -112,6 +122,8 @@ EventD: ServerUpdate: 00:00 Campaign: Name: dynamic + Event: + type: state Mode: normal Use2xBook: false AmbushEvade: true @@ -128,6 +140,8 @@ EventSp: ServerUpdate: 00:00 Campaign: Name: sp + Event: + type: state Mode: normal Use2xBook: false AmbushEvade: true @@ -142,6 +156,8 @@ EventSp: Raid: Campaign: Name: dynamic + Event: + type: state Mode: normal UseClearMode: true UseFleetLock: true @@ -182,6 +198,8 @@ RaidDaily: ServerUpdate: 00:00 Campaign: Name: dynamic + Event: + type: state Mode: normal UseClearMode: true UseFleetLock: true @@ -211,6 +229,8 @@ Coalition: FailureInterval: 30 ServerUpdate: 00:00 Campaign: + Event: + type: state Name: dynamic Mode: normal UseClearMode: true @@ -239,6 +259,8 @@ CoalitionSp: ServerUpdate: 00:00 Campaign: Name: sp + Event: + type: state Mode: normal UseClearMode: true UseFleetLock: true diff --git a/module/config/config_updater.py b/module/config/config_updater.py index 7e6889e86..415bd531d 100644 --- a/module/config/config_updater.py +++ b/module/config/config_updater.py @@ -466,6 +466,7 @@ class ConfigGenerator: latest[server] = deep_get(self.args, keys=f'{task}.Campaign.Event.option_{server}', default=[]) options = set().union(*latest.values()) options = sorted([option for option in options if option != 'campaign_main']) + deep_set(self.args, keys=f'{task}.Campaign.Event.option_bold', value=options) deep_set(self.args, keys=f'{task}.Campaign.Event.option', value=options) @staticmethod From b911e53d3e19941581ae8aa3093b45a3d862c0c0 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sat, 30 Aug 2025 22:18:53 +0800 Subject: [PATCH 6/6] Fix: War archive shouldn't have option_bold --- module/config/argument/args.json | 42 -------------------------------- module/config/config_updater.py | 3 ++- 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/module/config/argument/args.json b/module/config/argument/args.json index b4b2ab159..7cf544ff6 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -3630,48 +3630,6 @@ "war_archives_20190321_en", "war_archives_20191031_en", "war_archives_20181020_en" - ], - "option_bold": [ - "war_archives_20180607_cn", - "war_archives_20180726_cn", - "war_archives_20181020_en", - "war_archives_20181026_en", - "war_archives_20181227_cn", - "war_archives_20190221_en", - "war_archives_20190314_en", - "war_archives_20190321_en", - "war_archives_20190620_en", - "war_archives_20190911_cn", - "war_archives_20191010_en", - "war_archives_20191031_en", - "war_archives_20200312_cn", - "war_archives_20200507_cn", - "war_archives_20200603_cn", - "war_archives_20200806_cn", - "war_archives_20200820_cn", - "war_archives_20200903_cn", - "war_archives_20200917_cn", - "war_archives_20201012_cn", - "war_archives_20201029_cn", - "war_archives_20201229_cn", - "war_archives_20210225_cn", - "war_archives_20210325_cn", - "war_archives_20210422_cn", - "war_archives_20210527_cn", - "war_archives_20210624_cn", - "war_archives_20210819_cn", - "war_archives_20210916_cn", - "war_archives_20211014_cn", - "war_archives_20211028_cn", - "war_archives_20211111_cn", - "war_archives_20211229_cn", - "war_archives_20220210_cn", - "war_archives_20220224_cn", - "war_archives_20220324_cn", - "war_archives_20220414_cn", - "war_archives_20220428_cn", - "war_archives_20220526_cn", - "war_archives_20220728_cn" ] }, "Mode": { diff --git a/module/config/config_updater.py b/module/config/config_updater.py index 415bd531d..8b9d42210 100644 --- a/module/config/config_updater.py +++ b/module/config/config_updater.py @@ -466,7 +466,8 @@ class ConfigGenerator: latest[server] = deep_get(self.args, keys=f'{task}.Campaign.Event.option_{server}', default=[]) options = set().union(*latest.values()) options = sorted([option for option in options if option != 'campaign_main']) - deep_set(self.args, keys=f'{task}.Campaign.Event.option_bold', value=options) + if task not in WAR_ARCHIVES: + deep_set(self.args, keys=f'{task}.Campaign.Event.option_bold', value=options) deep_set(self.args, keys=f'{task}.Campaign.Event.option', value=options) @staticmethod