OSDN Git Service

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