3 #include "object-curse.h"
4 #include "monsterrace-hook.h"
5 #include "objectkind-hook.h"
6 #include "spells-summon.h"
8 void gain_level_reward(int chosen_reward)
12 char wrath_reason[32] = "";
14 OBJECT_TYPE_VALUE dummy = 0;
15 OBJECT_SUBTYPE_VALUE dummy2 = 0;
17 concptr reward = NULL;
18 GAME_TEXT o_name[MAX_NLEN];
24 if (multi_rew) return;
25 else multi_rew = TRUE;
29 if (p_ptr->lev == 13) nasty_chance = 2;
30 else if (!(p_ptr->lev % 13)) nasty_chance = 3;
31 else if (!(p_ptr->lev % 14)) nasty_chance = 12;
33 if (one_in_(nasty_chance))
34 type = randint1(20); /* Allow the 'nasty' effects */
36 type = randint1(15) + 5; /* Or disallow them */
38 if (type < 1) type = 1;
39 if (type > 20) type = 20;
43 sprintf(wrath_reason, _("%sの怒り", "the Wrath of %s"), chaos_patrons[p_ptr->chaos_patron]);
45 effect = chaos_rewards[p_ptr->chaos_patron][type];
47 if (one_in_(6) && !chosen_reward)
49 msg_format(_("%^sは褒美としてあなたを突然変異させた。", "%^s rewards you with a mutation!"), chaos_patrons[p_ptr->chaos_patron]);
50 (void)gain_random_mutation(0);
51 reward = _("変異した。", "mutation");
55 switch (chosen_reward ? chosen_reward : effect)
60 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
61 msg_print(_("「汝、新たなる姿を必要とせり!」", "'Thou needst a new form, mortal!'"));
64 reward = _("変異した。", "polymorphing");
69 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
70 msg_print(_("「汝は良く行いたり!続けよ!」", "'Well done, mortal! Lead on!'"));
72 if (p_ptr->prace == RACE_ANDROID)
74 msg_print(_("しかし何も起こらなかった。", "But, nothing happen."));
76 else if (p_ptr->exp < PY_MAX_EXP)
78 s32b ee = (p_ptr->exp / 2) + 10;
79 if (ee > 100000L) ee = 100000L;
80 msg_print(_("更に経験を積んだような気がする。", "You feel more experienced."));
83 reward = _("経験値を得た", "experience");
89 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
90 msg_print(_("「下僕よ、汝それに値せず。」", "'Thou didst not deserve that, slave.'"));
92 if (p_ptr->prace == RACE_ANDROID)
94 msg_print(_("しかし何も起こらなかった。", "But, nothing happen."));
98 lose_exp(p_ptr->exp / 6);
99 reward = _("経験値を失った。", "losing experience");
105 msg_format("%sの声がささやいた:",
106 chaos_patrons[p_ptr->chaos_patron]);
108 msg_format("The voice of %s whispers:",
109 chaos_patrons[p_ptr->chaos_patron]);
112 msg_print(_("「我が与えし物を賢明に使うべし。」", "'Use my gift wisely.'"));
114 acquirement(p_ptr->y, p_ptr->x, 1, FALSE, FALSE, FALSE);
115 reward = _("上質なアイテムを手に入れた。", "a good item");
120 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
121 msg_print(_("「我が与えし物を賢明に使うべし。」", "'Use my gift wisely.'"));
123 acquirement(p_ptr->y, p_ptr->x, 1, TRUE, FALSE, FALSE);
124 reward = _("高級品のアイテムを手に入れた。", "an excellent item");
129 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
130 msg_print(_("「汝の行いは貴き剣に値せり。」", "'Thy deed hath earned thee a worthy blade.'"));
133 switch (randint1(p_ptr->lev))
139 dummy2 = SV_MAIN_GAUCHE;
148 dummy2 = SV_SMALL_SWORD;
151 dummy2 = SV_BASILLARD;
153 case 11: case 12: case 13:
154 dummy2 = SV_SHORT_SWORD;
163 dummy2 = SV_WAKIZASHI;
172 dummy2 = SV_BROAD_SWORD;
175 dummy2 = SV_LONG_SWORD;
178 dummy2 = SV_SCIMITAR;
187 dummy2 = SV_BASTARD_SWORD;
190 dummy2 = SV_GREAT_SCIMITAR;
193 dummy2 = SV_CLAYMORE;
199 dummy2 = SV_TWO_HANDED_SWORD;
202 dummy2 = SV_FLAMBERGE;
205 dummy2 = SV_NO_DACHI;
208 dummy2 = SV_EXECUTIONERS_SWORD;
211 dummy2 = SV_ZWEIHANDER;
214 dummy2 = SV_HAYABUSA;
217 dummy2 = SV_BLADE_OF_CHAOS;
220 object_prep(q_ptr, lookup_kind(dummy, dummy2));
221 q_ptr->to_h = 3 + randint1(dun_level) % 10;
222 q_ptr->to_d = 3 + randint1(dun_level) % 10;
223 one_resistance(q_ptr);
224 q_ptr->name2 = EGO_CHAOTIC;
225 (void)drop_near(q_ptr, -1, p_ptr->y, p_ptr->x);
226 reward = _("(混沌)の武器を手に入れた。", "chaos weapon");
231 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
232 msg_print(_("「汝の行いは貴き報いに値せり。」", "'Thy deed hath earned thee a worthy reward.'"));
234 acquirement(p_ptr->y, p_ptr->x, randint1(2) + 1, FALSE, FALSE, FALSE);
235 reward = _("上質なアイテムを手に入れた。", "good items");
240 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
241 msg_print(_("「下僕よ、汝の献身への我が惜しみ無き報いを見るがよい。」", "'Behold, mortal, how generously I reward thy loyalty.'"));
243 acquirement(p_ptr->y, p_ptr->x, randint1(2) + 1, TRUE, FALSE, FALSE);
244 reward = _("高級品のアイテムを手に入れた。", "excellent items");
249 msg_format("%sの声が轟き渡った:", chaos_patrons[p_ptr->chaos_patron]);
251 msg_format("The voice of %s thunders:", chaos_patrons[p_ptr->chaos_patron]);
254 msg_print(_("「下僕よ、汝傲慢なり。」", "'Thou art growing arrogant, mortal.'"));
256 (void)activate_ty_curse(FALSE, &count);
257 reward = _("禍々しい呪いをかけられた。", "cursing");
262 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
263 msg_print(_("「我が下僕たちよ、かの傲慢なる者を倒すべし!」", "'My pets, destroy the arrogant mortal!'"));
265 for (dummy = 0; dummy < randint1(5) + 1; dummy++)
267 (void)summon_specific(0, p_ptr->y, p_ptr->x, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET), '\0');
269 reward = _("モンスターを召喚された。", "summoning hostile monsters");
275 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
276 msg_print(_("「汝、より強き敵を必要とせり!」", "'Thou needst worthier opponents!'"));
278 activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
279 reward = _("モンスターを召喚された。", "summoning many hostile monsters");
285 msg_format("%sの声が響き渡った:",
286 chaos_patrons[p_ptr->chaos_patron]);
288 msg_format("The voice of %s booms out:",
289 chaos_patrons[p_ptr->chaos_patron]);
292 msg_print(_("「死と破壊こそ我が喜びなり!」", "'Death and destruction! This pleaseth me!'"));
295 reward = _("カオスの力が渦巻いた。", "calling chaos");
301 msg_format("%sの声が鳴り響いた:",
302 chaos_patrons[p_ptr->chaos_patron]);
304 msg_format("The voice of %s rings out:",
305 chaos_patrons[p_ptr->chaos_patron]);
308 msg_print(_("「留まるのだ、下僕よ。余が汝の肉体を鍛えん。」", "'Stay, mortal, and let me mold thee.'"));
310 if (one_in_(3) && !(chaos_stats[p_ptr->chaos_patron] < 0))
311 do_inc_stat(chaos_stats[p_ptr->chaos_patron]);
313 do_inc_stat(randint0(6));
314 reward = _("能力値が上がった。", "increasing a stat");
320 msg_format("%sの声が響き渡った:",
321 chaos_patrons[p_ptr->chaos_patron]);
323 msg_format("The voice of %s booms out:",
324 chaos_patrons[p_ptr->chaos_patron]);
327 msg_print(_("「下僕よ、余は汝に飽みたり。」", "'I grow tired of thee, mortal.'"));
329 if (one_in_(3) && !(chaos_stats[p_ptr->chaos_patron] < 0))
330 do_dec_stat(chaos_stats[p_ptr->chaos_patron]);
332 (void)do_dec_stat(randint0(6));
333 reward = _("能力値が下がった。", "decreasing a stat");
340 msg_format("%sの声が轟き渡った:",
341 chaos_patrons[p_ptr->chaos_patron]);
343 msg_format("The voice of %s thunders:",
344 chaos_patrons[p_ptr->chaos_patron]);
347 msg_print(_("「汝、謙虚たることを学ぶべし!」", "'Thou needst a lesson in humility, mortal!'"));
348 msg_print(_("あなたは以前より弱くなった!", "You feel less powerful!"));
350 for (dummy = 0; dummy < A_MAX; dummy++)
352 (void)dec_stat(dummy, 10 + randint1(15), TRUE);
354 reward = _("全能力値が下がった。", "decreasing all stats");
359 msg_format(_("%sの力が触れるのを感じた。", "You feel the power of %s touch you."),
360 chaos_patrons[p_ptr->chaos_patron]);
362 reward = _("傷が変化した。", "polymorphing wounds");
367 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
369 msg_print(_("「我がささやかなる賜物を受けとるがよい!」", "'Receive this modest gift from me!'"));
371 for (dummy = 0; dummy < A_MAX; dummy++)
373 (void)do_inc_stat(dummy);
375 reward = _("全能力値が上がった。", "increasing all stats");
380 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
381 msg_print(_("「苦しむがよい、無能な愚か者よ!」", "'Suffer, pathetic fool!'"));
383 fire_ball(GF_DISINTEGRATE, 0, p_ptr->lev * 4, 4);
384 take_hit(DAMAGE_NOESCAPE, p_ptr->lev * 4, wrath_reason, -1);
385 reward = _("分解の球が発生した。", "generating disintegration ball");
390 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
391 (void)restore_level();
392 (void)restore_all_status();
393 (void)true_healing(5000);
394 reward = _("体力が回復した。", "healing");
399 if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM)) break;
400 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
401 msg_print(_("「汝、武器に頼ることなかれ。」", "'Thou reliest too much on thy weapon.'"));
404 if (buki_motteruka(INVEN_LARM))
407 if (buki_motteruka(INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
409 object_desc(o_name, &inventory[dummy], OD_NAME_ONLY);
410 (void)curse_weapon(FALSE, dummy);
411 reward = format(_("%sが破壊された。", "destroying %s"), o_name);
416 if (!inventory[INVEN_BODY].k_idx) break;
417 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
418 msg_print(_("「汝、防具に頼ることなかれ。」", "'Thou reliest too much on thine equipment.'"));
420 object_desc(o_name, &inventory[INVEN_BODY], OD_NAME_ONLY);
422 reward = format(_("%sが破壊された。", "destroying %s"), o_name);
426 msg_format(_("%sの声がささやいた:", "The voice of %s whispers:"), chaos_patrons[p_ptr->chaos_patron]);
427 msg_print(_("「我を怒りしめた罪を償うべし。」", "'Now thou shalt pay for annoying me.'"));
432 (void)activate_ty_curse(FALSE, &count);
433 reward = _("禍々しい呪いをかけられた。", "cursing");
436 activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
437 reward = _("モンスターを召喚された。", "summoning hostile monsters");
442 if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM)) break;
444 if (buki_motteruka(INVEN_LARM))
447 if (buki_motteruka(INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
449 object_desc(o_name, &inventory[dummy], OD_NAME_ONLY);
450 (void)curse_weapon(FALSE, dummy);
451 reward = format(_("%sが破壊された。", "destroying %s"), o_name);
455 if (!inventory[INVEN_BODY].k_idx) break;
456 object_desc(o_name, &inventory[INVEN_BODY], OD_NAME_ONLY);
458 reward = format(_("%sが破壊された。", "destroying %s"), o_name);
462 for (dummy = 0; dummy < A_MAX; dummy++)
464 (void)dec_stat(dummy, 10 + randint1(15), TRUE);
466 reward = _("全能力値が下がった。", "decreasing all stats");
473 msg_format(_("%sの声が轟き渡った:", "The voice of %s thunders:"), chaos_patrons[p_ptr->chaos_patron]);
474 msg_print(_("「死ぬがよい、下僕よ!」", "'Die, mortal!'"));
476 take_hit(DAMAGE_LOSELIFE, p_ptr->lev * 4, wrath_reason, -1);
477 for (dummy = 0; dummy < A_MAX; dummy++)
479 (void)dec_stat(dummy, 10 + randint1(15), FALSE);
481 activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
482 (void)activate_ty_curse(FALSE, &count);
487 if (buki_motteruka(INVEN_RARM))
490 if (buki_motteruka(INVEN_LARM) && one_in_(2)) dummy = INVEN_LARM;
492 else if (buki_motteruka(INVEN_LARM)) dummy = INVEN_LARM;
494 if (dummy) (void)curse_weapon(FALSE, dummy);
496 if (one_in_(2)) (void)curse_armor();
501 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
502 msg_print(_("「死と破壊こそ我が喜びなり!」", "'Death and destruction! This pleaseth me!'"));
504 (void)destroy_area(p_ptr->y, p_ptr->x, 25, FALSE);
505 reward = _("ダンジョンが*破壊*された。", "*destruct*ing dungeon");
510 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
511 msg_print(_("「我、汝の敵を抹殺せん!」", "'Let me relieve thee of thine oppressors!'"));
512 (void)symbol_genocide(0, FALSE);
513 reward = _("モンスターが抹殺された。", "genociding monsters");
518 msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
519 msg_print(_("「我、汝の敵を抹殺せん!」", "'Let me relieve thee of thine oppressors!'"));
521 (void)mass_genocide(0, FALSE);
522 reward = _("モンスターが抹殺された。", "genociding nearby monsters");
527 msg_format(_("%sの力が敵を攻撃するのを感じた!", "You can feel the power of %s assault your enemies!"), chaos_patrons[p_ptr->chaos_patron]);
528 (void)dispel_monsters(p_ptr->lev * 4);
533 msg_format(_("%sはあなたを無視した。", "%s ignores you."), chaos_patrons[p_ptr->chaos_patron]);
538 msg_format(_("%sは褒美として悪魔の使いをよこした!", "%s rewards you with a demonic servant!"), chaos_patrons[p_ptr->chaos_patron]);
540 if (!summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_DEMON, PM_FORCE_PET, '\0'))
541 msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
543 reward = _("悪魔がペットになった。", "a demonic servant");
548 msg_format(_("%sは褒美として使いをよこした!", "%s rewards you with a servant!"), chaos_patrons[p_ptr->chaos_patron]);
550 if (!summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, 0, PM_FORCE_PET, '\0'))
551 msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
553 reward = _("モンスターがペットになった。", "a servant");
558 msg_format(_("%sは褒美としてアンデッドの使いをよこした。", "%s rewards you with an undead servant!"), chaos_patrons[p_ptr->chaos_patron]);
560 if (!summon_specific(-1, p_ptr->y, p_ptr->x, dun_level, SUMMON_UNDEAD, PM_FORCE_PET, '\0'))
561 msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
563 reward = _("アンデッドがペットになった。", "an undead servant");
568 msg_format(_("%sの声がどもった:", "The voice of %s stammers:"),
570 chaos_patrons[p_ptr->chaos_patron]);
571 msg_format(_("「あー、あー、答えは %d/%d。質問は何?」", "'Uh... uh... the answer's %d/%d, what's the question?'"), type, effect);
577 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, format(_("パトロンの報酬で%s", "The patron rewards you with %s."), reward));