优化帮助消息

This commit is contained in:
2025-11-10 21:44:28 +08:00
parent be3043829c
commit f5b03422e4
5 changed files with 40 additions and 9 deletions

View File

@@ -10,7 +10,9 @@ alwaysApply: true
语言设置:除非用户另有指示,所有常规交互响应都应该使用中文。然而,模式声明(例如\[MODE: RESEARCH\])和特定格式化输出(例如代码块、清单等)应保持英文,以确保格式一致性。 语言设置:除非用户另有指示,所有常规交互响应都应该使用中文。然而,模式声明(例如\[MODE: RESEARCH\])和特定格式化输出(例如代码块、清单等)应保持英文,以确保格式一致性。
Python环境设置: 用户的python环境使用conda进行管理, 目前处于名为liubai的环境中 你必须完全理解这个项目, 并明白文件夹PWF里的文件你没有权力更改
你必须熟读 WPSAPI.py 和 plugin_interface.py 才有可能不犯错误
### 元指令:模式声明要求 ### 元指令:模式声明要求

View File

@@ -863,3 +863,6 @@ Debug 模式下冒险时长为 0立即结算可快速测试结算流程
✅ 模块导出正确 ✅ 模块导出正确
✅ 无代码质量问题 ✅ 无代码质量问题
# 人工审查
大量逻辑错误以及漏洞, 大量不符合需求的内容

View File

@@ -0,0 +1,18 @@
# 背景
文件名2025-11-10_1_battle-system.md
创建于2025-11-10_11:07:53
创建者admin
主分支main
任务分支:未创建
Yolo模式Off
# 任务描述
修复战斗系统 `WPSCombatSystem` 中存在的大量bug以及前任ai的大量错误理解
# 任务进度
手动
- 已修改Plugins/WPSCombatSystem/ 目录及所有文件
- 更改使用log函数包装装备强度带来的成功率提升, 基础成功率现在能够无下限降低, 新增冒险放弃, 冒险的阶段奖励会立即结算, 部分指令调整
- 原因: 大量实现上具有严重错误
- 状态: 成功

View File

@@ -221,12 +221,19 @@ class WPSAPIHelp(WPSAPI):
@override @override
async def callback(self, message: str, chat_id: int, user_id: int) -> str|None: async def callback(self, message: str, chat_id: int, user_id: int) -> str|None:
return await self.send_markdown_message(f"""# 指令帮助 mapper: Dict[str, List[str]] = {}
{"\n".join([f"- {key} 插件来源: {PluginInterface.plugin_instances.get(key).__class__.__name__}" for key in PluginInterface.plugin_instances.keys()])} for key in PluginInterface.plugin_instances.keys():
""", plugin = PluginInterface.plugin_instances.get(key)
chat_id, if plugin:
user_id if plugin.__class__.__name__ not in mapper:
) mapper[plugin.__class__.__name__] = []
mapper[plugin.__class__.__name__].append(key)
desc = ""
for plugin_name, keys in mapper.items():
desc += f"- {plugin_name}: {", ".join(keys)}\n"
return await self.send_markdown_message(f"""# 指令入口
{desc}
""", chat_id, user_id)
@override @override
def wake_up(self) -> None: def wake_up(self) -> None:

View File

@@ -4,8 +4,9 @@ from __future__ import annotations
from typing import Optional from typing import Optional
from PWF.Convention.Runtime.Config import *
from PWF.Convention.Runtime.GlobalConfig import ConsoleFrontColor, ProjectConfig from PWF.Convention.Runtime.GlobalConfig import ConsoleFrontColor, ProjectConfig
from Plugins.WPSCombatSystem.combat_models import PlayerStats, EquipmentDefinition
from .combat_plugin_base import WPSCombatBase from .combat_plugin_base import WPSCombatBase
@@ -52,7 +53,7 @@ class WPSCombatStatus(WPSCombatBase):
return await self.send_markdown_message(output, chat_id, user_id) return await self.send_markdown_message(output, chat_id, user_id)
def _format_status(self, stats, equipped) -> str: def _format_status(self, stats: PlayerStats, equipped: Dict[str, Optional[EquipmentDefinition]]) -> str:
"""格式化状态输出""" """格式化状态输出"""
lines = ["# ⚔️ 战斗属性"] lines = ["# ⚔️ 战斗属性"]