载入中...
搜索中...
未找到
ActionEncounter.h
浏览该文件的文档.
1#pragma once
2#include <memory>
3#include <string_view>
4#include "common/Export.h"
5#include "common/Result.h"
6
7namespace eve::rpg {
8class RPGActor;
9class GameState;
10class Tracker;
21public:
31 void close() noexcept;
33 ActionEncounter& operator=(const ActionEncounter&) = delete;
39 [[nodiscard]] Result<void> bind(RPGActor& player, RPGActor& enemy, std::string_view playerId,
40 std::string_view enemyId);
49 [[nodiscard]] Result<double> hit(bool playerAttacks, double amount, int tick);
56 [[nodiscard]] Result<void> claim(GameState& state, Tracker& tracker, std::string_view encounterId);
58 [[nodiscard]] bool hasPendingReward() const;
60 [[nodiscard]] bool isClosed() const;
62 [[nodiscard]] bool isBound() const;
67 [[nodiscard]] int lastTick() const;
68
69private:
70 struct Impl;
71 std::unique_ptr<Impl> impl_;
72};
73} // namespace eve::rpg
#define EVENGINE_API_PLATFORM
Definition Export.h:107
bool hit
Move-only, checked operation results for the common layer.
SimulationTick tick
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Two-participant action encounter with generation-safe links and retryable kill delivery....
~ActionEncounter()
Unregister the provider before destroying its link mapping.
一份游戏状态(开关/变量/独立变量)。
Definition GameState.h:26
属性 / 状态 / 技能三表合一的 ECS 实体。
Definition RPGActor.h:34
一份任务进度 + 本实例事件队列。
Definition Tracker.h:26
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。