diff --git a/plugins/xiuxian/config.toml b/plugins/xiuxian/config.toml index 32db941..d0baf00 100644 --- a/plugins/xiuxian/config.toml +++ b/plugins/xiuxian/config.toml @@ -111,11 +111,14 @@ thresholds = [ [Xiuxian.breakthrough_stages] # 瓶颈突破定义:当前境界(10层):路径:修为消耗:成功率:目标境界 +# 注意:突破修为要求应该与达到10层所需修为一致或略高 +# 炼气10层需要9000修为(9×1000),所以突破要求应该≥9000 +# 筑基10层需要45000修为(9×5000),所以突破要求应该≥45000 paths = [ - "炼气10层:pill:5000:0.4:筑基1层", - "炼气10层:hard:20000:0.1:筑基2层", - "筑基10层:pill:50000:0.2:金丹1层", - "筑基10层:hard:200000:0.05:金丹2层" + "炼气10层:pill:9000:0.4:筑基1层", # 修复:从5000改为9000,与达到10层所需修为一致 + "炼气10层:hard:18000:0.1:筑基2层", # 修复:从20000改为18000(2倍) + "筑基10层:pill:45000:0.2:金丹1层", # 修复:从50000改为45000,与达到10层所需修为一致 + "筑基10层:hard:90000:0.05:金丹2层" # 修复:从200000改为90000(2倍) ] [Xiuxian.points_exchange] point_to_stone_rate = 10 \ No newline at end of file diff --git a/plugins/xiuxian/main.py b/plugins/xiuxian/main.py index cf405a8..a03df9d 100644 --- a/plugins/xiuxian/main.py +++ b/plugins/xiuxian/main.py @@ -777,6 +777,16 @@ class XiuxianPlugin(MessagePluginInterface): self.redis_db.leaderboard_realm_add(user_id, float(self._realm_score(new_realm))) def _auto_layer_up(self, user_id: str, player: Dict[str, Any]): + """自动层级提升:根据修为自动提升层数(不跨瓶颈) + + 逻辑: + - 炼气1层:0-999修为 + - 炼气2层:1000-1999修为 + - ... + - 炼气10层:9000-9999修为 + + 计算公式:new_layer = min(10, (pts // threshold) + 1) + """ prefix, layer = self._parse_realm(player.get("realm", "凡人")) if layer is None or layer >= 10: return @@ -784,7 +794,11 @@ class XiuxianPlugin(MessagePluginInterface): if not threshold: return pts = int(player.get("cultivation_points", 0)) - new_layer = max(layer, min(10, pts // threshold)) + # 修复:计算应该达到的层数 = (修为 // 每层阈值) + 1 + # 例如:1000修为 → 1000 // 1000 = 1 → 1 + 1 = 2层 + calculated_layer = min(10, (pts // threshold) + 1) + # 只允许提升,不允许降低 + new_layer = max(layer, calculated_layer) if new_layer != layer: self._set_realm(user_id, player, f"{prefix}{new_layer}层")