OSDN Git Service

[Refactor] #37353 flavor.c を object-flavor.c/h に変更して #pragma once を他ファイルに適用。(LNK4042の...
[hengband/hengband.git] / src / patron.c
1 
2 #include "angband.h"
3
4 #include "patron.h"
5 #include "cmd-pet.h"
6 #include "object-curse.h"
7 #include "object-flavor.h"
8 #include "monsterrace-hook.h"
9 #include "objectkind-hook.h"
10 #include "mutation.h"
11 #include "artifact.h"
12 #include "player-status.h"
13
14 #include "spells.h"
15 #include "spells-summon.h"
16 #include "spells-object.h"
17 #include "spells-status.h"
18
19 #ifdef JP
20 /*!
21  * @brief カオスパトロン名テーブル
22  */
23 const concptr chaos_patrons[MAX_PATRON] =
24 {
25         "スローター",
26         "マベロード",
27         "チャードロス",
28         "ハイオンハーン",
29         "キシオムバーグ",
30
31         "ピアレー",
32         "バラン",
33         "アリオッチ",
34         "イーカー",
35         "ナージャン",
36
37         "バロ",
38         "コーン",
39         "スラーネッシュ",
40         "ナーグル",
41         "ティーンチ",
42
43         "カイン"
44 };
45 #else
46 const concptr chaos_patrons[MAX_PATRON] =
47 {
48         "Slortar",
49         "Mabelode",
50         "Chardros",
51         "Hionhurn",
52         "Xiombarg",
53
54         "Pyaray",
55         "Balaan",
56         "Arioch",
57         "Eequor",
58         "Narjhan",
59
60         "Balo",
61         "Khorne",
62         "Slaanesh",
63         "Nurgle",
64         "Tzeentch",
65
66         "Khaine"
67 };
68 #endif
69
70
71 /*!
72  * @brief カオスパトロンの報酬能力値テーブル
73  */
74 const int chaos_stats[MAX_PATRON] =
75 {
76         A_CON,  /* Slortar */
77         A_CON,  /* Mabelode */
78         A_STR,  /* Chardros */
79         A_STR,  /* Hionhurn */
80         A_STR,  /* Xiombarg */
81
82         A_INT,  /* Pyaray */
83         A_STR,  /* Balaan */
84         A_INT,  /* Arioch */
85         A_CON,  /* Eequor */
86         A_CHR,  /* Narjhan */
87
88         -1,     /* Balo */
89         A_STR,  /* Khorne */
90         A_CHR,  /* Slaanesh */
91         A_CON,  /* Nurgle */
92         A_INT,  /* Tzeentch */
93
94         A_STR,  /* Khaine */
95 };
96
97 /*!
98  * @brief カオスパトロンの報酬テーブル
99  */
100 const int chaos_rewards[MAX_PATRON][20] =
101 {
102         /* Slortar the Old: */
103         {
104                 REW_WRATH, REW_CURSE_WP, REW_CURSE_AR, REW_RUIN_ABL, REW_LOSE_ABL,
105                 REW_IGNORE, REW_IGNORE, REW_IGNORE, REW_POLY_WND, REW_POLY_SLF,
106                 REW_POLY_SLF, REW_POLY_SLF, REW_GAIN_ABL, REW_GAIN_ABL, REW_GAIN_EXP,
107                 REW_GOOD_OBJ, REW_CHAOS_WP, REW_GREA_OBJ, REW_AUGM_ABL, REW_AUGM_ABL
108         },
109
110         /* Mabelode the Faceless: */
111         {
112                 REW_WRATH, REW_CURSE_WP, REW_CURSE_AR, REW_H_SUMMON, REW_SUMMON_M,
113                 REW_SUMMON_M, REW_IGNORE, REW_IGNORE, REW_POLY_WND, REW_POLY_WND,
114                 REW_POLY_SLF, REW_HEAL_FUL, REW_HEAL_FUL, REW_GAIN_ABL, REW_SER_UNDE,
115                 REW_CHAOS_WP, REW_GOOD_OBJ, REW_GOOD_OBJ, REW_GOOD_OBS, REW_GOOD_OBS
116         },
117
118         /* Chardros the Reaper: */
119         {
120                 REW_WRATH, REW_WRATH, REW_HURT_LOT, REW_PISS_OFF, REW_H_SUMMON,
121                 REW_SUMMON_M, REW_IGNORE, REW_IGNORE, REW_DESTRUCT, REW_SER_UNDE,
122                 REW_GENOCIDE, REW_MASS_GEN, REW_MASS_GEN, REW_DISPEL_C, REW_GOOD_OBJ,
123                 REW_CHAOS_WP, REW_GOOD_OBS, REW_GOOD_OBS, REW_AUGM_ABL, REW_AUGM_ABL
124         },
125
126         /* Hionhurn the Executioner: */
127         {
128                 REW_WRATH, REW_WRATH, REW_CURSE_WP, REW_CURSE_AR, REW_RUIN_ABL,
129                 REW_IGNORE, REW_IGNORE, REW_SER_UNDE, REW_DESTRUCT, REW_GENOCIDE,
130                 REW_MASS_GEN, REW_MASS_GEN, REW_HEAL_FUL, REW_GAIN_ABL, REW_GAIN_ABL,
131                 REW_CHAOS_WP, REW_GOOD_OBS, REW_GOOD_OBS, REW_AUGM_ABL, REW_AUGM_ABL
132         },
133
134         /* Xiombarg the Sword-Queen: */
135         {
136                 REW_TY_CURSE, REW_TY_CURSE, REW_PISS_OFF, REW_RUIN_ABL, REW_LOSE_ABL,
137                 REW_IGNORE, REW_POLY_SLF, REW_POLY_SLF, REW_POLY_WND, REW_POLY_WND,
138                 REW_GENOCIDE, REW_DISPEL_C, REW_GOOD_OBJ, REW_GOOD_OBJ, REW_SER_MONS,
139                 REW_GAIN_ABL, REW_CHAOS_WP, REW_GAIN_EXP, REW_AUGM_ABL, REW_GOOD_OBS
140         },
141
142
143         /* Pyaray the Tentacled Whisperer of Impossible Secretes: */
144         {
145                 REW_WRATH, REW_TY_CURSE, REW_PISS_OFF, REW_H_SUMMON, REW_H_SUMMON,
146                 REW_IGNORE, REW_IGNORE, REW_IGNORE, REW_POLY_WND, REW_POLY_SLF,
147                 REW_POLY_SLF, REW_SER_DEMO, REW_HEAL_FUL, REW_GAIN_ABL, REW_GAIN_ABL,
148                 REW_CHAOS_WP, REW_DO_HAVOC, REW_GOOD_OBJ, REW_GREA_OBJ, REW_GREA_OBS
149         },
150
151         /* Balaan the Grim: */
152         {
153                 REW_TY_CURSE, REW_HURT_LOT, REW_CURSE_WP, REW_CURSE_AR, REW_RUIN_ABL,
154                 REW_SUMMON_M, REW_LOSE_EXP, REW_POLY_SLF, REW_POLY_SLF, REW_POLY_WND,
155                 REW_SER_UNDE, REW_HEAL_FUL, REW_HEAL_FUL, REW_GAIN_EXP, REW_GAIN_EXP,
156                 REW_CHAOS_WP, REW_GOOD_OBJ, REW_GOOD_OBS, REW_GREA_OBS, REW_AUGM_ABL
157         },
158
159         /* Arioch, Duke of Hell: */
160         {
161                 REW_WRATH, REW_PISS_OFF, REW_RUIN_ABL, REW_LOSE_EXP, REW_H_SUMMON,
162                 REW_IGNORE, REW_IGNORE, REW_IGNORE, REW_IGNORE, REW_POLY_SLF,
163                 REW_POLY_SLF, REW_MASS_GEN, REW_SER_DEMO, REW_HEAL_FUL, REW_CHAOS_WP,
164                 REW_CHAOS_WP, REW_GOOD_OBJ, REW_GAIN_EXP, REW_GREA_OBJ, REW_AUGM_ABL
165         },
166
167         /* Eequor, Blue Lady of Dismay: */
168         {
169                 REW_WRATH, REW_TY_CURSE, REW_PISS_OFF, REW_CURSE_WP, REW_RUIN_ABL,
170                 REW_IGNORE, REW_IGNORE, REW_POLY_SLF, REW_POLY_SLF, REW_POLY_WND,
171                 REW_GOOD_OBJ, REW_GOOD_OBJ, REW_SER_MONS, REW_HEAL_FUL, REW_GAIN_EXP,
172                 REW_GAIN_ABL, REW_CHAOS_WP, REW_GOOD_OBS, REW_GREA_OBJ, REW_AUGM_ABL
173         },
174
175         /* Narjhan, Lord of Beggars: */
176         {
177                 REW_WRATH, REW_CURSE_AR, REW_CURSE_WP, REW_CURSE_WP, REW_CURSE_AR,
178                 REW_IGNORE, REW_IGNORE, REW_IGNORE, REW_POLY_SLF, REW_POLY_SLF,
179                 REW_POLY_WND, REW_HEAL_FUL, REW_HEAL_FUL, REW_GAIN_EXP, REW_AUGM_ABL,
180                 REW_GOOD_OBJ, REW_GOOD_OBJ, REW_CHAOS_WP, REW_GREA_OBJ, REW_GREA_OBS
181         },
182
183         /* Balo the Jester: */
184         {
185                 REW_WRATH, REW_SER_DEMO, REW_CURSE_WP, REW_CURSE_AR, REW_LOSE_EXP,
186                 REW_GAIN_ABL, REW_LOSE_ABL, REW_POLY_WND, REW_POLY_SLF, REW_IGNORE,
187                 REW_DESTRUCT, REW_MASS_GEN, REW_CHAOS_WP, REW_GREA_OBJ, REW_HURT_LOT,
188                 REW_AUGM_ABL, REW_RUIN_ABL, REW_H_SUMMON, REW_GREA_OBS, REW_AUGM_ABL
189         },
190
191         /* Khorne the Bloodgod: */
192         {
193                 REW_WRATH, REW_HURT_LOT, REW_HURT_LOT, REW_H_SUMMON, REW_H_SUMMON,
194                 REW_IGNORE, REW_IGNORE, REW_IGNORE, REW_SER_MONS, REW_SER_DEMO,
195                 REW_POLY_SLF, REW_POLY_WND, REW_HEAL_FUL, REW_GOOD_OBJ, REW_GOOD_OBJ,
196                 REW_CHAOS_WP, REW_GOOD_OBS, REW_GOOD_OBS, REW_GREA_OBJ, REW_GREA_OBS
197         },
198
199         /* Slaanesh: */
200         {
201                 REW_WRATH, REW_PISS_OFF, REW_PISS_OFF, REW_RUIN_ABL, REW_LOSE_ABL,
202                 REW_LOSE_EXP, REW_IGNORE, REW_IGNORE, REW_POLY_WND, REW_SER_DEMO,
203                 REW_POLY_SLF, REW_HEAL_FUL, REW_HEAL_FUL, REW_GOOD_OBJ, REW_GAIN_EXP,
204                 REW_GAIN_EXP, REW_CHAOS_WP, REW_GAIN_ABL, REW_GREA_OBJ, REW_AUGM_ABL
205         },
206
207         /* Nurgle: */
208         {
209                 REW_WRATH, REW_PISS_OFF, REW_HURT_LOT, REW_RUIN_ABL, REW_LOSE_ABL,
210                 REW_LOSE_EXP, REW_IGNORE, REW_IGNORE, REW_IGNORE, REW_POLY_SLF,
211                 REW_POLY_SLF, REW_POLY_WND, REW_HEAL_FUL, REW_GOOD_OBJ, REW_GAIN_ABL,
212                 REW_GAIN_ABL, REW_SER_UNDE, REW_CHAOS_WP, REW_GREA_OBJ, REW_AUGM_ABL
213         },
214
215         /* Tzeentch: */
216         {
217                 REW_WRATH, REW_CURSE_WP, REW_CURSE_AR, REW_RUIN_ABL, REW_LOSE_ABL,
218                 REW_LOSE_EXP, REW_IGNORE, REW_POLY_SLF, REW_POLY_SLF, REW_POLY_SLF,
219                 REW_POLY_SLF, REW_POLY_WND, REW_HEAL_FUL, REW_CHAOS_WP, REW_GREA_OBJ,
220                 REW_GAIN_ABL, REW_GAIN_ABL, REW_GAIN_EXP, REW_GAIN_EXP, REW_AUGM_ABL
221         },
222
223         /* Khaine: */
224         {
225                 REW_WRATH, REW_HURT_LOT, REW_PISS_OFF, REW_LOSE_ABL, REW_LOSE_EXP,
226                 REW_IGNORE,   REW_IGNORE,   REW_DISPEL_C, REW_DO_HAVOC, REW_DO_HAVOC,
227                 REW_POLY_SLF, REW_POLY_SLF, REW_GAIN_EXP, REW_GAIN_ABL, REW_GAIN_ABL,
228                 REW_SER_MONS, REW_GOOD_OBJ, REW_CHAOS_WP, REW_GREA_OBJ, REW_GOOD_OBS
229         }
230 };
231
232
233 void gain_level_reward(int chosen_reward)
234 {
235         char        wrath_reason[32] = "";
236         int         nasty_chance = 6;
237         OBJECT_TYPE_VALUE dummy = 0;
238         int         type, effect;
239         concptr        reward = NULL;
240         GAME_TEXT o_name[MAX_NLEN];
241
242         int count = 0;
243
244         if (!chosen_reward)
245         {
246                 if (multi_rew) return;
247                 else multi_rew = TRUE;
248         }
249
250
251         if (p_ptr->lev == 13) nasty_chance = 2;
252         else if (!(p_ptr->lev % 13)) nasty_chance = 3;
253         else if (!(p_ptr->lev % 14)) nasty_chance = 12;
254
255         if (one_in_(nasty_chance))
256                 type = randint1(20); /* Allow the 'nasty' effects */
257         else
258                 type = randint1(15) + 5; /* Or disallow them */
259
260         if (type < 1) type = 1;
261         if (type > 20) type = 20;
262         type--;
263
264
265         sprintf(wrath_reason, _("%sの怒り", "the Wrath of %s"), chaos_patrons[p_ptr->chaos_patron]);
266
267         effect = chaos_rewards[p_ptr->chaos_patron][type];
268
269         if (one_in_(6) && !chosen_reward)
270         {
271                 msg_format(_("%^sは褒美としてあなたを突然変異させた。", "%^s rewards you with a mutation!"), chaos_patrons[p_ptr->chaos_patron]);
272                 (void)gain_mutation(p_ptr, 0);
273                 reward = _("変異した。", "mutation");
274         }
275         else
276         {
277                 switch (chosen_reward ? chosen_reward : effect)
278                 {
279
280                 case REW_POLY_SLF:
281
282                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
283                         msg_print(_("「汝、新たなる姿を必要とせり!」", "'Thou needst a new form, mortal!'"));
284
285                         do_poly_self();
286                         reward = _("変異した。", "polymorphing");
287                         break;
288
289                 case REW_GAIN_EXP:
290
291                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
292                         msg_print(_("「汝は良く行いたり!続けよ!」", "'Well done, mortal! Lead on!'"));
293
294                         if (p_ptr->prace == RACE_ANDROID)
295                         {
296                                 msg_print(_("しかし何も起こらなかった。", "But, nothing happen."));
297                         }
298                         else if (p_ptr->exp < PY_MAX_EXP)
299                         {
300                                 s32b ee = (p_ptr->exp / 2) + 10;
301                                 if (ee > 100000L) ee = 100000L;
302                                 msg_print(_("更に経験を積んだような気がする。", "You feel more experienced."));
303
304                                 gain_exp(ee);
305                                 reward = _("経験値を得た", "experience");
306                         }
307                         break;
308
309                 case REW_LOSE_EXP:
310
311                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
312                         msg_print(_("「下僕よ、汝それに値せず。」", "'Thou didst not deserve that, slave.'"));
313
314                         if (p_ptr->prace == RACE_ANDROID)
315                         {
316                                 msg_print(_("しかし何も起こらなかった。", "But, nothing happen."));
317                         }
318                         else
319                         {
320                                 lose_exp(p_ptr->exp / 6);
321                                 reward = _("経験値を失った。", "losing experience");
322                         }
323                         break;
324
325                 case REW_GOOD_OBJ:
326                         msg_format(_("%sの声がささやいた:", "The voice of %s whispers:"), chaos_patrons[p_ptr->chaos_patron]);
327                         msg_print(_("「我が与えし物を賢明に使うべし。」", "'Use my gift wisely.'"));
328
329                         acquirement(p_ptr->y, p_ptr->x, 1, FALSE, FALSE, FALSE);
330                         reward = _("上質なアイテムを手に入れた。", "a good item");
331                         break;
332
333                 case REW_GREA_OBJ:
334
335                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
336                         msg_print(_("「我が与えし物を賢明に使うべし。」", "'Use my gift wisely.'"));
337
338                         acquirement(p_ptr->y, p_ptr->x, 1, TRUE, FALSE, FALSE);
339                         reward = _("高級品のアイテムを手に入れた。", "an excellent item");
340                         break;
341
342                 case REW_CHAOS_WP:
343                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
344                         msg_print(_("「汝の行いは貴き剣に値せり。」", "'Thy deed hath earned thee a worthy blade.'"));
345                         acquire_chaos_weapon(p_ptr);
346                         reward = _("(混沌)の武器を手に入れた。", "chaos weapon");
347                         break;
348
349                 case REW_GOOD_OBS:
350
351                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
352                         msg_print(_("「汝の行いは貴き報いに値せり。」", "'Thy deed hath earned thee a worthy reward.'"));
353
354                         acquirement(p_ptr->y, p_ptr->x, randint1(2) + 1, FALSE, FALSE, FALSE);
355                         reward = _("上質なアイテムを手に入れた。", "good items");
356                         break;
357
358                 case REW_GREA_OBS:
359
360                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
361                         msg_print(_("「下僕よ、汝の献身への我が惜しみ無き報いを見るがよい。」", "'Behold, mortal, how generously I reward thy loyalty.'"));
362
363                         acquirement(p_ptr->y, p_ptr->x, randint1(2) + 1, TRUE, FALSE, FALSE);
364                         reward = _("高級品のアイテムを手に入れた。", "excellent items");
365                         break;
366
367                 case REW_TY_CURSE:
368                         msg_format(_("%sの声が轟き渡った:", "The voice of %s thunders:"), chaos_patrons[p_ptr->chaos_patron]);
369                         msg_print(_("「下僕よ、汝傲慢なり。」", "'Thou art growing arrogant, mortal.'"));
370
371                         (void)activate_ty_curse(FALSE, &count);
372                         reward = _("禍々しい呪いをかけられた。", "cursing");
373                         break;
374
375                 case REW_SUMMON_M:
376
377                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
378                         msg_print(_("「我が下僕たちよ、かの傲慢なる者を倒すべし!」", "'My pets, destroy the arrogant mortal!'"));
379
380                         for (dummy = 0; dummy < randint1(5) + 1; dummy++)
381                         {
382                                 (void)summon_specific(0, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET), '\0');
383                         }
384                         reward = _("モンスターを召喚された。", "summoning hostile monsters");
385                         break;
386
387
388                 case REW_H_SUMMON:
389
390                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
391                         msg_print(_("「汝、より強き敵を必要とせり!」", "'Thou needst worthier opponents!'"));
392
393                         activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
394                         reward = _("モンスターを召喚された。", "summoning many hostile monsters");
395                         break;
396
397
398                 case REW_DO_HAVOC:
399                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
400                         msg_print(_("「死と破壊こそ我が喜びなり!」", "'Death and destruction! This pleaseth me!'"));
401
402                         call_chaos();
403                         reward = _("カオスの力が渦巻いた。", "calling chaos");
404                         break;
405
406
407                 case REW_GAIN_ABL:
408                         msg_format(_("%sの声が鳴り響いた:", "The voice of %s rings out:"), chaos_patrons[p_ptr->chaos_patron]);
409                         msg_print(_("「留まるのだ、下僕よ。余が汝の肉体を鍛えん。」", "'Stay, mortal, and let me mold thee.'"));
410
411                         if (one_in_(3) && !(chaos_stats[p_ptr->chaos_patron] < 0))
412                                 do_inc_stat(chaos_stats[p_ptr->chaos_patron]);
413                         else
414                                 do_inc_stat(randint0(6));
415                         reward = _("能力値が上がった。", "increasing a stat");
416                         break;
417
418
419                 case REW_LOSE_ABL:
420                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
421                         msg_print(_("「下僕よ、余は汝に飽みたり。」", "'I grow tired of thee, mortal.'"));
422
423                         if (one_in_(3) && !(chaos_stats[p_ptr->chaos_patron] < 0))
424                                 do_dec_stat(chaos_stats[p_ptr->chaos_patron]);
425                         else
426                                 (void)do_dec_stat(randint0(6));
427                         reward = _("能力値が下がった。", "decreasing a stat");
428                         break;
429
430
431                 case REW_RUIN_ABL:
432
433                         msg_format(_("%sの声が轟き渡った:", "The voice of %s thunders:"), chaos_patrons[p_ptr->chaos_patron]);
434                         msg_print(_("「汝、謙虚たることを学ぶべし!」", "'Thou needst a lesson in humility, mortal!'"));
435                         msg_print(_("あなたは以前より弱くなった!", "You feel less powerful!"));
436
437                         for (dummy = 0; dummy < A_MAX; dummy++)
438                         {
439                                 (void)dec_stat(dummy, 10 + randint1(15), TRUE);
440                         }
441                         reward = _("全能力値が下がった。", "decreasing all stats");
442                         break;
443
444                 case REW_POLY_WND:
445
446                         msg_format(_("%sの力が触れるのを感じた。", "You feel the power of %s touch you."),
447                                 chaos_patrons[p_ptr->chaos_patron]);
448                         do_poly_wounds();
449                         reward = _("傷が変化した。", "polymorphing wounds");
450                         break;
451
452                 case REW_AUGM_ABL:
453
454                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
455
456                         msg_print(_("「我がささやかなる賜物を受けとるがよい!」", "'Receive this modest gift from me!'"));
457
458                         for (dummy = 0; dummy < A_MAX; dummy++)
459                         {
460                                 (void)do_inc_stat(dummy);
461                         }
462                         reward = _("全能力値が上がった。", "increasing all stats");
463                         break;
464
465                 case REW_HURT_LOT:
466
467                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
468                         msg_print(_("「苦しむがよい、無能な愚か者よ!」", "'Suffer, pathetic fool!'"));
469
470                         fire_ball(GF_DISINTEGRATE, 0, p_ptr->lev * 4, 4);
471                         take_hit(DAMAGE_NOESCAPE, p_ptr->lev * 4, wrath_reason, -1);
472                         reward = _("分解の球が発生した。", "generating disintegration ball");
473                         break;
474
475                 case REW_HEAL_FUL:
476
477                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
478                         (void)restore_level();
479                         (void)restore_all_status();
480                         (void)true_healing(5000);
481                         reward = _("体力が回復した。", "healing");
482                         break;
483
484                 case REW_CURSE_WP:
485
486                         if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM)) break;
487                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
488                         msg_print(_("「汝、武器に頼ることなかれ。」", "'Thou reliest too much on thy weapon.'"));
489
490                         dummy = INVEN_RARM;
491                         if (has_melee_weapon(INVEN_LARM))
492                         {
493                                 dummy = INVEN_LARM;
494                                 if (has_melee_weapon(INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
495                         }
496                         object_desc(o_name, &inventory[dummy], OD_NAME_ONLY);
497                         (void)curse_weapon(FALSE, dummy);
498                         reward = format(_("%sが破壊された。", "destroying %s"), o_name);
499                         break;
500
501                 case REW_CURSE_AR:
502
503                         if (!inventory[INVEN_BODY].k_idx) break;
504                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
505                         msg_print(_("「汝、防具に頼ることなかれ。」", "'Thou reliest too much on thine equipment.'"));
506
507                         object_desc(o_name, &inventory[INVEN_BODY], OD_NAME_ONLY);
508                         (void)curse_armor();
509                         reward = format(_("%sが破壊された。", "destroying %s"), o_name);
510                         break;
511
512                 case REW_PISS_OFF:
513
514                         msg_format(_("%sの声がささやいた:", "The voice of %s whispers:"), chaos_patrons[p_ptr->chaos_patron]);
515                         msg_print(_("「我を怒りしめた罪を償うべし。」", "'Now thou shalt pay for annoying me.'"));
516
517                         switch (randint1(4))
518                         {
519                         case 1:
520                                 (void)activate_ty_curse(FALSE, &count);
521                                 reward = _("禍々しい呪いをかけられた。", "cursing");
522                                 break;
523                         case 2:
524                                 activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
525                                 reward = _("モンスターを召喚された。", "summoning hostile monsters");
526                                 break;
527                         case 3:
528                                 if (one_in_(2))
529                                 {
530                                         if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM)) break;
531                                         dummy = INVEN_RARM;
532                                         if (has_melee_weapon(INVEN_LARM))
533                                         {
534                                                 dummy = INVEN_LARM;
535                                                 if (has_melee_weapon(INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
536                                         }
537                                         object_desc(o_name, &inventory[dummy], OD_NAME_ONLY);
538                                         (void)curse_weapon(FALSE, dummy);
539                                         reward = format(_("%sが破壊された。", "destroying %s"), o_name);
540                                 }
541                                 else
542                                 {
543                                         if (!inventory[INVEN_BODY].k_idx) break;
544                                         object_desc(o_name, &inventory[INVEN_BODY], OD_NAME_ONLY);
545                                         (void)curse_armor();
546                                         reward = format(_("%sが破壊された。", "destroying %s"), o_name);
547                                 }
548                                 break;
549                         default:
550                                 for (dummy = 0; dummy < A_MAX; dummy++)
551                                 {
552                                         (void)dec_stat(dummy, 10 + randint1(15), TRUE);
553                                 }
554                                 reward = _("全能力値が下がった。", "decreasing all stats");
555                                 break;
556                         }
557                         break;
558
559                 case REW_WRATH:
560
561                         msg_format(_("%sの声が轟き渡った:", "The voice of %s thunders:"), chaos_patrons[p_ptr->chaos_patron]);
562                         msg_print(_("「死ぬがよい、下僕よ!」", "'Die, mortal!'"));
563
564                         take_hit(DAMAGE_LOSELIFE, p_ptr->lev * 4, wrath_reason, -1);
565                         for (dummy = 0; dummy < A_MAX; dummy++)
566                         {
567                                 (void)dec_stat(dummy, 10 + randint1(15), FALSE);
568                         }
569                         activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
570                         (void)activate_ty_curse(FALSE, &count);
571                         if (one_in_(2))
572                         {
573                                 dummy = 0;
574
575                                 if (has_melee_weapon(INVEN_RARM))
576                                 {
577                                         dummy = INVEN_RARM;
578                                         if (has_melee_weapon(INVEN_LARM) && one_in_(2)) dummy = INVEN_LARM;
579                                 }
580                                 else if (has_melee_weapon(INVEN_LARM)) dummy = INVEN_LARM;
581
582                                 if (dummy) (void)curse_weapon(FALSE, dummy);
583                         }
584                         if (one_in_(2)) (void)curse_armor();
585                         break;
586
587                 case REW_DESTRUCT:
588
589                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
590                         msg_print(_("「死と破壊こそ我が喜びなり!」", "'Death and destruction! This pleaseth me!'"));
591
592                         (void)destroy_area(p_ptr->y, p_ptr->x, 25, FALSE);
593                         reward = _("ダンジョンが*破壊*された。", "*destruct*ing dungeon");
594                         break;
595
596                 case REW_GENOCIDE:
597
598                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
599                         msg_print(_("「我、汝の敵を抹殺せん!」", "'Let me relieve thee of thine oppressors!'"));
600                         (void)symbol_genocide(0, FALSE);
601                         reward = _("モンスターが抹殺された。", "genociding monsters");
602                         break;
603
604                 case REW_MASS_GEN:
605
606                         msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
607                         msg_print(_("「我、汝の敵を抹殺せん!」", "'Let me relieve thee of thine oppressors!'"));
608
609                         (void)mass_genocide(0, FALSE);
610                         reward = _("モンスターが抹殺された。", "genociding nearby monsters");
611                         break;
612
613                 case REW_DISPEL_C:
614
615                         msg_format(_("%sの力が敵を攻撃するのを感じた!", "You can feel the power of %s assault your enemies!"), chaos_patrons[p_ptr->chaos_patron]);
616                         (void)dispel_monsters(p_ptr->lev * 4);
617                         break;
618
619                 case REW_IGNORE:
620
621                         msg_format(_("%sはあなたを無視した。", "%s ignores you."), chaos_patrons[p_ptr->chaos_patron]);
622                         break;
623
624                 case REW_SER_DEMO:
625
626                         msg_format(_("%sは褒美として悪魔の使いをよこした!", "%s rewards you with a demonic servant!"), chaos_patrons[p_ptr->chaos_patron]);
627
628                         if (!summon_specific(-1, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, SUMMON_DEMON, PM_FORCE_PET, '\0'))
629                                 msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
630                         else
631                                 reward = _("悪魔がペットになった。", "a demonic servant");
632
633                         break;
634
635                 case REW_SER_MONS:
636                         msg_format(_("%sは褒美として使いをよこした!", "%s rewards you with a servant!"), chaos_patrons[p_ptr->chaos_patron]);
637
638                         if (!summon_specific(-1, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, 0, PM_FORCE_PET, '\0'))
639                                 msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
640                         else
641                                 reward = _("モンスターがペットになった。", "a servant");
642
643                         break;
644
645                 case REW_SER_UNDE:
646                         msg_format(_("%sは褒美としてアンデッドの使いをよこした。", "%s rewards you with an undead servant!"), chaos_patrons[p_ptr->chaos_patron]);
647
648                         if (!summon_specific(-1, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, SUMMON_UNDEAD, PM_FORCE_PET, '\0'))
649                                 msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
650                         else
651                                 reward = _("アンデッドがペットになった。", "an undead servant");
652
653                         break;
654
655                 default:
656                         msg_format(_("%sの声がどもった:", "The voice of %s stammers:"), chaos_patrons[p_ptr->chaos_patron]);
657                         msg_format(_("「あー、あー、答えは %d/%d。質問は何?」", "'Uh... uh... the answer's %d/%d, what's the question?'"), type, effect);
658
659                 }
660         }
661         if (reward)
662         {
663                 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, format(_("パトロンの報酬で%s", "The patron rewards you with %s."), reward));
664         }
665 }
666
667 void admire_from_patron(player_type *creature_ptr)
668 {
669         if ((creature_ptr->pclass == CLASS_CHAOS_WARRIOR) || (creature_ptr->muta2 & MUT2_CHAOS_GIFT))
670         {
671                 msg_format(_("%sからの声が響いた。", "The voice of %s booms out:"), chaos_patrons[creature_ptr->chaos_patron]);
672                 msg_print(_("『よくやった、定命の者よ!』", "'Thou art donst well, mortal!'"));
673         }
674 }