载入中...
搜索中...
未找到
ActionDamageBlock.cpp
浏览该文件的文档.
30 return found == payload.end() ? Result<double>::success(fallback) : number(found->second, field);
38 const auto* damageType = foundType == payload.end() ? nullptr : foundType->second.getIf<std::string>();
41 Diagnostic::error(DiagnosticCode::InvalidArgument, "damage type must be a gameplay tag", "damageType"));
54 Diagnostic::error(DiagnosticCode::InvalidArgument, "damage amount must be non-negative", "amount"));
57 Diagnostic::error(DiagnosticCode::InvalidArgument, "poise damage must be non-negative", "poiseAmount"));
Typed instantaneous combat-damage action contract.
Stable hierarchical gameplay-tag definitions and registry.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
Definition AbilityAsset.cpp:9
const EditorValue * field(const EditorValue &value, const char *name)
Definition RoadNetworkEditTarget.cpp:15
bool isValidGameplayTagName(std::string_view name) noexcept
Returns whether a name is a canonical dot-separated gameplay tag.
Definition GameplayTag.cpp:29
@ InvalidArgument
Owning validated damage request authored on an action timeline.
Definition ActionDamageBlock.h:25
std::size_t targetIndex
Target index into ActionNotifyContext::targets.
Definition ActionDamageBlock.h:33
ActionDamageImpulse knockback
Optional world-space knockback impulse.
Definition ActionDamageBlock.h:35
static Result< ActionDamageBinding > fromPayload(const Value::Object &payload)
Decode and validate a damage payload without mutating combat state.
Definition ActionDamageBlock.cpp:35