Debian Codegraph @

include/spells.h

raw symbols SCIP
1 /**
2 * @file
3 * Spell-related defines: spellpath, subtypes, ...
4 */
5
6 #ifndef SPELLS_H
7 #define SPELLS_H
8
9 /**
10 * @defgroup PATH_xxx Spell path
11 */
12 /*@{*/
13 #define PATH_PROT 0x00000001 /* 1 */
14 #define PATH_FIRE 0x00000002 /* 2 */
15 #define PATH_FROST 0x00000004 /* 4 */
16 #define PATH_ELEC 0x00000008 /* 8 */
17 #define PATH_MISSILE 0x00000010 /* 16 */
18 #define PATH_SELF 0x00000020 /* 32 */
19 #define PATH_SUMMON 0x00000040 /* 64 */
20 #define PATH_ABJURE 0x00000080 /* 128 */
21 #define PATH_RESTORE 0x00000100 /* 256 */
22 #define PATH_DETONATE 0x00000200 /* 512 */
23 #define PATH_MIND 0x00000400 /* 1024 */
24 #define PATH_CREATE 0x00000800 /* 2048 */
25 #define PATH_TELE 0x00001000 /* 4096 */
26 #define PATH_INFO 0x00002000 /* 8192 */
27 #define PATH_TRANSMUTE 0x00004000 /* 16384 */
28 #define PATH_TRANSFER 0x00008000 /* 32768 */
29 #define PATH_TURNING 0x00010000 /* 65536 */
30 #define PATH_WOUNDING 0x00020000 /* 131072 */
31 #define PATH_DEATH 0x00040000 /* 262144 */
32 #define PATH_LIGHT 0x00080000 /* 524288 */
33 /*@}*/
34
35 /** Multiplier for spell points / grace based on the attenuation. */
36 #define PATH_SP_MULT(op, spell) (((op->path_attuned&spell->path_attuned) ? 0.8 : 1)* \
37 ((op->path_repelled&spell->path_attuned) ? 1.25 : 1))
38
39 /** Number of spell paths. */
40 #define NRSPELLPATHS 20
41 extern const char *const spellpathnames[NRSPELLPATHS];
42
43 /**
44 * Number of spells.
45 * The only place this is really used is to allocate an array
46 * when printing out the spells the player knows.
47 */
48 #define NROFREALSPELLS 1024
49
50 /**
51 * @defgroup SPELL_xxx Spell/grace points
52 * This is passed to SP_level_spellpoint_cost() to determine
53 * what to check. These values are also used in other places
54 * when we want to pass into a function if it is a cleric spell
55 * or a wizard (mana) spell.
56 */
57 /*@{*/
58 #define SPELL_MANA 0x1
59 #define SPELL_GRACE 0x2
60 #define SPELL_HIGHEST 0x3
61 /*@}*/
62
63 /**
64 * @defgroup SP_xxx Spell subtypes
65 * This is the subtype for the ::SPELL type. Start at 1 so that
66 * it is easy to see 0 as an uninitialized value.
67 * Note that for some spells, subtype pretty accurately
68 * describes the entire spell (SP_DETECT_MAGIC). But for other, the subtype
69 * may not really say much (eg, SP_BOLT), and it is other
70 * fields within the object which really determines its properties.
71 * No effort is made to match these new numbers with the old ones,
72 * and given there is not a 1:1 mapping, you can't do that anyways.
73 */
74 /*@{*/
75 #define SP_RAISE_DEAD 1
76 #define SP_RUNE 2
77 #define SP_MAKE_MARK 3
78 #define SP_BOLT 4
79 #define SP_BULLET 5
80 #define SP_EXPLOSION 6
81 #define SP_CONE 7
82 #define SP_BOMB 8
83 #define SP_WONDER 9
84 #define SP_SMITE 10
85 #define SP_MAGIC_MISSILE 11
86 #define SP_SUMMON_GOLEM 12
87 #define SP_DIMENSION_DOOR 13
88 #define SP_MAGIC_MAPPING 14
89 #define SP_MAGIC_WALL 15
90 #define SP_DESTRUCTION 16
91 #define SP_PERCEIVE_SELF 17
92 #define SP_WORD_OF_RECALL 18
93 #define SP_INVISIBLE 19
94 #define SP_PROBE 20
95 #define SP_HEALING 21
96 #define SP_CREATE_FOOD 22
97 #define SP_EARTH_TO_DUST 23
98 #define SP_CHANGE_ABILITY 24
99 #define SP_BLESS 25
100 #define SP_CURSE 26
101 #define SP_SUMMON_MONSTER 27
102 #define SP_CHARGING 28
103 #define SP_POLYMORPH 29
104 #define SP_ALCHEMY 30
105 #define SP_REMOVE_CURSE 31
106 #define SP_IDENTIFY 32
107 #define SP_DETECTION 33
108 #define SP_MOOD_CHANGE 34
109 #define SP_MOVING_BALL 35
110 #define SP_SWARM 36
111 #define SP_CHANGE_MANA 37
112 #define SP_DISPEL_RUNE 38
113 #define SP_CREATE_MISSILE 39
114 #define SP_CONSECRATE 40
115 #define SP_ANIMATE_WEAPON 41
116 #define SP_LIGHT 42
117 #define SP_CHANGE_MAP_LIGHT 43
118 #define SP_FAERY_FIRE 44
119 #define SP_CAUSE_DISEASE 45
120 #define SP_AURA 46
121 #define SP_TOWN_PORTAL 47
122 /*#define SP_PARTY_SPELL 48*/
123 #define SP_ITEM_CURSE_BLESS 49
124 #define SP_ELEM_SHIELD 50
125 /*@}*/
126
127 /**
128 * @defgroup POT_xxx Potion subtypes.
129 * Subtypes for ::POTION.
130 */
131 /*@{*/
132 #define POT_SPELL 1
133 #define POT_DUST 2
134 #define POT_FIGURINE 3
135 #define POT_BALM 4
136 /*@}*/
137
138 /**
139 * @defgroup FORCE_xxx Force subtypes
140 *
141 * This is for the ::FORCE subtypes.
142 */
143 /*@{*/
144 #define FORCE_CONFUSION 1
145 #define FORCE_CHANGE_ABILITY 2
146 #define FORCE_TRANSFORMED_ITEM 3
147 /*@}*/
148
149 /**
150 * Multiplier for the casting time based on path attenuation.
151 */
152 #define PATH_TIME_MULT(op, spell) (((op->path_attuned&spell->path_attuned) ? 0.8 : 1)* \
153 ((op->path_repelled&spell->path_attuned) ? 1.25 : 1))
154
155 /**
156 * These are some hard coded values that are used within the code
157 * for spell failure effects or pieces of spells. Rather
158 * then hardcode the names, use defines so it is easier to
159 * update if necessary.
160 */
161 #define SP_MED_FIREBALL "spell_medium_fireball"
162 #define LOOSE_MANA "loose_magic"
163 #define SPELL_WONDER "spell_wonder"
164 #define GOD_POWER "god_power"
165 #define SPLINT "splint" /* for bombs */
166 #define SWARM_SPELL "swarm_spell"
167 #define GENERIC_RUNE "generic_rune"
168 #define HOLY_POSSESSION "spell_holy_possession"
169 #define FORCE_NAME "force" /* instead of it being hardcoded */
170 /**
171 * This is used for fumbles - this arch is all set up to do
172 * the right just by inserting it
173 */
174 #define EXPLODING_FIREBALL "exploding_fireball"
175
176 #endif /* SPELLS_H */