新增插件指引网页
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
from typing import Optional, Sequence
|
||||
|
||||
from PWF.Convention.Runtime.GlobalConfig import ConsoleFrontColor, ProjectConfig
|
||||
from Plugins.WPSAPI import GuideEntry
|
||||
from Plugins.WPSCombatSystem.combat_models import CombatConfig
|
||||
|
||||
from .combat_plugin_base import WPSCombatBase
|
||||
|
||||
@@ -15,6 +17,32 @@ logger: ProjectConfig = ProjectConfig()
|
||||
class WPSCombatHeal(WPSCombatBase):
|
||||
"""治疗系统插件"""
|
||||
|
||||
def get_guide_subtitle(self) -> str:
|
||||
return "恢复受伤状态并重返冒险"
|
||||
|
||||
def collect_command_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
GuideEntry(
|
||||
title="治疗",
|
||||
identifier="治疗",
|
||||
description="消耗积分清除受伤状态,使角色可继续冒险或战斗。",
|
||||
metadata={"别名": "heal / 恢复"},
|
||||
icon="💊",
|
||||
details=[
|
||||
{"type": "list", "items": ["若未受伤会返回提示信息。", "扣除积分后立即清除受伤标记。"]},
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
def collect_guide_entries(self) -> Sequence[GuideEntry]:
|
||||
heal_cost = CombatConfig.get_int("combat_heal_cost")
|
||||
return (
|
||||
{
|
||||
"title": "费用计算",
|
||||
"description": f"治疗费用由配置 `combat_heal_cost` 决定,当前为 {heal_cost} 分。",
|
||||
},
|
||||
)
|
||||
|
||||
def is_enable_plugin(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user