OSDN Git Service

[Refactor] #37287 #37353 型の置換。 / Type replacement.
[hengband/hengband.git] / src / realm-craft.c
1 #include "angband.h"\r
2 #include "cmd-spell.h"\r
3 #include "selfinfo.h"\r
4 \r
5 \r
6 \r
7 /*!\r
8 * @brief \8f \97Ì\88æ\96\82\96@\82Ì\8ae\8f\88\97\9d\82ð\8ds\82¤\r
9 * @param spell \96\82\96@ID\r
10 * @param mode \8f\88\97\9d\93à\97e (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)\r
11 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO \8e\9e\82É\82Í\95\8e\9a\97ñ\83|\83C\83\93\83^\82ð\95Ô\82·\81BSPELL_CAST\8e\9e\82ÍNULL\95\8e\9a\97ñ\82ð\95Ô\82·\81B\r
12 */\r
13 cptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)\r
14 {\r
15         bool name = (mode == SPELL_NAME) ? TRUE : FALSE;\r
16         bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;\r
17         bool info = (mode == SPELL_INFO) ? TRUE : FALSE;\r
18         bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;\r
19 \r
20         int plev = p_ptr->lev;\r
21 \r
22         switch (spell)\r
23         {\r
24         case 0:\r
25                 if (name) return _("\90Ô\8aO\90ü\8e\8b\97Í", "Infravision");\r
26                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\90Ô\8aO\90ü\8e\8b\97Í\82ª\91\9d\8b­\82³\82ê\82é\81B", "Gives infravision for a while.");\r
27 \r
28                 {\r
29                         int base = 100;\r
30 \r
31                         if (info) return info_duration(base, base);\r
32 \r
33                         if (cast)\r
34                         {\r
35                                 set_tim_infra(base + randint1(base), FALSE);\r
36                         }\r
37                 }\r
38                 break;\r
39 \r
40         case 1:\r
41                 if (name) return _("\89ñ\95\9c\97Í\8b­\89»", "Regeneration");\r
42                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\89ñ\95\9c\97Í\82ª\91\9d\8b­\82³\82ê\82é\81B", "Gives regeneration ability for a while.");\r
43 \r
44                 {\r
45                         int base = 80;\r
46 \r
47                         if (info) return info_duration(base, base);\r
48 \r
49                         if (cast)\r
50                         {\r
51                                 set_tim_regen(base + randint1(base), FALSE);\r
52                         }\r
53                 }\r
54                 break;\r
55 \r
56         case 2:\r
57                 if (name) return _("\8bó\95 \8f[\91«", "Satisfy Hunger");\r
58                 if (desc) return _("\96\9e\95 \82É\82È\82é\81B", "Satisfies hunger.");\r
59 \r
60                 {\r
61                         if (cast)\r
62                         {\r
63                                 set_food(PY_FOOD_MAX - 1);\r
64                         }\r
65                 }\r
66                 break;\r
67 \r
68         case 3:\r
69                 if (name) return _("\91Ï\97â\8bC", "Resist Cold");\r
70                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\97â\8bC\82Ö\82Ì\91Ï\90«\82ð\93¾\82é\81B\91\95\94õ\82É\82æ\82é\91Ï\90«\82É\97Ý\90Ï\82·\82é\81B",\r
71                         "Gives resistance to cold. This resistance can be added to which from equipment for more powerful resistance.");\r
72 \r
73                 {\r
74                         int base = 20;\r
75 \r
76                         if (info) return info_duration(base, base);\r
77 \r
78                         if (cast)\r
79                         {\r
80                                 set_oppose_cold(randint1(base) + base, FALSE);\r
81                         }\r
82                 }\r
83                 break;\r
84 \r
85         case 4:\r
86                 if (name) return _("\91Ï\89Î\89\8a", "Resist Fire");\r
87                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\89\8a\82Ö\82Ì\91Ï\90«\82ð\93¾\82é\81B\91\95\94õ\82É\82æ\82é\91Ï\90«\82É\97Ý\90Ï\82·\82é\81B",\r
88                         "Gives resistance to fire. This resistance can be added to which from equipment for more powerful resistance.");\r
89 \r
90                 {\r
91                         int base = 20;\r
92 \r
93                         if (info) return info_duration(base, base);\r
94 \r
95                         if (cast)\r
96                         {\r
97                                 set_oppose_fire(randint1(base) + base, FALSE);\r
98                         }\r
99                 }\r
100                 break;\r
101 \r
102         case 5:\r
103                 if (name) return _("\8em\8bC\8d\82\97g", "Heroism");\r
104                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\83q\81[\83\8d\81[\8bC\95ª\82É\82È\82é\81B", "Removes fear, and gives bonus to hit and 10 more HP for a while.");\r
105 \r
106                 {\r
107                         int base = 25;\r
108 \r
109                         if (info) return info_duration(base, base);\r
110 \r
111                         if (cast)\r
112                         {\r
113                                 (void)heroism(base);\r
114                         }\r
115                 }\r
116                 break;\r
117 \r
118         case 6:\r
119                 if (name) return _("\91Ï\93d\8c\82", "Resist Lightning");\r
120                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\93d\8c\82\82Ö\82Ì\91Ï\90«\82ð\93¾\82é\81B\91\95\94õ\82É\82æ\82é\91Ï\90«\82É\97Ý\90Ï\82·\82é\81B",\r
121                         "Gives resistance to electricity. This resistance can be added to which from equipment for more powerful resistance.");\r
122 \r
123                 {\r
124                         int base = 20;\r
125 \r
126                         if (info) return info_duration(base, base);\r
127 \r
128                         if (cast)\r
129                         {\r
130                                 set_oppose_elec(randint1(base) + base, FALSE);\r
131                         }\r
132                 }\r
133                 break;\r
134 \r
135         case 7:\r
136                 if (name) return _("\91Ï\8e_", "Resist Acid");\r
137                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\8e_\82Ö\82Ì\91Ï\90«\82ð\93¾\82é\81B\91\95\94õ\82É\82æ\82é\91Ï\90«\82É\97Ý\90Ï\82·\82é\81B",\r
138                         "Gives resistance to acid. This resistance can be added to which from equipment for more powerful resistance.");\r
139 \r
140                 {\r
141                         int base = 20;\r
142 \r
143                         if (info) return info_duration(base, base);\r
144 \r
145                         if (cast)\r
146                         {\r
147                                 set_oppose_acid(randint1(base) + base, FALSE);\r
148                         }\r
149                 }\r
150                 break;\r
151 \r
152         case 8:\r
153                 if (name) return _("\93§\96¾\8e\8b\94F", "See Invisibility");\r
154                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\93§\96¾\82È\82à\82Ì\82ª\8c©\82¦\82é\82æ\82¤\82É\82È\82é\81B", "Gives see invisible for a while.");\r
155 \r
156                 {\r
157                         int base = 24;\r
158 \r
159                         if (info) return info_duration(base, base);\r
160 \r
161                         if (cast)\r
162                         {\r
163                                 set_tim_invis(randint1(base) + base, FALSE);\r
164                         }\r
165                 }\r
166                 break;\r
167 \r
168         case 9:\r
169                 if (name) return _("\89ð\8eô", "Remove Curse");\r
170                 if (desc) return _("\83A\83C\83e\83\80\82É\82©\82©\82Á\82½\8eã\82¢\8eô\82¢\82ð\89ð\8f\9c\82·\82é\81B", "Removes normal curses from equipped items.");\r
171 \r
172                 {\r
173                         if (cast)\r
174                         {\r
175                                 if (remove_curse())\r
176                                 {\r
177                                         msg_print(_("\92N\82©\82É\8c©\8eç\82ç\82ê\82Ä\82¢\82é\82æ\82¤\82È\8bC\82ª\82·\82é\81B", "You feel as if someone is watching over you."));\r
178                                 }\r
179                         }\r
180                 }\r
181                 break;\r
182 \r
183         case 10:\r
184                 if (name) return _("\91Ï\93Å", "Resist Poison");\r
185                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\93Å\82Ö\82Ì\91Ï\90«\82ð\93¾\82é\81B\91\95\94õ\82É\82æ\82é\91Ï\90«\82É\97Ý\90Ï\82·\82é\81B",\r
186                         "Gives resistance to poison. This resistance can be added to which from equipment for more powerful resistance.");\r
187 \r
188                 {\r
189                         int base = 20;\r
190 \r
191                         if (info) return info_duration(base, base);\r
192 \r
193                         if (cast)\r
194                         {\r
195                                 set_oppose_pois(randint1(base) + base, FALSE);\r
196                         }\r
197                 }\r
198                 break;\r
199 \r
200         case 11:\r
201                 if (name) return _("\8b\90í\8em\89»", "Berserk");\r
202                 if (desc) return _("\8b\90í\8em\89»\82µ\81A\8b°\95|\82ð\8f\9c\8b\8e\82·\82é\81B", "Gives bonus to hit and HP, immunity to fear for a while. But decreases AC.");\r
203 \r
204                 {\r
205                         int base = 25;\r
206 \r
207                         if (info) return info_duration(base, base);\r
208 \r
209                         if (cast)\r
210                         {\r
211                                 (void)berserk(base + randint1(base));\r
212                         }\r
213                 }\r
214                 break;\r
215 \r
216         case 12:\r
217                 if (name) return _("\8e©\8cÈ\95ª\90Í", "Self Knowledge");\r
218                 if (desc) return _("\8c»\8dÝ\82Ì\8e©\95ª\82Ì\8fó\91Ô\82ð\8a®\91S\82É\92m\82é\81B",\r
219                         "Gives you useful info regarding your current resistances, the powers of your weapon and maximum limits of your stats.");\r
220 \r
221                 {\r
222                         if (cast)\r
223                         {\r
224                                 self_knowledge();\r
225                         }\r
226                 }\r
227                 break;\r
228 \r
229         case 13:\r
230                 if (name) return _("\91Î\8e×\88«\8c\8b\8aE", "Protection from Evil");\r
231                 if (desc) return _("\8e×\88«\82È\83\82\83\93\83X\83^\81[\82Ì\8dU\8c\82\82ð\96h\82®\83o\83\8a\83A\82ð\92£\82é\81B", "Gives aura which protect you from evil monster's physical attack.");\r
232 \r
233                 {\r
234                         int base = 3 * plev;\r
235                         int sides = 25;\r
236 \r
237                         if (info) return info_duration(base, sides);\r
238 \r
239                         if (cast)\r
240                         {\r
241                                 set_protevil(randint1(sides) + base, FALSE);\r
242                         }\r
243                 }\r
244                 break;\r
245 \r
246         case 14:\r
247                 if (name) return _("\96ü\82µ", "Cure");\r
248                 if (desc) return _("\93Å\81A\9eN\9eO\8fó\91Ô\81A\95\89\8f\9d\82ð\91S\89õ\82³\82¹\81A\8c\8ao\82ð\92¼\82·\81B", "Heals poison, stun, cut and hallucination completely.");\r
249 \r
250                 {\r
251                         if (cast)\r
252                         {\r
253                                 (void)true_healing(0);\r
254                         }\r
255                 }\r
256                 break;\r
257 \r
258         case 15:\r
259                 if (name) return _("\96\82\96@\8c\95", "Mana Branding");\r
260                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\95\90\8aí\82É\97â\8bC\81A\89\8a\81A\93d\8c\82\81A\8e_\81A\93Å\82Ì\82¢\82¸\82ê\82©\82Ì\91®\90«\82ð\82Â\82¯\82é\81B\95\90\8aí\82ð\8e\9d\82½\82È\82¢\82Æ\8eg\82¦\82È\82¢\81B",\r
261                         "Makes current weapon some elemental branded. You must wield weapons.");\r
262 \r
263                 {\r
264                         int base = plev / 2;\r
265 \r
266                         if (info) return info_duration(base, base);\r
267 \r
268                         if (cast)\r
269                         {\r
270                                 if (!choose_ele_attack()) return NULL;\r
271                         }\r
272                 }\r
273                 break;\r
274 \r
275         case 16:\r
276                 if (name) return _("\83e\83\8c\83p\83V\81[", "Telepathy");\r
277                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\83e\83\8c\83p\83V\81[\94\\97Í\82ð\93¾\82é\81B", "Gives telepathy for a while.");\r
278 \r
279                 {\r
280                         int base = 25;\r
281                         int sides = 30;\r
282 \r
283                         if (info) return info_duration(base, sides);\r
284 \r
285                         if (cast)\r
286                         {\r
287                                 set_tim_esp(randint1(sides) + base, FALSE);\r
288                         }\r
289                 }\r
290                 break;\r
291 \r
292         case 17:\r
293                 if (name) return _("\94§\90Î\89»", "Stone Skin");\r
294                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81AAC\82ð\8fã\8f¸\82³\82¹\82é\81B", "Gives bonus to AC for a while.");\r
295 \r
296                 {\r
297                         int base = 30;\r
298                         int sides = 20;\r
299 \r
300                         if (info) return info_duration(base, sides);\r
301 \r
302                         if (cast)\r
303                         {\r
304                                 set_shield(randint1(sides) + base, FALSE);\r
305                         }\r
306                 }\r
307                 break;\r
308 \r
309         case 18:\r
310                 if (name) return _("\91S\91Ï\90«", "Resistance");\r
311                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\8e_\81A\93d\8c\82\81A\89\8a\81A\97â\8bC\81A\93Å\82É\91Î\82·\82é\91Ï\90«\82ð\93¾\82é\81B\91\95\94õ\82É\82æ\82é\91Ï\90«\82É\97Ý\90Ï\82·\82é\81B",\r
312                         "Gives resistance to fire, cold, electricity, acid and poison for a while. These resistances can be added to which from equipment for more powerful resistances.");\r
313 \r
314                 {\r
315                         int base = 20;\r
316 \r
317                         if (info) return info_duration(base, base);\r
318 \r
319                         if (cast)\r
320                         {\r
321                                 set_oppose_acid(randint1(base) + base, FALSE);\r
322                                 set_oppose_elec(randint1(base) + base, FALSE);\r
323                                 set_oppose_fire(randint1(base) + base, FALSE);\r
324                                 set_oppose_cold(randint1(base) + base, FALSE);\r
325                                 set_oppose_pois(randint1(base) + base, FALSE);\r
326                         }\r
327                 }\r
328                 break;\r
329 \r
330         case 19:\r
331                 if (name) return _("\83X\83s\81[\83h", "Haste Self");\r
332                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\89Á\91¬\82·\82é\81B", "Hastes you for a while.");\r
333 \r
334                 {\r
335                         int base = plev;\r
336                         int sides = 20 + plev;\r
337 \r
338                         if (info) return info_duration(base, sides);\r
339 \r
340                         if (cast)\r
341                         {\r
342                                 set_fast(randint1(sides) + base, FALSE);\r
343                         }\r
344                 }\r
345                 break;\r
346 \r
347         case 20:\r
348                 if (name) return _("\95Ç\94²\82¯", "Walk through Wall");\r
349                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\94¼\95¨\8e¿\89»\82µ\95Ç\82ð\92Ê\82è\94²\82¯\82ç\82ê\82é\82æ\82¤\82É\82È\82é\81B", "Gives ability to pass walls for a while.");\r
350 \r
351                 {\r
352                         int base = plev / 2;\r
353 \r
354                         if (info) return info_duration(base, base);\r
355 \r
356                         if (cast)\r
357                         {\r
358                                 set_kabenuke(randint1(base) + base, FALSE);\r
359                         }\r
360                 }\r
361                 break;\r
362 \r
363         case 21:\r
364                 if (name) return _("\8f\82\96\81\82«", "Polish Shield");\r
365                 if (desc) return _("\8f\82\82É\94½\8eË\82Ì\91®\90«\82ð\82Â\82¯\82é\81B", "Makes a shield a shield of reflection.");\r
366 \r
367                 {\r
368                         if (cast)\r
369                         {\r
370                                 pulish_shield();\r
371                         }\r
372                 }\r
373                 break;\r
374 \r
375         case 22:\r
376                 if (name) return _("\83S\81[\83\8c\83\80\90»\91¢", "Create Golem");\r
377                 if (desc) return _("1\91Ì\82Ì\83S\81[\83\8c\83\80\82ð\90»\91¢\82·\82é\81B", "Creates a golem.");\r
378 \r
379                 {\r
380                         if (cast)\r
381                         {\r
382                                 if (summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_GOLEM, PM_FORCE_PET))\r
383                                 {\r
384                                         msg_print(_("\83S\81[\83\8c\83\80\82ð\8dì\82Á\82½\81B", "You make a golem."));\r
385                                 }\r
386                                 else\r
387                                 {\r
388                                         msg_print(_("\82¤\82Ü\82­\83S\81[\83\8c\83\80\82ð\8dì\82ê\82È\82©\82Á\82½\81B", "No Golems arrive."));\r
389                                 }\r
390                         }\r
391                 }\r
392                 break;\r
393 \r
394         case 23:\r
395                 if (name) return _("\96\82\96@\82Ì\8aZ", "Magical armor");\r
396                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\96\82\96@\96h\8cä\97Í\82ÆAC\82ª\8fã\82ª\82è\81A\8d¬\97\90\82Æ\96Ó\96Ú\82Ì\91Ï\90«\81A\94½\8eË\94\\97Í\81A\96\83á\83\92m\82ç\82¸\81A\95\82\97V\82ð\93¾\82é\81B",\r
397                         "Gives resistance to magic, bonus to AC, resistance to confusion, blindness, reflection, free action and levitation for a while.");\r
398 \r
399                 {\r
400                         int base = 20;\r
401 \r
402                         if (info) return info_duration(base, base);\r
403 \r
404                         if (cast)\r
405                         {\r
406                                 set_magicdef(randint1(base) + base, FALSE);\r
407                         }\r
408                 }\r
409                 break;\r
410 \r
411         case 24:\r
412                 if (name) return _("\91\95\94õ\96³\97Í\89»", "Remove Enchantment");\r
413                 if (desc) return _("\95\90\8aí\81E\96h\8bï\82É\82©\82¯\82ç\82ê\82½\82 \82ç\82ä\82é\96\82\97Í\82ð\8a®\91S\82É\89ð\8f\9c\82·\82é\81B", "Removes all magics completely from any weapon or armor.");\r
414 \r
415                 {\r
416                         if (cast)\r
417                         {\r
418                                 if (!mundane_spell(TRUE)) return NULL;\r
419                         }\r
420                 }\r
421                 break;\r
422 \r
423         case 25:\r
424                 if (name) return _("\8eô\82¢\95²\8dÓ", "Remove All Curse");\r
425                 if (desc) return _("\83A\83C\83e\83\80\82É\82©\82©\82Á\82½\8b­\97Í\82È\8eô\82¢\82ð\89ð\8f\9c\82·\82é\81B", "Removes normal and heavy curse from equipped items.");\r
426 \r
427                 {\r
428                         if (cast)\r
429                         {\r
430                                 if (remove_all_curse())\r
431                                 {\r
432                                         msg_print(_("\92N\82©\82É\8c©\8eç\82ç\82ê\82Ä\82¢\82é\82æ\82¤\82È\8bC\82ª\82·\82é\81B", "You feel as if someone is watching over you."));\r
433                                 }\r
434                         }\r
435                 }\r
436                 break;\r
437 \r
438         case 26:\r
439                 if (name) return _("\8a®\91S\82È\82é\92m\8e¯", "Knowledge True");\r
440                 if (desc) return _("\83A\83C\83e\83\80\82Ì\8e\9d\82Â\94\\97Í\82ð\8a®\91S\82É\92m\82é\81B", "*Identifies* an item.");\r
441 \r
442                 {\r
443                         if (cast)\r
444                         {\r
445                                 if (!identify_fully(FALSE)) return NULL;\r
446                         }\r
447                 }\r
448                 break;\r
449 \r
450         case 27:\r
451                 if (name) return _("\95\90\8aí\8b­\89»", "Enchant Weapon");\r
452                 if (desc) return _("\95\90\8aí\82Ì\96½\92\86\97¦\8fC\90³\82Æ\83_\83\81\81[\83W\8fC\90³\82ð\8b­\89»\82·\82é\81B", "Attempts to increase +to-hit, +to-dam of a weapon.");\r
453 \r
454                 {\r
455                         if (cast)\r
456                         {\r
457                                 if (!enchant_spell(randint0(4) + 1, randint0(4) + 1, 0)) return NULL;\r
458                         }\r
459                 }\r
460                 break;\r
461 \r
462         case 28:\r
463                 if (name) return _("\96h\8bï\8b­\89»", "Enchant Armor");\r
464                 if (desc) return _("\8aZ\82Ì\96h\8cä\8fC\90³\82ð\8b­\89»\82·\82é\81B", "Attempts to increase +AC of an armor.");\r
465 \r
466                 {\r
467                         if (cast)\r
468                         {\r
469                                 if (!enchant_spell(0, 0, randint0(3) + 2)) return NULL;\r
470                         }\r
471                 }\r
472                 break;\r
473 \r
474         case 29:\r
475                 if (name) return _("\95\90\8aí\91®\90«\95t\97^", "Brand Weapon");\r
476                 if (desc) return _("\95\90\8aí\82É\83\89\83\93\83_\83\80\82É\91®\90«\82ð\82Â\82¯\82é\81B", "Makes current weapon a random ego weapon.");\r
477 \r
478                 {\r
479                         if (cast)\r
480                         {\r
481                                 brand_weapon(randint0(18));\r
482                         }\r
483                 }\r
484                 break;\r
485 \r
486         case 30:\r
487                 if (name) return _("\90l\8aÔ\83g\83\89\83\93\83v", "Living Trump");\r
488                 if (desc) return _("\83\89\83\93\83_\83\80\82É\83e\83\8c\83|\81[\83g\82·\82é\93Ë\91R\95Ï\88Ù\82©\81A\8e©\95ª\82Ì\88Ó\8ev\82Å\83e\83\8c\83|\81[\83g\82·\82é\93Ë\91R\95Ï\88Ù\82ª\90g\82É\82Â\82­\81B",\r
489                         "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");\r
490 \r
491                 {\r
492                         if (cast)\r
493                         {\r
494                                 int mutation;\r
495 \r
496                                 if (one_in_(7))\r
497                                         /* Teleport control */\r
498                                         mutation = 12;\r
499                                 else\r
500                                         /* Random teleportation (uncontrolled) */\r
501                                         mutation = 77;\r
502 \r
503                                 /* Gain the mutation */\r
504                                 if (gain_random_mutation(mutation))\r
505                                 {\r
506                                         msg_print(_("\82 \82È\82½\82Í\90\82«\82Ä\82¢\82é\83J\81[\83h\82É\95Ï\82í\82Á\82½\81B", "You have turned into a Living Trump."));\r
507                                 }\r
508                         }\r
509                 }\r
510                 break;\r
511 \r
512         case 31:\r
513                 if (name) return _("\91®\90«\82Ö\82Ì\96Æ\89u", "Immunity");\r
514                 if (desc) return _("\88ê\92è\8e\9e\8aÔ\81A\97â\8bC\81A\89\8a\81A\93d\8c\82\81A\8e_\82Ì\82¢\82¸\82ê\82©\82É\91Î\82·\82é\96Æ\89u\82ð\93¾\82é\81B",\r
515                         "Gives an immunity to fire, cold, electricity or acid for a while.");\r
516 \r
517                 {\r
518                         int base = 13;\r
519 \r
520                         if (info) return info_duration(base, base);\r
521 \r
522                         if (cast)\r
523                         {\r
524                                 if (!choose_ele_immune(base + randint1(base))) return NULL;\r
525                         }\r
526                 }\r
527                 break;\r
528         }\r
529 \r
530         return "";\r
531 }\r