OSDN Git Service

[Refactor] #37353 monsterrace.c/h を作成して関連構造体と変数を移動.
[hengband/hengband.git] / src / monster.h
1 #pragma once
2 #include "monsterrace.h"
3
4 #define MON_BEGGAR        12
5 #define MON_LEPER         13
6 #define MON_BLACK_MARKET  14
7 #define MON_LION_HEART    19
8 #define MON_GHB           39
9 #define MON_NOV_PRIEST    45
10 #define MON_GRIP          53
11 #define MON_WOLF          54
12 #define MON_FANG          55
13 #define MON_LOUSE         69
14 #define MON_PIRANHA       70
15 #define MON_COPPER_COINS  85
16 #define MON_NOV_PALADIN   97
17 #define MON_GREEN_G       100
18 #define MON_NOV_PRIEST_G  109
19 #define MON_SILVER_COINS  117
20 #define MON_D_ELF         122
21 #define MON_MANES         128
22 #define MON_LOST_SOUL     133
23 #define MON_ROBIN_HOOD    138
24 #define MON_NOV_PALADIN_G 147
25 #define MON_PHANTOM_W     152
26 #define MON_WOUNDED_BEAR  159
27 #define MON_D_ELF_MAGE    178
28 #define MON_D_ELF_WARRIOR 182
29 #define MON_BLUE_HORROR   189
30 #define MON_GOLD_COINS    195
31 #define MON_VORPAL_BUNNY  205
32 #define MON_MASTER_YEEK   224
33 #define MON_PRIEST        225
34 #define MON_D_ELF_PRIEST  226
35 #define MON_TIGER         230
36 #define MON_MITHRIL_COINS 239
37 #define MON_DRUID         241
38 #define MON_PINK_HORROR   242
39 #define MON_HILL_GIANT    255
40 #define MON_WERERAT       270
41 #define MON_UMBER_HULK    283
42 #define MON_ORC_CAPTAIN   285
43 #define MON_BERSERKER     293
44 #define MON_IMP           296
45 #define MON_SHAGRAT       314
46 #define MON_GORBAG        315
47 #define MON_STONE_GIANT   321
48 #define MON_LIZARD_KING   332
49 #define MON_WYVERN        334
50 #define MON_SABRE_TIGER   339
51 #define MON_D_ELF_LORD    348
52 #define MON_FIRE_VOR      354
53 #define MON_WATER_VOR     355
54 #define MON_ARCH_VILE     357
55 #define MON_COLD_VOR      358
56 #define MON_ENERGY_VOR    359
57 #define MON_IRON_GOLEM    367
58 #define MON_JADE_MONK     370
59 #define MON_D_ELF_WARLOCK 375
60 #define MON_HAGEN         383
61 #define MON_MENELDOR      384
62 #define MON_PHANTOM_B     385
63 #define MON_C_CRAWLER     395
64 #define MON_XICLOTLAN     396
65 #define MON_D_ELF_DRUID   400
66 #define MON_TROLL_PRIEST  403
67 #define MON_GWAIHIR       410
68 #define MON_ANGEL         417
69 #define MON_ADAMANT_COINS 423
70 #define MON_COLBRAN       435
71 #define MON_SPIRIT_NAGA   436
72 #define MON_GACHAPIN      441
73 #define MON_BASILISK      453
74 #define MON_ARCHANGEL     456
75 #define MON_MITHRIL_GOLEM 464
76 #define MON_THORONDOR     468
77 #define MON_SHADOW_DRAKE  471
78 #define MON_GHOST         477
79 #define MON_OGRE_SHAMAN   479
80 #define MON_GHOUL_KING    483
81 #define MON_NINJA         485
82 #define MON_BICLOPS       490
83 #define MON_IVORY_MONK    492
84 #define MON_LOG_MASTER    498
85 #define MON_ETHER_DRAKE   504
86 #define MON_GOEMON        505
87 #define MON_CHERUB        511
88 #define MON_WATER_ELEM    512
89 #define MON_JURT          517
90 #define MON_LICH          518
91 #define MON_BLOODLETTER   523
92 #define MON_HALFLING_S    539
93 #define MON_GRAV_HOUND    540
94 #define MON_REVENANT      555
95 #define MON_RAAL          557
96 #define MON_COLOSSUS      558
97 #define MON_NIGHTBLADE    564
98 #define MON_ELDER_THING   569
99 #define MON_CRYPT_THING   577
100 #define MON_NEXUS_VOR     587
101 #define MON_PLASMA_VOR    588
102 #define MON_TIME_VOR      589
103 #define MON_M_MH_DRAGON   593
104 #define MON_MANDOR        598
105 #define MON_SHIM_VOR      600
106 #define MON_SERAPH        605
107 #define MON_BARON_HELL    609
108 #define MON_KAVLAX        616
109 #define MON_ETTIN         621
110 #define MON_VAMPIRE_LORD  623
111 #define MON_JUBJUB        640
112 #define MON_G_C_DRAKE     646
113 #define MON_CLUB_DEMON    648
114 #define MON_F_ANGEL       652
115 #define MON_D_ELF_SORC    657
116 #define MON_MASTER_LICH   658
117 #define MON_RINALDO       660
118 #define MON_ARCHON        661
119 #define MON_UND_BEHOLDER  664
120 #define MON_IRON_LICH     666
121 #define MON_JACK_SHADOWS  670
122 #define MON_LLOIGOR       682
123 #define MON_DREADMASTER   690
124 #define MON_DROLEM        691
125 #define MON_DAWN          693
126 #define MON_NAZGUL        696
127 #define MON_SMAUG         697
128 #define MON_STORMBRINGER  698
129 #define MON_ULTRA_PALADIN 699
130 #define MON_G_TITAN       702
131 #define MON_S_TYRANNO     705
132 #define MON_FAFNER        712
133 #define MON_G_BALROG      720
134 #define MON_TIME_HOUND    725
135 #define MON_PLASMA_HOUND  726
136 #define MON_BULLGATES     732
137 #define MON_SANTACLAUS    733
138 #define MON_LORD_CHAOS    737
139 #define MON_TINDALOS      739
140 #define MON_DEMILICH      742
141 #define MON_NIGHTCRAWLER  744
142 #define MON_CHAOS_VOR     751
143 #define MON_AETHER_VOR    752
144 #define MON_FUNDIN        762
145 #define MON_DWORKIN       763
146 #define MON_NIGHTWALKER   768
147 #define MON_RAPHAEL       769
148 #define MON_SARUMAN       771
149 #define MON_GANDALF       772
150 #define MON_BRAND         773
151 #define MON_SHADOWLORD    774
152 #define MON_ARCHLICH      776
153 #define MON_JABBERWOCK    778
154 #define MON_CHAOS_HOUND   779
155 #define MON_ULT_BEHOLDER  781
156 #define MON_SHAMBLER      786
157 #define MON_BLEYS         789
158 #define MON_FIONA         791
159 #define MON_SKY_DRAKE     793
160 #define MON_JULIAN        794
161 #define MON_BLACK_REAVER  798
162 #define MON_CAINE         799
163 #define MON_GERARD        807
164 #define MON_UNGOLIANT     808
165 #define MON_ATLACH_NACHA  809
166 #define MON_Y_GOLONAC     810
167 #define MON_AETHER_HOUND  811
168 #define MON_WARP_DEMON    812
169 #define MON_ERIC          813
170 #define MON_UNMAKER       815
171 #define MON_CYBER         816
172 #define MON_KLING         819
173 #define MON_CORWIN        820
174 #define MON_ANGMAR        825
175 #define MON_CANTORAS      830
176 #define MON_GODZILLA      832
177 #define MON_SPAWN_CTH     836
178 #define MON_SURTUR        837
179 #define MON_TARRASQUE     838
180 #define MON_LUNGORTHIN    839
181 #define MON_CYBER_KING    843
182 #define MON_WYRM_POWER    847
183 #define MON_NODENS        849
184 #define MON_JORMUNGAND    854
185 #define MON_DESTROYER     855
186 #define MON_GOTHMOG       856
187 #define MON_G_CTHULHU     857
188 #define MON_SAURON        858
189 #define MON_UNICORN_ORD   859
190 #define MON_OBERON        860
191 #define MON_MORGOTH       861
192 #define MON_SERPENT       862
193 #define MON_ONE_RING      864
194 #define MON_CAAWS         866
195 #define MON_CULVERIN      867
196 #define MON_EBONY_MONK    870
197 #define MON_HAGURE        871
198 #define MON_OROCHI        872
199 #define MON_ECHIZEN       873
200 #define MON_SPECT_WYRM    874
201 #define MON_DIO           878
202 #define MON_OHMU          879
203 #define MON_WONG          880
204 #define MON_ZOMBI_SERPENT 883
205 #define MON_D_ELF_SHADE   886
206 #define MON_MANA_HOUND    887
207 #define MON_VENOM_WYRM    890
208 #define MON_TROLL_KING    894
209 #define MON_BAZOOKER      896
210 #define MON_SHARD_VOR     897
211 #define MON_ELF_LORD      900
212 #define MON_MASTER_MYS    916
213 #define MON_G_MASTER_MYS  917
214 #define MON_IE            921
215 #define MON_TSUCHINOKO    926
216 #define MON_GCWADL        929
217 #define MON_LOCKE_CLONE   930
218 #define MON_CALDARM       931
219 #define MON_BANORLUPART   932
220 #define MON_BANOR         933
221 #define MON_LUPART        934
222 #define MON_KENSHIROU     936
223 #define MON_W_KNIGHT      938
224 #define MON_PLANETAR      942
225 #define MON_SOLAR         943
226 #define MON_BIKETAL       945
227 #define MON_RICH          948
228 #define MON_IKETA         949
229 #define MON_B_DEATH_SWORD 953
230 #define MON_YASE_HORSE    955
231 #define MON_HORSE         956
232 #define MON_BOTEI         963
233 #define MON_KAGE          964
234 #define MON_JAIAN         967
235 #define MON_BELD          973
236 #define MON_THAT_BAT      975
237 #define MON_SHUTEN        979
238 #define MON_FENGHUANG     988
239 #define MON_KIRIN         989
240 #define MON_BAHAMUT       1000
241 #define MON_SUKE          1001
242 #define MON_KAKU          1002
243 #define MON_GHOST_Q       1003
244 #define MON_PIP           1004
245 #define MON_A_GOLD        1010
246 #define MON_A_SILVER      1011
247 #define MON_ROLENTO       1013
248 #define MON_RAOU          1018
249 #define MON_SHURYUUDAN    1023
250 #define MON_WAHHA         1031
251 #define MON_DEBBY         1032
252 #define MON_KNI_TEMPLAR   1037
253 #define MON_PALADIN       1038
254 #define MON_CHAMELEON     1040
255 #define MON_CHAMELEON_K   1041
256 #define MON_TOPAZ_MONK    1047
257 #define MON_M_MINDCRAFTER 1056
258 #define MON_ELDER_VAMPIRE 1058
259 #define MON_NOBORTA       1059
260 #define MON_MORI_TROLL    1060
261 #define MON_BARNEY        1061
262 #define MON_GROO          1062
263 #define MON_LOUSY         1063
264 #define MON_WYRM_SPACE    1064
265 #define MON_JIZOTAKO      1065
266 #define MON_TANUKI        1067
267 #define MON_ALIEN_JURAL   1082
268 #define MON_HATOPOPPO     1083
269 #define MON_KOGAN         1096
270
271 /*
272  * Bit flags for the place_monster_???() (etc)
273  */
274 #define PM_ALLOW_SLEEP    0x00000001    /*!< モンスター生成フラグ: 眠っている状態で生成されても良い */
275 #define PM_ALLOW_GROUP    0x00000002    /*!< モンスター生成フラグ: 集団生成されても良い */
276 #define PM_FORCE_FRIENDLY 0x00000004    /*!< モンスター生成フラグ: 必ず友好的に生成される */
277 #define PM_FORCE_PET      0x00000008    /*!< モンスター生成フラグ: 必ずペットとして生成される */
278 #define PM_NO_KAGE        0x00000010    /*!< モンスター生成フラグ: 必ずあやしい影としては生成されない */
279 #define PM_NO_PET         0x00000020    /*!< モンスター生成フラグ: 必ずペットとして生成されない */
280 #define PM_ALLOW_UNIQUE   0x00000040    /*!< モンスター生成フラグ: ユニークの選択生成を許可する */
281 #define PM_IGNORE_TERRAIN 0x00000080    /*!< モンスター生成フラグ: 侵入可能地形を考慮せずに生成する */
282 #define PM_HASTE          0x00000100    /*!< モンスター生成フラグ: 加速状態で生成する */
283 #define PM_KAGE           0x00000200    /*!< モンスター生成フラグ: 必ずあやしい影として生成する */
284 #define PM_MULTIPLY       0x00000400    /*!< モンスター生成フラグ: 増殖処理時として生成する */
285
286 extern bool place_monster_aux(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
287 extern bool place_monster(POSITION y, POSITION x, BIT_FLAGS mode);
288 extern bool alloc_horde(POSITION y, POSITION x);
289 extern bool alloc_guardian(bool def_val);
290 extern bool alloc_monster(POSITION dis, BIT_FLAGS mode);
291
292 extern void monster_desc(char *desc, monster_type *m_ptr, BIT_FLAGS mode);
293 /* Bit flags for monster_desc() */
294 #define MD_OBJECTIVE      0x00000001 /* Objective (or Reflexive) */
295 #define MD_POSSESSIVE     0x00000002 /* Possessive (or Reflexive) */
296 #define MD_INDEF_HIDDEN   0x00000004 /* Use indefinites for hidden monsters ("something") */
297 #define MD_INDEF_VISIBLE  0x00000008 /* Use indefinites for visible monsters ("a kobold") */
298 #define MD_PRON_HIDDEN    0x00000010 /* Pronominalize hidden monsters */
299 #define MD_PRON_VISIBLE   0x00000020 /* Pronominalize visible monsters */
300 #define MD_ASSUME_HIDDEN  0x00000040 /* Assume the monster is hidden */
301 #define MD_ASSUME_VISIBLE 0x00000080 /* Assume the monster is visible */
302 #define MD_TRUE_NAME      0x00000100 /* Chameleon's true name */
303 #define MD_IGNORE_HALLU   0x00000200 /* Ignore hallucination, and penetrate shape change */
304
305 #define MD_WRONGDOER_NAME (MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE) /* 加害明記向け */
306
307 extern void monster_name(MONSTER_IDX m_idx, char* m_name);
308
309 extern void roff_top(MONRACE_IDX r_idx);
310 extern void screen_roff(MONRACE_IDX r_idx, BIT_FLAGS mode);
311 extern void display_roff(MONRACE_IDX r_idx);
312 extern void output_monster_spoiler(MONRACE_IDX r_idx, void(*roff_func)(TERM_COLOR attr, concptr str));
313 extern concptr extract_note_dies(MONRACE_IDX r_idx);
314 extern void monster_death(MONSTER_IDX m_idx, bool drop_item);
315 extern monsterrace_hook_type get_monster_hook(void);
316 extern monsterrace_hook_type get_monster_hook2(POSITION y, POSITION x);
317 extern void set_friendly(monster_type *m_ptr);
318 extern void set_pet(monster_type *m_ptr);
319 extern void set_hostile(monster_type *m_ptr);
320 extern void anger_monster(monster_type *m_ptr);
321 extern bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode);
322 extern bool monster_can_enter(POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode);
323 extern bool are_enemies(monster_type *m_ptr1, monster_type *m_ptr2);
324 extern bool monster_has_hostile_align(monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr);
325 extern void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char* msg);
326 extern concptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode);
327 extern int get_monster_crowd_number(MONSTER_IDX m_idx);
328 extern void message_pain(MONSTER_IDX m_idx, HIT_POINT dam);
329
330 #define is_friendly(A) \
331          (bool)(((A)->smart & SM_FRIENDLY) ? TRUE : FALSE)
332
333 #define is_friendly_idx(IDX) \
334          (bool)((IDX) > 0 && is_friendly(&current_floor_ptr->m_list[(IDX)]))
335
336 #define is_pet(A) \
337          (bool)(((A)->smart & SM_PET) ? TRUE : FALSE)
338
339 #define is_hostile(A) \
340          (bool)((is_friendly(A) || is_pet(A)) ? FALSE : TRUE)