载入中...
搜索中...
未找到
eve::rpg::BattleTacticsCatalogue类 参考

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()

void eve::rpg::BattleTacticsCatalogue::clear ( )
static

在文件 BattleTactics.cpp 第 150 行定义.

引用了 definitions.

被这些函数引用 eve::rpg::RPG::clearBattleTactics().

◆ count()

int eve::rpg::BattleTacticsCatalogue::count ( )
static

Returns the number of .

在文件 BattleTactics.cpp 第 151 行定义.

引用了 definitions.

◆ queueAction()

eve::Result< std::string > eve::rpg::BattleTacticsCatalogue::queueAction ( Battle *  battle,
RPGActor *  actor,
const std::string &  tacticsId 
)
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()

eve::Result< int > eve::rpg::BattleTacticsCatalogue::replaceFromJsonStrict ( const std::string &  json)
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.

被这些函数引用 eve::rpg::RPG::replaceBattleTacticsFromJson().


该类的文档由以下文件生成: