-
-
Notifications
You must be signed in to change notification settings - Fork 122
Expand file tree
/
Copy pathbuff_info.h
More file actions
59 lines (52 loc) · 1.74 KB
/
buff_info.h
File metadata and controls
59 lines (52 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include "lasting_effect.h"
#include "attr_type.h"
#include "effect.h"
#include "msg_type.h"
#include "fx_variant_name.h"
#include "color.h"
#include "special_attr.h"
#include "t_string.h"
struct YouMessage {
MsgType SERIAL(type);
TString SERIAL(message);
SERIALIZE_ALL(type, message)
};
struct VerbMessage {
TString SERIAL(secondPerson);
TString SERIAL(thirdPerson);
TString SERIAL(message);
SERIALIZE_ALL(secondPerson, thirdPerson, message)
};
using BuffMessageInfo = variant<YouMessage, VerbMessage>;
void applyMessage(const BuffMessageInfo&, const Creature*);
void serialize(PrettyInputArchive&, BuffMessageInfo&, const unsigned int);
struct BuffInfo {
TString SERIAL(name);
optional<BuffMessageInfo> SERIAL(addedMessage);
optional<BuffMessageInfo> SERIAL(removedMessage);
optional<Effect> SERIAL(startEffect);
optional<Effect> SERIAL(tickEffect);
optional<Effect> SERIAL(endEffect);
TString SERIAL(description);
TString SERIAL(adjective);
bool SERIAL(consideredBad) = false;
bool SERIAL(combatConsumable) = false;
bool SERIAL(stacks) = false;
bool SERIAL(canAbsorb) = true;
bool SERIAL(canWishFor) = true;
bool SERIAL(inheritsFromSteed) = false;
optional<double> SERIAL(efficiencyMultiplier);
int SERIAL(price) = 50;
Color SERIAL(color);
optional<TString> SERIAL(hatedGroupName);
double SERIAL(defenseMultiplier) = 1.0;
optional<AttrType> SERIAL(defenseMultiplierAttr);
FXVariantName SERIAL(fx) = FXVariantName::BUFF_RED;
optional<pair<AttrType, AttrType>> SERIAL(modifyDamageAttr);
optional<SpecialAttr> SERIAL(specialAttr);
optional<CreaturePredicate> SERIAL(hiddenPredicate);
template <class Archive>
void serialize(Archive& ar1, const unsigned int);
};
CEREAL_CLASS_VERSION(BuffInfo, 2)