Crossfire Server, Trunk  1.75.0
attack.h
Go to the documentation of this file.
1 
6 #ifndef ATTACK_H
7 #define ATTACK_H
8 
15 #define NROFATTACKS 26
16 #define NROFATTACKMESS 21
17 #define MAXATTACKMESS 21
18 
19 /* attack message numbers must be less than NROFATTACKMESS */
20 
21 #define ATM_ARROW 0
22 #define ATM_DRAIN 1
23 #define ATM_ELEC 2
24 #define ATM_COLD 3
25 #define ATM_FIRE 4
26 #define ATM_BASIC 5
27 #define ATM_KARATE 6
28 #define ATM_CLAW 7
29 #define ATM_PUNCH 8
30 #define ATM_SLASH 9
31 #define ATM_PIERCE 10
32 #define ATM_CLEAVE 11
33 #define ATM_SLICE 12
34 #define ATM_STAB 13
35 #define ATM_WHIP 14
36 #define ATM_CRUSH 15
37 #define ATM_BLUD 16
38 #define ATM_DOOR 17
39 #define ATM_SUFFER 18
40 #define ATM_WRAITH_FEED 19
41 
42 /* Note that the last ATNR_ should be one less than NROFATTACKS above
43  * since the ATNR starts counting at zero.
44  * For compatible loading, these MUST correspond to the same value
45  * as the bitmasks below.
46  */
47 #define ATNR_PHYSICAL 0
48 #define ATNR_MAGIC 1
49 #define ATNR_FIRE 2
50 #define ATNR_ELECTRICITY 3
51 #define ATNR_COLD 4
52 #define ATNR_CONFUSION 5
53 #define ATNR_ACID 6
54 #define ATNR_DRAIN 7
55 #define ATNR_WEAPONMAGIC 8
56 #define ATNR_GHOSTHIT 9
57 #define ATNR_POISON 10
58 #define ATNR_SLOW 11
59 #define ATNR_PARALYZE 12
60 #define ATNR_TURN_UNDEAD 13
61 #define ATNR_FEAR 14
62 #define ATNR_CANCELLATION 15
63 #define ATNR_DEPLETE 16
64 #define ATNR_DEATH 17
65 #define ATNR_CHAOS 18
66 #define ATNR_COUNTERSPELL 19
67 #define ATNR_GODPOWER 20
68 #define ATNR_HOLYWORD 21
69 #define ATNR_BLIND 22
70 #define ATNR_INTERNAL 23
71 #define ATNR_LIFE_STEALING 24
72 #define ATNR_DISEASE 25
73 
78 #define AT_PHYSICAL 0x00000001
79 #define AT_MAGIC 0x00000002
80 #define AT_FIRE 0x00000004
81 #define AT_ELECTRICITY 0x00000008
82 #define AT_COLD 0x00000010
83 #define AT_CONFUSION 0x00000020
84 #define AT_ACID 0x00000040
85 #define AT_DRAIN 0x00000080
86 #define AT_WEAPONMAGIC 0x00000100
87 #define AT_GHOSTHIT 0x00000200
88 #define AT_POISON 0x00000400
89 #define AT_SLOW 0x00000800
90 #define AT_PARALYZE 0x00001000
91 #define AT_TURN_UNDEAD 0x00002000
92 #define AT_FEAR 0x00004000
93 #define AT_CANCELLATION 0x00008000
94 #define AT_DEPLETE 0x00010000
95 #define AT_DEATH 0x00020000
96 #define AT_CHAOS 0x00040000
97 #define AT_COUNTERSPELL 0x00080000
98 #define AT_GODPOWER 0x00100000
99 #define AT_HOLYWORD 0x00200000
100 #define AT_BLIND 0x00400000
101 #define AT_INTERNAL 0x00800000
102 #define AT_LIFE_STEALING \
103  0x01000000
104 #define AT_DISEASE 0x02000000
107 /* attacktypes_load is suffixed to resist_ when saving objects.
108  * (so the line may be 'resist_fire' 20 for example). These are never
109  * seen by the player. loader.l uses the same names, but it doesn't look
110  * like you can use these values, so in that function they are hard coded.
111  */
112 
113 /* Note that internal should not ever be referanced in the last two
114  * tables. however, other resisttypes may be added, and if through some
115  * bug these do get used somehow, might as well make it more easier to notice
116  * and not have mystery values appear.
117  */
118 
120 struct attackmess_t {
121  int level;
122  char *buf1;
123  char *buf2;
124  char *buf3;
125 };
126 
129  int face;
130 };
131 
134 
137 EXTERN const char *const resist_plus[NROFATTACKS];
138 EXTERN const char *const resist_color[NROFATTACKS];
139 EXTERN const char *const attacktype_desc[NROFATTACKS];
140 EXTERN const char *const resist_save[NROFATTACKS];
141 
142 #endif /* ATTACK_H */
NROFATTACKMESS
#define NROFATTACKMESS
Definition: attack.h:16
Chaos_Attacks::attacktype
int attacktype
Definition: attack.h:128
attackmess_t::buf1
char * buf1
Definition: attack.h:122
NROFATTACKS
#define NROFATTACKS
Definition: attack.h:15
MAXATTACKMESS
#define MAXATTACKMESS
Definition: attack.h:17
resist_save
const EXTERN char *const resist_save[NROFATTACKS]
Definition: attack.h:140
ATTACKS
EXTERN Chaos_Attacks ATTACKS[22]
Definition: attack.h:135
attack_mess
EXTERN attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]
Attack messages the player gets when hitting/getting hit.
Definition: attack.h:133
Chaos_Attacks::face
int face
Definition: attack.h:129
resist_plus
const EXTERN char *const resist_plus[NROFATTACKS]
Definition: attack.h:137
resist_color
const EXTERN char *const resist_color[NROFATTACKS]
Definition: attack.h:138
change_resist_msg
const EXTERN char *const change_resist_msg[NROFATTACKS]
Definition: attack.h:136
EXTERN
#define EXTERN
Define external variables.
Definition: global.h:15
attackmess_t::buf2
char * buf2
Definition: attack.h:123
attacktype_desc
const EXTERN char *const attacktype_desc[NROFATTACKS]
Definition: attack.h:139
attackmess_t::level
int level
Definition: attack.h:121
Chaos_Attacks
Definition: attack.h:127
attackmess_t
Attack messages structure.
Definition: attack.h:120
attackmess_t::buf3
char * buf3
Definition: attack.h:124