载入中...
搜索中...
未找到
ActionDamageBlock.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
8
9#include <cstddef>
10#include <string>
11
12namespace eve::action {
13
16 double x = 0.0;
17 double y = 0.0;
18 double z = 0.0;
19
21 auto operator<=>(const ActionDamageImpulse&) const = default;
22};
23
27 std::string damageType;
29 double amount = 0.0;
31 double poiseAmount = 0.0;
33 std::size_t targetIndex = 0;
36
38 auto operator<=>(const ActionDamageBinding&) const = default;
39
41 [[nodiscard]] static Result<ActionDamageBinding> fromPayload(const Value::Object& payload);
42};
43
51public:
52 static constexpr const char* capabilityName = "eve.action.damage-sink";
54 virtual ~IActionDamageSink() = default;
55
57 [[nodiscard]] virtual bool supports(ecs::EntityHandle target) const = 0;
59 [[nodiscard]] virtual Result<void> apply(const ActionDamageBinding& binding,
60 const ActionNotifyContext& context) = 0;
61};
62
63} // namespace eve::action
LogicalId target
Extensible notify descriptors, validation and runtime routing.
Value::Object payload
#define EVENGINE_API_PLATFORM
Definition Export.h:107
eve::action::ActionVfxBinding binding
const VegetationPresetContext & context
Move-only operation result carrying either a value or Status.
Definition Result.h:155
std::map< std::string, Value > Object
Definition Value.h:34
Optional target-domain adapter for timeline damage.
virtual bool supports(ecs::EntityHandle target) const =0
Whether this sink can resolve the supplied target handle now.
static constexpr const char * capabilityName
virtual ~IActionDamageSink()=default
Releases IActionDamageSink resources.
virtual Result< void > apply(const ActionDamageBinding &binding, const ActionNotifyContext &context)=0
Atomically apply one validated damage request.
Owning validated damage request authored on an action timeline.
ActionDamageImpulse knockback
Optional world-space knockback impulse.
std::string damageType
Gameplay-tag damage classification.
auto operator<=>(const ActionDamageBinding &) const =default
Operator <=>.
Renderer- and combat-implementation-neutral knockback impulse.
auto operator<=>(const ActionDamageImpulse &) const =default
Operator <=>.
Context linking a routed event to its action execution.