From a55fec0c4abf221e80aaead2ca0910f8cb4b2477 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Mon, 27 Jul 2026 12:33:37 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=86=E8=A7=A3?= =?UTF-8?q?=E6=9C=AA=E4=B8=8A=E9=94=81=E9=87=91=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 金装没必要保留了吧 --- autopcr/module/modules/travel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 68fe31f3..67563f28 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -13,10 +13,11 @@ import random import time +@description(''' @description(''' 分解对应的EX装备,不分解已锁或已装备的EX装备 '''.strip()) -@multichoice("ex_equip_recycle_category", "稀有度", ['普通铜', '普通银'], ['普通铜', '普通银', '会战银']) +@multichoice("ex_equip_recycle_category", "稀有度", ['普通铜', '普通银', '普通金'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) @name("EX装备分解") @default(True) class ex_equip_recycle(Module): @@ -24,6 +25,8 @@ class ex_equip_recycle(Module): '普通铜': lambda ex_id: db.ex_equipment_data[ex_id].rarity == 1 and db.ex_equipment_data[ex_id].clan_battle_equip_flag == 0, '普通银': lambda ex_id: db.ex_equipment_data[ex_id].rarity == 2 and db.ex_equipment_data[ex_id].clan_battle_equip_flag == 0, '会战银': lambda ex_id: db.ex_equipment_data[ex_id].rarity == 2 and db.ex_equipment_data[ex_id].clan_battle_equip_flag == 1, + '普通金': lambda ex_id: db.ex_equipment_data[ex_id].rarity == 3 and db.ex_equipment_data[ex_id].clan_battle_equip_flag == 0, + '会战金': lambda ex_id: db.ex_equipment_data[ex_id].rarity == 3 and db.ex_equipment_data[ex_id].clan_battle_equip_flag == 1, } async def do_task(self, client: pcrclient): From 873dadf8ef5d942f11b2fdd312a74a307981b6d1 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Mon, 27 Jul 2026 14:45:25 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=86=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E5=A4=9A=E5=B0=91=E9=87=91=E8=A3=85=E4=B8=8D=E5=88=86?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 还是ai好使 --- autopcr/module/modules/travel.py | 141 +++++++++++++++++++++++++++---- 1 file changed, 125 insertions(+), 16 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 67563f28..abb52aee 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -14,10 +14,13 @@ import time @description(''' -@description(''' -分解对应的EX装备,不分解已锁或已装备的EX装备 +分解对应的EX装备,不分解已锁或已装备的EX装备,支持设置保留数量,避免分解过多,打开详情可查看具体装备名称 '''.strip()) -@multichoice("ex_equip_recycle_category", "稀有度", ['普通铜', '普通银', '普通金'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) +@multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '普通金'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) +@booltype("ex_equip_enable_keep", "启用保留数量限制", True) +@inttype("ex_equip_normal_gold_keep", "普通金保留数量", 5, list(range(100))) +@inttype("ex_equip_clan_gold_keep", "会战金保留数量", 5, list(range(100))) +@booltype("ex_equip_show_detail", "显示详细分解信息", True) @name("EX装备分解") @default(True) class ex_equip_recycle(Module): @@ -30,35 +33,141 @@ class ex_equip_recycle(Module): } async def do_task(self, client: pcrclient): - ex_equip_resolve_category: List[str] = self.get_config("ex_equip_recycle_category") + ex_equip_recycle_category: List[str] = self.get_config("ex_equip_recycle_category") + ex_equip_enable_keep: bool = self.get_config("ex_equip_enable_keep") + ex_equip_normal_gold_keep: int = self.get_config("ex_equip_normal_gold_keep") + ex_equip_clan_gold_keep: int = self.get_config("ex_equip_clan_gold_keep") + ex_equip_show_detail: bool = self.get_config("ex_equip_show_detail") + cnt = Counter() rewards = [] - slot_ex = set(ex.serial_id for unit in client.data.unit.values() for ex in unit.ex_equip_slot if ex.serial_id) | set(ex.serial_id for unit in client.data.unit.values() for ex in unit.cb_ex_equip_slot if ex.serial_id) + # 获取已装备的EX装备 + slot_ex = set(ex.serial_id for unit in client.data.unit.values() for ex in unit.ex_equip_slot if ex.serial_id) | \ + set(ex.serial_id for unit in client.data.unit.values() for ex in unit.cb_ex_equip_slot if ex.serial_id) + + # 按装备ID统计可分解数量 + def get_decomposable_count(filter_func: Callable[[int], bool]) -> Dict[int, int]: + """统计每种装备的可分解数量""" + equip_count = {} + for ex in client.data.ex_equips.values(): + if filter_func(ex.ex_equipment_id) and \ + ex.protection_flag != 2 and \ + ex.serial_id not in slot_ex: + equip_count[ex.ex_equipment_id] = equip_count.get(ex.ex_equipment_id, 0) + 1 + return equip_count + + # 获取保留配置 + keep_config = { + '普通金': ex_equip_normal_gold_keep if ex_equip_enable_keep else 0, + '会战金': ex_equip_clan_gold_keep if ex_equip_enable_keep else 0, + '普通铜': 0, # 铜装不保留 + '普通银': 0, # 银装不保留 + '会战银': 0, # 银装不保留 + } - async def resolve(filter: Callable[[int], bool]): - serial_ids = [ex.serial_id for ex in client.data.ex_equips.values() if - filter(ex.ex_equipment_id) and - ex.protection_flag != 2 and - ex.serial_id not in slot_ex] + async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, category: str): + """分解装备,保留指定数量""" + # 统计可分解的装备 + equip_count = get_decomposable_count(filter_func) + + if not equip_count: + return + + # 显示当前装备情况 + if ex_equip_show_detail: + self._log(f"\n【{category}】当前可分解装备:") + for equip_id, count in sorted(equip_count.items()): + equip_name = db.get_ex_equip_name(equip_id) + self._log(f" {equip_name}: {count}件") + + # 计算每种装备需要保留的数量 + to_decompose = [] + total_keep = 0 + total_decompose = 0 + + for equip_id, count in equip_count.items(): + equip_name = db.get_ex_equip_name(equip_id) + + # 如果总数 <= 保留数量,全部保留 + if count <= keep_count: + if ex_equip_show_detail: + self._log(f" {equip_name}: 共{count}件 ≤ 保留{keep_count}件,全部保留") + total_keep += count + continue + + # 否则分解 count - keep_count 件 + decompose_count = count - keep_count + to_decompose.append((equip_id, decompose_count, equip_name, count)) + total_decompose += decompose_count + + if ex_equip_show_detail: + self._log(f" {equip_name}: 共{count}件,保留{keep_count}件,分解{decompose_count}件") + + if not to_decompose: + if ex_equip_show_detail: + self._log(f" {category}: 所有装备数量均不超过保留值,无需分解") + return + + # 获取要分解的装备serial_id列表 + serial_ids = [] + for equip_id, decompose_count, equip_name, total_count in to_decompose: + # 收集该装备的serial_id + equip_serial_ids = [ + ex.serial_id for ex in client.data.ex_equips.values() + if ex.ex_equipment_id == equip_id and + filter_func(ex.ex_equipment_id) and + ex.protection_flag != 2 and + ex.serial_id not in slot_ex + ] + # 只取需要分解的数量 + serial_ids.extend(equip_serial_ids[:decompose_count]) + cnt[category] += decompose_count + + # 批量分解 if serial_ids: gap = client.data.settings.ex_equip.ex_equip_limit_consume_num - cnt[category] = len(serial_ids) + self._log(f"分解 {category},共{len(serial_ids)}件") for i in range(0, len(serial_ids), gap): ret = await client.item_recycle_ex(serial_ids[i:i+gap]) rewards.extend(ret.item_list) + - for category in ex_equip_resolve_category: + # 执行分解 + for category in ex_equip_recycle_category: if category not in self.task: self._warn(f"未知的稀有度{category}") + continue + + keep_count = keep_config.get(category, 0) + + # 显示当前分类的保留设置 + if ex_equip_enable_keep and category in ['普通金', '会战金']: + self._log(f"\n{'='*40}") + self._log(f"处理 {category},保留数量: {keep_count}件") else: - await resolve(self.task[category]) + self._log(f"\n{'='*40}") + self._log(f"处理 {category}(全部分解)") + + await resolve_with_keep(self.task[category], keep_count, category) + # 输出结果 if cnt: - msg = "分解了" + ' '.join(f"{category}x{cnt}" for category, cnt in cnt.items()) - self._log(msg) - msg = "获得了:\n" + (await client.serialize_reward_summary(rewards)).strip('无') + self._log(f"\n{'='*40}") + self._log("分解完成!") + + # 显示分解汇总 + msg = "分解了 " + ' '.join(f"{category}x{count}" for category, count in cnt.items()) self._log(msg) + + # 显示获得的奖励 + if rewards: + self._log("获得了:") + reward_msg = (await client.serialize_reward_summary(rewards)).strip('无') + if reward_msg: + self._log(reward_msg) + else: + self._log(" 无奖励") else: raise SkipError("没有可分解的装备") From 21f624ac22250642930ac57c83614ba3aa0dc394 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Mon, 27 Jul 2026 14:59:55 +0800 Subject: [PATCH 03/13] Update travel.py --- autopcr/module/modules/travel.py | 71 ++++++++++++++------------------ 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index abb52aee..b54ef1ca 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -14,13 +14,13 @@ import time @description(''' -分解对应的EX装备,不分解已锁或已装备的EX装备,支持设置保留数量,避免分解过多,打开详情可查看具体装备名称 +分解对应的EX装备,不分解已锁或已装备的EX装备,支持为不同稀有度设置保留数量,避免分解过多,支持查看装备详细 '''.strip()) @multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '普通金'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) @booltype("ex_equip_enable_keep", "启用保留数量限制", True) @inttype("ex_equip_normal_gold_keep", "普通金保留数量", 5, list(range(100))) @inttype("ex_equip_clan_gold_keep", "会战金保留数量", 5, list(range(100))) -@booltype("ex_equip_show_detail", "显示详细分解信息", True) +@booltype("ex_equip_show_detail", "显示详细分解信息", False) # 默认关闭 @name("EX装备分解") @default(True) class ex_equip_recycle(Module): @@ -42,11 +42,9 @@ async def do_task(self, client: pcrclient): cnt = Counter() rewards = [] - # 获取已装备的EX装备 slot_ex = set(ex.serial_id for unit in client.data.unit.values() for ex in unit.ex_equip_slot if ex.serial_id) | \ set(ex.serial_id for unit in client.data.unit.values() for ex in unit.cb_ex_equip_slot if ex.serial_id) - # 按装备ID统计可分解数量 def get_decomposable_count(filter_func: Callable[[int], bool]) -> Dict[int, int]: """统计每种装备的可分解数量""" equip_count = {} @@ -57,7 +55,6 @@ def get_decomposable_count(filter_func: Callable[[int], bool]) -> Dict[int, int] equip_count[ex.ex_equipment_id] = equip_count.get(ex.ex_equipment_id, 0) + 1 return equip_count - # 获取保留配置 keep_config = { '普通金': ex_equip_normal_gold_keep if ex_equip_enable_keep else 0, '会战金': ex_equip_clan_gold_keep if ex_equip_enable_keep else 0, @@ -68,35 +65,28 @@ def get_decomposable_count(filter_func: Callable[[int], bool]) -> Dict[int, int] async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, category: str): """分解装备,保留指定数量""" - # 统计可分解的装备 equip_count = get_decomposable_count(filter_func) if not equip_count: return - # 显示当前装备情况 if ex_equip_show_detail: self._log(f"\n【{category}】当前可分解装备:") for equip_id, count in sorted(equip_count.items()): equip_name = db.get_ex_equip_name(equip_id) self._log(f" {equip_name}: {count}件") - # 计算每种装备需要保留的数量 to_decompose = [] - total_keep = 0 total_decompose = 0 for equip_id, count in equip_count.items(): equip_name = db.get_ex_equip_name(equip_id) - # 如果总数 <= 保留数量,全部保留 if count <= keep_count: if ex_equip_show_detail: self._log(f" {equip_name}: 共{count}件 ≤ 保留{keep_count}件,全部保留") - total_keep += count continue - # 否则分解 count - keep_count 件 decompose_count = count - keep_count to_decompose.append((equip_id, decompose_count, equip_name, count)) total_decompose += decompose_count @@ -107,12 +97,10 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, if not to_decompose: if ex_equip_show_detail: self._log(f" {category}: 所有装备数量均不超过保留值,无需分解") - return + return total_decompose - # 获取要分解的装备serial_id列表 serial_ids = [] for equip_id, decompose_count, equip_name, total_count in to_decompose: - # 收集该装备的serial_id equip_serial_ids = [ ex.serial_id for ex in client.data.ex_equips.values() if ex.ex_equipment_id == equip_id and @@ -120,20 +108,25 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, ex.protection_flag != 2 and ex.serial_id not in slot_ex ] - # 只取需要分解的数量 serial_ids.extend(equip_serial_ids[:decompose_count]) cnt[category] += decompose_count - # 批量分解 if serial_ids: gap = client.data.settings.ex_equip.ex_equip_limit_consume_num - self._log(f"分解 {category},共{len(serial_ids)}件") + if ex_equip_show_detail: + self._log(f" 开始分解 {category},共{len(serial_ids)}件") + for i in range(0, len(serial_ids), gap): ret = await client.item_recycle_ex(serial_ids[i:i+gap]) rewards.extend(ret.item_list) + if ex_equip_show_detail: + progress = min(i + gap, len(serial_ids)) + self._log(f" 进度: {progress}/{len(serial_ids)}") + + return total_decompose - # 执行分解 + total_decomposed = 0 for category in ex_equip_recycle_category: if category not in self.task: self._warn(f"未知的稀有度{category}") @@ -141,33 +134,33 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, keep_count = keep_config.get(category, 0) - # 显示当前分类的保留设置 - if ex_equip_enable_keep and category in ['普通金', '会战金']: - self._log(f"\n{'='*40}") - self._log(f"处理 {category},保留数量: {keep_count}件") - else: - self._log(f"\n{'='*40}") - self._log(f"处理 {category}(全部分解)") + if ex_equip_show_detail: + if ex_equip_enable_keep and category in ['普通金', '会战金']: + self._log(f"\n{'='*40}") + self._log(f"处理 {category},保留数量: {keep_count}件") + else: + self._log(f"\n{'='*40}") + self._log(f"处理 {category}(全部分解)") - await resolve_with_keep(self.task[category], keep_count, category) + decomposed = await resolve_with_keep(self.task[category], keep_count, category) + if decomposed: + total_decomposed += decomposed - # 输出结果 if cnt: - self._log(f"\n{'='*40}") - self._log("分解完成!") + decompose_msg = ' '.join(f"{category}x{count}" for category, count in cnt.items()) - # 显示分解汇总 - msg = "分解了 " + ' '.join(f"{category}x{count}" for category, count in cnt.items()) - self._log(msg) + if ex_equip_show_detail: + self._log(f"\n{'='*40}") + + self._log("分解完成!") + self._log(f"分解了 {decompose_msg}") - # 显示获得的奖励 if rewards: - self._log("获得了:") - reward_msg = (await client.serialize_reward_summary(rewards)).strip('无') - if reward_msg: - self._log(reward_msg) + reward_summary = await client.serialize_reward_summary(rewards) + if reward_summary and reward_summary.strip('无'): + self._log(f"获得了:\n{reward_summary.strip('无')}") else: - self._log(" 无奖励") + self._log("获得了: 无") else: raise SkipError("没有可分解的装备") From 51b7dd43c832ad3c1046060f7869bf2d8a9fb659 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Mon, 27 Jul 2026 15:14:13 +0800 Subject: [PATCH 04/13] Update travel.py --- autopcr/module/modules/travel.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index b54ef1ca..f4c11d7d 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -114,15 +114,11 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, if serial_ids: gap = client.data.settings.ex_equip.ex_equip_limit_consume_num if ex_equip_show_detail: - self._log(f" 开始分解 {category},共{len(serial_ids)}件") + self._log(f" 分解 {category},共{len(serial_ids)}件") for i in range(0, len(serial_ids), gap): ret = await client.item_recycle_ex(serial_ids[i:i+gap]) rewards.extend(ret.item_list) - - if ex_equip_show_detail: - progress = min(i + gap, len(serial_ids)) - self._log(f" 进度: {progress}/{len(serial_ids)}") return total_decompose From f58c3149b0051c879c4b14afc9e524ca77e96704 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Mon, 27 Jul 2026 15:20:36 +0800 Subject: [PATCH 05/13] Update travel.py --- autopcr/module/modules/travel.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index f4c11d7d..67300de7 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -72,9 +72,6 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, if ex_equip_show_detail: self._log(f"\n【{category}】当前可分解装备:") - for equip_id, count in sorted(equip_count.items()): - equip_name = db.get_ex_equip_name(equip_id) - self._log(f" {equip_name}: {count}件") to_decompose = [] total_decompose = 0 From 19bc12ee2f9600f43ae3188bb9b4d614fc408e27 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Tue, 28 Jul 2026 16:21:01 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E6=88=91=E5=8E=BB=EF=BC=8C=E6=80=8E?= =?UTF-8?q?=E4=B9=88=E7=BB=9F=E8=AE=A1=E7=9A=84=E6=98=AF=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E6=9C=AA=E5=88=86=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autopcr/module/modules/travel.py | 135 +++++++++++++++++-------------- 1 file changed, 76 insertions(+), 59 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 67300de7..1c061855 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -14,13 +14,13 @@ import time @description(''' -分解对应的EX装备,不分解已锁或已装备的EX装备,支持为不同稀有度设置保留数量,避免分解过多,支持查看装备详细 +分解对应的EX装备,不分解已锁或已装备的EX装备,可设置每种金装保留数量,只分解未强化的装备 '''.strip()) @multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '普通金'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) -@booltype("ex_equip_enable_keep", "启用保留数量限制", True) -@inttype("ex_equip_normal_gold_keep", "普通金保留数量", 5, list(range(100))) -@inttype("ex_equip_clan_gold_keep", "会战金保留数量", 5, list(range(100))) -@booltype("ex_equip_show_detail", "显示详细分解信息", False) # 默认关闭 +@inttype("ex_equip_clan_gold_keep", "会战金保留数量", 9, list(range(100))) +@inttype("ex_equip_normal_gold_keep", "普通金保留数量", 9, list(range(100))) +@booltype("ex_equip_enable_keep", "启用保留数量限制", False) +@booltype("ex_equip_show_detail", "显示详细分解信息", False) @name("EX装备分解") @default(True) class ex_equip_recycle(Module): @@ -42,84 +42,105 @@ async def do_task(self, client: pcrclient): cnt = Counter() rewards = [] + # 获取已装备的EX装备 slot_ex = set(ex.serial_id for unit in client.data.unit.values() for ex in unit.ex_equip_slot if ex.serial_id) | \ set(ex.serial_id for unit in client.data.unit.values() for ex in unit.cb_ex_equip_slot if ex.serial_id) - def get_decomposable_count(filter_func: Callable[[int], bool]) -> Dict[int, int]: - """统计每种装备的可分解数量""" - equip_count = {} - for ex in client.data.ex_equips.values(): - if filter_func(ex.ex_equipment_id) and \ - ex.protection_flag != 2 and \ - ex.serial_id not in slot_ex: - equip_count[ex.ex_equipment_id] = equip_count.get(ex.ex_equipment_id, 0) + 1 - return equip_count - + # 获取保留配置 keep_config = { '普通金': ex_equip_normal_gold_keep if ex_equip_enable_keep else 0, '会战金': ex_equip_clan_gold_keep if ex_equip_enable_keep else 0, - '普通铜': 0, # 铜装不保留 - '普通银': 0, # 银装不保留 - '会战银': 0, # 银装不保留 + '普通铜': 0, + '普通银': 0, + '会战银': 0, } async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, category: str): - """分解装备,保留指定数量""" - equip_count = get_decomposable_count(filter_func) + """分解装备,保留指定数量(只分解未强化的)""" + + # 1. 先统计所有符合条件的装备(未强化、未锁定、未装备) + all_equips = [] + unenhanced_equips = [] # 未强化的装备 - if not equip_count: + for ex in client.data.ex_equips.values(): + if filter_func(ex.ex_equipment_id) and \ + ex.protection_flag != 2 and \ + ex.serial_id not in slot_ex: + all_equips.append(ex) + # 检查是否未强化(rank == 0 表示未强化) + if ex.rank == 0: + unenhanced_equips.append(ex) + + if not unenhanced_equips: + if ex_equip_show_detail: + self._log(f"【{category}】没有可分解的未强化装备") return - + + # 2. 按装备ID分组统计未强化装备 + equip_count = {} + for ex in unenhanced_equips: + equip_id = ex.ex_equipment_id + equip_count[equip_id] = equip_count.get(equip_id, 0) + 1 + if ex_equip_show_detail: - self._log(f"\n【{category}】当前可分解装备:") - - to_decompose = [] + self._log(f"\n【{category}】未强化装备统计:") + total_unenhanced = 0 + for equip_id, count in sorted(equip_count.items()): + equip_name = db.get_ex_equip_name(equip_id) + self._log(f" {equip_name}: {count}件") + total_unenhanced += count + self._log(f" 总计: {total_unenhanced}件未强化装备") + + if keep_count > 0: + self._log(f" 保留设置: 每种保留{keep_count}件") + else: + self._log(f" 保留设置: 全部分解") + + # 3. 计算每种装备需要分解的数量 + to_decompose_serial_ids = [] total_decompose = 0 for equip_id, count in equip_count.items(): equip_name = db.get_ex_equip_name(equip_id) + # 如果总数 <= 保留数量,全部保留 if count <= keep_count: if ex_equip_show_detail: - self._log(f" {equip_name}: 共{count}件 ≤ 保留{keep_count}件,全部保留") + self._log(f" {equip_name}: {count}件 ≤ 保留{keep_count}件,全部保留") continue + # 否则分解 count - keep_count 件 decompose_count = count - keep_count - to_decompose.append((equip_id, decompose_count, equip_name, count)) total_decompose += decompose_count + cnt[category] += decompose_count if ex_equip_show_detail: - self._log(f" {equip_name}: 共{count}件,保留{keep_count}件,分解{decompose_count}件") - - if not to_decompose: - if ex_equip_show_detail: - self._log(f" {category}: 所有装备数量均不超过保留值,无需分解") - return total_decompose - - serial_ids = [] - for equip_id, decompose_count, equip_name, total_count in to_decompose: + self._log(f" {equip_name}: {count}件,保留{keep_count}件,分解{decompose_count}件") + + # 获取该装备未强化的serial_id列表 equip_serial_ids = [ - ex.serial_id for ex in client.data.ex_equips.values() - if ex.ex_equipment_id == equip_id and - filter_func(ex.ex_equipment_id) and - ex.protection_flag != 2 and - ex.serial_id not in slot_ex + ex.serial_id for ex in unenhanced_equips + if ex.ex_equipment_id == equip_id ] - serial_ids.extend(equip_serial_ids[:decompose_count]) - cnt[category] += decompose_count - - if serial_ids: + # 取需要分解的数量(优先分解低等级的) + to_decompose_serial_ids.extend(equip_serial_ids[:decompose_count]) + + if not to_decompose_serial_ids: + if ex_equip_show_detail: + self._log(f" {category}: 无需分解") + return + + # 4. 批量分解 + if to_decompose_serial_ids: gap = client.data.settings.ex_equip.ex_equip_limit_consume_num if ex_equip_show_detail: - self._log(f" 分解 {category},共{len(serial_ids)}件") + self._log(f" 分解了 {category},共{len(to_decompose_serial_ids)}件") - for i in range(0, len(serial_ids), gap): - ret = await client.item_recycle_ex(serial_ids[i:i+gap]) + for i in range(0, len(to_decompose_serial_ids), gap): + ret = await client.item_recycle_ex(to_decompose_serial_ids[i:i+gap]) rewards.extend(ret.item_list) - - return total_decompose + - total_decomposed = 0 for category in ex_equip_recycle_category: if category not in self.task: self._warn(f"未知的稀有度{category}") @@ -128,23 +149,19 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, keep_count = keep_config.get(category, 0) if ex_equip_show_detail: + self._log(f"\n{'='*40}") if ex_equip_enable_keep and category in ['普通金', '会战金']: - self._log(f"\n{'='*40}") - self._log(f"处理 {category},保留数量: {keep_count}件") + self._log(f"处理 {category}(保留数量: {keep_count}件)") else: - self._log(f"\n{'='*40}") self._log(f"处理 {category}(全部分解)") - decomposed = await resolve_with_keep(self.task[category], keep_count, category) - if decomposed: - total_decomposed += decomposed + await resolve_with_keep(self.task[category], keep_count, category) if cnt: - decompose_msg = ' '.join(f"{category}x{count}" for category, count in cnt.items()) - if ex_equip_show_detail: self._log(f"\n{'='*40}") + decompose_msg = ' '.join(f"{category}x{count}" for category, count in cnt.items()) self._log("分解完成!") self._log(f"分解了 {decompose_msg}") From 1c430e15d3b46cef7b267ddab5ad43a5d7cbc640 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Tue, 28 Jul 2026 16:22:09 +0800 Subject: [PATCH 07/13] Update travel.py --- autopcr/module/modules/travel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 1c061855..49cfe83a 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -16,7 +16,7 @@ @description(''' 分解对应的EX装备,不分解已锁或已装备的EX装备,可设置每种金装保留数量,只分解未强化的装备 '''.strip()) -@multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '普通金'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) +@multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '会战银'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) @inttype("ex_equip_clan_gold_keep", "会战金保留数量", 9, list(range(100))) @inttype("ex_equip_normal_gold_keep", "普通金保留数量", 9, list(range(100))) @booltype("ex_equip_enable_keep", "启用保留数量限制", False) From 9344c3e4a428c1d2bde5ab18204c690214fe52a9 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Tue, 28 Jul 2026 16:27:25 +0800 Subject: [PATCH 08/13] Update travel.py --- autopcr/module/modules/travel.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 49cfe83a..01e6b66b 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -158,17 +158,10 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, await resolve_with_keep(self.task[category], keep_count, category) if cnt: - if ex_equip_show_detail: - self._log(f"\n{'='*40}") - - decompose_msg = ' '.join(f"{category}x{count}" for category, count in cnt.items()) - self._log("分解完成!") - self._log(f"分解了 {decompose_msg}") - - if rewards: - reward_summary = await client.serialize_reward_summary(rewards) - if reward_summary and reward_summary.strip('无'): - self._log(f"获得了:\n{reward_summary.strip('无')}") + msg = "分解了" + ' '.join(f"{category}x{cnt}" for category, cnt in cnt.items()) + self._log(msg) + msg = "获得了:\n" + (await client.serialize_reward_summary(rewards)).strip('无') + self._log(msg) else: self._log("获得了: 无") else: From e366ebb2026eee9a7c091782ab11102e2814b1b9 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Tue, 28 Jul 2026 17:47:39 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E4=BC=BC=E4=B9=8E=E8=B6=8A=E6=94=B9?= =?UTF-8?q?=E8=B6=8A=E4=B9=B1=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autopcr/module/modules/travel.py | 96 +++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 31 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 01e6b66b..4f9f09e7 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -6,20 +6,23 @@ from ...db.database import db from ...model.enums import * from ...model.common import InventoryInfo, TravelAppearEventData, TravelDecreaseItem, TravelQuestAddLap, TravelQuestInfo, TravelStartInfo -from typing import Set from collections import Counter +from typing import Set from ...util.ilp_solver import dispatch_solver import math import random import time @description(''' -分解对应的EX装备,不分解已锁或已装备的EX装备,可设置每种金装保留数量,只分解未强化的装备 +分解对应的EX装备,不分解已锁或已装备的EX装备。 +可设置每种金装保留数量,只分解未强化的装备。 +开启"分解未满星装备"后,会将所有未满5星的装备纳入分解范围。 '''.strip()) @multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '会战银'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) -@inttype("ex_equip_clan_gold_keep", "会战金保留数量", 9, list(range(100))) @inttype("ex_equip_normal_gold_keep", "普通金保留数量", 9, list(range(100))) +@inttype("ex_equip_clan_gold_keep", "会战金保留数量", 9, list(range(100))) @booltype("ex_equip_enable_keep", "启用保留数量限制", False) +@booltype("ex_equip_include_not_max_star", "分解未满星装备", False) @booltype("ex_equip_show_detail", "显示详细分解信息", False) @name("EX装备分解") @default(True) @@ -37,6 +40,7 @@ async def do_task(self, client: pcrclient): ex_equip_enable_keep: bool = self.get_config("ex_equip_enable_keep") ex_equip_normal_gold_keep: int = self.get_config("ex_equip_normal_gold_keep") ex_equip_clan_gold_keep: int = self.get_config("ex_equip_clan_gold_keep") + ex_equip_include_not_max_star: bool = self.get_config("ex_equip_include_not_max_star") ex_equip_show_detail: bool = self.get_config("ex_equip_show_detail") cnt = Counter() @@ -56,40 +60,56 @@ async def do_task(self, client: pcrclient): } async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, category: str): - """分解装备,保留指定数量(只分解未强化的)""" + """分解装备,保留指定数量""" - # 1. 先统计所有符合条件的装备(未强化、未锁定、未装备) + # 1. 先统计所有符合条件的装备 all_equips = [] - unenhanced_equips = [] # 未强化的装备 + target_equips = [] # 要处理的装备 for ex in client.data.ex_equips.values(): - if filter_func(ex.ex_equipment_id) and \ + if not (filter_func(ex.ex_equipment_id) and \ ex.protection_flag != 2 and \ - ex.serial_id not in slot_ex: - all_equips.append(ex) - # 检查是否未强化(rank == 0 表示未强化) + ex.serial_id not in slot_ex): + continue + + all_equips.append(ex) + + # 判断是否应该纳入分解范围 + should_include = False + + if ex_equip_include_not_max_star: + # 开启"包含未满星装备":所有未满5星的装备都纳入(无论是否强化) + if ex.rank < 5: + should_include = True + else: + # 默认:只分解未强化的装备(rank == 0) if ex.rank == 0: - unenhanced_equips.append(ex) + should_include = True + + if should_include: + target_equips.append(ex) - if not unenhanced_equips: + if not target_equips: if ex_equip_show_detail: - self._log(f"【{category}】没有可分解的未强化装备") + status_text = "未满星" if ex_equip_include_not_max_star else "未强化" + self._log(f"【{category}】没有可分解的{status_text}装备") return - # 2. 按装备ID分组统计未强化装备 + # 2. 按装备ID分组统计目标装备 equip_count = {} - for ex in unenhanced_equips: + for ex in target_equips: equip_id = ex.ex_equipment_id equip_count[equip_id] = equip_count.get(equip_id, 0) + 1 if ex_equip_show_detail: - self._log(f"\n【{category}】未强化装备统计:") - total_unenhanced = 0 + status_text = "未满星" if ex_equip_include_not_max_star else "未强化" + self._log(f"\n【{category}】{status_text}装备统计:") + total_target = 0 for equip_id, count in sorted(equip_count.items()): equip_name = db.get_ex_equip_name(equip_id) - self._log(f" {equip_name}: {count}件") - total_unenhanced += count - self._log(f" 总计: {total_unenhanced}件未强化装备") + self._log(f" {equip_name}: {count}件({status_text})") + total_target += count + self._log(f" 总计: {total_target}件{status_text}装备") if keep_count > 0: self._log(f" 保留设置: 每种保留{keep_count}件") @@ -117,13 +137,18 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, if ex_equip_show_detail: self._log(f" {equip_name}: {count}件,保留{keep_count}件,分解{decompose_count}件") - # 获取该装备未强化的serial_id列表 + # 获取该装备的serial_id列表 equip_serial_ids = [ - ex.serial_id for ex in unenhanced_equips + ex.serial_id for ex in target_equips if ex.ex_equipment_id == equip_id ] - # 取需要分解的数量(优先分解低等级的) - to_decompose_serial_ids.extend(equip_serial_ids[:decompose_count]) + # 按等级排序,优先分解低等级的 + equip_serial_ids_sorted = sorted( + equip_serial_ids, + key=lambda sid: client.data.ex_equips[sid].rank + ) + # 取需要分解的数量 + to_decompose_serial_ids.extend(equip_serial_ids_sorted[:decompose_count]) if not to_decompose_serial_ids: if ex_equip_show_detail: @@ -141,6 +166,7 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, rewards.extend(ret.item_list) + # 执行分解 for category in ex_equip_recycle_category: if category not in self.task: self._warn(f"未知的稀有度{category}") @@ -150,23 +176,31 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, if ex_equip_show_detail: self._log(f"\n{'='*40}") + status_text = "未满星" if ex_equip_include_not_max_star else "未强化" if ex_equip_enable_keep and category in ['普通金', '会战金']: - self._log(f"处理 {category}(保留数量: {keep_count}件)") + self._log(f"处理 {category}({status_text},保留数量: {keep_count}件)") else: - self._log(f"处理 {category}(全部分解)") + self._log(f"处理 {category}({status_text},全部分解)") await resolve_with_keep(self.task[category], keep_count, category) + # 输出结果 if cnt: - msg = "分解了" + ' '.join(f"{category}x{cnt}" for category, cnt in cnt.items()) - self._log(msg) - msg = "获得了:\n" + (await client.serialize_reward_summary(rewards)).strip('无') - self._log(msg) + if ex_equip_show_detail: + self._log(f"\n{'='*40}") + + decompose_msg = ' '.join(f"{category}x{count}" for category, count in cnt.items()) + self._log(f"分解了 {decompose_msg}") + + if rewards: + reward_summary = await client.serialize_reward_summary(rewards) + if reward_summary and reward_summary.strip('无'): + self._log(f"获得了:\n{reward_summary.strip('无')}") else: self._log("获得了: 无") else: raise SkipError("没有可分解的装备") - + class eEventReward(IntEnum): Unknown = 0 Coin = 1 From 797a7c1d55ec31c3769a4fd5eb67fcdc4f11ba24 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Tue, 28 Jul 2026 19:35:41 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9C=8B=E6=B6=88?= =?UTF-8?q?=E8=80=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 又写了些无意义功能 --- autopcr/module/modules/travel.py | 82 ++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 26 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 4f9f09e7..3e5c4f6b 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -19,6 +19,7 @@ 开启"分解未满星装备"后,会将所有未满5星的装备纳入分解范围。 '''.strip()) @multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '会战银'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) +@booltype("ex_equip_preview_only", "看消耗", False) @inttype("ex_equip_normal_gold_keep", "普通金保留数量", 9, list(range(100))) @inttype("ex_equip_clan_gold_keep", "会战金保留数量", 9, list(range(100))) @booltype("ex_equip_enable_keep", "启用保留数量限制", False) @@ -42,9 +43,11 @@ async def do_task(self, client: pcrclient): ex_equip_clan_gold_keep: int = self.get_config("ex_equip_clan_gold_keep") ex_equip_include_not_max_star: bool = self.get_config("ex_equip_include_not_max_star") ex_equip_show_detail: bool = self.get_config("ex_equip_show_detail") + ex_equip_preview_only: bool = self.get_config("ex_equip_preview_only") cnt = Counter() rewards = [] + preview_details = {} # 存储预览详情 # 获取已装备的EX装备 slot_ex = set(ex.serial_id for unit in client.data.unit.values() for ex in unit.ex_equip_slot if ex.serial_id) | \ @@ -63,8 +66,7 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, """分解装备,保留指定数量""" # 1. 先统计所有符合条件的装备 - all_equips = [] - target_equips = [] # 要处理的装备 + target_equips = [] for ex in client.data.ex_equips.values(): if not (filter_func(ex.ex_equipment_id) and \ @@ -72,8 +74,6 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, ex.serial_id not in slot_ex): continue - all_equips.append(ex) - # 判断是否应该纳入分解范围 should_include = False @@ -101,31 +101,18 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, equip_id = ex.ex_equipment_id equip_count[equip_id] = equip_count.get(equip_id, 0) + 1 - if ex_equip_show_detail: - status_text = "未满星" if ex_equip_include_not_max_star else "未强化" - self._log(f"\n【{category}】{status_text}装备统计:") - total_target = 0 - for equip_id, count in sorted(equip_count.items()): - equip_name = db.get_ex_equip_name(equip_id) - self._log(f" {equip_name}: {count}件({status_text})") - total_target += count - self._log(f" 总计: {total_target}件{status_text}装备") - - if keep_count > 0: - self._log(f" 保留设置: 每种保留{keep_count}件") - else: - self._log(f" 保留设置: 全部分解") # 3. 计算每种装备需要分解的数量 to_decompose_serial_ids = [] total_decompose = 0 + category_details = [] for equip_id, count in equip_count.items(): equip_name = db.get_ex_equip_name(equip_id) # 如果总数 <= 保留数量,全部保留 if count <= keep_count: - if ex_equip_show_detail: + if ex_equip_show_detail or ex_equip_preview_only: self._log(f" {equip_name}: {count}件 ≤ 保留{keep_count}件,全部保留") continue @@ -134,7 +121,16 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, total_decompose += decompose_count cnt[category] += decompose_count - if ex_equip_show_detail: + # 记录预览详情 + category_details.append({ + 'name': equip_name, + 'total': count, + 'keep': keep_count, + 'decompose': decompose_count, + 'equip_id': equip_id + }) + + if ex_equip_show_detail or ex_equip_preview_only: self._log(f" {equip_name}: {count}件,保留{keep_count}件,分解{decompose_count}件") # 获取该装备的serial_id列表 @@ -150,13 +146,21 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, # 取需要分解的数量 to_decompose_serial_ids.extend(equip_serial_ids_sorted[:decompose_count]) + # 存储预览详情 + if ex_equip_preview_only: + preview_details[category] = { + 'details': category_details, + 'total_count': total_decompose, + 'serial_ids': to_decompose_serial_ids.copy() + } + if not to_decompose_serial_ids: if ex_equip_show_detail: self._log(f" {category}: 无需分解") return - # 4. 批量分解 - if to_decompose_serial_ids: + # 4. 批量分解(仅在非预览模式下执行) + if to_decompose_serial_ids and not ex_equip_preview_only: gap = client.data.settings.ex_equip.ex_equip_limit_consume_num if ex_equip_show_detail: self._log(f" 分解了 {category},共{len(to_decompose_serial_ids)}件") @@ -164,7 +168,10 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, for i in range(0, len(to_decompose_serial_ids), gap): ret = await client.item_recycle_ex(to_decompose_serial_ids[i:i+gap]) rewards.extend(ret.item_list) - + elif ex_equip_preview_only: + # 预览模式下,记录将要分解的数量 + if ex_equip_show_detail: + self._log(f" 将分解 {category},共{len(to_decompose_serial_ids)}件") # 执行分解 for category in ex_equip_recycle_category: @@ -174,17 +181,38 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, keep_count = keep_config.get(category, 0) - if ex_equip_show_detail: + if ex_equip_show_detail or ex_equip_preview_only: self._log(f"\n{'='*40}") status_text = "未满星" if ex_equip_include_not_max_star else "未强化" + preview_text = "【看消耗】" if ex_equip_preview_only else "" if ex_equip_enable_keep and category in ['普通金', '会战金']: - self._log(f"处理 {category}({status_text},保留数量: {keep_count}件)") + self._log(f"{preview_text}处理 {category}({status_text},保留数量: {keep_count}件)") else: - self._log(f"处理 {category}({status_text},全部分解)") + self._log(f"{preview_text}处理 {category}({status_text},全部分解)") await resolve_with_keep(self.task[category], keep_count, category) # 输出结果 + if ex_equip_preview_only: + # 预览模式:只显示预览信息,不执行分解 + self._log(f"\n{'='*40}") + self._log("以下装备将被分解:") + + total_preview = 0 + for category, info in preview_details.items(): + if info['details']: + self._log(f"\n{category}:") + for detail in info['details']: + self._log(f" {detail['name']}: {detail['decompose']}件") + total_preview += detail['decompose'] + + if total_preview > 0: + self._log(f"\n总计将分解 {total_preview} 件装备") + else: + self._log("没有需要分解的装备") + return # 预览模式直接返回 + + # 正常执行模式 if cnt: if ex_equip_show_detail: self._log(f"\n{'='*40}") @@ -198,6 +226,8 @@ async def resolve_with_keep(filter_func: Callable[[int], bool], keep_count: int, self._log(f"获得了:\n{reward_summary.strip('无')}") else: self._log("获得了: 无") + else: + self._log("获得了: 无") else: raise SkipError("没有可分解的装备") From 09fef45c76058fa3ffaa9299057618770781d8d8 Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Wed, 29 Jul 2026 20:12:30 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autopcr/module/modules/travel.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 3e5c4f6b..1a287855 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -14,15 +14,15 @@ import time @description(''' -分解对应的EX装备,不分解已锁或已装备的EX装备。 +分解对应的EX装备,不分解已锁或已装备或5星的EX装备。 可设置每种金装保留数量,只分解未强化的装备。 -开启"分解未满星装备"后,会将所有未满5星的装备纳入分解范围。 +开启"分解未满星装备"后,会将所有已强化但未满5星的装备纳入分解范围。 '''.strip()) @multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '会战银'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) @booltype("ex_equip_preview_only", "看消耗", False) -@inttype("ex_equip_normal_gold_keep", "普通金保留数量", 9, list(range(100))) -@inttype("ex_equip_clan_gold_keep", "会战金保留数量", 9, list(range(100))) -@booltype("ex_equip_enable_keep", "启用保留数量限制", False) +@inttype("ex_equip_normal_gold_keep", "可分解普通金保留数量", 30, list(range(100))) +@inttype("ex_equip_clan_gold_keep", "可分解会战金保留数量", 30, list(range(100))) +@booltype("ex_equip_enable_keep", "启用保留数量限制", True) @booltype("ex_equip_include_not_max_star", "分解未满星装备", False) @booltype("ex_equip_show_detail", "显示详细分解信息", False) @name("EX装备分解") From 4c268c68df28058eef65c1de1bc1742ebdf177fa Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Fri, 21 Aug 2026 19:37:01 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E6=8D=A2=E4=B8=AA=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autopcr/module/modules/travel.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 1a287855..480b2b03 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -18,13 +18,13 @@ 可设置每种金装保留数量,只分解未强化的装备。 开启"分解未满星装备"后,会将所有已强化但未满5星的装备纳入分解范围。 '''.strip()) -@multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '会战银'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) -@booltype("ex_equip_preview_only", "看消耗", False) -@inttype("ex_equip_normal_gold_keep", "可分解普通金保留数量", 30, list(range(100))) @inttype("ex_equip_clan_gold_keep", "可分解会战金保留数量", 30, list(range(100))) -@booltype("ex_equip_enable_keep", "启用保留数量限制", True) +@@inttype("ex_equip_normal_gold_keep", "可分解普通金保留数量", 30, list(range(100))) +booltype("ex_equip_enable_keep", "启用保留数量限制", True) @booltype("ex_equip_include_not_max_star", "分解未满星装备", False) @booltype("ex_equip_show_detail", "显示详细分解信息", False) +@booltype("ex_equip_preview_only", "不分解,看消耗", False) +@multichoice("ex_equip_recycle_category", "分解稀有度", ['普通铜', '普通银', '会战银'], ['普通铜', '普通银', '会战银', '普通金', '会战金']) @name("EX装备分解") @default(True) class ex_equip_recycle(Module): From 434b4bfcb07f245f62136258fee0a6fbf931feef Mon Sep 17 00:00:00 2001 From: HT-9420 Date: Fri, 21 Aug 2026 19:40:37 +0800 Subject: [PATCH 13/13] Update travel.py --- autopcr/module/modules/travel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autopcr/module/modules/travel.py b/autopcr/module/modules/travel.py index 480b2b03..4145f0ae 100644 --- a/autopcr/module/modules/travel.py +++ b/autopcr/module/modules/travel.py @@ -19,8 +19,8 @@ 开启"分解未满星装备"后,会将所有已强化但未满5星的装备纳入分解范围。 '''.strip()) @inttype("ex_equip_clan_gold_keep", "可分解会战金保留数量", 30, list(range(100))) -@@inttype("ex_equip_normal_gold_keep", "可分解普通金保留数量", 30, list(range(100))) -booltype("ex_equip_enable_keep", "启用保留数量限制", True) +@inttype("ex_equip_normal_gold_keep", "可分解普通金保留数量", 30, list(range(100))) +@booltype("ex_equip_enable_keep", "启用保留数量限制", True) @booltype("ex_equip_include_not_max_star", "分解未满星装备", False) @booltype("ex_equip_show_detail", "显示详细分解信息", False) @booltype("ex_equip_preview_only", "不分解,看消耗", False)