OSDN Git Service

4138d69b41cd08c50682c017aaea95ba9c3a7b91
[hengband/hengband.git] / src / monster-spell.h
1 #pragma once
2
3 /* Monster Spells */
4 #define MS_SHRIEK         0
5 #define MS_XXX1           1
6 #define MS_DISPEL         2
7 #define MS_ROCKET         3
8 #define MS_SHOOT          4
9 #define MS_XXX2           5
10 #define MS_XXX3           6
11 #define MS_XXX4           7
12 #define MS_BR_ACID        8
13 #define MS_BR_ELEC        9
14 #define MS_BR_FIRE        10
15 #define MS_BR_COLD        11
16 #define MS_BR_POIS        12
17 #define MS_BR_NETHER      13
18 #define MS_BR_LITE        14
19 #define MS_BR_DARK        15
20 #define MS_BR_CONF        16
21 #define MS_BR_SOUND       17
22 #define MS_BR_CHAOS       18
23 #define MS_BR_DISEN       19
24 #define MS_BR_NEXUS       20
25 #define MS_BR_TIME        21
26 #define MS_BR_INERTIA     22
27 #define MS_BR_GRAVITY     23
28 #define MS_BR_SHARDS      24
29 #define MS_BR_PLASMA      25
30 #define MS_BR_FORCE       26
31 #define MS_BR_MANA        27
32 #define MS_BALL_NUKE      28
33 #define MS_BR_NUKE        29
34 #define MS_BALL_CHAOS     30
35 #define MS_BR_DISI        31
36 #define MS_BALL_ACID      32
37 #define MS_BALL_ELEC      33
38 #define MS_BALL_FIRE      34
39 #define MS_BALL_COLD      35
40 #define MS_BALL_POIS      36
41 #define MS_BALL_NETHER    37
42 #define MS_BALL_WATER     38
43 #define MS_BALL_MANA      39
44 #define MS_BALL_DARK      40
45 #define MS_DRAIN_MANA     41
46 #define MS_MIND_BLAST     42
47 #define MS_BRAIN_SMASH    43
48 #define MS_CAUSE_1        44
49 #define MS_CAUSE_2        45
50 #define MS_CAUSE_3        46
51 #define MS_CAUSE_4        47
52 #define MS_BOLT_ACID      48
53 #define MS_BOLT_ELEC      49
54 #define MS_BOLT_FIRE      50
55 #define MS_BOLT_COLD      51
56 #define MS_STARBURST      52
57 #define MS_BOLT_NETHER    53
58 #define MS_BOLT_WATER     54
59 #define MS_BOLT_MANA      55
60 #define MS_BOLT_PLASMA    56
61 #define MS_BOLT_ICE       57
62 #define MS_MAGIC_MISSILE  58
63 #define MS_SCARE          59
64 #define MS_BLIND          60
65 #define MS_CONF           61
66 #define MS_SLOW           62
67 #define MS_SLEEP          63
68 #define MS_SPEED          64
69 #define MS_HAND_DOOM      65
70 #define MS_HEAL           66
71 #define MS_INVULNER       67
72 #define MS_BLINK          68
73 #define MS_TELEPORT       69
74 #define MS_WORLD          70
75 #define MS_SPECIAL        71
76 #define MS_TELE_TO        72
77 #define MS_TELE_AWAY      73
78 #define MS_TELE_LEVEL     74
79 #define MS_PSY_SPEAR      75
80 #define MS_DARKNESS       76
81 #define MS_MAKE_TRAP      77
82 #define MS_FORGET         78
83 #define MS_RAISE_DEAD     79
84 #define MS_S_KIN          80
85 #define MS_S_CYBER        81
86 #define MS_S_MONSTER      82
87 #define MS_S_MONSTERS     83
88 #define MS_S_ANT          84
89 #define MS_S_SPIDER       85
90 #define MS_S_HOUND        86
91 #define MS_S_HYDRA        87
92 #define MS_S_ANGEL        88
93 #define MS_S_DEMON        89
94 #define MS_S_UNDEAD       90
95 #define MS_S_DRAGON       91
96 #define MS_S_HI_UNDEAD    92
97 #define MS_S_HI_DRAGON    93
98 #define MS_S_AMBERITE     94
99 #define MS_S_UNIQUE       95
100
101 /*
102  * Hack -- choose "intelligent" spells when desperate
103  * Including "summon" spells
104  */
105 #define RF4_INT_MASK \
106         (RF4_SUMMON_MASK | RF4_DISPEL)
107
108 #define RF5_INT_MASK \
109         (RF5_SUMMON_MASK | \
110          RF5_HOLD | RF5_SLOW | RF5_CONF | RF5_BLIND | RF5_SCARE)
111
112 #define RF6_INT_MASK \
113         (RF6_SUMMON_MASK | \
114          RF6_BLINK | RF6_TPORT | RF6_TELE_LEVEL | RF6_TELE_AWAY | \
115          RF6_HEAL | RF6_INVULNER | RF6_HASTE | RF6_TRAPS)
116
117  /*
118   * Hack -- spells that cannot be used while player riding on the monster
119   */
120 #define RF4_RIDING_MASK \
121         (RF4_SHRIEK)
122
123 #define RF5_RIDING_MASK 0UL
124
125 #define RF6_RIDING_MASK \
126         (RF6_BLINK | RF6_TPORT | RF6_TRAPS | RF6_DARKNESS | RF6_SPECIAL)
127
128   /*
129    * Hack -- "bolt" spells that may hurt fellow monsters
130    * Currently "bolt" spells are included in "attack"
131    */
132 #define RF4_BOLT_MASK \
133         (RF4_ROCKET | RF4_SHOOT)
134
135 #define RF5_BOLT_MASK \
136         (RF5_BO_ACID | RF5_BO_ELEC | RF5_BO_FIRE | RF5_BO_COLD | \
137          RF5_BO_NETH | RF5_BO_WATE | RF5_BO_MANA | RF5_BO_PLAS | \
138          RF5_BO_ICEE | RF5_MISSILE)
139
140 #define RF6_BOLT_MASK 0UL
141
142    /*
143         * Hack -- "beam" spells that may hurt fellow monsters
144         * Currently "beam" spells are included in "attack"
145         */
146 #define RF4_BEAM_MASK 0UL
147
148 #define RF5_BEAM_MASK 0UL
149
150 #define RF6_BEAM_MASK (RF6_PSY_SPEAR)
151
152         /*
153          * Hack -- "ball" spells that may hurt friends
154          * Including "radius 4 ball" and "breath" spells
155          * Currently "ball" spells are included in "attack"
156          */
157 #define RF4_BALL_MASK \
158         (RF4_BIG_BALL_MASK | RF4_BREATH_MASK | \
159          RF4_ROCKET | RF4_BA_NUKE)
160
161 #define RF5_BALL_MASK \
162         (RF5_BIG_BALL_MASK | RF5_BREATH_MASK | \
163          RF5_BA_ACID | RF5_BA_ELEC | RF5_BA_FIRE | RF5_BA_COLD | \
164          RF5_BA_POIS | RF5_BA_NETH)
165
166 #define RF6_BALL_MASK \
167         (RF6_BIG_BALL_MASK | RF6_BREATH_MASK)
168
169          /*
170           * Hack -- "ball" spells with radius 4 that may hurt friends
171           * Currently "radius 4 ball" spells are included in "ball"
172           */
173 #define RF4_BIG_BALL_MASK \
174         (RF4_BA_CHAO)
175
176 #define RF5_BIG_BALL_MASK \
177         (RF5_BA_LITE | RF5_BA_DARK | RF5_BA_WATE | RF5_BA_MANA)
178
179 #define RF6_BIG_BALL_MASK 0UL
180
181           /*
182            * Hack -- "breath" spells that may hurt friends
183            * Currently "breath" spells are included in "ball" and "non-magic"
184            */
185 #define RF4_BREATH_MASK \
186         (RF4_BR_ACID | RF4_BR_ELEC | RF4_BR_FIRE | RF4_BR_COLD | \
187          RF4_BR_POIS | RF4_BR_NETH | RF4_BR_LITE | RF4_BR_DARK | \
188          RF4_BR_CONF | RF4_BR_SOUN | RF4_BR_CHAO | RF4_BR_DISE | \
189          RF4_BR_NEXU | RF4_BR_SHAR | RF4_BR_TIME | RF4_BR_INER | \
190          RF4_BR_GRAV | RF4_BR_PLAS | RF4_BR_WALL | RF4_BR_MANA | \
191          RF4_BR_NUKE | RF4_BR_DISI)
192
193 #define RF5_BREATH_MASK 0UL
194
195 #define RF6_BREATH_MASK 0UL
196
197            /*
198                 * Hack -- "summon" spells
199                 * Currently "summon" spells are included in "intelligent" and "indirect"
200                 */
201 #define RF4_SUMMON_MASK 0UL
202
203 #define RF5_SUMMON_MASK 0UL
204
205 #define RF6_SUMMON_MASK \
206         (RF6_S_KIN | RF6_S_CYBER | RF6_S_MONSTER | RF6_S_MONSTERS | RF6_S_ANT | \
207          RF6_S_SPIDER | RF6_S_HOUND | RF6_S_HYDRA | RF6_S_ANGEL | RF6_S_DEMON | \
208          RF6_S_UNDEAD | RF6_S_DRAGON | RF6_S_HI_UNDEAD | RF6_S_HI_DRAGON | \
209          RF6_S_AMBERITES | RF6_S_UNIQUE)
210
211                 /*
212                  * Hack -- "attack" spells
213                  * Including "bolt", "beam" and "ball" spells
214                  */
215 #define RF4_ATTACK_MASK \
216         (RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK | RF4_DISPEL)
217
218 #define RF5_ATTACK_MASK \
219         (RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | \
220          RF5_DRAIN_MANA | RF5_MIND_BLAST | RF5_BRAIN_SMASH | \
221          RF5_CAUSE_1 | RF5_CAUSE_2 | RF5_CAUSE_3 | RF5_CAUSE_4 | \
222          RF5_SCARE | RF5_BLIND | RF5_CONF | RF5_SLOW | RF5_HOLD)
223
224 #define RF6_ATTACK_MASK \
225         (RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK | \
226          RF6_HAND_DOOM | RF6_TELE_TO | RF6_TELE_AWAY | RF6_TELE_LEVEL | \
227          RF6_DARKNESS | RF6_TRAPS | RF6_FORGET)
228
229                  /*
230                   * Hack -- "indirect" spells
231                   * Including "summon" spells
232                   */
233 #define RF4_INDIRECT_MASK \
234         (RF4_SUMMON_MASK | RF4_SHRIEK)
235
236 #define RF5_INDIRECT_MASK \
237         (RF5_SUMMON_MASK)
238
239 #define RF6_INDIRECT_MASK \
240         (RF6_SUMMON_MASK | \
241          RF6_HASTE | RF6_HEAL | RF6_INVULNER | RF6_BLINK | RF6_WORLD | \
242          RF6_TPORT | RF6_RAISE_DEAD)
243
244                   /*
245                    * Hack -- "non-magic" spells
246                    * Including "breath" spells
247                    */
248 #define RF4_NOMAGIC_MASK \
249         (RF4_BREATH_MASK | RF4_SHRIEK | RF4_ROCKET | RF4_SHOOT)
250
251 #define RF5_NOMAGIC_MASK \
252         (RF5_BREATH_MASK)
253
254 #define RF6_NOMAGIC_MASK \
255         (RF6_BREATH_MASK | RF6_SPECIAL)
256
257 extern const monster_power monster_powers[MAX_MONSPELLS];
258 extern const concptr monster_powers_short[MAX_MONSPELLS];