载入中...
搜索中...
未找到
eve::tactics::TacticsSettlementRuntime类 参考final

Owner-thread settlement bridge between tactics declarations and game-owned combat state. 更多...

#include <TacticsSettlement.h>

Public 成员函数

Result< void > configureSettlementRules (const settlement::SettlementRuleSet &rules)
 Replace declarative rules used by subsequent tactical ability settlements.
 
Result< settlement::SettlementResult > settle (const AbilitySettlementRequest &request, settlement::ISettlementPolicy &policy, game_event::GameEventLog *eventLog=nullptr) const
 Settle one committed ability receipt against game-owned state.
 
Result< std::vector< settlement::SettlementResult > > settleAtomic (std::span< const AbilitySettlementRequest > requests, std::span< settlement::ISettlementPolicy * > policies, game_event::GameEventLog *eventLog=nullptr) const
 Settle an ordered tactical area effect as one atomic transaction.
 

详细描述

Owner-thread settlement bridge between tactics declarations and game-owned combat state.

Tactics continues to own action legality and resources. The supplied policy owns health, status, board-object, or other effect state; this bridge only supplies the common ordered, explainable and transactional settlement protocol.

在文件 TacticsSettlement.h 第 45 行定义.

成员函数说明

◆ configureSettlementRules()

Result< void > eve::tactics::TacticsSettlementRuntime::configureSettlementRules ( const settlement::SettlementRuleSet &  rules)

Replace declarative rules used by subsequent tactical ability settlements.

返回
Applied, or a structured failure while retaining the previous rule set. @thread Call on the battle's owning simulation thread outside settle. @reentrancy Does not invoke callbacks.

在文件 TacticsSettlement.cpp 第 32 行定义.

引用了 eve::Applied, eve::settlement::SettlementRuleSet::install(), eve::Status::success() , 以及 eve::Result< T >::success().

◆ settle()

Result< settlement::SettlementResult > eve::tactics::TacticsSettlementRuntime::settle ( const AbilitySettlementRequest &  request,
settlement::ISettlementPolicy &  policy,
game_event::GameEventLog *  eventLog = nullptr 
) const

Settle one committed ability receipt against game-owned state.

参数
requestOwning receipt, magnitude, tags, context and deterministic tick.
policySynchronous borrowed policy; it is not retained after the call.
eventLogOptional event owner participating in the atomic commit.
返回
Complete settlement audit, or failure with policy state rolled back. @thread Call on the owning simulation thread. @reentrancy The policy must not re-enter this runtime.

在文件 TacticsSettlement.cpp 第 40 行定义.

引用了 eve::Result< T >::failure(), eve::tactics::makeSettlementRequest(), request , 以及 eve::settlement::SettlementPipeline::settle().

◆ settleAtomic()

Result< std::vector< settlement::SettlementResult > > eve::tactics::TacticsSettlementRuntime::settleAtomic ( std::span< const AbilitySettlementRequest >  requests,
std::span< settlement::ISettlementPolicy * >  policies,
game_event::GameEventLog *  eventLog = nullptr 
) const

Settle an ordered tactical area effect as one atomic transaction.

参数
requestsOwning unit or cell-target requests in deterministic area order.
policiesBorrowed state owners matching requests one-for-one.
eventLogOptional event owner rolled back with every domain mutation on failure.
返回
One canonical result per request, or failure with all domain state restored. @thread Call on every involved state's common owning simulation thread. @reentrancy Policies and the event log must not re-enter this runtime. @cost Linear in request count plus one full settlement per area target.

在文件 TacticsSettlement.cpp 第 48 行定义.

引用了 eve::tactics::makeSettlementRequest(), projected, request , 以及 eve::settlement::SettlementPipeline::settleAtomic().


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