forked from miki151/keeperrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuff_info.h
52 lines (46 loc) · 1.94 KB
/
buff_info.h
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
#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"
struct YouMessage {
MsgType SERIAL(type);
string SERIAL(message);
SERIALIZE_ALL(type, message)
};
struct VerbMessage {
string SERIAL(secondPerson);
string SERIAL(thirdPerson);
string 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 {
string SERIAL(name);
optional<BuffMessageInfo> SERIAL(addedMessage);
optional<BuffMessageInfo> SERIAL(removedMessage);
optional<Effect> SERIAL(startEffect);
optional<Effect> SERIAL(tickEffect);
optional<Effect> SERIAL(endEffect);
string SERIAL(description);
string 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<string> SERIAL(hatedGroupName);
double SERIAL(defenseMultiplier) = 1.0;
optional<AttrType> SERIAL(defenseMultiplierAttr);
FXVariantName SERIAL(fx) = FXVariantName::BUFF_RED;
optional<pair<AttrType, AttrType>> SERIAL(modifyDamageAttr);
SERIALIZE_ALL(NAMED(modifyDamageAttr), OPTION(inheritsFromSteed), OPTION(canWishFor), OPTION(canAbsorb), OPTION(combatConsumable), OPTION(fx), OPTION(defenseMultiplier), OPTION(defenseMultiplierAttr), NAMED(hatedGroupName), NAMED(name), OPTION(addedMessage), OPTION(removedMessage), NAMED(startEffect), NAMED(tickEffect), NAMED(endEffect), OPTION(stacks), OPTION(consideredBad), NAMED(description), OPTION(price), NAMED(color), NAMED(adjective), OPTION(efficiencyMultiplier))
};