forked from miki151/keeperrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreature_attributes.h
68 lines (60 loc) · 1.68 KB
/
creature_attributes.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
#ifndef _CREATURE_ATTRIBUTES_H
#define _CREATURE_ATTRIBUTES_H
#include <string>
#include <functional>
#include "util.h"
#include "effect.h"
#include "skill.h"
// WTF is this defined
#undef HUGE
enum class CreatureSize { SMALL, MEDIUM, LARGE, HUGE };
#define CATTR(X) CreatureAttributes([&](CreatureAttributes& c) { X })
class CreatureAttributes {
public:
CreatureAttributes(function<void(CreatureAttributes&)> fun) {
fun(*this);
}
MustInitialize<string> name;
MustInitialize<int> speed;
MustInitialize<CreatureSize> size;
MustInitialize<int> strength;
MustInitialize<int> dexterity;
MustInitialize<int> weight;
Optional<string> chatReactionFriendly;
Optional<string> chatReactionHostile;
Optional<string> firstName;
bool specialMonster = false;
int barehandedDamage = 0;
Optional<AttackType> barehandedAttack;
Optional<EffectType> attackEffect;
Optional<EffectType> passiveAttack;
int legs = 2;
int arms = 2;
int wings = 0;
int heads = 1;
bool innocent = false;
bool noBody = false;
bool fireResistant = false;
bool fireCreature = false;
bool breathing = true;
MustInitialize<bool> humanoid;
bool animal = false;
bool healer = false;
bool flyer = false;
bool undead = false;
bool notLiving = false;
bool walker = true;
bool isFood = false;
bool stationary = false;
bool noSleep = false;
double courage = 1;
int maxLevel = 10;
double carryingMultiplier = 1;
bool permanentlyBlind = false;
bool invincible = false;
double damageMultiplier = 1;
unordered_set<Skill*> skills;
map<int, Skill*> skillGain {{4, Skill::twoHandedWeapon}, {6, Skill::knifeThrowing}, {10, Skill::archery}};
vector<SpellInfo> spells;
};
#endif