OSDN Git Service

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