Process-local strict catalogue that selects and queues companion/AI actions. 更多...
#include <BattleTactics.h>
静态 Public 成员函数 | |
| static eve::Result< int > | replaceFromJsonStrict (const std::string &json) |
| Validate and atomically replace all tactic definitions. | |
| static void | clear () |
| static int | count () |
| Returns the number of . | |
| static eve::Result< std::string > | queueAction (Battle *battle, RPGActor *actor, const std::string &tacticsId) |
| Select the first matching rule and queue it through Battle's canonical checked API. | |
详细描述
Process-local strict catalogue that selects and queues companion/AI actions.
在文件 BattleTactics.h 第 32 行定义.
成员函数说明
◆ clear()
|
static |
◆ count()
|
static |
◆ queueAction()
|
static |
Select the first matching rule and queue it through Battle's canonical checked API.
- 返回
- Selected skill id (empty means basic attack), or a structured failure without queue mutation.
在文件 BattleTactics.cpp 第 153 行定义.
引用了 definitions, end, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::rpg::RPGActor::getMax(), eve::InvalidArgument, eve::rpg::LowestHealthAlly, maximum, eve::NotFound, eve::PreconditionViolation, queued, eve::rpg::Self, eve::rpg::Battle::setActionByPolicyChecked(), side, eve::Result< T >::success() , 以及 target.
被这些函数引用 eve::rpg::RPG::queueBattleTactic().
◆ replaceFromJsonStrict()
|
static |
Validate and atomically replace all tactic definitions.
- 返回
- Committed definition count, or a structured failure preserving the previous catalogue.
- 备注
- Skill references and target policies are validated. Each definition must end in an unconditional default so queueAction cannot silently omit a living actor's turn.
在文件 BattleTactics.cpp 第 46 行定义.
引用了 eve::AlreadyExists, eve::rpg::Auto, eve::rpg::BattleTacticRule::belowRatio, eve::rpg::BattleTacticRule::conditionResource, definitions, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::rpg::SkillRegistry::find(), index, eve::InvalidArgument, key, eve::NotFound, eve::json::Document::parse(), eve::ParseError, path, root, size, eve::rpg::BattleTacticRule::skillId, eve::Result< T >::success(), eve::rpg::BattleTacticRule::targetPolicy , 以及 eve::rpg::SkillDefinition::targetType.
该类的文档由以下文件生成:
- src/modules/rpg/BattleTactics.h
- src/modules/rpg/BattleTactics.cpp