forked from miki151/keeperrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
attack_trigger.h
74 lines (62 loc) · 1.37 KB
/
attack_trigger.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#pragma once
#include "util.h"
#include "furniture_type.h"
#include "enum_variant.h"
#include "pretty_archive.h"
#include "resource_id.h"
struct RoomTrigger {
FurnitureType SERIAL(type);
double SERIAL(probPerSquare);
COMPARE_ALL(type, probPerSquare)
};
EMPTY_STRUCT(Power);
EMPTY_STRUCT(SelfVictims);
EMPTY_STRUCT(StolenItems);
EMPTY_STRUCT(MiningInProximity);
EMPTY_STRUCT(FinishOff);
EMPTY_STRUCT(Proximity);
EMPTY_STRUCT(Immediate);
EMPTY_STRUCT(AggravatingMinions);
struct EnemyPopulation {
int SERIAL(value);
COMPARE_ALL(value)
};
struct Resource {
CollectiveResourceId SERIAL(resource);
int SERIAL(value);
COMPARE_ALL(resource, value)
};
struct Timer {
int SERIAL(value);
COMPARE_ALL(value)
};
struct NumConquered {
int SERIAL(value);
COMPARE_ALL(value)
};
#define ATTACK_TRIGGERS_LIST\
X(RoomTrigger, 0)\
X(Power, 1)\
X(SelfVictims, 2)\
X(StolenItems, 3)\
X(MiningInProximity, 4)\
X(FinishOff, 5)\
X(Proximity, 6)\
X(EnemyPopulation, 7)\
X(Resource, 8)\
X(Timer, 9)\
X(NumConquered, 10)\
X(Immediate, 11)\
X(AggravatingMinions, 12)
#define VARIANT_TYPES_LIST ATTACK_TRIGGERS_LIST
#define VARIANT_NAME AttackTrigger
#include "gen_variant.h"
#include "gen_variant_serialize.h"
inline
#include "gen_variant_serialize_pretty.h"
#undef VARIANT_TYPES_LIST
#undef VARIANT_NAME
struct TriggerInfo {
AttackTrigger trigger;
double value;
};