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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
#ifndef CONSTANTES_H
#define CONSTANTES_H
#define JOUER 0
#define OPTIONS 1
#define QUITTER 2
enum character_class_t {
CLASS_INVAL = -1,
CLASS_PALADIN,
CLASS_PRIEST,
CLASS_THIEF,
/* XXX add new ally classes here
* ->
*/
CLASS_ALLY_CNT,
CLASS_WARRIOR_GOBELIN = CLASS_ALLY_CNT,
/* XXX add new enemy classes here
* ->
*/
CLASS_CNT,
CLASS_ENEMY_CNT = CLASS_CNT - CLASS_ALLY_CNT,
};
#define MORT 0
enum element_t {
ELEM_FIRE,
ELEM_ICE,
ELEM_WATER,
ELEM_THUNDER,
ELEM_COUNT,
ELEM_NONE = ELEM_COUNT,
};
enum affinity_t {
AFFIN_ABSORPTION,
AFFIN_INVULN,
AFFIN_RESISTANCE,
AFFIN_NONE,
AFFIN_SENSITIVE,
AFFIN_COUNT,
};
#define POTION 0
#define ETHER 1
#define POTIONPLUS 2
#define ETHERPLUS 3
#define ALLIE 1
#define ENNEMI 0
enum damages_type_t {
DAMAGES_PHYSICAL,
DAMAGES_MAGICAL,
};
enum action_state_t {
ACTION_PERFORMED,
ACTION_CANCELED,
ACTION_ERROR,
ACTION_COUNT,
};
enum target_type_t {
TARGET_SINGLE_ALLY = 0x1,
TARGET_SINGLE_ENEMY = TARGET_SINGLE_ALLY << 0x1,
TARGET_TEAM_ALLY = TARGET_SINGLE_ENEMY << 0x1,
TARGET_TEAM_ENEMY = TARGET_TEAM_ALLY << 0x1,
TARGET_SELF = TARGET_TEAM_ENEMY << 0x1,
TARGET_ALL = TARGET_SELF << 0x1,
TARGET_SINGLE = TARGET_SINGLE_ALLY | TARGET_SINGLE_ENEMY,
TARGET_TEAM = TARGET_TEAM_ALLY | TARGET_TEAM_ENEMY,
};
//map
#define SOL 0
#define MUR 1
#define COFFRE 2
#define GUS 3
#define countof(_array) ((int)(sizeof((_array)) / sizeof((_array)[0])))
#include <stdbool.h>
#define inverse_boolean(_b) ((_b) = (((_b)) ? false : true))
#endif
|