新增插件指引网页
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from typing import Optional, Sequence
|
||||
|
||||
from PWF.Convention.Runtime.GlobalConfig import ConsoleFrontColor, ProjectConfig
|
||||
|
||||
from Plugins.WPSAPI import GuideEntry, GuideSection
|
||||
from .combat_plugin_base import WPSCombatBase
|
||||
from .combat_models import CombatConfig
|
||||
|
||||
|
||||
logger: ProjectConfig = ProjectConfig()
|
||||
@@ -16,6 +18,133 @@ logger: ProjectConfig = ProjectConfig()
|
||||
class WPSCombatAdventure(WPSCombatBase):
|
||||
"""冒险系统插件"""
|
||||
|
||||
def get_guide_subtitle(self) -> str:
|
||||
return "阶段式 PVE 冒险,产出装备与素材"
|
||||
|
||||
def collect_command_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
GuideEntry(
|
||||
title="冒险 开始",
|
||||
identifier="冒险 开始 [食物...]",
|
||||
description="启动第 1 阶段冒险,可额外投入食物缩短时间并提升成功率。",
|
||||
metadata={"别名": "start"},
|
||||
icon="🚀",
|
||||
tags=("阶段1", "需未受伤"),
|
||||
details=[
|
||||
{
|
||||
"type": "steps",
|
||||
"items": [
|
||||
"检查自身状态,确认未处于受伤或其他冒险中。",
|
||||
"可选:准备食物 `food_id` 列表;每个食物将被立即消耗。",
|
||||
"系统计算预计耗时、成功率并生成冒险记录。",
|
||||
"创建时钟任务,时间到后自动结算。",
|
||||
],
|
||||
},
|
||||
"结算时会根据装备强度与运势发放奖励。",
|
||||
],
|
||||
),
|
||||
GuideEntry(
|
||||
title="继续冒险",
|
||||
identifier="冒险 / 继续冒险",
|
||||
description="在已有链路下进入下一阶段或查看剩余时间。",
|
||||
metadata={"别名": "adventure / continue"},
|
||||
icon="⏱️",
|
||||
tags=("阶段推进",),
|
||||
details=[
|
||||
{
|
||||
"type": "steps",
|
||||
"items": [
|
||||
"查询当前冒险记录,若已在倒计时阶段则返回剩余时间。",
|
||||
"如冒险链完成并准备进入下一阶段,可再次投喂食物并启动。",
|
||||
"系统保持阶段编号,累计奖励与时间。",
|
||||
],
|
||||
}
|
||||
],
|
||||
),
|
||||
GuideEntry(
|
||||
title="冒险 停止",
|
||||
identifier="冒险 停止 / 放弃",
|
||||
description="放弃当前冒险链,结算状态并清空倒计时。",
|
||||
metadata={"别名": "放弃 / 停止"},
|
||||
icon="🛑",
|
||||
tags=("风险",),
|
||||
details=[
|
||||
"放弃后当前阶段奖励作废,未来可从第 1 阶段重开。",
|
||||
"若系统已开始结算,则命令会提示等待完成。",
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
def collect_guide_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
GuideEntry(
|
||||
title="冒险阶段",
|
||||
description="Adventure 链路包含多个阶段,难度逐渐提升,奖励也随之增加。",
|
||||
icon="⚙️",
|
||||
details=[
|
||||
{
|
||||
"type": "list",
|
||||
"items": [
|
||||
"阶段时间:基础 15 分钟,最高不超过 24 小时。",
|
||||
"投喂食物:每份食物提供额外时间与成功率加成。",
|
||||
"装备影响:装备强度越高,成功率越高且时间越短。",
|
||||
"运势影响:由运势系统提供当前整点的幸运值,用于修正成功率。",
|
||||
],
|
||||
}
|
||||
],
|
||||
),
|
||||
GuideEntry(
|
||||
title="奖励构成",
|
||||
description="冒险完成后会发放积分、装备、材料、纪念品等。",
|
||||
icon="🎁",
|
||||
details=[
|
||||
{
|
||||
"type": "list",
|
||||
"items": [
|
||||
"基础积分奖励随阶段提升。",
|
||||
"装备掉落根据稀有度加权抽取。",
|
||||
"部分阶段触发事件可获得药剂、种子或纪念品。",
|
||||
],
|
||||
}
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
def collect_additional_sections(self) -> Sequence[GuideSection]:
|
||||
sections = list(super().collect_additional_sections())
|
||||
adventure_config_entries: List[GuideEntry] = []
|
||||
config_labels = {
|
||||
"combat_adventure_base_time": "阶段起始时间 (分钟)",
|
||||
"combat_adventure_max_time": "时间上限 (分钟)",
|
||||
"combat_food_support_time": "单个食物提供时间 (分钟)",
|
||||
"combat_adventure_base_success_rate": "基础成功率",
|
||||
"combat_adventure_stage_penalty": "阶段成功率衰减",
|
||||
"combat_adventure_equipment_coeff": "装备强度加成系数",
|
||||
"combat_adventure_fortune_coeff": "运势加成系数",
|
||||
"combat_time_reduction_divisor": "时间缩减除数",
|
||||
}
|
||||
for key, label in config_labels.items():
|
||||
value = CombatConfig.get(key)
|
||||
adventure_config_entries.append(
|
||||
GuideEntry(
|
||||
title=label,
|
||||
identifier=key,
|
||||
description=f"{value}",
|
||||
category="配置项",
|
||||
icon="📐",
|
||||
)
|
||||
)
|
||||
sections.append(
|
||||
GuideSection(
|
||||
title="冒险参数一览",
|
||||
entries=adventure_config_entries,
|
||||
layout="grid",
|
||||
section_id="adventure-config",
|
||||
description="核心公式与系数决定冒险耗时、成功率与奖励结构。",
|
||||
)
|
||||
)
|
||||
return tuple(sections)
|
||||
|
||||
def is_enable_plugin(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List, Type
|
||||
from typing import Dict, List, Type, Union
|
||||
|
||||
from PWF.Convention.Runtime.Architecture import Architecture
|
||||
from PWF.Convention.Runtime.GlobalConfig import ConsoleFrontColor, ProjectConfig
|
||||
from PWF.CoreModules.plugin_interface import DatabaseModel
|
||||
|
||||
from Plugins.WPSAPI import WPSAPI
|
||||
from Plugins.WPSAPI import GuideEntry, GuideSection, WPSAPI
|
||||
from Plugins.WPSBackpackSystem import BackpackItemTier, WPSBackpackSystem
|
||||
from Plugins.WPSStoreSystem import WPSStoreSystem
|
||||
from Plugins.WPSConfigSystem import WPSConfigAPI
|
||||
@@ -46,6 +46,270 @@ class WPSCombatBase(WPSAPI):
|
||||
|
||||
_service: CombatService | None = None
|
||||
_initialized: bool = False
|
||||
|
||||
def collect_additional_sections(self) -> Sequence[GuideSection]:
|
||||
sections = list(super().collect_additional_sections())
|
||||
|
||||
equipment_entries = self._build_equipment_entries()
|
||||
if equipment_entries:
|
||||
sections.append(
|
||||
GuideSection(
|
||||
title="装备详单",
|
||||
entries=equipment_entries,
|
||||
layout="grid",
|
||||
section_id="combat-equipment",
|
||||
description="战斗系统预置的装备清单及属性效果。",
|
||||
)
|
||||
)
|
||||
|
||||
potion_entries = self._build_simple_item_entries(
|
||||
COMBAT_POTIONS,
|
||||
category="战斗药剂",
|
||||
)
|
||||
if potion_entries:
|
||||
sections.append(
|
||||
GuideSection(
|
||||
title="药剂与增益",
|
||||
entries=potion_entries,
|
||||
layout="grid",
|
||||
section_id="combat-potions",
|
||||
description="药剂品质影响价格与效果,部分由冒险掉落。",
|
||||
)
|
||||
)
|
||||
|
||||
material_entries = self._build_simple_item_entries(
|
||||
ADVENTURE_MATERIALS,
|
||||
category="冒险材料",
|
||||
)
|
||||
if material_entries:
|
||||
sections.append(
|
||||
GuideSection(
|
||||
title="冒险材料",
|
||||
entries=material_entries,
|
||||
layout="grid",
|
||||
section_id="combat-materials",
|
||||
description="材料主要来源于冒险战斗,稀有度决定获取概率。",
|
||||
)
|
||||
)
|
||||
|
||||
souvenir_entries = self._build_souvenir_entries()
|
||||
if souvenir_entries:
|
||||
sections.append(
|
||||
GuideSection(
|
||||
title="纪念品一览",
|
||||
entries=souvenir_entries,
|
||||
layout="grid",
|
||||
section_id="combat-souvenirs",
|
||||
description="纪念品可在营地或商店出售兑换积分。",
|
||||
)
|
||||
)
|
||||
|
||||
seed_entries = self._build_simple_item_entries(
|
||||
ADVENTURE_SEEDS,
|
||||
category="冒险种子",
|
||||
)
|
||||
if seed_entries:
|
||||
sections.append(
|
||||
GuideSection(
|
||||
title="冒险种子",
|
||||
entries=seed_entries,
|
||||
layout="grid",
|
||||
section_id="combat-seeds",
|
||||
description="冒险专属种子,可在菜园种植获取增益或任务物资。",
|
||||
)
|
||||
)
|
||||
|
||||
skill_entries = self._build_skill_entries()
|
||||
if skill_entries:
|
||||
sections.append(
|
||||
GuideSection(
|
||||
title="技能图鉴",
|
||||
entries=skill_entries,
|
||||
layout="list",
|
||||
section_id="combat-skills",
|
||||
description="装备附带的技能可在战斗中释放,冷却时间以回合计算。",
|
||||
)
|
||||
)
|
||||
|
||||
return tuple(sections)
|
||||
|
||||
def _format_tier(self, tier: BackpackItemTier) -> str:
|
||||
return f"{tier.display_name}"
|
||||
|
||||
def _build_equipment_entries(self) -> List[GuideEntry]:
|
||||
entries: List[GuideEntry] = []
|
||||
attr_names = {
|
||||
"HP": "生命值",
|
||||
"ATK": "攻击力",
|
||||
"DEF": "防御力",
|
||||
"SPD": "速度",
|
||||
"CRIT": "暴击率",
|
||||
"CRIT_DMG": "暴击伤害",
|
||||
}
|
||||
tier_icons = {
|
||||
BackpackItemTier.COMMON: "⚔️",
|
||||
BackpackItemTier.RARE: "🛡️",
|
||||
BackpackItemTier.EPIC: "🔥",
|
||||
BackpackItemTier.LEGENDARY: "🌟",
|
||||
}
|
||||
for eq in EQUIPMENT_REGISTRY.values():
|
||||
attr_list = []
|
||||
for key, value in eq.attributes.items():
|
||||
label = attr_names.get(key, key)
|
||||
suffix = "%" if key in ("CRIT", "CRIT_DMG") else ""
|
||||
attr_list.append(f"{label}+{value}{suffix}")
|
||||
skills = []
|
||||
for skill_id in eq.skill_ids:
|
||||
skill = SKILL_REGISTRY.get(skill_id)
|
||||
if skill:
|
||||
skills.append(f"{skill.icon} {skill.name}")
|
||||
metadata = {
|
||||
"槽位": eq.slot,
|
||||
"稀有度": self._format_tier(eq.tier),
|
||||
}
|
||||
details: List[Dict[str, Any] | str] = []
|
||||
if attr_list:
|
||||
details.append({"type": "list", "items": attr_list})
|
||||
if skills:
|
||||
details.append({"type": "list", "items": [f"技能:{info}" for info in skills]})
|
||||
if eq.description:
|
||||
details.append(eq.description)
|
||||
entries.append(
|
||||
GuideEntry(
|
||||
title=eq.name,
|
||||
identifier=eq.item_id,
|
||||
description=eq.description or "标准装备。",
|
||||
category="装备",
|
||||
metadata=metadata,
|
||||
icon=tier_icons.get(eq.tier, "⚔️"),
|
||||
tags=skills,
|
||||
details=details,
|
||||
)
|
||||
)
|
||||
return entries
|
||||
|
||||
def _build_simple_item_entries(
|
||||
self,
|
||||
registry: Dict[str, tuple],
|
||||
*,
|
||||
category: str,
|
||||
) -> List[GuideEntry]:
|
||||
entries: List[GuideEntry] = []
|
||||
icon_map = {
|
||||
"战斗药剂": "🧪",
|
||||
"冒险材料": "🪨",
|
||||
"纪念品": "🎖️",
|
||||
"冒险种子": "🌱",
|
||||
}
|
||||
for item_id, payload in registry.items():
|
||||
name, tier, *rest = payload
|
||||
description = rest[-1] if rest else ""
|
||||
metadata = {"稀有度": self._format_tier(tier)}
|
||||
if category == "战斗药剂":
|
||||
price_lookup = {
|
||||
BackpackItemTier.COMMON: 50,
|
||||
BackpackItemTier.RARE: 150,
|
||||
BackpackItemTier.EPIC: 500,
|
||||
}
|
||||
price = price_lookup.get(tier)
|
||||
if price:
|
||||
metadata["默认售价"] = f"{price} 分"
|
||||
entries.append(
|
||||
GuideEntry(
|
||||
title=name,
|
||||
identifier=item_id,
|
||||
description=description,
|
||||
category=category,
|
||||
metadata=metadata,
|
||||
icon=icon_map.get(category, "📦"),
|
||||
)
|
||||
)
|
||||
return entries
|
||||
|
||||
def _build_souvenir_entries(self) -> List[GuideEntry]:
|
||||
entries: List[GuideEntry] = []
|
||||
for item_id, (name, tier, price, desc) in ADVENTURE_SOUVENIRS.items():
|
||||
entries.append(
|
||||
GuideEntry(
|
||||
title=name,
|
||||
identifier=item_id,
|
||||
description=desc,
|
||||
category="纪念品",
|
||||
metadata={
|
||||
"稀有度": self._format_tier(tier),
|
||||
"基础售价": f"{price} 分",
|
||||
},
|
||||
icon="🎖️",
|
||||
)
|
||||
)
|
||||
return entries
|
||||
|
||||
def _build_skill_entries(self) -> List[GuideEntry]:
|
||||
entries: List[GuideEntry] = []
|
||||
for skill in SKILL_REGISTRY.values():
|
||||
details: List[Union[str, Dict[str, Any]]] = [
|
||||
{"type": "list", "items": [effect.get("description", str(effect)) for effect in skill.effects]},
|
||||
]
|
||||
if skill.cooldown:
|
||||
details.append(f"冷却:{skill.cooldown} 回合")
|
||||
entries.append(
|
||||
GuideEntry(
|
||||
title=skill.name,
|
||||
identifier=skill.skill_id,
|
||||
description=skill.description,
|
||||
category="技能",
|
||||
icon=skill.icon,
|
||||
metadata={},
|
||||
details=details,
|
||||
)
|
||||
)
|
||||
return entries
|
||||
|
||||
def get_guide_subtitle(self) -> str:
|
||||
return "冒险、战斗与装备体系的基础能力"
|
||||
|
||||
def get_guide_metadata(self) -> Dict[str, str]:
|
||||
return {
|
||||
"装备数量": str(len(EQUIPMENT_REGISTRY)),
|
||||
"药剂数量": str(len(COMBAT_POTIONS)),
|
||||
"纪念品数量": str(len(ADVENTURE_SOUVENIRS)),
|
||||
"冒险材料": str(len(ADVENTURE_MATERIALS)),
|
||||
}
|
||||
|
||||
def collect_item_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
{
|
||||
"title": "装备库",
|
||||
"description": f"{len(EQUIPMENT_REGISTRY)} 件装备,自动注册至背包并带有属性描述。",
|
||||
},
|
||||
{
|
||||
"title": "药剂与材料",
|
||||
"description": (
|
||||
f"{len(COMBAT_POTIONS)} 种药剂、{len(ADVENTURE_MATERIALS)} 种冒险素材,"
|
||||
"部分可在商店购买或冒险获得。"
|
||||
),
|
||||
},
|
||||
{
|
||||
"title": "纪念品",
|
||||
"description": f"{len(ADVENTURE_SOUVENIRS)} 种纪念品可在营地出售换取积分。",
|
||||
},
|
||||
)
|
||||
|
||||
def collect_guide_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
{
|
||||
"title": "冒险流程",
|
||||
"description": "冒险按阶段推进,使用食物缩短时间并依赖运势与装备强度影响结果。",
|
||||
},
|
||||
{
|
||||
"title": "装备体系",
|
||||
"description": "装备提供属性与技能加成,通过 `装备`/`战斗属性` 等指令查看详情。",
|
||||
},
|
||||
{
|
||||
"title": "积分与资源",
|
||||
"description": "冒险和战斗会产出积分、装备、材料等,通过商店与营地完成循环。",
|
||||
},
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def service(cls) -> CombatService:
|
||||
|
||||
@@ -2,10 +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 .combat_plugin_base import WPSCombatBase
|
||||
|
||||
|
||||
@@ -15,6 +16,69 @@ logger: ProjectConfig = ProjectConfig()
|
||||
class WPSCombatBattle(WPSCombatBase):
|
||||
"""PVP对战插件"""
|
||||
|
||||
def get_guide_subtitle(self) -> str:
|
||||
return "玩家间回合制对战指令集"
|
||||
|
||||
def collect_command_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
GuideEntry(
|
||||
title="挑战",
|
||||
identifier="挑战 <目标用户ID>",
|
||||
description="向指定玩家发起 PVP 挑战。",
|
||||
metadata={"别名": "challenge"},
|
||||
icon="⚔️",
|
||||
details=[
|
||||
{"type": "list", "items": ["不可挑战自己。", "挑战在超时前需对方接受,否则自动失效。"]},
|
||||
],
|
||||
),
|
||||
GuideEntry(
|
||||
title="接受挑战",
|
||||
identifier="接受挑战 <挑战ID>",
|
||||
description="接受待处理的挑战并初始化战斗。",
|
||||
metadata={"别名": "accept"},
|
||||
icon="✅",
|
||||
details=[
|
||||
{"type": "steps", "items": ["输入挑战列表中的 ID。", "系统创建战斗记录并通知双方。"]},
|
||||
],
|
||||
),
|
||||
GuideEntry(
|
||||
title="拒绝挑战",
|
||||
identifier="拒绝挑战 <挑战ID>",
|
||||
description="拒绝尚未开始的挑战请求。",
|
||||
metadata={"别名": "reject"},
|
||||
icon="🚫",
|
||||
),
|
||||
GuideEntry(
|
||||
title="战斗动作",
|
||||
identifier="战斗 <战斗ID> <技能名>",
|
||||
description="在战斗中释放技能或执行普攻。",
|
||||
metadata={"别名": "battle"},
|
||||
icon="🌀",
|
||||
details=[
|
||||
{"type": "list", "items": ["技能冷却与效果可在 `技能列表` 中查看。", "战斗为回合制,按顺序执行。"]},
|
||||
],
|
||||
),
|
||||
GuideEntry(
|
||||
title="投降",
|
||||
identifier="投降 <战斗ID>",
|
||||
description="主动认输并结束当前战斗。",
|
||||
metadata={"别名": "surrender"},
|
||||
icon="🏳️",
|
||||
),
|
||||
)
|
||||
|
||||
def collect_guide_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
{
|
||||
"title": "挑战生命周期",
|
||||
"description": "挑战需在配置的超时前被接受,超时将自动失效。",
|
||||
},
|
||||
{
|
||||
"title": "战斗指令",
|
||||
"description": "战斗中按回合输入技能,系统根据属性与技能效果计算伤害。",
|
||||
},
|
||||
)
|
||||
|
||||
def is_enable_plugin(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
from typing import Optional, Sequence
|
||||
|
||||
from PWF.Convention.Runtime.Architecture import Architecture
|
||||
from PWF.Convention.Runtime.GlobalConfig import ConsoleFrontColor, ProjectConfig
|
||||
|
||||
from Plugins.WPSAPI import GuideEntry
|
||||
from Plugins.WPSBackpackSystem import WPSBackpackSystem
|
||||
from Plugins.WPSConfigSystem import WPSConfigAPI
|
||||
|
||||
@@ -27,6 +28,35 @@ class WPSCombatCamp(WPSCombatBase):
|
||||
meta[0].lower(): item_id for item_id, meta in self._souvenir_by_id.items()
|
||||
}
|
||||
|
||||
def get_guide_subtitle(self) -> str:
|
||||
return "营地寄售区:纪念品快速变现"
|
||||
|
||||
def collect_command_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
GuideEntry(
|
||||
title="营地 售出",
|
||||
identifier="营地 售出 <纪念品> <数量>",
|
||||
description="将纪念品出售给系统换取积分。",
|
||||
metadata={"别名": "camp"},
|
||||
icon="🏕️",
|
||||
details=[
|
||||
{"type": "steps", "items": ["输入纪念品名称或 ID。", "校验背包数量并扣除。", "根据基础售价发放积分。"]},
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
def collect_guide_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
{
|
||||
"title": "销售指令",
|
||||
"description": "`营地 售出 <纪念品> <数量>`,名称可用中文或物品ID。",
|
||||
},
|
||||
{
|
||||
"title": "积分结算",
|
||||
"description": "根据纪念品基础售价乘以数量发放积分,并扣除背包库存。",
|
||||
},
|
||||
)
|
||||
|
||||
def is_enable_plugin(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
@@ -2,10 +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 .combat_plugin_base import WPSCombatBase
|
||||
|
||||
|
||||
@@ -15,6 +16,42 @@ logger: ProjectConfig = ProjectConfig()
|
||||
class WPSCombatEquipment(WPSCombatBase):
|
||||
"""装备管理插件"""
|
||||
|
||||
def get_guide_subtitle(self) -> str:
|
||||
return "穿戴与卸下战斗装备"
|
||||
|
||||
def collect_command_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
GuideEntry(
|
||||
title="装备",
|
||||
identifier="装备 [物品名|ID]",
|
||||
description="穿戴指定装备,或不带参数时查看当前装备。",
|
||||
metadata={"别名": "equip"},
|
||||
icon="🛡️",
|
||||
details=[
|
||||
{"type": "list", "items": ["名称与 ID 均可匹配装备库条目。", "若未携带该装备会提示不足。"]},
|
||||
],
|
||||
),
|
||||
GuideEntry(
|
||||
title="卸下",
|
||||
identifier="卸下 <槽位>",
|
||||
description="卸下指定槽位(weapon/helmet/armor/boots/accessory)的装备。",
|
||||
metadata={"别名": "unequip"},
|
||||
icon="🧤",
|
||||
),
|
||||
)
|
||||
|
||||
def collect_guide_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
{
|
||||
"title": "槽位说明",
|
||||
"description": "支持 weapon/helmet/armor/boots/accessory 五个槽位。",
|
||||
},
|
||||
{
|
||||
"title": "属性加成",
|
||||
"description": "装备属性直接影响战斗与冒险计算,可在 `战斗属性` 指令中查看综合加成。",
|
||||
},
|
||||
)
|
||||
|
||||
def is_enable_plugin(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
from typing import Optional, Sequence
|
||||
|
||||
from PWF.Convention.Runtime.Config import *
|
||||
from PWF.Convention.Runtime.GlobalConfig import ConsoleFrontColor, ProjectConfig
|
||||
from Plugins.WPSCombatSystem.combat_models import PlayerStats, EquipmentDefinition
|
||||
from Plugins.WPSAPI import GuideEntry
|
||||
from Plugins.WPSCombatSystem.combat_models import EquipmentDefinition, PlayerStats
|
||||
from .combat_plugin_base import WPSCombatBase
|
||||
|
||||
|
||||
@@ -16,6 +17,44 @@ logger: ProjectConfig = ProjectConfig()
|
||||
class WPSCombatStatus(WPSCombatBase):
|
||||
"""状态查看插件"""
|
||||
|
||||
def get_guide_subtitle(self) -> str:
|
||||
return "查看战斗属性、装备栏与技能列表"
|
||||
|
||||
def collect_command_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
GuideEntry(
|
||||
title="战斗属性",
|
||||
identifier="战斗属性",
|
||||
description="展示基础属性、装备强度与技能概览。",
|
||||
metadata={"别名": "combat"},
|
||||
icon="📊",
|
||||
),
|
||||
GuideEntry(
|
||||
title="装备栏",
|
||||
identifier="装备栏",
|
||||
description="仅查看当前装备与各槽位详情。",
|
||||
icon="🎽",
|
||||
),
|
||||
GuideEntry(
|
||||
title="技能列表",
|
||||
identifier="技能列表",
|
||||
description="罗列当前可用技能、描述与冷却时间。",
|
||||
icon="📜",
|
||||
),
|
||||
)
|
||||
|
||||
def collect_guide_entries(self) -> Sequence[GuideEntry]:
|
||||
return (
|
||||
{
|
||||
"title": "属性来源",
|
||||
"description": "数值由基础配置、装备加成与技能被动共同组成。",
|
||||
},
|
||||
{
|
||||
"title": "技能冷却",
|
||||
"description": "输出中会标注技能冷却回合,用于 PVP 战斗操作参考。",
|
||||
},
|
||||
)
|
||||
|
||||
def is_enable_plugin(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user