OSDN Git Service

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