Atrinik Server  4.0
spells.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #ifndef SPELLS_H
31 #define SPELLS_H
32 
38 #define PATH_PROT 0x00000001
39 
40 #define PATH_FIRE 0x00000002
41 
42 #define PATH_FROST 0x00000004
43 
44 #define PATH_ELEC 0x00000008
45 
46 #define PATH_MISSILE 0x00000010
47 
48 #define PATH_SELF 0x00000020
49 
50 #define PATH_SUMMON 0x00000040
51 
52 #define PATH_ABJURE 0x00000080
53 
54 #define PATH_RESTORE 0x00000100
55 
56 #define PATH_DETONATE 0x00000200
57 
58 #define PATH_MIND 0x00000400
59 
60 #define PATH_CREATE 0x00000800
61 
62 #define PATH_TELE 0x00001000
63 
64 #define PATH_INFO 0x00002000
65 
66 #define PATH_TRANSMUTE 0x00004000
67 
68 #define PATH_TRANSFER 0x00008000
69 
70 #define PATH_TURNING 0x00010000
71 
72 #define PATH_WOUNDING 0x00020000
73 
74 #define PATH_DEATH 0x00040000
75 
76 #define PATH_LIGHT 0x00080000
77 
79 #define PATH_NUM 20
80 
87 #define SPELL_USE_CAST 0x01
88 
89 #define SPELL_USE_BALM 0x02
90 
91 #define SPELL_USE_DUST 0x04
92 
93 #define SPELL_USE_SCROLL 0x08
94 /*** Spell can be found in books. */
95 #define SPELL_USE_BOOK 0x10
96 
97 #define SPELL_USE_WAND 0x20
98 
99 #define SPELL_USE_ROD 0x40
100 
101 #define SPELL_USE_POTION 0x80
102 
108 #define SPELL_TYPE_NROF 2
109 
116 #define SPELL_DESC_TOWN 0x01
117 
118 #define SPELL_DESC_DIRECTION 0x02
119 
120 #define SPELL_DESC_SELF 0x04
121 
122 #define SPELL_DESC_FRIENDLY 0x08
123 
124 #define SPELL_DESC_ENEMY 0x10
125 
127 struct archetype;
128 
130 typedef struct spell_struct {
132  const char *name;
133 
135  int sp;
136 
138  int time;
139 
141  int scrolls;
142 
144  int charges;
145 
147  int range;
148 
156  float value_mul;
157 
159  int bdam;
160 
162  int bdur;
163 
165  int ldam;
166 
168  int ldur;
169 
180  int spl;
181 
183  const char *sound;
184 
187 
189  uint32_t flags;
190 
192  uint32_t path;
193 
195  const char *archname;
196 
198  struct archetype *at;
199 } spell_struct;
200 
202 #define SP_NO_SPELL -1
203 
215 enum spellnrs {
216  SP_FIRESTORM,
217  SP_ICESTORM,
218  SP_MINOR_HEAL,
219  SP_CURE_POISON,
220  SP_CURE_DISEASE,
221  SP_STRENGTH,
222  SP_IDENTIFY,
223  SP_ASTEROID,
224  SP_FROST_NOVA,
225  SP_REMOVE_CURSE,
226  SP_REMOVE_DAMNATION,
227  SP_CAUSE_LIGHT,
228  SP_CONFUSION,
229  SP_BULLET,
230  SP_UNUSED1,
231  SP_REMOVE_DEPLETION,
232  SP_PROBE,
233  SP_TOWN_PORTAL,
234  SP_CREATE_FOOD,
235  SP_WOR,
236  SP_CHARGING,
237  SP_GREATER_HEAL,
238  SP_RESTORATION,
239  SP_PROT_COLD,
240  SP_PROT_FIRE,
241  SP_PROT_ELEC,
242  SP_PROT_POISON,
243  SP_CONSECRATE,
244  SP_FINGER_DEATH,
245  SP_CAUSE_COLD,
246  SP_CAUSE_FLU,
247  SP_CAUSE_LEPROSY,
248  SP_CAUSE_SMALLPOX,
249  SP_CAUSE_PNEUMONIC_PLAGUE,
250  SP_METEOR,
251  SP_METEOR_SWARM,
252  SP_POISON_FOG,
253  SP_BULLET_SWARM,
254  SP_BULLET_STORM,
255  SP_DESTRUCTION,
256  SP_BOMB,
257  SP_CURE_CONFUSION,
258  SP_TRANSFORM_WEALTH,
259  SP_MAGIC_MISSILE,
260  SP_RAIN_HEAL,
261  SP_PARTY_HEAL,
262  SP_FROSTBOLT,
263  SP_FIREBOLT,
264  SP_LIGHTNING,
265  SP_FORKED_LIGHTNING,
266  SP_NEGABOLT,
267  SP_HOLYWORD
268 };
269 
275 #define CAST_NORMAL 0
276 
277 #define CAST_WAND 1
278 
279 #define CAST_ROD 2
280 
281 #define CAST_SCROLL 4
282 
283 #define CAST_POTION 5
284 
288 #define CAST_NPC 6
289 
294 #define TRANSFORM_WEALTH_SACRIFICE 0.80f
295 
297 #define SPELL_MISS_ROLL_MIN 20
298 
299 #define SPELL_MISS_ROLL_MAX 35
300 
301 #endif
struct spell_struct spell_struct
int range
Definition: spells.h:147
int ldam
Definition: spells.h:165
int spell_use
Definition: spells.h:186
const char * sound
Definition: spells.h:183
int scrolls
Definition: spells.h:141
Definition: arch.h:40
int time
Definition: spells.h:138
int charges
Definition: spells.h:144
struct archetype * at
Definition: spells.h:198
uint32_t flags
Definition: spells.h:189
const char * name
Definition: spells.h:132
int bdur
Definition: spells.h:162
const char * archname
Definition: spells.h:195
uint32_t path
Definition: spells.h:192
int bdam
Definition: spells.h:159
float value_mul
Definition: spells.h:156
int ldur
Definition: spells.h:168
spellnrs
Definition: spells.h:215