载入中...
搜索中...
未找到
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;
35 std::string requiredQuestId;
36 std::string notifyTopic;
37 std::string notifyTarget;
38 int notifyAmount = 0;
39 std::string defeatCounterId;
43};
44
47public:
55 [[nodiscard]] static eve::Result<int> replaceFromJsonStrict(const std::string &json);
56 static void clear();
58 static int count();
60 static const EncounterDefinition *find(const std::string &id);
62 static int memberCount(const std::string &id);
67 static RPGActor *createActor(const std::string &id);
72 static RPGActor *createMemberActor(const std::string &id, int memberIndex);
73};
74
75} // namespace eve::rpg
#define EVENGINE_API_PLATFORM
Definition Export.h:107
Move-only, checked operation results for the common layer.
std::uint32_t count
Move-only operation result carrying either a value or Status.
Definition Result.h:155
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
One immutable enemy member inside an encounter composition.