载入中...
搜索中...
未找到
EncounterCatalogue.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
7#include "common/Result.h"
8
9#include <string>
10#include <vector>
11
12namespace eve::rpg {
13
14class RPGActor;
15
18 std::string id;
19 std::string displayName;
20 std::string skillId;
21 double attack = 0.0;
22 double defense = 0.0;
23 double maxHp = 1.0;
24 double speed = 0.0;
25};
26
29 std::string id;
30 std::string displayName;
31 std::vector<EncounterMemberDefinition> members;
32 double xpReward = 0.0;
33 double xpGrowth = 1.2;
34 double goldReward = 0.0;
36 std::string requiredQuestId;
37 std::string notifyTopic;
38 std::string notifyTarget;
39 int notifyAmount = 0;
40 std::string defeatCounterId;
44};
45
48public:
57 [[nodiscard]] static eve::Result<int> replaceFromJsonStrict(const std::string &json);
58 static void clear();
60 static int count();
62 static const EncounterDefinition *find(const std::string &id);
64 static int memberCount(const std::string &id);
69 static RPGActor *createActor(const std::string &id);
74 static RPGActor *createMemberActor(const std::string &id, int memberIndex);
75};
76
77} // namespace eve::rpg
#define EVENGINE_API_PLATFORM
Definition Export.h:107
Move-only, checked operation results for the common layer.
int count
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Process-local strict encounter content catalogue.
属性 / 状态 / 技能三表合一的 ECS 实体。
Definition RPGActor.h:34
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。
One immutable, fully specified encounter composition and settlement definition.
std::vector< EncounterMemberDefinition > members
std::string requiredQuestId
Empty disables the quest prerequisite; nonempty requires an active quest.
One immutable enemy member inside an encounter composition.