载入中...
搜索中...
未找到
eve::combat::DamageRuntime类 参考

Owner-thread deterministic damage coordinator. 更多...

#include <Damage.h>

Public 成员函数

 DamageRuntime (const IDamageRule *rule=nullptr, HitReactionPolicy policy={})
 Construct with an optional borrowed rule provider and owning policy copy.
 
Result< void > configureSettlementRules (const settlement::SettlementRuleSet &rules)
 Replace the optional declarative buff/effect rules used by subsequent damage settlements.
 
Result< DamageAmounts > preview (const CombatState &target, const DamageRequest &request) const
 Resolve provider damage amounts before settlement stages, without mutating the target.
 
Result< DamageOutcome > previewSettlement (const CombatState &target, const DamageRequest &request) const
 Preview the complete rule, mitigation, shield, clamp and reaction result without mutation.
 
Result< DamageOutcome > apply (CombatState &target, const DamageRequest &request) const
 Resolve and atomically commit one damage request.
 
Result< settlement::SettlementResult > heal (CombatState &target, SubjectRef source, double amount) const
 Resolve and atomically commit health restoration through the configured settlement pipeline.
 
Result< double > recoverPoise (CombatState &target, double amount) const
 Restore an explicit poise amount, clamped to maxPoise.
 

详细描述

Owner-thread deterministic damage coordinator.

apply prepares and validates the complete outcome before one assignment to target state. It uses no clock or RNG. IEEE-754 results are deterministic for identical inputs on supported backends; replay comparison uses exact stored doubles produced by this single resolution path.

在文件 Damage.h 第 125 行定义.

构造及析构函数说明

◆ DamageRuntime()

eve::combat::DamageRuntime::DamageRuntime ( const IDamageRule *  rule = nullptr,
HitReactionPolicy  policy = {} 
)
inlineexplicit

Construct with an optional borrowed rule provider and owning policy copy.

Rule.

在文件 Damage.h 第 128 行定义.

成员函数说明

◆ apply()

◆ configureSettlementRules()

Result< void > eve::combat::DamageRuntime::configureSettlementRules ( const settlement::SettlementRuleSet &  rules)

Replace the optional declarative buff/effect rules used by subsequent damage settlements.

参数
rulesValidated owning rule collection; the installed snapshot is copied.
返回
Applied, or a duplicate/invalid stage diagnostic without changing the previous pipeline. @thread Call on the owning simulation thread while no apply call is active. @reentrancy Does not invoke gameplay callbacks.

在文件 Damage.cpp 第 279 行定义.

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

被这些函数引用 eve::rts::RTS::configureSettlementRules().

◆ heal()

Result< settlement::SettlementResult > eve::combat::DamageRuntime::heal ( CombatState &  target,
SubjectRef  source,
double  amount 
) const

Resolve and atomically commit health restoration through the configured settlement pipeline.

参数
targetAuthoritative combat state to restore.
sourceStable subject responsible for the restoration; may be nil for passive regeneration.
amountRequested finite non-negative restoration.
返回
Complete canonical settlement audit, including the clamped applied amount.

在文件 Damage.cpp 第 262 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, request, eve::settlement::SettlementPipeline::settle(), source, eve::settlement::SettlementRequest::source, target , 以及 valid.

被这些函数引用 eve::rts::RTS::heal(), eve::rts::EffectSystem::step() , 以及 eve::rts::RepairSystem::step().

◆ preview()

Result< DamageAmounts > eve::combat::DamageRuntime::preview ( const CombatState &  target,
const DamageRequest &  request 
) const

Resolve provider damage amounts before settlement stages, without mutating the target.

在文件 Damage.cpp 第 181 行定义.

引用了 eve::Diagnostic::error(), eve::combat::IDamageRule::evaluate(), eve::Result< T >::failure(), eve::combat::DamageAmounts::healthDamage, eve::InvalidArgument, request, eve::Result< T >::success(), target , 以及 valid.

被这些函数引用 apply() , 以及 eve::rts::TacticsSystem::step().

◆ previewSettlement()

Result< DamageOutcome > eve::combat::DamageRuntime::previewSettlement ( const CombatState &  target,
const DamageRequest &  request 
) const

Preview the complete rule, mitigation, shield, clamp and reaction result without mutation.

返回
The same owning outcome apply would produce while leaving target unchanged. @cost Same order as one full damage settlement; use preview() when only provider amounts are needed.

在文件 Damage.cpp 第 256 行定义.

引用了 apply(), request , 以及 target.

◆ recoverPoise()

Result< double > eve::combat::DamageRuntime::recoverPoise ( CombatState &  target,
double  amount 
) const

Restore an explicit poise amount, clamped to maxPoise.

在文件 Damage.cpp 第 287 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::NoOp, eve::Status::success(), eve::Result< T >::success(), target , 以及 valid.


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