OSDN Git Service

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