去除原来的签到级别设计

This commit is contained in:
liuwei
2025-11-18 16:23:30 +08:00
parent 85d5fb2746
commit 7c5051cca6
3 changed files with 75 additions and 30 deletions

View File

@@ -72,6 +72,80 @@
* *描述:* 成功渡过天劫,飞升上界。
* *(游戏终点或新篇章起点)*
---
## 📖 玩家用户手册(如何玩)
### 快速开始
- 注册角色:发送 `注册修仙 道号`
- 查看状态:发送 `我的状态`
- 开始修炼:发送 `闭关`(进入闭关状态,安全不可被劫掠)
- 结束修炼:适时发送 `出关`(获得修为,进入“气息不稳”短暂状态)
- 聚灵提升:发送 `聚灵 数量`(消耗灵石,提升修为)
- 查看帮助:发送 `修仙帮助`(或 `帮助``help``修仙指令``指令`
### 日常玩法
- 签到领石:`修仙签到`(每日一次,获得灵石)
- 坊市购物:
- 查看商品:`坊市`
- 购买物品:`购买 物品名称 数量`
- 查看背包:`乾坤袋`
- 积分兑换灵石:`积分购石 积分数`
- 比例:`10 积分 = 1 灵石`
- 示例:`积分购石 100` → 获得 `10` 灵石
### 境界与修炼
- 境界层数:每个境界均为 110 层,达到 `10 层`为瓶颈(如 `炼气10层`
- 自动层提升:修为达到阈值自动提升层数(不跨瓶颈)。不同境界阈值不同:
- 炼气:每层约需 `1000` 修为
- 筑基:每层约需 `5000` 修为
- 金丹:每层约需 `50000` 修为
- 突破瓶颈:当到达 `当前境界10层` 可发起突破:
- 丹药突破:`突破`(需丹药,如 `筑基丹`,成功率较高、修为消耗较低)
- 强行突破:`强行突破`(不需丹药,成功率较低、修为消耗较高)
- 成功则进入下一境界;失败则保留当前境界与修为变动
### 门派系统
- 创建门派:`创建门派 名称``元婴期及以上`
- 加入门派:`加入门派 名称`
- 退出门派:`退出门派`
- 同门规则:仅同门可 `赠与 灵石``赠送 物品`;不可劫掠同门
### PVP 劫掠
- 发起劫掠:`劫掠 目标wxid`
- 限制与保护:
- 新手保护:`炼气期`目标不可劫掠
- 状态保护:`闭关``受伤保护`中不可被劫掠
- 群限制:仅限同一群内劫掠
- 门派限制:不可劫掠同门
- 结果:成功夺取对方约 `20%` 灵石,对方进入 `受伤保护`;失败无收益
### 排行榜
- 修为榜:`排行榜`Top10可能开启境界分值榜按境界映射分加层数
### 冷却与撤回
- 指令独立冷却(如 `闭关/出关≈5s``聚灵≈30s``突破≈60s`
- 消息自动撤回:错误提示≈`5s`,成功提示≈`10s`,列表展示≈`2030s`
### 常用示例
- 注册:`注册修仙 张三`;状态:`我的状态`
- 闭关/出关:`闭关``出关`
- 聚灵:`聚灵 10`
- 坊市:`坊市``购买 筑基丹 1``乾坤袋`
- 积分换石:`积分购石 100`(得 10 灵石)
- 突破:`突破`(需 `筑基丹`)或 `强行突破`
- 赠与:`赠与 @wxid_xxx 50`;赠送:`赠送 @wxid_xxx 筑基丹 1`
- 劫掠:`劫掠 @wxid_xxx`
- 门派:`创建门派 凌霄阁``加入门派 凌霄阁``退出门派`
- 排行:`排行榜`
### 常见问题
- “未注册”:先发送 `注册修仙 道号`
- “命令格式错误”:参考 `修仙帮助` 用法提示
- 积分不足/灵石不足:指令会提示当前剩余或不足原因
- 未到瓶颈:请先提升到 `当前境界10层`
- 强行突破失败:属正常设定,建议用丹药或补足修为
## 2\. 🛠️ 技术栈
| 类别 | 技术 | 备注 |

View File

@@ -8,7 +8,6 @@ from typing import Callable, Dict, Any, Tuple
from db.stats_db import StatsDBOperator
from db.connection import DBConnectionManager
from db.levels_db import LevelsDBOperator
def plugin_stats_decorator(plugin_name: str) -> Callable:
@@ -69,9 +68,7 @@ def plugin_stats_decorator(plugin_name: str) -> Callable:
process_time_ms=process_time_ms
)
logger.info(f"[{plugin_name}] 成功记录插件调用: {command}, 耗时: {process_time_ms:.2f}ms")
if success and sender:
levels_db = LevelsDBOperator(db_manager)
levels_db.add_exp(sender, roomid or sender, 2, "plugin_call")
# 定义不需要记录错误的正常业务状态
normal_responses = {

View File

@@ -7,7 +7,6 @@ from typing import Callable, Dict, Any, Tuple, Union
from db.connection import DBConnectionManager
from db.points_db import PointsDBOperator, PointSource
from db.levels_db import LevelsDBOperator
from utils.revoke.message_auto_revoke import MessageAutoRevoke
from utils.robot_cmd.robot_command import Feature, PermissionStatus, GroupBotManager
from wechat_ipad import WechatAPIClient
@@ -87,8 +86,6 @@ def points_reward_decorator(points_calculator: Union[int, Callable], source_type
logger.info(f"PointsReward.{self.name if hasattr(self, 'name') else 'Unknown'}")
if reward_success:
logger.info(f"用户 {sender} 获得 {points} 积分奖励")
levels_db = LevelsDBOperator(db_manager)
ok, lvl = levels_db.add_exp(sender, roomid, points, source.value)
if "积分" not in response:
response += f"\n🎁 恭喜获得 {points} 积分奖励!"
client_msg_id, create_time, new_msg_id = await bot.send_at_message(
@@ -96,19 +93,6 @@ def points_reward_decorator(points_calculator: Union[int, Callable], source_type
response, [sender]
)
revoke.add_message_to_revoke(roomid, client_msg_id, create_time, new_msg_id, 5)
if ok and isinstance(lvl, dict) and "level" in lvl and "exp" in lvl:
title = levels_db.level_title(int(lvl['level']))
level_msg = f"🔰 当前等级: {lvl['level']}{title} 经验: {lvl['exp']}"
_, cur_t, next_t, pct, remain = levels_db.get_progress(int(lvl['exp']))
if next_t is None:
level_msg += "\n📈 进度: 已满级"
else:
level_msg += f"\n📈 进度: {int(pct*100)}%(还差 {remain}"
client_msg_id, create_time, new_msg_id = await bot.send_at_message(
(roomid if roomid else sender),
level_msg, [sender]
)
revoke.add_message_to_revoke(roomid, client_msg_id, create_time, new_msg_id, 5)
else:
logger.warning(f"用户 {sender} 积分奖励失败: {reward_result}")
except Exception as e:
@@ -174,20 +158,10 @@ def points_reward_decorator(points_calculator: Union[int, Callable], source_type
logger.info(f"PointsReward.{self.name if hasattr(self, 'name') else 'Unknown'}")
if reward_success:
logger.info(f"用户 {sender} 获得 {points} 积分奖励")
levels_db = LevelsDBOperator(db_manager)
ok, lvl = levels_db.add_exp(sender, roomid, points, source.value)
# 如果响应中没有提到积分,添加积分信息
if "积分" not in response:
response += f"\n🎁 恭喜获得 {points} 积分奖励!"
if ok and isinstance(lvl, dict) and "level" in lvl and "exp" in lvl:
title = levels_db.level_title(int(lvl['level']))
response += f"\n🔰 当前等级: {lvl['level']}{title} 经验: {lvl['exp']}"
_, cur_t, next_t, pct, remain = levels_db.get_progress(int(lvl['exp']))
if next_t is None:
response += "\n📈 进度: 已满级"
else:
response += f"\n📈 进度: {int(pct*100)}%(还差 {remain}"
else:
logger.warning(f"用户 {sender} 积分奖励失败: {reward_result}")
except Exception as e: