1 /* NetHack 3.6 pray.c $NHDT-Date: 1549074257 2019/02/02 02:24:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.110 $ */
2 /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
3 /* NetHack may be freely redistributed. See license for details. */
5 /* JNetHack Copyright */
6 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000 */
7 /* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2019 */
8 /* JNetHack may be freely redistributed. See license for details. */
12 STATIC_PTR int NDECL(prayer_done);
13 STATIC_DCL struct obj *NDECL(worst_cursed_item);
14 STATIC_DCL int NDECL(in_trouble);
15 STATIC_DCL void FDECL(fix_worst_trouble, (int));
16 STATIC_DCL void FDECL(angrygods, (ALIGNTYP_P));
17 STATIC_DCL void FDECL(at_your_feet, (const char *));
18 STATIC_DCL void NDECL(gcrownu);
19 STATIC_DCL void FDECL(pleased, (ALIGNTYP_P));
20 STATIC_DCL void FDECL(godvoice, (ALIGNTYP_P, const char *));
21 STATIC_DCL void FDECL(god_zaps_you, (ALIGNTYP_P));
22 STATIC_DCL void FDECL(fry_by_god, (ALIGNTYP_P, BOOLEAN_P));
23 STATIC_DCL void FDECL(gods_angry, (ALIGNTYP_P));
24 STATIC_DCL void FDECL(gods_upset, (ALIGNTYP_P));
25 STATIC_DCL void FDECL(consume_offering, (struct obj *));
26 STATIC_DCL boolean FDECL(water_prayer, (BOOLEAN_P));
27 STATIC_DCL boolean FDECL(blocked_boulder, (int, int));
29 /* simplify a few tests */
30 #define Cursed_obj(obj, typ) ((obj) && (obj)->otyp == (typ) && (obj)->cursed)
33 * Logic behind deities and altars and such:
34 * + prayers are made to your god if not on an altar, and to the altar's god
35 * if you are on an altar
36 * + If possible, your god answers all prayers, which is why bad things happen
37 * if you try to pray on another god's altar
38 * + sacrifices work basically the same way, but the other god may decide to
39 * accept your allegiance, after which they are your god. If rejected,
40 * your god takes over with your punishment.
41 * + if you're in Gehennom, all messages come from Moloch
45 * Moloch, who dwells in Gehennom, is the "renegade" cruel god
46 * responsible for the theft of the Amulet from Marduk, the Creator.
47 * Moloch is unaligned.
50 static const char *Moloch = "Moloch";
52 static const char *Moloch = "
\83\82\81[
\83\8d\83b
\83N";
54 static const char *godvoices[] = {
56 "booms out", "thunders", "rings out", "booms",
58 "
\8b¿
\82«
\82í
\82½
\82Á
\82½", "
\97\8b\82Ì
\82æ
\82¤
\82É
\8b¿
\82¢
\82½", "
\82Æ
\82Ç
\82ë
\82¢
\82½", "
\8b¿
\82¢
\82½",
61 /* values calculated when prayer starts, and used when completed */
62 static aligntyp p_aligntyp;
64 static int p_type; /* (-1)-3: (-1)=really naughty, 3=really good */
72 * The actual trouble priority is determined by the order of the
73 * checks performed in in_trouble() rather than by these numeric
74 * values, so keep that code and these values synchronized in
75 * order to have the values be meaningful.
78 #define TROUBLE_STONED 14
79 #define TROUBLE_SLIMED 13
80 #define TROUBLE_STRANGLED 12
81 #define TROUBLE_LAVA 11
82 #define TROUBLE_SICK 10
83 #define TROUBLE_STARVING 9
84 #define TROUBLE_REGION 8 /* stinking cloud */
86 #define TROUBLE_LYCANTHROPE 6
87 #define TROUBLE_COLLAPSING 5
88 #define TROUBLE_STUCK_IN_WALL 4
89 #define TROUBLE_CURSED_LEVITATION 3
90 #define TROUBLE_UNUSEABLE_HANDS 2
91 #define TROUBLE_CURSED_BLINDFOLD 1
93 #define TROUBLE_PUNISHED (-1)
94 #define TROUBLE_FUMBLING (-2)
95 #define TROUBLE_CURSED_ITEMS (-3)
96 #define TROUBLE_SADDLE (-4)
97 #define TROUBLE_BLIND (-5)
98 #define TROUBLE_POISONED (-6)
99 #define TROUBLE_WOUNDED_LEGS (-7)
100 #define TROUBLE_HUNGRY (-8)
101 #define TROUBLE_STUNNED (-9)
102 #define TROUBLE_CONFUSED (-10)
103 #define TROUBLE_HALLUCINATION (-11)
106 #define ugod_is_angry() (u.ualign.record < 0)
107 #define on_altar() IS_ALTAR(levl[u.ux][u.uy].typ)
108 #define on_shrine() ((levl[u.ux][u.uy].altarmask & AM_SHRINE) != 0)
109 #define a_align(x, y) ((aligntyp) Amask2align(levl[x][y].altarmask & AM_MASK))
111 /* critically low hit points if hp <= 5 or hp <= maxhp/N for some N */
113 critically_low_hp(only_if_injured)
114 boolean only_if_injured; /* determines whether maxhp <= 5 matters */
116 int divisor, hplim, curhp = Upolyd ? u.mh : u.uhp,
117 maxhp = Upolyd ? u.mhmax : u.uhpmax;
119 if (only_if_injured && !(curhp < maxhp))
121 /* if maxhp is extremely high, use lower threshold for the division test
122 (golden glow cuts off at 11+5*lvl, nurse interaction at 25*lvl; this
123 ought to use monster hit dice--and a smaller multiplier--rather than
124 ulevel when polymorphed, but polyself doesn't maintain that) */
125 hplim = 15 * u.ulevel;
128 /* 7 used to be the unconditional divisor */
129 switch (xlev_to_rank(u.ulevel)) { /* maps 1..30 into 0..8 */
133 break; /* explvl 1 to 5 */
137 break; /* explvl 6 to 13 */
141 break; /* explvl 14 to 21 */
145 break; /* explvl 22 to 29 */
148 break; /* explvl 30+ */
150 /* 5 is a magic number in TROUBLE_HIT handling below */
151 return (boolean) (curhp <= 5 || curhp * divisor <= maxhp);
154 /* return True if surrounded by impassible rock, regardless of the state
155 of your own location (for example, inside a doorless closet) */
159 int i, j, x, y, count = 0;
163 for (i = -1; i <= 1; i++) {
165 for (j = -1; j <= 1; j++) {
170 || (IS_ROCK(levl[x][y].typ)
171 && (levl[x][y].typ != SDOOR && levl[x][y].typ != SCORR))
172 || (blocked_boulder(i, j) && !throws_rocks(youmonst.data)))
176 return (count == 8) ? TRUE : FALSE;
180 * Return 0 if nothing particular seems wrong, positive numbers for
181 * serious trouble, and negative numbers for comparative annoyances.
182 * This returns the worst problem. There may be others, and the gods
183 * may fix more than one.
185 * This could get as bizarre as noting surrounding opponents, (or
186 * hostile dogs), but that's really hard.
188 * We could force rehumanize of polyselfed people, but we can't tell
189 * unintentional shape changes from the other kind. Oh well.
190 * 3.4.2: make an exception if polymorphed into a form which lacks
191 * hands; that's a case where the ramifications override this doubt.
203 return TROUBLE_STONED;
205 return TROUBLE_SLIMED;
207 return TROUBLE_STRANGLED;
208 if (u.utrap && u.utraptype == TT_LAVA)
213 return TROUBLE_STARVING;
215 return TROUBLE_REGION;
216 if (critically_low_hp(FALSE))
218 if (u.ulycn >= LOW_PM)
219 return TROUBLE_LYCANTHROPE;
220 if (near_capacity() >= EXT_ENCUMBER && AMAX(A_STR) - ABASE(A_STR) > 3)
221 return TROUBLE_COLLAPSING;
223 return TROUBLE_STUCK_IN_WALL;
224 if (Cursed_obj(uarmf, LEVITATION_BOOTS)
225 || stuck_ring(uleft, RIN_LEVITATION)
226 || stuck_ring(uright, RIN_LEVITATION))
227 return TROUBLE_CURSED_LEVITATION;
228 if (nohands(youmonst.data) || !freehand()) {
229 /* for bag/box access [cf use_container()]...
230 make sure it's a case that we know how to handle;
231 otherwise "fix all troubles" would get stuck in a loop */
233 return TROUBLE_UNUSEABLE_HANDS;
234 if (Upolyd && nohands(youmonst.data)
235 && (!Unchanging || ((otmp = unchanger()) != 0 && otmp->cursed)))
236 return TROUBLE_UNUSEABLE_HANDS;
238 if (Blindfolded && ublindf->cursed)
239 return TROUBLE_CURSED_BLINDFOLD;
244 if (Punished || (u.utrap && u.utraptype == TT_BURIEDBALL))
245 return TROUBLE_PUNISHED;
246 if (Cursed_obj(uarmg, GAUNTLETS_OF_FUMBLING)
247 || Cursed_obj(uarmf, FUMBLE_BOOTS))
248 return TROUBLE_FUMBLING;
249 if (worst_cursed_item())
250 return TROUBLE_CURSED_ITEMS;
251 if (u.usteed) { /* can't voluntarily dismount from a cursed saddle */
252 otmp = which_armor(u.usteed, W_SADDLE);
253 if (Cursed_obj(otmp, SADDLE))
254 return TROUBLE_SADDLE;
257 if (Blinded > 1 && haseyes(youmonst.data)
259 || !attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND)))
260 return TROUBLE_BLIND;
261 /* deafness isn't it's own trouble; healing magic cures deafness
262 when it cures blindness, so do the same with trouble repair */
263 if ((HDeaf & TIMEOUT) > 1L)
264 return TROUBLE_BLIND;
266 for (i = 0; i < A_MAX; i++)
267 if (ABASE(i) < AMAX(i))
268 return TROUBLE_POISONED;
269 if (Wounded_legs && !u.usteed)
270 return TROUBLE_WOUNDED_LEGS;
272 return TROUBLE_HUNGRY;
274 return TROUBLE_STUNNED;
275 if (HConfusion & TIMEOUT)
276 return TROUBLE_CONFUSED;
277 if (HHallucination & TIMEOUT)
278 return TROUBLE_HALLUCINATION;
282 /* select an item for TROUBLE_CURSED_ITEMS */
283 STATIC_OVL struct obj *
286 register struct obj *otmp;
288 /* if strained or worse, check for loadstone first */
289 if (near_capacity() >= HVY_ENCUMBER) {
290 for (otmp = invent; otmp; otmp = otmp->nobj)
291 if (Cursed_obj(otmp, LOADSTONE))
294 /* weapon takes precedence if it is interfering
295 with taking off a ring or putting on a shield */
296 if (welded(uwep) && (uright || bimanual(uwep))) { /* weapon */
298 /* gloves come next, due to rings */
299 } else if (uarmg && uarmg->cursed) { /* gloves */
301 /* then shield due to two handed weapons and spells */
302 } else if (uarms && uarms->cursed) { /* shield */
304 /* then cloak due to body armor */
305 } else if (uarmc && uarmc->cursed) { /* cloak */
307 } else if (uarm && uarm->cursed) { /* suit */
309 /* if worn helmet of opposite alignment is making you an adherent
310 of the current god, he/she/it won't uncurse that for you */
311 } else if (uarmh && uarmh->cursed /* helmet */
312 && uarmh->otyp != HELM_OF_OPPOSITE_ALIGNMENT) {
314 } else if (uarmf && uarmf->cursed) { /* boots */
316 } else if (uarmu && uarmu->cursed) { /* shirt */
318 } else if (uamul && uamul->cursed) { /* amulet */
320 } else if (uleft && uleft->cursed) { /* left ring */
322 } else if (uright && uright->cursed) { /* right ring */
324 } else if (ublindf && ublindf->cursed) { /* eyewear */
325 otmp = ublindf; /* must be non-blinding lenses */
326 /* if weapon wasn't handled above, do it now */
327 } else if (welded(uwep)) { /* weapon */
329 /* active secondary weapon even though it isn't welded */
330 } else if (uswapwep && uswapwep->cursed && u.twoweap) {
332 /* all worn items ought to be handled by now */
334 for (otmp = invent; otmp; otmp = otmp->nobj) {
337 if (otmp->otyp == LOADSTONE || confers_luck(otmp))
345 fix_worst_trouble(trouble)
349 struct obj *otmp = 0;
350 const char *what = (const char *) 0;
352 static NEARDATA const char leftglow[] = "Your left ring softly glows",
353 rightglow[] = "Your right ring softly glows";
355 static NEARDATA const char leftglow[] = "
\8d¶
\82Ì
\8ew
\97Ö",
356 rightglow[] = "
\89E
\82Ì
\8ew
\97Ö";
362 make_stoned(0L, "You feel more limber.", 0, (char *) 0);
364 make_stoned(0L, "
\93î
\82ç
\82©
\82
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", 0, (char *) 0);
368 make_slimed(0L, "The slime disappears.");
370 make_slimed(0L, "
\82Ç
\82ë
\82Ç
\82ë
\8a´
\82Í
\8fÁ
\82¦
\82½
\81D");
372 case TROUBLE_STRANGLED:
373 if (uamul && uamul->otyp == AMULET_OF_STRANGULATION) {
375 Your("amulet vanishes!");
377 Your("
\96\82\8f\9c\82¯
\82Í
\8fÁ
\82¦
\82³
\82Á
\82½
\81I");
381 You("can breathe again.");
383 You("
\82Ü
\82½
\8cÄ
\8bz
\82Å
\82«
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81D");
389 You("are back on solid ground.");
391 You("
\8cÅ
\82¢
\92n
\96Ê
\82É
\96ß
\82Á
\82½
\81D");
392 /* teleport should always succeed, but if not, just untrap them */
393 if (!safe_teleds(FALSE))
396 case TROUBLE_STARVING:
397 /* temporarily lost strength recovery now handled by init_uhunger() */
401 Your("%s feels content.", body_part(STOMACH));
403 Your("
\90H
\97~
\82Í
\96\9e\82½
\82³
\82ê
\82½
\81D");
411 You("
\8bC
\95ª
\82ª
\97Ç
\82
\82È
\82Á
\82½
\81D");
412 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
415 /* stinking cloud, with hero vulnerable to HP loss */
419 /* "fix all troubles" will keep trying if hero has
420 5 or less hit points, so make sure they're always
421 boosted to be more than that */
423 You_feel("much better.");
425 You("
\82Æ
\82Ä
\82à
\8bC
\95ª
\82ª
\97Ç
\82
\82È
\82Á
\82½
\81D");
432 if (u.uhpmax < u.ulevel * 5 + 11)
439 case TROUBLE_COLLAPSING:
440 /* override Fixed_abil; uncurse that if feasible */
442 You_feel("%sstronger.",
443 (AMAX(A_STR) - ABASE(A_STR) > 6) ? "much " : "");
445 You_feel("%s
\8b
\82
\82È
\82Á
\82½
\82æ
\82¤
\82¾
\81D",
446 (AMAX(A_STR) - ABASE(A_STR) > 6) ? "
\82Æ
\82Ä
\82à" : "");
448 ABASE(A_STR) = AMAX(A_STR);
451 if ((otmp = stuck_ring(uleft, RIN_SUSTAIN_ABILITY)) != 0) {
454 } else if ((otmp = stuck_ring(uright, RIN_SUSTAIN_ABILITY)) != 0) {
462 case TROUBLE_STUCK_IN_WALL:
463 /* no control, but works on no-teleport levels */
464 if (safe_teleds(FALSE)) {
466 Your("surroundings change.");
468 Your("
\8aÂ
\8b«
\82ª
\95Ï
\89»
\82µ
\82½
\81D");
470 /* safe_teleds() couldn't find a safe place; perhaps the
471 level is completely full. As a last resort, confer
472 intrinsic wall/rock-phazing. Hero might get stuck
473 again fairly soon....
474 Without something like this, fix_all_troubles can get
475 stuck in an infinite loop trying to fix STUCK_IN_WALL
476 and repeatedly failing. */
477 set_itimeout(&HPasses_walls, (long) (d(4, 4) + 4)); /* 8..20 */
478 /* how else could you move between packed rocks or among
479 lattice forming "solid" rock? */
481 You_feel("much slimmer.");
483 You_feel("
\82Æ
\82Ä
\82à
\83X
\83\8a\83\80\82É
\82È
\82Á
\82½
\8bC
\82ª
\82µ
\82½
\81D");
486 case TROUBLE_CURSED_LEVITATION:
487 if (Cursed_obj(uarmf, LEVITATION_BOOTS)) {
489 } else if ((otmp = stuck_ring(uleft, RIN_LEVITATION)) != 0) {
492 } else if ((otmp = stuck_ring(uright, RIN_LEVITATION)) != 0) {
497 case TROUBLE_UNUSEABLE_HANDS:
502 if (Upolyd && nohands(youmonst.data)) {
505 Your("shape becomes uncertain.");
507 Your("
\91Ì
\8c^
\82Í
\95s
\96¾
\8am
\82É
\82È
\82Á
\82½
\81D");
508 rehumanize(); /* "You return to {normal} form." */
509 } else if ((otmp = unchanger()) != 0 && otmp->cursed) {
510 /* otmp is an amulet of unchanging */
514 if (nohands(youmonst.data) || !freehand())
515 impossible("fix_worst_trouble: couldn't cure hands.");
517 case TROUBLE_CURSED_BLINDFOLD:
520 case TROUBLE_LYCANTHROPE:
525 case TROUBLE_PUNISHED:
527 Your("chain disappears.");
529 Your("
\8d½
\82Í
\8fÁ
\82¦
\82½
\81D");
530 if (u.utrap && u.utraptype == TT_BURIEDBALL)
531 buried_ball_to_freedom();
535 case TROUBLE_FUMBLING:
536 if (Cursed_obj(uarmg, GAUNTLETS_OF_FUMBLING))
538 else if (Cursed_obj(uarmf, FUMBLE_BOOTS))
543 case TROUBLE_CURSED_ITEMS:
544 otmp = worst_cursed_item();
547 else if (otmp == uleft)
551 impossible("fix_worst_trouble: nothing to uncurse.");
554 if (!Blind || (otmp == ublindf && Blindfolded_only)) {
557 what ? what : (const char *) Yobjnam2(otmp, "softly glow"),
560 Your("%s
\82Í%s
\82â
\82í
\82ç
\82©
\82
\8bP
\82¢
\82½
\81D",
561 what ? what : (const char *)xname(otmp),
562 jconj_adj(hcolor(NH_AMBER)));
564 iflags.last_msg = PLNMSG_OBJ_GLOWS;
565 otmp->bknown = !Hallucination;
570 case TROUBLE_POISONED:
571 /* override Fixed_abil; ignore items which confer that */
574 pline("There's a tiger in your tank.");
576 pline("
\82 \82È
\82½
\82Ì
\83^
\83\93\83N
\82Ì
\92\86\82É
\83g
\83\89\82ª
\82¢
\82é
\81D");
579 You_feel("in good health again.");
581 You("
\82Ü
\82½
\8c\92\8dN
\82É
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D");
582 for (i = 0; i < A_MAX; i++) {
583 if (ABASE(i) < AMAX(i)) {
588 (void) encumber_msg();
590 case TROUBLE_BLIND: { /* handles deafness as well as blindness */
593 const char *eyes = body_part(EYE);
595 boolean cure_deaf = (HDeaf & TIMEOUT) ? TRUE : FALSE;
600 if (eyecount(youmonst.data) != 1)
601 eyes = makeplural(eyes);
604 Sprintf(msgbuf, "Your %s %s better", eyes, vtense(eyes, "feel"));
606 Sprintf(msgbuf, "%s
\82ª
\89ñ
\95\9c\82µ
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", body_part(EYE));
609 make_blinded(0L, FALSE);
612 make_deaf(0L, FALSE);
614 Sprintf(eos(msgbuf), "%s can hear again",
615 !*msgbuf ? "You" : " and you");
618 pline("%s.", msgbuf);
621 case TROUBLE_WOUNDED_LEGS:
624 case TROUBLE_STUNNED:
625 make_stunned(0L, TRUE);
627 case TROUBLE_CONFUSED:
628 make_confused(0L, TRUE);
630 case TROUBLE_HALLUCINATION:
632 pline("Looks like you are back in Kansas.");
634 pline("
\8c©
\82Ä
\81I
\83J
\83\93\83U
\83X
\82É
\96ß
\82Á
\82Ä
\82«
\82½
\82ñ
\82¾
\82í
\81D");
635 (void) make_hallucinated(0L, FALSE, 0L);
638 otmp = which_armor(u.usteed, W_SADDLE);
641 pline("%s %s.", Yobjnam2(otmp, "softly glow"), hcolor(NH_AMBER));
643 pline("%s
\82Í%s
\82â
\82í
\82ç
\82©
\82
\8bP
\82¢
\82½
\81D", y_monnam(u.usteed), hcolor(NH_AMBER));
651 /* "I am sometimes shocked by... the nuns who never take a bath without
652 * wearing a bathrobe all the time. When asked why, since no man can see them,
653 * they reply 'Oh, but you forget the good God'. Apparently they conceive of
654 * the Deity as a Peeping Tom, whose omnipotence enables Him to see through
655 * bathroom walls, but who is foiled by bathrobes." --Bertrand Russell, 1943
656 * Divine wrath, dungeon walls, and armor follow the same principle.
659 god_zaps_you(resp_god)
665 "Suddenly a bolt of lightning comes down at you from the heavens!");
667 "
\93Ë
\91R
\8bó
\82©
\82ç
\88î
\8dÈ
\82ª
\97\8e\82¿
\82Ä
\82«
\82½
\81I");
669 pline("It strikes %s!", mon_nam(u.ustuck));
671 pline("
\88î
\8dÈ
\82Í%s
\82É
\96½
\92\86\82µ
\82½
\81I", mon_nam(u.ustuck));
672 if (!resists_elec(u.ustuck)) {
674 pline("%s fries to a crisp!", Monnam(u.ustuck));
676 pline("%s
\82Í
\83p
\83\8a\83p
\83\8a\82É
\82È
\82Á
\82½
\81I", Monnam(u.ustuck));
677 /* Yup, you get experience. It takes guts to successfully
678 * pull off this trick on your god, anyway.
679 * Other credit/blame applies (luck or alignment adjustments),
680 * but not direct kill count (pacifist conduct).
682 xkilled(u.ustuck, XKILL_NOMSG | XKILL_NOCONDUCT);
685 pline("%s seems unaffected.", Monnam(u.ustuck));
687 pline("%s
\82Í
\89e
\8b¿
\82ð
\8eó
\82¯
\82È
\82¢
\82æ
\82¤
\82¾
\81D", Monnam(u.ustuck));
690 pline("Suddenly, a bolt of lightning strikes you!");
692 pline("
\93Ë
\91R
\81C
\88î
\8dÈ
\82ª
\82 \82È
\82½
\82É
\96½
\92\86\82µ
\82½
\81I");
694 shieldeff(u.ux, u.uy);
697 pline("For some reason you're unaffected.");
699 pline("
\82È
\82º
\82©
\82 \82È
\82½
\82Í
\89e
\8b¿
\82ð
\8eó
\82¯
\82È
\82¢
\81D");
702 (void) ureflects("%s reflects from your %s.", "It");
704 (void) ureflects("%s
\82Í%s
\82É
\82æ
\82Á
\82Ä
\94½
\8eË
\82³
\82ê
\82½
\81D", "
\89½
\82©");
705 } else if (Shock_resistance) {
706 shieldeff(u.ux, u.uy);
708 pline("It seems not to affect you.");
710 pline("
\88î
\8dÈ
\82Í
\89e
\8b¿
\82ð
\97^
\82¦
\82È
\82¢
\82æ
\82¤
\82¾
\81D");
712 fry_by_god(resp_god, FALSE);
716 pline("%s is not deterred...", align_gname(resp_god));
718 pline("%s
\82Í
\82 \82«
\82ç
\82ß
\82È
\82©
\82Á
\82½
\81D
\81D
\81D", align_gname(resp_god));
721 pline("A wide-angle disintegration beam aimed at you hits %s!",
723 pline("
\82 \82È
\82½
\82ð
\91_
\82Á
\82½
\8dL
\8ap
\95²
\8dÓ
\8cõ
\90ü
\82ª%s
\82É
\96½
\92\86\82µ
\82½
\81I",
725 if (!resists_disint(u.ustuck)) {
727 pline("%s disintegrates into a pile of dust!", Monnam(u.ustuck));
729 pline("%s
\82Í
\82¿
\82è
\82Ì
\8eR
\82É
\82È
\82Á
\82½
\81I", Monnam(u.ustuck));
730 xkilled(u.ustuck, XKILL_NOMSG | XKILL_NOCORPSE | XKILL_NOCONDUCT);
733 pline("%s seems unaffected.", Monnam(u.ustuck));
735 pline("%s
\82Í
\89e
\8b¿
\82ð
\8eó
\82¯
\82È
\82¢
\82æ
\82¤
\82¾
\81D", Monnam(u.ustuck));
738 pline("A wide-angle disintegration beam hits you!");
740 pline("
\8dL
\8ap
\95²
\8dÓ
\8cõ
\90ü
\82ª
\82 \82È
\82½
\82É
\96½
\92\86\82µ
\82½
\81I");
742 /* disintegrate shield and body armor before disintegrating
743 * the impudent mortal, like black dragon breath -3.
745 if (uarms && !(EReflecting & W_ARMS)
746 && !(EDisint_resistance & W_ARMS))
747 (void) destroy_arm(uarms);
748 if (uarmc && !(EReflecting & W_ARMC)
749 && !(EDisint_resistance & W_ARMC))
750 (void) destroy_arm(uarmc);
751 if (uarm && !(EReflecting & W_ARM) && !(EDisint_resistance & W_ARM)
753 (void) destroy_arm(uarm);
754 if (uarmu && !uarm && !uarmc)
755 (void) destroy_arm(uarmu);
756 if (!Disint_resistance) {
757 fry_by_god(resp_god, TRUE);
760 You("bask in its %s glow for a minute...", NH_BLACK);
762 You("
\82µ
\82Î
\82ç
\82
\81C
\82»
\82Ì%s
\8bP
\82«
\82Å
\92g
\82Ü
\82Á
\82½
\81D
\81D
\81D", NH_BLACK);
764 godvoice(resp_god, "I believe it not!");
766 godvoice(resp_god, "
\90M
\82¶
\82ç
\82ê
\82Ê
\81I");
768 if (Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) {
769 /* one more try for high altars */
771 verbalize("Thou cannot escape my wrath, mortal!");
773 verbalize("
\92è
\96½
\82Ì
\8eÒ
\82æ
\81C
\93ð
\89ä
\82ª
\93{
\82è
\82©
\82ç
\93¦
\82ª
\82ê
\82é
\82±
\82Æ
\82È
\82ç
\82ñ
\81I");
774 summon_minion(resp_god, FALSE);
775 summon_minion(resp_god, FALSE);
776 summon_minion(resp_god, FALSE);
778 verbalize("Destroy %s, my servants!", uhim());
780 verbalize("%s
\82ð
\8eE
\82¹
\81C
\82í
\82ª
\89º
\96l
\82æ
\81I", uhim());
786 fry_by_god(resp_god, via_disintegration)
788 boolean via_disintegration;
791 You("%s!", !via_disintegration ? "fry to a crisp"
792 : "disintegrate into a pile of dust");
794 You("%s
\81I", !via_disintegration ? "
\83p
\83\8a\83p
\83\8a\82É
\82È
\82Á
\82½"
795 : "
\82¿
\82è
\82Ì
\8eR
\82É
\82È
\82Á
\82½");
797 killer.format = KILLED_BY;
799 Sprintf(killer.name, "the wrath of %s", align_gname(resp_god));
801 Sprintf(killer.name, "%s
\82Ì
\93{
\82è
\82É
\90G
\82ê", align_gname(resp_god));
815 /* changed from tmp = u.ugangr + abs (u.uluck) -- rph */
816 /* added test for alignment diff -dlc */
817 if (resp_god != u.ualign.type)
818 maxanger = u.ualign.record / 2 + (Luck > 0 ? -Luck / 3 : -Luck);
820 maxanger = 3 * u.ugangr + ((Luck > 0 || u.ualign.record >= STRIDENT)
824 maxanger = 1; /* possible if bad align & good luck */
825 else if (maxanger > 15)
826 maxanger = 15; /* be reasonable */
828 switch (rn2(maxanger)) {
832 You_feel("that %s is %s.", align_gname(resp_god),
833 Hallucination ? "bummed" : "displeased");
835 You("%s
\82ª%s
\82¢
\82é
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", align_gname(resp_god),
836 Hallucination ? "
\82Ë
\82¾
\82Á
\82Ä" : "
\97§
\95 \82µ
\82Ä");
841 godvoice(resp_god, (char *) 0);
843 pline("\"Thou %s, %s.\"",
844 (ugod_is_angry() && resp_god == u.ualign.type)
845 ? "hast strayed from the path"
847 youmonst.data->mlet == S_HUMAN ? "mortal" : "creature");
849 pline("
\81u
\93ð%s
\81C%s
\82æ
\81D
\81v",
850 (ugod_is_angry() && resp_god == u.ualign.type)
851 ? "
\82»
\82Ì
\93¹
\82©
\82ç
\93¥
\82Ý
\8fo
\82Ä
\82¨
\82é"
852 : "
\98ü
\96\9d\82È
\82è",
853 youmonst.data->mlet == S_HUMAN ? "
\92è
\96½
\82Ì
\82à
\82Ì" : "
\90¶
\95¨");
856 verbalize("Thou must relearn thy lessons!");
858 verbalize("
\93ð
\82¢
\82Ü
\88ê
\93x
\8aw
\82Ô
\82×
\82µ
\81I");
859 (void) adjattrib(A_WIS, -1, FALSE);
864 gods_angry(resp_god);
865 punish((struct obj *) 0);
867 } /* else fall thru */
870 gods_angry(resp_god);
871 if (!Blind && !Antimagic)
873 pline("%s glow surrounds you.", An(hcolor(NH_BLACK)));
875 pline("%s
\8cõ
\82ª
\82 \82È
\82½
\82ð
\8eæ
\82è
\8aª
\82¢
\82½
\81D", An(hcolor(NH_BLACK)));
880 godvoice(resp_god, (char *) 0);
882 verbalize("Thou durst %s me?",
883 (on_altar() && (a_align(u.ux, u.uy) != resp_god))
887 verbalize("
\93ð
\81C
\89ä%s
\81H",
888 (on_altar() && (a_align(u.ux,u.uy) != resp_god))
889 ? "
\82ð
\82³
\82°
\82·
\82Ý
\82µ
\82©
\81H"
890 : "
\82É
\8bF
\82è
\82ð
\8b\81\82ß
\82µ
\82©
\81H");
893 pline("\"Then die, %s!\"",
894 youmonst.data->mlet == S_HUMAN ? "mortal" : "creature");
896 pline("
\81u
\8e\80\82Ë
\81C%s
\82æ
\81I
\81v",
897 youmonst.data->mlet == S_HUMAN ? "
\92è
\96½
\82Ì
\82à
\82Ì" : "
\90¶
\95¨");
899 summon_minion(resp_god, FALSE);
903 gods_angry(resp_god);
904 god_zaps_you(resp_god);
907 u.ublesscnt = rnz(300);
911 /* helper to print "str appears at your feet", or appropriate */
919 /* barrier between you and the floor */
921 pline("%s %s into %s %s.", str, vtense(str, "drop"),
922 s_suffix(mon_nam(u.ustuck)), mbodypart(u.ustuck, STOMACH));
924 pline("%s
\82ª%s
\82Ì%s
\82É
\97\8e\82¿
\82½
\81D", str,
925 mon_nam(u.ustuck), mbodypart(u.ustuck, STOMACH));
929 pline("%s %s %s your %s!", str,
930 Blind ? "lands" : vtense(str, "appear"),
931 Levitation ? "beneath" : "at", makeplural(body_part(FOOT)));
933 pline("%s
\82ª
\82 \82È
\82½
\82Ì%s
\82É%s
\81I", str,
934 Levitation ? "
\89º
\95û" : "
\91«
\8c³",
935 Blind ? "
\92\85\92n
\82µ
\82½" : "
\8c»
\82í
\82ê
\82½");
944 boolean already_exists, in_hand;
947 #define ok_wep(o) ((o) && ((o)->oclass == WEAPON_CLASS || is_weptool(o)))
949 HSee_invisible |= FROMOUTSIDE;
950 HFire_resistance |= FROMOUTSIDE;
951 HCold_resistance |= FROMOUTSIDE;
952 HShock_resistance |= FROMOUTSIDE;
953 HSleep_resistance |= FROMOUTSIDE;
954 HPoison_resistance |= FROMOUTSIDE;
955 godvoice(u.ualign.type, (char *) 0);
957 obj = ok_wep(uwep) ? uwep : 0;
958 already_exists = in_hand = FALSE; /* lint suppression */
959 switch (u.ualign.type) {
961 u.uevent.uhand_of_elbereth = 1;
963 verbalize("I crown thee... The Hand of Elbereth!");
965 verbalize("
\93ð
\82É
\81D
\81D
\81D
\83G
\83\8b\83x
\83\8c\83X
\82Ì
\8cä
\8eè
\82Ì
\89h
\97_
\82ð
\82³
\82¸
\82¯
\82æ
\82¤
\81I");
968 u.uevent.uhand_of_elbereth = 2;
969 in_hand = (uwep && uwep->oartifact == ART_VORPAL_BLADE);
971 exist_artifact(LONG_SWORD, artiname(ART_VORPAL_BLADE));
973 verbalize("Thou shalt be my Envoy of Balance!");
975 verbalize("
\93ð
\81C
\89ä
\82ª
\92²
\98a
\82Ì
\8eg
\8eÒ
\82È
\82è
\81I");
978 u.uevent.uhand_of_elbereth = 3;
979 in_hand = (uwep && uwep->oartifact == ART_STORMBRINGER);
981 exist_artifact(RUNESWORD, artiname(ART_STORMBRINGER));
983 verbalize("Thou art chosen to %s for My Glory!",
984 already_exists && !in_hand ? "take lives" : "steal souls");
986 verbalize("
\93ð
\81C
\89ä
\82ª
\89h
\8cõ
\82Ì
\82½
\82ß%s
\8eÒ
\82Æ
\82µ
\82Ä
\91I
\82Î
\82ê
\82ñ
\81I",
987 already_exists && !in_hand ?
988 "
\90¶
\82«
\82È
\82ª
\82ç
\82¦
\82ñ" : "
\8d°
\82ð
\92D
\82¢
\82µ
\82½
\82ß
\82é");
993 class_gift = STRANGE_OBJECT;
994 /* 3.3.[01] had this in the A_NEUTRAL case below,
995 preventing chaotic wizards from receiving a spellbook */
996 if (Role_if(PM_WIZARD)
997 && (!uwep || (uwep->oartifact != ART_VORPAL_BLADE
998 && uwep->oartifact != ART_STORMBRINGER))
999 && !carrying(SPE_FINGER_OF_DEATH)) {
1000 class_gift = SPE_FINGER_OF_DEATH;
1002 obj = mksobj(class_gift, TRUE, FALSE);
1006 at_your_feet("A spellbook");
1008 at_your_feet("
\96\82\96@
\8f\91");
1011 /* when getting a new book for known spell, enhance
1012 currently wielded weapon rather than the book */
1013 for (sp_no = 0; sp_no < MAXSPELL; sp_no++)
1014 if (spl_book[sp_no].sp_id == class_gift) {
1016 obj = uwep; /* to be blessed,&c */
1019 } else if (Role_if(PM_MONK) && (!uwep || !uwep->oartifact)
1020 && !carrying(SPE_RESTORE_ABILITY)) {
1021 /* monks rarely wield a weapon */
1022 class_gift = SPE_RESTORE_ABILITY;
1026 switch (u.ualign.type) {
1028 if (class_gift != STRANGE_OBJECT) {
1029 ; /* already got bonus above */
1030 } else if (obj && obj->otyp == LONG_SWORD && !obj->oartifact) {
1033 Your("sword shines brightly for a moment.");
1035 Your("
\8c\95\82Í
\82µ
\82Î
\82ç
\82
\82Ì
\8aÔ
\96¾
\82é
\82
\8bP
\82¢
\82½
\81D");
1036 obj = oname(obj, artiname(ART_EXCALIBUR));
1037 if (obj && obj->oartifact == ART_EXCALIBUR)
1040 /* acquire Excalibur's skill regardless of weapon or gift */
1041 unrestrict_weapon_skill(P_LONG_SWORD);
1042 if (obj && obj->oartifact == ART_EXCALIBUR)
1043 discover_artifact(ART_EXCALIBUR);
1046 if (class_gift != STRANGE_OBJECT) {
1047 ; /* already got bonus above */
1048 } else if (obj && in_hand) {
1050 Your("%s goes snicker-snack!", xname(obj));
1052 Your("%s
\82Í
\83T
\83N
\83T
\83N
\82É
\82È
\82Á
\82½
\81I", xname(obj));
1054 } else if (!already_exists) {
1055 obj = mksobj(LONG_SWORD, FALSE, FALSE);
1056 obj = oname(obj, artiname(ART_VORPAL_BLADE));
1059 at_your_feet("A sword");
1061 at_your_feet("
\8c\95");
1065 /* acquire Vorpal Blade's skill regardless of weapon or gift */
1066 unrestrict_weapon_skill(P_LONG_SWORD);
1067 if (obj && obj->oartifact == ART_VORPAL_BLADE)
1068 discover_artifact(ART_VORPAL_BLADE);
1071 char swordbuf[BUFSZ];
1074 Sprintf(swordbuf, "%s sword", hcolor(NH_BLACK));
1076 Sprintf(swordbuf, "%s
\8c\95", hcolor(NH_BLACK));
1077 if (class_gift != STRANGE_OBJECT) {
1078 ; /* already got bonus above */
1079 } else if (obj && in_hand) {
1081 Your("%s hums ominously!", swordbuf);
1083 Your("%s
\82Í
\8bC
\96¡
\82Ì
\88«
\82¢
\89¹
\82ð
\97§
\82Ä
\82½
\81I", swordbuf);
1085 } else if (!already_exists) {
1086 obj = mksobj(RUNESWORD, FALSE, FALSE);
1087 obj = oname(obj, artiname(ART_STORMBRINGER));
1089 at_your_feet(An(swordbuf));
1093 /* acquire Stormbringer's skill regardless of weapon or gift */
1094 unrestrict_weapon_skill(P_BROAD_SWORD);
1095 if (obj && obj->oartifact == ART_STORMBRINGER)
1096 discover_artifact(ART_STORMBRINGER);
1104 /* enhance weapon regardless of alignment or artifact status */
1107 obj->oeroded = obj->oeroded2 = 0;
1108 obj->oerodeproof = TRUE;
1109 obj->bknown = obj->rknown = TRUE;
1112 /* acquire skill in this weapon */
1113 unrestrict_weapon_skill(weapon_type(obj));
1114 } else if (class_gift == STRANGE_OBJECT) {
1115 /* opportunity knocked, but there was nobody home... */
1117 You_feel("unworthy.");
1119 You("
\89¿
\92l
\82ª
\82È
\82¢
\82Æ
\8ev
\82Á
\82½
\81D");
1123 /* lastly, confer an extra skill slot/credit beyond the
1124 up-to-29 you can get from gaining experience levels */
1125 add_weapon_skill(1);
1133 /* don't use p_trouble, worst trouble may get fixed while praying */
1134 int trouble = in_trouble(); /* what's your worst difficulty? */
1135 int pat_on_head = 0, kick_on_butt;
1138 You_feel("that %s is %s.", align_gname(g_align),
1139 (u.ualign.record >= DEVOUT)
1140 ? Hallucination ? "pleased as punch" : "well-pleased"
1141 : (u.ualign.record >= STRIDENT)
1142 ? Hallucination ? "ticklish" : "pleased"
1143 : Hallucination ? "full" : "satisfied");
1145 pline("%s
\82ª%s
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", align_gname(g_align),
1146 (u.ualign.record >= DEVOUT)
1147 ? Hallucination ? "
\82
\82»
\8b@
\8c\99\82¢
\82¢" : "
\82²
\8b@
\8c\99\97í
\82µ
\82¢"
1148 : (u.ualign.record >= STRIDENT)
1149 ? Hallucination ? "
\82
\82·
\82®
\82Á
\82½
\82ª
\82Á
\82Ä
\82¢
\82é" : "
\8fã
\8b@
\8c\99\82Å
\82 \82é"
1150 : Hallucination ? "
\95 \82¢
\82Á
\82Ï
\82¢
\82Å
\82 \82é" : "
\96\9e\91«
\82µ
\82Ä
\82¢
\82é");
1153 /* not your deity */
1154 if (on_altar() && p_aligntyp != u.ualign.type) {
1157 } else if (u.ualign.record < 2 && trouble <= 0)
1161 * Depending on your luck & align level, the god you prayed to will:
1162 * - fix your worst problem if it's major;
1163 * - fix all your major problems;
1164 * - fix your worst problem if it's minor;
1165 * - fix all of your problems;
1166 * - do you a gratuitous favor.
1168 * If you make it to the last category, you roll randomly again
1169 * to see what they do for you.
1171 * If your luck is at least 0, then you are guaranteed rescued from
1172 * your worst major problem.
1174 if (!trouble && u.ualign.record >= DEVOUT) {
1175 /* if hero was in trouble, but got better, no special favor */
1179 int action, prayer_luck;
1182 /* Negative luck is normally impossible here (can_pray() forces
1183 prayer failure in that situation), but it's possible for
1184 Luck to drop during the period of prayer occupation and
1185 become negative by the time we get here. [Reported case
1186 was lawful character whose stinking cloud caused a delayed
1187 killing of a peaceful human, triggering the "murderer"
1188 penalty while successful prayer was in progress. It could
1189 also happen due to inconvenient timing on Friday 13th, but
1190 the magnitude there (-1) isn't big enough to cause trouble.]
1191 We don't bother remembering start-of-prayer luck, just make
1192 sure it's at least -1 so that Luck+2 is big enough to avoid
1193 a divide by zero crash when generating a random number. */
1194 prayer_luck = max(Luck, -1); /* => (prayer_luck + 2 > 0) */
1195 action = rn1(prayer_luck + (on_altar() ? 3 + on_shrine() : 2), 1);
1197 action = min(action, 3);
1198 if (u.ualign.record < STRIDENT)
1199 action = (u.ualign.record > 0 || !rnl(2)) ? 1 : 0;
1201 switch (min(action, 5)) {
1207 fix_worst_trouble(trouble);
1208 while ((trouble = in_trouble()) != 0);
1212 fix_worst_trouble(trouble);
1214 /* arbitrary number of tries */
1215 while ((trouble = in_trouble()) > 0 && (++tryct < 10))
1216 fix_worst_trouble(trouble);
1221 fix_worst_trouble(trouble);
1223 break; /* your god blows you off, too bad */
1227 /* note: can't get pat_on_head unless all troubles have just been
1228 fixed or there were no troubles to begin with; hallucination
1229 won't be in effect so special handling for it is superfluous */
1231 switch (rn2((Luck + 6) >> 1)) {
1235 if (uwep && (welded(uwep) || uwep->oclass == WEAPON_CLASS
1236 || is_weptool(uwep))) {
1237 char repair_buf[BUFSZ];
1240 if (uwep->oeroded || uwep->oeroded2)
1242 Sprintf(repair_buf, " and %s now as good as new",
1243 otense(uwep, "are"));
1245 Sprintf(repair_buf, "
\82³
\82ç
\82É
\90V
\95i
\93¯
\97l
\82É
\82È
\82Á
\82½
\81D");
1251 pline("%s %s%s.", Yobjnam2(uwep, "softly glow"),
1252 hcolor(NH_AMBER), repair_buf);
1254 Your("%s
\82Í%s
\82â
\82í
\82ç
\82©
\82
\8bP
\82¢
\82½
\81D%s", xname(uwep),
1255 jconj_adj(hcolor(NH_AMBER)), repair_buf);
1257 iflags.last_msg = PLNMSG_OBJ_GLOWS;
1260 You_feel("the power of %s over %s.", u_gname(),
1263 pline("%s
\82Ì
\97Í
\82ª%s
\82É
\92\8d\82ª
\82ê
\82Ä
\82¢
\82é
\82Ì
\82ð
\8a´
\82¶
\82½
\81D", u_gname(),
1267 uwep->bknown = TRUE;
1269 } else if (!uwep->blessed) {
1272 pline("%s with %s aura%s.",
1273 Yobjnam2(uwep, "softly glow"),
1274 an(hcolor(NH_LIGHT_BLUE)), repair_buf);
1276 Your("%s
\82Í%s
\82â
\82í
\82ç
\82©
\82È
\83I
\81[
\83\89\82É
\82Â
\82Â
\82Ü
\82ê
\82½
\81D%s",
1278 an(hcolor(NH_LIGHT_BLUE)), repair_buf);
1280 iflags.last_msg = PLNMSG_OBJ_GLOWS;
1283 You_feel("the blessing of %s over %s.", u_gname(),
1286 pline("%s
\82Ì
\8fj
\95\9f\82ª%s
\82É
\92\8d\82ª
\82ê
\82Ä
\82¢
\82é
\82Ì
\82ð
\8a´
\82¶
\82½
\81D", u_gname(),
1290 uwep->bknown = TRUE;
1294 /* fix any rust/burn/rot damage, but don't protect
1295 against future damage */
1296 if (uwep->oeroded || uwep->oeroded2) {
1297 uwep->oeroded = uwep->oeroded2 = 0;
1298 /* only give this message if we didn't just bless
1299 or uncurse (which has already given a message) */
1302 pline("%s as good as new!",
1303 Yobjnam2(uwep, Blind ? "feel" : "look"));
1305 Your("%s
\82Í
\90V
\95i
\93¯
\97l
\82É
\82È
\82Á
\82½%s
\81I",
1306 xname(uwep), Blind ? "
\82æ
\82¤
\82È
\8bC
\82ª
\82·
\82é" : "");
1313 /* takes 2 hints to get the music to enter the stronghold;
1314 skip if you've solved it via mastermind or destroyed the
1315 drawbridge (both set uopened_dbridge) or if you've already
1316 travelled past the Valley of the Dead (gehennom_entered) */
1317 if (!u.uevent.uopened_dbridge && !u.uevent.gehennom_entered) {
1318 if (u.uevent.uheard_tune < 1) {
1319 godvoice(g_align, (char *) 0);
1321 verbalize("Hark, %s!", youmonst.data->mlet == S_HUMAN
1325 verbalize("%s
\82æ
\81C
\95·
\82¯
\81I", youmonst.data->mlet == S_HUMAN
1326 ? "
\92è
\96½
\82Ì
\8eÒ"
1331 "To enter the castle, thou must play the right tune!");
1333 "
\93ð
\8fé
\82É
\93ü
\82ç
\82ñ
\82Æ
\97~
\82·
\82é
\82È
\82ç
\82Î
\81C
\90³
\82µ
\82«
\92²
\82×
\82ð
\91t
\82Å
\82é
\82×
\82µ
\81I");
1334 u.uevent.uheard_tune++;
1336 } else if (u.uevent.uheard_tune < 2) {
1338 You_hear("a divine music...");
1340 You_hear("
\90_
\82Ì
\89¹
\8ay
\82ð
\95·
\82¢
\82½
\81D
\81D
\81D");
1342 pline("It sounds like: \"%s\".", tune);
1344 pline("
\82»
\82ê
\82Í
\8e\9f\82Ì
\82æ
\82¤
\82É
\95·
\82±
\82¦
\82½:
\81u%s
\81v", tune);
1345 u.uevent.uheard_tune++;
1353 You("are surrounded by %s glow.", an(hcolor(NH_GOLDEN)));
1355 You("%s
\8bP
\82«
\82É
\82Â
\82Â
\82Ü
\82ê
\82½
\81D", hcolor(NH_GOLDEN));
1356 /* if any levels have been lost (and not yet regained),
1357 treat this effect like blessed full healing */
1358 if (u.ulevel < u.ulevelmax) {
1359 u.ulevelmax -= 1; /* see potion.c */
1369 if (ABASE(A_STR) < AMAX(A_STR)) {
1370 ABASE(A_STR) = AMAX(A_STR);
1371 context.botl = 1; /* before potential message */
1372 (void) encumber_msg();
1374 if (u.uhunger < 900)
1376 /* luck couldn't have been negative at start of prayer because
1377 the prayer would have failed, but might have been decremented
1378 due to a timed event (delayed death of peaceful monster hit
1379 by hero-created stinking cloud) during the praying interval */
1382 /* superfluous; if hero was blinded we'd be handling trouble
1383 rather than issuing a pat-on-head */
1385 make_blinded(0L, TRUE);
1389 register struct obj *otmp;
1394 You_feel("the power of %s.", u_gname());
1396 You("%s
\82Ì
\97Í
\82ð
\8a´
\82¶
\82½
\81D", u_gname());
1399 You("are surrounded by %s aura.", an(hcolor(NH_LIGHT_BLUE)));
1401 You("%s
\83I
\81[
\83\89\82É
\82Â
\82Â
\82Ü
\82ê
\82½
\81D", an(hcolor(NH_LIGHT_BLUE)));
1402 for (otmp = invent; otmp; otmp = otmp->nobj) {
1404 && (otmp != uarmh /* [see worst_cursed_item()] */
1405 || uarmh->otyp != HELM_OF_OPPOSITE_ALIGNMENT)) {
1408 pline("%s %s.", Yobjnam2(otmp, "softly glow"),
1411 Your("%s
\82Í%s
\82â
\82í
\82ç
\82©
\82
\8bP
\82¢
\82½
\81D", xname(otmp),
1412 jconj_adj(hcolor(NH_AMBER)));
1414 iflags.last_msg = PLNMSG_OBJ_GLOWS;
1415 otmp->bknown = TRUE;
1426 static NEARDATA const char msg[] =
1428 "\"and thus I grant thee the gift of %s!\"";
1430 "
\81u
\82³
\82ç
\82É
\93ð
\82É%s
\82ð
\82³
\82¸
\82¯
\82æ
\82¤
\81I
\81v";
1432 godvoice(u.ualign.type,
1434 "Thou hast pleased me with thy progress,");
1436 "
\93ð
\82Ì
\90¬
\92·
\82Í
\94ñ
\8fí
\82É
\96]
\82Ü
\82µ
\82¢
\81C");
1437 if (!(HTelepat & INTRINSIC)) {
1438 HTelepat |= FROMOUTSIDE;
1440 pline(msg, "Telepathy");
1442 pline(msg, "
\83e
\83\8c\83p
\83V
\81[");
1445 } else if (!(HFast & INTRINSIC)) {
1446 HFast |= FROMOUTSIDE;
1448 pline(msg, "Speed");
1450 pline(msg, "
\91¬
\82³");
1451 } else if (!(HStealth & INTRINSIC)) {
1452 HStealth |= FROMOUTSIDE;
1454 pline(msg, "Stealth");
1456 pline(msg, "
\94E
\82Ì
\97Í");
1458 if (!(HProtection & INTRINSIC)) {
1459 HProtection |= FROMOUTSIDE;
1461 u.ublessed = rn1(3, 2);
1465 pline(msg, "my protection");
1467 pline(msg, "
\89ä
\82ª
\8cì
\82è");
1470 verbalize("Use it wisely in my name!");
1472 verbalize("
\89ä
\82ª
\96¼
\82É
\89\97\82¢
\82Ä
\97L
\8cø
\82É
\8eg
\82¤
\82ª
\82æ
\82¢
\81I");
1477 if (u.ualign.record >= PIOUS && !u.uevent.uhand_of_elbereth) {
1484 int sp_no, trycnt = u.ulevel + 1;
1486 /* not yet known spells given preference over already known ones
1488 /* Also, try to grant a spell for which there is a skill slot */
1489 otmp = mkobj(SPBOOK_CLASS, TRUE);
1490 while (--trycnt > 0) {
1491 if (otmp->otyp != SPE_BLANK_PAPER) {
1492 for (sp_no = 0; sp_no < MAXSPELL; sp_no++)
1493 if (spl_book[sp_no].sp_id == otmp->otyp)
1495 if (sp_no == MAXSPELL
1496 && !P_RESTRICTED(spell_skilltype(otmp->otyp)))
1497 break; /* usable, but not yet known */
1499 if (!objects[SPE_BLANK_PAPER].oc_name_known
1500 || carrying(MAGIC_MARKER))
1503 otmp->otyp = rnd_class(bases[SPBOOK_CLASS], SPE_BLANK_PAPER);
1507 at_your_feet("A spellbook");
1509 at_your_feet("
\96\82\96@
\8f\91");
1510 place_object(otmp, u.ux, u.uy);
1515 impossible("Confused deity!");
1519 u.ublesscnt = rnz(350);
1520 kick_on_butt = u.uevent.udemigod ? 1 : 0;
1521 if (u.uevent.uhand_of_elbereth)
1524 u.ublesscnt += kick_on_butt * rnz(1000);
1529 /* either blesses or curses water on the altar,
1530 * returns true if it found any water here.
1533 water_prayer(bless_water)
1534 boolean bless_water;
1536 register struct obj *otmp;
1537 register long changed = 0;
1538 boolean other = FALSE, bc_known = !(Blind || Hallucination);
1540 for (otmp = level.objects[u.ux][u.uy]; otmp; otmp = otmp->nexthere) {
1541 /* turn water into (un)holy water */
1542 if (otmp->otyp == POT_WATER
1543 && (bless_water ? !otmp->blessed : !otmp->cursed)) {
1544 otmp->blessed = bless_water;
1545 otmp->cursed = !bless_water;
1546 otmp->bknown = bc_known;
1547 changed += otmp->quan;
1548 } else if (otmp->oclass == POTION_CLASS)
1551 if (!Blind && changed) {
1553 pline("%s potion%s on the altar glow%s %s for a moment.",
1554 ((other && changed > 1L) ? "Some of the"
1555 : (other ? "One of the" : "The")),
1556 ((other || changed > 1L) ? "s" : ""), (changed > 1L ? "" : "s"),
1557 (bless_water ? hcolor(NH_LIGHT_BLUE) : hcolor(NH_BLACK)));
1559 pline("%s
\8dÕ
\92d
\82Ì
\96ò
\82Í
\88ê
\8fu%s
\8bP
\82¢
\82½
\81D",
1560 (other && changed > 1L) ? "
\82¢
\82
\82Â
\82©
\82Ì"
1562 jconj_adj(bless_water ? hcolor(NH_LIGHT_BLUE) : hcolor(NH_BLACK)));
1565 return (boolean) (changed > 0L);
1569 godvoice(g_align, words)
1574 const char *quot = "";
1581 pline_The("voice of %s %s: %s%s%s", align_gname(g_align),
1582 godvoices[rn2(SIZE(godvoices))], quot, words, quot);
1585 pline("%s
\82Ì
\90º
\82ª%s:
\81u%s
\81v", align_gname(g_align),
1586 godvoices[rn2(SIZE(godvoices))], words);
1588 pline("%s
\82Ì
\90º
\82ª%s
\81F", align_gname(g_align),
1589 godvoices[rn2(SIZE(godvoices))]);
1598 godvoice(g_align, "Thou hast angered me.");
1600 godvoice(g_align, "
\93ð
\81C
\89ä
\82ð
\93{
\82ç
\82µ
\82ß
\82½
\82è
\81D");
1603 /* The g_align god is upset with you. */
1608 if (g_align == u.ualign.type)
1616 consume_offering(otmp)
1617 register struct obj *otmp;
1623 Your("sacrifice sprouts wings and a propeller and roars away!");
1625 Your("
\8c£
\8fã
\95¨
\82Í
\89H
\82ð
\82Í
\82â
\82µ
\81C
\83v
\83\8d\83y
\83\89\82ª
\82Ü
\82í
\82è
\81C
\94ò
\82ñ
\82Å
\82Á
\82½
\81I");
1629 Your("sacrifice puffs up, swelling bigger and bigger, and pops!");
1631 Your("
\8c£
\8fã
\95¨
\82Í
\95¬
\89\8c\82ð
\82 \82°
\81C
\82Ç
\82ñ
\82Ç
\82ñ
\96c
\82ê
\81C
\82»
\82µ
\82Ä
\82Í
\82¶
\82¯
\82½
\81I");
1636 "sacrifice collapses into a cloud of dancing particles and fades away!");
1638 "
\8c£
\8fã
\95¨
\82Í
\8d×
\82©
\82
\8dÓ
\82¯
\81C
\97x
\82è
\8fo
\82µ
\81C
\82Ç
\82±
\82©
\82É
\8ds
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I");
1641 else if (Blind && u.ualign.type == A_LAWFUL)
1643 Your("sacrifice disappears!");
1645 Your("
\8c£
\8fã
\95¨
\82Í
\8fÁ
\82¦
\82½
\81I");
1648 Your("sacrifice is consumed in a %s!",
1649 u.ualign.type == A_LAWFUL ? "flash of light" : "burst of flame");
1651 Your("
\8c£
\8fã
\95¨
\82Í%s
\8fÁ
\82¦
\82³
\82Á
\82½
\81I",
1652 u.ualign.type == A_LAWFUL ? "
\82Ü
\82Î
\82ä
\82¢
\8cõ
\82ð
\95ú
\82¿" : "
\89\8a\82ð
\8fã
\82°");
1658 exercise(A_WIS, TRUE);
1664 static NEARDATA const char cloud_of_smoke[] =
1666 "A cloud of %s smoke surrounds you...";
1668 "%s
\89\8c\82ª
\82 \82È
\82½
\82ð
\8eæ
\82è
\88Í
\82ñ
\82¾
\81D
\81D
\81D";
1669 register struct obj *otmp;
1672 aligntyp altaralign = a_align(u.ux, u.uy);
1674 if (!on_altar() || u.uswallow) {
1676 You("are not standing on an altar.");
1678 You("
\8dÕ
\92d
\82Ì
\8fã
\82É
\97§
\82Á
\82Ä
\82¢
\82È
\82¢
\81D");
1681 highaltar = ((Is_astralevel(&u.uz) || Is_sanctum(&u.uz))
1682 && (levl[u.ux][u.uy].altarmask & AM_SHRINE));
1684 otmp = floorfood("sacrifice", 1);
1688 * Was based on nutritional value and aging behavior (< 50 moves).
1689 * Sacrificing a food ration got you max luck instantly, making the
1690 * gods as easy to please as an angry dog!
1692 * Now only accepts corpses, based on the game's evaluation of their
1693 * toughness. Human and pet sacrifice, as well as sacrificing unicorns
1694 * of your alignment, is strongly discouraged.
1696 #define MAXVALUE 24 /* Highest corpse value (besides Wiz) */
1698 if (otmp->otyp == CORPSE) {
1699 register struct permonst *ptr = &mons[otmp->corpsenm];
1703 u.uconduct.gnostic++;
1705 /* you're handling this corpse, even if it was killed upon the altar
1707 feel_cockatrice(otmp, TRUE);
1708 if (rider_corpse_revival(otmp, FALSE))
1711 if (otmp->corpsenm == PM_ACID_BLOB
1712 || (monstermoves <= peek_at_iced_corpse_age(otmp) + 50)) {
1713 value = mons[otmp->corpsenm].difficulty + 1;
1715 value = eaten_stat(value, otmp);
1718 if (your_race(ptr)) {
1719 if (is_demon(youmonst.data)) {
1721 You("find the idea very satisfying.");
1723 You("
\82»
\82Ì
\8dl
\82¦
\82Í
\91f
\90°
\82µ
\82¢
\82Æ
\8ev
\82Á
\82½
\81D");
1724 exercise(A_WIS, TRUE);
1725 } else if (u.ualign.type != A_CHAOTIC) {
1727 pline("You'll regret this infamous offense!");
1729 pline("
\93ð
\81C
\82±
\82Ì
\95\8e\90J
\82Ì
\8ds
\82È
\82¢
\82ð
\8cã
\89÷
\82·
\82é
\82×
\82µ
\81I");
1730 exercise(A_WIS, FALSE);
1734 && (altaralign != A_CHAOTIC || u.ualign.type != A_CHAOTIC)) {
1735 goto desecrate_high_altar;
1736 } else if (altaralign != A_CHAOTIC && altaralign != A_NONE) {
1737 /* curse the lawful/neutral altar */
1739 pline_The("altar is stained with %s blood.", urace.adj);
1741 pline("
\8dÕ
\92d
\82Í%s
\82Ì
\8c\8c\82Å
\89\98\82ê
\82Ä
\82¢
\82é
\81D", urace.adj);
1742 levl[u.ux][u.uy].altarmask = AM_CHAOTIC;
1746 const char *demonless_msg;
1748 /* Human sacrifice on a chaotic or unaligned altar */
1749 /* is equivalent to demon summoning */
1750 if (altaralign == A_CHAOTIC && u.ualign.type != A_CHAOTIC) {
1753 "The blood floods the altar, which vanishes in %s cloud!",
1755 "
\8c\8c\82ª
\8dÕ
\92d
\82©
\82ç
\82 \82Ó
\82ê
\81C
\8dÕ
\92d
\82Í%s
\89_
\82Æ
\82È
\82è
\8fÁ
\82¦
\82½
\81I",
1756 an(hcolor(NH_BLACK)));
1757 levl[u.ux][u.uy].typ = ROOM;
1758 levl[u.ux][u.uy].altarmask = 0;
1762 demonless_msg = "cloud dissipates";
1764 demonless_msg = "
\89_
\82Í
\8fÁ
\82¦
\82½
\81D";
1766 /* either you're chaotic or altar is Moloch's or both */
1768 pline_The("blood covers the altar!");
1770 pline("
\8c\8c\82ª
\8dÕ
\92d
\82ð
\95¢
\82Á
\82½
\81I");
1771 change_luck(altaralign == A_NONE ? -2 : 2);
1773 demonless_msg = "blood coagulates";
1775 demonless_msg = "
\8c\8c\82ª
\82±
\82Ñ
\82è
\82Â
\82¢
\82½";
1777 if ((pm = dlord(altaralign)) != NON_PM
1778 && (dmon = makemon(&mons[pm], u.ux, u.uy, NO_MM_FLAGS))
1782 Strcpy(dbuf, a_monnam(dmon));
1784 if (!strcmpi(dbuf, "it"))
1786 if (!strcmpi(dbuf, "
\89½
\8eÒ
\82©"))
1788 Strcpy(dbuf, "something dreadful");
1790 Strcpy(dbuf, "
\89½
\82©
\8b°
\82ë
\82µ
\82¢
\82à
\82Ì");
1792 dmon->mstrategy &= ~STRAT_APPEARMSG;
1794 You("have summoned %s!", dbuf);
1796 You("%s
\82ð
\8f¢
\8a«
\82µ
\82½
\81I", dbuf);
1797 if (sgn(u.ualign.type) == sgn(dmon->data->maligntyp))
1798 dmon->mpeaceful = TRUE;
1800 You("are terrified, and unable to move.");
1802 You("
\8b°
\95|
\82Å
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81D");
1805 multi_reason = "being terrified of a demon";
1807 multi_reason = "
\88«
\97ì
\82É
\8b°
\95|
\82µ
\82Ä
\82¢
\82é
\8e\9e\82É";
1811 pline_The("%s.", demonless_msg);
1813 pline("%s
\81D", demonless_msg);
1816 if (u.ualign.type != A_CHAOTIC) {
1819 (void) adjattrib(A_WIS, -1, TRUE);
1821 angrygods(u.ualign.type);
1830 } else if (has_omonst(otmp)
1831 && (mtmp = get_mtraits(otmp, FALSE)) != 0
1833 /* mtmp is a temporary pointer to a tame monster's attributes,
1834 * not a real monster */
1836 pline("So this is how you repay loyalty?");
1838 pline("
\82»
\82ê
\82Å
\82±
\82ê
\82ª
\82 \82È
\82½
\82Ì
\92\89\8b`
\82É
\95ñ
\82¢
\82é
\82à
\82Ì
\82©
\81H");
1841 HAggravate_monster |= FROMOUTSIDE;
1842 } else if (is_undead(ptr)) { /* Not demons--no demon corpses */
1843 if (u.ualign.type != A_CHAOTIC)
1845 } else if (is_unicorn(ptr)) {
1846 int unicalign = sgn(ptr->maligntyp);
1848 if (unicalign == altaralign) {
1849 /* When same as altar, always a very bad action.
1852 pline("Such an action is an insult to %s!",
1853 (unicalign == A_CHAOTIC) ? "chaos"
1854 : unicalign ? "law" : "balance");
1856 pline("
\82»
\82Ì
\82æ
\82¤
\82È
\8ds
\93®
\82Í
\81w%s
\81x
\82É
\94½
\82·
\82é
\81I",
1857 (unicalign == A_CHAOTIC) ? "
\8d¬
\93×"
1858 : unicalign ? "
\92\81\8f\98" : "
\92²
\98a");
1860 (void) adjattrib(A_WIS, -1, TRUE);
1862 } else if (u.ualign.type == altaralign) {
1863 /* When different from altar, and altar is same as yours,
1864 * it's a very good action.
1866 if (u.ualign.record < ALIGNLIM)
1868 You_feel("appropriately %s.", align_str(u.ualign.type));
1870 You("%s
\82É
\82Ó
\82³
\82í
\82µ
\82¢
\82Æ
\8a´
\82¶
\82½
\81D", align_str(u.ualign.type));
1873 You_feel("you are thoroughly on the right path.");
1875 You("
\8a®
\91S
\82É
\90³
\82µ
\82¢
\93¹
\82ð
\95à
\82ñ
\82Å
\82¢
\82é
\82Ì
\82ð
\8a´
\82¶
\82½
\81D");
1878 } else if (unicalign == u.ualign.type) {
1879 /* When sacrificing unicorn of your alignment to altar not of
1880 * your alignment, your god gets angry and it's a conversion.
1882 u.ualign.record = -1;
1885 /* Otherwise, unicorn's alignment is different from yours
1886 * and different from the altar's. It's an ordinary (well,
1887 * with a bonus) sacrifice on a cross-aligned altar.
1894 if (otmp->otyp == AMULET_OF_YENDOR) {
1897 if (altaralign == A_NONE && Inhell)
1898 /* hero has left Moloch's Sanctum so is in the process
1899 of getting away with the Amulet (outside of Gehennom,
1900 fall through to the "ashamed" feedback) */
1907 /* if on track, give a big hint */
1908 : (altaralign == u.ualign.type)
1909 ? "an urge to return to the surface"
1910 /* else headed towards celestial disgrace */
1915 ? "
\8cÌ
\8b½
\82ª
\97ö
\82µ
\82
\82È
\82Á
\82½"
1916 /* if on track, give a big hint */
1917 : (altaralign == u.ualign.type)
1918 ? "
\92n
\8fã
\82É
\8bA
\82è
\82½
\82¢
\8bC
\8e\9d\82É
\8bì
\82è
\97§
\82Ä
\82ç
\82ê
\82½"
1919 /* else headed towards celestial disgrace */
1920 : "
\92p
\82¸
\82©
\82µ
\82¢
\8ev
\82¢
\82ª
\82µ
\82½");
1924 /* The final Test. Did you win? */
1927 u.uevent.ascended = 1;
1929 useup(otmp); /* well, it's gone now */
1933 You("offer the Amulet of Yendor to %s...", a_gname());
1935 You("
\83C
\83F
\83\93\83_
\81[
\82Ì
\96\82\8f\9c\82¯
\82ð%s
\82É
\8c£
\8fã
\82µ
\82½
\81D
\81D
\81D",a_gname());
1936 if (altaralign == A_NONE) {
1937 /* Moloch's high altar */
1938 if (u.ualign.record > -99)
1939 u.ualign.record = -99;
1940 /*[apparently shrug/snarl can be sensed without being seen]*/
1942 pline("%s shrugs and retains dominion over %s,", Moloch,
1945 pline("%s
\82Í
\8c¨
\82ð
\82·
\82
\82ß
\81C%s
\82É
\91Î
\82·
\82é
\97D
\90¨
\82ð
\88Û
\8e\9d\82µ
\82½
\81D", Moloch,
1949 pline("then mercilessly snuffs out your life.");
1951 pline("
\82»
\82µ
\82Ä
\96³
\8e\9c\94ß
\82É
\82 \82È
\82½
\82Ì
\96½
\82ð
\92D
\82Á
\82½
\81D");
1955 Sprintf(killer.name, "%s indifference", s_suffix(Moloch));
1957 Sprintf(killer.name, "
\97â
\92W
\82È%s", Moloch);
1959 killer.format = KILLED_BY;
1961 /* life-saved (or declined to die in wizard/explore mode) */
1963 pline("%s snarls and tries again...", Moloch);
1965 pline("%s
\82Í
\82Ì
\82Ì
\82µ
\82è
\81C
\82à
\82¤
\88ê
\93x
\8e\8e\82µ
\82½
\81D
\81D
\81D", Moloch);
1966 fry_by_god(A_NONE, TRUE); /* wrath of Moloch */
1967 /* declined to die in wizard or explore mode */
1968 pline(cloud_of_smoke, hcolor(NH_BLACK));
1970 } else if (u.ualign.type != altaralign) {
1971 /* And the opposing team picks you up and
1972 carries you off on their shoulders */
1975 pline("%s accepts your gift, and gains dominion over %s...",
1976 a_gname(), u_gname());
1978 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\91\97\82è
\95¨
\82ð
\8eó
\82¯
\82Æ
\82è
\81C%s
\82Ì
\8c \97Í
\82ð
\93¾
\82½
\81D
\81D
\81D",
1979 a_gname(), u_gname());
1982 pline("%s is enraged...", u_gname());
1984 pline("%s
\82Í
\8c\83\93{
\82µ
\82½
\81D
\81D
\81D", u_gname());
1986 pline("Fortunately, %s permits you to live...", a_gname());
1988 pline("
\8dK
\89^
\82É
\82à
\81C%s
\82Í
\82 \82È
\82½
\82Ì
\91¶
\8dÝ
\82ð
\8b\96\82µ
\82Ä
\82¢
\82é
\81D
\81D
\81D",a_gname());
1989 pline(cloud_of_smoke, hcolor(NH_ORANGE));
1991 } else { /* super big win */
1993 u.uachieve.ascended = 1;
1996 "An invisible choir sings, and you are bathed in radiance...");
1998 "
\82Ç
\82±
\82©
\82ç
\82Æ
\82à
\82È
\82
\90¹
\89Ì
\91à
\82Ì
\89Ì
\82ª
\95·
\82±
\82¦
\81C
\82 \82È
\82½
\82Í
\8cõ
\82É
\95ï
\82Ü
\82ê
\82½
\81D
\81D
\81D");
2000 godvoice(altaralign, "Mortal, thou hast done well!");
2002 godvoice(altaralign, "
\92è
\96½
\82Ì
\8eÒ
\82æ
\81C
\82æ
\82
\82â
\82Á
\82½
\81I");
2003 display_nhwindow(WIN_MESSAGE, FALSE);
2006 "In return for thy service, I grant thee the gift of Immortality!");
2008 "
\93ð
\82Ì
\88Ì
\8bÆ
\82É
\91Î
\82µ
\81C
\95s
\8e\80\82Ì
\91Ì
\82ð
\8eö
\82¯
\82æ
\82¤
\82¼
\81I");
2010 You("ascend to the status of Demigod%s...",
2011 flags.female ? "dess" : "");
2013 You("
\8f¸
\93V
\82µ
\81C%s
\90_
\82Æ
\82È
\82Á
\82½
\81D
\81D
\81D",
2014 flags.female ? "
\8f\97" : "");
2021 if (otmp->otyp == FAKE_AMULET_OF_YENDOR) {
2022 if (!highaltar && !otmp->known)
2025 You_hear("a nearby thunderclap.");
2027 You("
\8bß
\82
\82É
\97\8b\82ª
\97\8e\82¿
\82½
\89¹
\82ð
\95·
\82¢
\82½
\81D");
2030 You("realize you have made a %s.",
2031 Hallucination ? "boo-boo" : "mistake");
2033 You("%s
\82±
\82Æ
\82É
\8bC
\82ª
\82Â
\82¢
\82½
\81D",
2034 Hallucination ? "
\81u
\83n
\83Y
\83\8c\81v
\82¾
\82Á
\82½" : "
\8aÔ
\88á
\82¢
\82ð
\94Æ
\82µ
\82½");
2040 /* don't you dare try to fool the gods */
2043 pline("Oh, no."); /* didn't hear thunderclap */
2045 pline("
\82È
\82ñ
\82Ä
\82±
\82Á
\82½
\81D"); /* didn't hear thunderclap */
2055 pline1(nothing_happens);
2059 if (altaralign != u.ualign.type && highaltar) {
2060 desecrate_high_altar:
2062 * REAL BAD NEWS!!! High altars cannot be converted. Even an attempt
2063 * gets the god who owns it truly pissed off.
2066 You_feel("the air around you grow charged...");
2068 You("
\89ñ
\82è
\82Ì
\8bó
\8bC
\82É
\83G
\83l
\83\8b\83M
\81[
\82ª
\96\9e\82¿
\82Ä
\82¢
\82
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D
\81D
\81D");
2070 pline("Suddenly, you realize that %s has noticed you...", a_gname());
2072 pline("
\93Ë
\91R
\81C%s
\82ª
\82 \82È
\82½
\82ð
\82¶
\82Á
\82Æ
\8c©
\82Ä
\82¢
\82é
\82Ì
\82É
\8bC
\82ª
\82Â
\82¢
\82½
\81D
\81D
\81D",a_gname());
2073 godvoice(altaralign,
2075 "So, mortal! You dare desecrate my High Temple!");
2077 "
\92è
\96½
\82Ì
\8eÒ
\82æ
\81I
\82¨
\82Ü
\82¦
\82Í
\89ä
\82ª
\90_
\90¹
\82È
\82é
\8e\9b\89@
\82ð
\89\98\82·
\82Ì
\82©
\81I");
2078 /* Throw everything we have at the player */
2079 god_zaps_you(altaralign);
2081 < 0) { /* I don't think the gods are gonna like this... */
2082 gods_upset(altaralign);
2084 int saved_anger = u.ugangr;
2085 int saved_cnt = u.ublesscnt;
2086 int saved_luck = u.uluck;
2088 /* Sacrificing at an altar of a different alignment */
2089 if (u.ualign.type != altaralign) {
2090 /* Is this a conversion ? */
2091 /* An unaligned altar in Gehennom will always elicit rejection. */
2092 if (ugod_is_angry() || (altaralign == A_NONE && Inhell)) {
2093 if (u.ualignbase[A_CURRENT] == u.ualignbase[A_ORIGINAL]
2094 && altaralign != A_NONE) {
2096 You("have a strong feeling that %s is angry...",
2098 You("%s
\82ª
\93{
\82Á
\82Ä
\82¢
\82é
\82Ì
\82ð
\8am
\90M
\82µ
\82½
\81D
\81D
\81D",
2100 consume_offering(otmp);
2102 pline("%s accepts your allegiance.", a_gname());
2104 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\91®
\90«
\82ð
\8eó
\82¯
\82¢
\82ê
\82½
\81D", a_gname());
2106 uchangealign(altaralign, 0);
2107 /* Beware, Conversion is costly */
2114 pline("%s rejects your sacrifice!", a_gname());
2116 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\8c£
\8fã
\95¨
\82ð
\8eó
\82¯
\82¢
\82ê
\82È
\82¢
\81I", a_gname());
2118 godvoice(altaralign, "Suffer, infidel!");
2120 godvoice(altaralign, "
\88Ù
\92[
\8eÒ
\82æ
\81I
\8e¸
\82¹
\82ë
\81I
\81I");
2122 (void) adjattrib(A_WIS, -2, TRUE);
2124 angrygods(u.ualign.type);
2128 consume_offering(otmp);
2130 You("sense a conflict between %s and %s.", u_gname(),
2133 You("%s
\82Æ%s
\8aÔ
\82Ì
\91\88\82¢
\82ð
\8a´
\82¶
\82½
\81D", u_gname(),
2136 if (rn2(8 + u.ulevel) > 5) {
2139 You_feel("the power of %s increase.", u_gname());
2141 You("%s
\82Ì
\97Í
\82ª
\91\9d\91å
\82µ
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", u_gname());
2142 exercise(A_WIS, TRUE);
2144 /* Yes, this is supposed to be &=, not |= */
2145 levl[u.ux][u.uy].altarmask &= AM_SHRINE;
2146 /* the following accommodates stupid compilers */
2147 levl[u.ux][u.uy].altarmask =
2148 levl[u.ux][u.uy].altarmask
2149 | (Align2amask(u.ualign.type));
2152 pline_The("altar glows %s.",
2153 hcolor((u.ualign.type == A_LAWFUL)
2157 : (const char *) "gray"));
2159 pline("
\8dÕ
\92d
\82Í%s
\8bP
\82¢
\82½
\81D",
2160 jconj_adj(hcolor((u.ualign.type == A_LAWFUL)
2164 : (const char *)"
\8aD
\90F
\82Ì")));
2167 if (rnl(u.ulevel) > 6 && u.ualign.record > 0
2168 && rnd(u.ualign.record) > (3 * ALIGNLIM) / 4)
2169 summon_minion(altaralign, TRUE);
2170 /* anger priest; test handles bones files */
2171 if ((pri = findpriest(temple_occupied(u.urooms)))
2172 && !p_coaligned(pri))
2176 pline("Unluckily, you feel the power of %s decrease.",
2178 pline("
\95s
\8dK
\82É
\82à
\81C%s
\82Ì
\97Í
\82ª
\8c¸
\8f
\82µ
\82½
\82Ì
\82ð
\8a´
\82¶
\82½
\81D",
2181 exercise(A_WIS, FALSE);
2182 if (rnl(u.ulevel) > 6 && u.ualign.record > 0
2183 && rnd(u.ualign.record) > (7 * ALIGNLIM) / 8)
2184 summon_minion(altaralign, TRUE);
2190 consume_offering(otmp);
2191 /* OK, you get brownie points. */
2193 u.ugangr -= ((value * (u.ualign.type == A_CHAOTIC ? 2 : 3))
2197 if (u.ugangr != saved_anger) {
2200 pline("%s seems %s.", u_gname(),
2201 Hallucination ? "groovy" : "slightly mollified");
2203 pline("%s
\82Í%s
\82É
\8c©
\82¦
\82é
\81D", u_gname(),
2204 Hallucination ? "
\91f
\93G" : "
\82¿
\82å
\82Á
\82Æ
\98a
\82ç
\82¢
\82¾
\82æ
\82¤");
2207 if ((int) u.uluck < 0)
2211 pline("%s seems %s.", u_gname(),
2212 Hallucination ? "cosmic (not a new fact)"
2215 pline("%s
\82Í%s
\82É
\8c©
\82¦
\82é
\81D", u_gname(),
2216 Hallucination ? "
\93ø
\90F(
\90V
\8e\96\8eÀ
\82Å
\82Í
\82È
\82¢)"
2217 : "
\8cy
\95Ì
\82µ
\82½
\82æ
\82¤");
2220 if ((int) u.uluck < 0)
2223 } else { /* not satisfied yet */
2226 pline_The("gods seem tall.");
2228 pline("
\90_
\82Í
\82¨
\8d\82\82
\82Æ
\82Ü
\82Á
\82Ä
\82¢
\82é
\82æ
\82¤
\82É
\8c©
\82¦
\82é
\81D");
2231 You("have a feeling of inadequacy.");
2233 You("
\82Ü
\82¾
\82Ü
\82¾
\82¾
\82Æ
\8a´
\82¶
\82½
\81D");
2235 } else if (ugod_is_angry()) {
2236 if (value > MAXVALUE)
2238 if (value > -u.ualign.record)
2239 value = -u.ualign.record;
2242 You_feel("partially absolved.");
2244 You("
\8f
\82µ
\82¾
\82¯
\82ä
\82é
\82µ
\82Ä
\82à
\82ç
\82¦
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D");
2245 } else if (u.ublesscnt > 0) {
2246 u.ublesscnt -= ((value * (u.ualign.type == A_CHAOTIC ? 500 : 300))
2248 if (u.ublesscnt < 0)
2250 if (u.ublesscnt != saved_cnt) {
2254 You("realize that the gods are not like you and I.");
2256 You("
\90_
\82Æ
\83c
\81[
\83J
\81[
\82Ì
\92\87\82Å
\82Í
\82È
\82¢
\82±
\82Æ
\82ð
\8cå
\82Á
\82½
\81D");
2259 You("have a hopeful feeling.");
2261 pline("
\8aó
\96]
\82ª
\8c©
\82¦
\82Ä
\82«
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D");
2262 if ((int) u.uluck < 0)
2267 pline("Overall, there is a smell of fried onions.");
2269 pline("
\82½
\82Ü
\82Ë
\82¬
\82ð
\97g
\82°
\82½
\93õ
\82¢
\82ª
\82µ
\82½
\81D");
2272 You("have a feeling of reconciliation.");
2274 You("
\8b\96\82³
\82ê
\82½
\8bC
\82ª
\82µ
\82½
\81D");
2275 if ((int) u.uluck < 0)
2280 int nartifacts = nartifact_exist();
2282 /* you were already in pretty good standing */
2283 /* The player can gain an artifact */
2284 /* The chance goes down as the number of artifacts goes up */
2285 if (u.ulevel > 2 && u.uluck >= 0
2286 && !rn2(10 + (2 * u.ugifts * nartifacts))) {
2287 otmp = mk_artifact((struct obj *) 0, a_align(u.ux, u.uy));
2293 otmp->oerodeproof = TRUE;
2295 at_your_feet("An object");
2297 at_your_feet("
\89½
\82©");
2300 godvoice(u.ualign.type, "Use my gift wisely!");
2302 godvoice(u.ualign.type, "
\89ä
\82ª
\97^
\82¦
\82µ
\82à
\82Ì
\8c«
\82
\8eg
\82¤
\82×
\82µ
\81I");
2304 u.ublesscnt = rnz(300 + (50 * nartifacts));
2305 exercise(A_WIS, TRUE);
2306 /* make sure we can use this weapon */
2307 unrestrict_weapon_skill(weapon_type(otmp));
2308 if (!Hallucination && !Blind) {
2310 makeknown(otmp->otyp);
2311 discover_artifact(otmp->oartifact);
2316 change_luck((value * LUCKMAX) / (MAXVALUE * 2));
2317 if ((int) u.uluck < 0)
2319 if (u.uluck != saved_luck) {
2322 You("think %s brushed your %s.", something,
2325 pline("%s
\82ª
\82 \82È
\82½
\82Ì%s
\82ð
\82
\82·
\82®
\82Á
\82½
\82æ
\82¤
\82¾
\81D", something,
2331 ? "see crabgrass at your %s. A funny thing in a dungeon."
2332 : "glimpse a four-leaf clover at your %s.",
2333 makeplural(body_part(FOOT)));
2336 ? "
\91«
\8c³
\82É
\83y
\83\93\83y
\83\93\91\90\82ð
\82Ý
\82Â
\82¯
\82½
\81D
\96À
\8b{
\82É
\82µ
\82Ä
\82Í
\92¿
\82µ
\82¢
\81D"
2337 : "
\8el
\97t
\82Ì
\83N
\83\8d\81[
\83o
\81[
\82ð
\91«
\8c³
\82É
\8c©
\82Â
\82¯
\82½
\81D");
2345 /* determine prayer results in advance; also used for enlightenment */
2348 boolean praying; /* false means no messages should be given */
2352 p_aligntyp = on_altar() ? a_align(u.ux, u.uy) : u.ualign.type;
2353 p_trouble = in_trouble();
2355 if (is_demon(youmonst.data) && (p_aligntyp != A_CHAOTIC)) {
2358 pline_The("very idea of praying to a %s god is repugnant to you.",
2359 p_aligntyp ? "lawful" : "neutral");
2361 pline("%s
\82Ì
\90_
\82É
\8bF
\82è
\82ð
\82³
\82³
\82°
\82é
\82Ì
\82Í
\8fí
\8e¯
\82É
\94w
\82
\81D",
2362 p_aligntyp ? "
\92\81\8f\98" : "
\92\86\97§");
2369 You("begin praying to %s.", align_gname(p_aligntyp));
2371 You("%s
\82É
\8bF
\82è
\82ð
\95ù
\82°
\82½
\81D", align_gname(p_aligntyp));
2373 if (u.ualign.type && u.ualign.type == -p_aligntyp)
2374 alignment = -u.ualign.record; /* Opposite alignment altar */
2375 else if (u.ualign.type != p_aligntyp)
2376 alignment = u.ualign.record / 2; /* Different alignment altar */
2378 alignment = u.ualign.record;
2380 if ((p_trouble > 0) ? (u.ublesscnt > 200) /* big trouble */
2381 : (p_trouble < 0) ? (u.ublesscnt > 100) /* minor difficulties */
2382 : (u.ublesscnt > 0)) /* not in trouble */
2383 p_type = 0; /* too soon... */
2384 else if ((int) Luck < 0 || u.ugangr || alignment < 0)
2385 p_type = 1; /* too naughty... */
2386 else /* alignment >= 0 */ {
2387 if (on_altar() && u.ualign.type != p_aligntyp)
2393 if (is_undead(youmonst.data) && !Inhell
2394 && (p_aligntyp == A_LAWFUL || (p_aligntyp == A_NEUTRAL && !rn2(10))))
2396 /* Note: when !praying, the random factor for neutrals makes the
2397 return value a non-deterministic approximation for enlightenment.
2398 This case should be uncommon enough to live with... */
2400 return !praying ? (boolean) (p_type == 3 && !Inhell) : TRUE;
2403 /* #pray commmand */
2407 /* Confirm accidental slips of Alt-P */
2409 if (ParanoidPray && yn("Are you sure you want to pray?") != 'y')
2411 if (ParanoidPray && yn("
\8bF
\82è
\82Ü
\82·
\82©
\81H") != 'y')
2414 u.uconduct.gnostic++;
2416 /* set up p_type and p_alignment */
2417 if (!can_pray(TRUE))
2420 if (wizard && p_type >= 0) {
2422 if (yn("Force the gods to be pleased?") == 'y') {
2424 if (yn("
\96³
\97\9d\96î
\97\9d\90_
\82É
\94÷
\8fÎ
\82ñ
\82Å
\82à
\82ç
\82¢
\82Ü
\82·
\82©
\81H") == 'y') {
2428 if (u.ualign.record <= 0)
2429 u.ualign.record = 1;
2437 multi_reason = "praying";
2439 multi_reason = "
\8bF
\82Á
\82Ä
\82¢
\82é
\8e\9e\82É";
2441 nomovemsg = "You finish your prayer.";
2443 nomovemsg = "
\8bF
\82è
\8fI
\82¦
\82½
\81D";
2444 afternmv = prayer_done;
2446 if (p_type == 3 && !Inhell) {
2447 /* if you've been true to your god you can't die while you pray */
2450 You("are surrounded by a shimmering light.");
2452 You("
\82©
\82·
\82©
\82È
\8cõ
\82É
\82Â
\82Â
\82Ü
\82ê
\82½
\81D");
2453 u.uinvulnerable = TRUE;
2460 prayer_done() /* M. Stephenson (1.0.3b) */
2462 aligntyp alignment = p_aligntyp;
2464 u.uinvulnerable = FALSE;
2468 (alignment == A_LAWFUL)
2469 ? "Vile creature, thou durst call upon me?"
2470 : "Walk no more, perversion of nature!");
2473 (alignment == A_LAWFUL)
2474 ? "
\94Ú
\97ò
\82È
\90¶
\95¨
\82æ
\81C
\93ð
\81C
\89ä
\82É
\8bF
\82è
\82ð
\8b\81\82ß
\82½
\82©
\81H"
2475 : "
\93®
\82
\82È
\81I
\8e\80\82É
\82¼
\82±
\82È
\82¢
\82Ì
\90¶
\95¨
\82æ
\81I");
2478 You_feel("like you are falling apart.");
2480 You("
\83o
\83\89\83o
\83\89\82É
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D");
2481 /* KMH -- Gods have mastery over unchanging */
2483 /* no Half_physical_damage adjustment here */
2485 losehp(rnd(20), "residual undead turning effect", KILLED_BY_AN);
2487 losehp(rnd(20), "
\95s
\8e\80\82Ì
\90¶
\95¨
\82ð
\93y
\82É
\95Ô
\82·
\97Í
\82Å", KILLED_BY_AN);
2488 exercise(A_CON, FALSE);
2493 pline("Since you are in Gehennom, %s won't help you.",
2495 pline("
\83Q
\83w
\83i
\82É%s
\82Ì
\97Í
\82Í
\93Í
\82©
\82È
\82¢
\81D",
2496 align_gname(alignment));
2497 /* haltingly aligned is least likely to anger */
2498 if (u.ualign.record <= 0 || rnl(u.ualign.record))
2499 angrygods(u.ualign.type);
2504 if (on_altar() && u.ualign.type != alignment)
2505 (void) water_prayer(FALSE);
2506 u.ublesscnt += rnz(250);
2508 gods_upset(u.ualign.type);
2509 } else if (p_type == 1) {
2510 if (on_altar() && u.ualign.type != alignment)
2511 (void) water_prayer(FALSE);
2512 angrygods(u.ualign.type); /* naughty */
2513 } else if (p_type == 2) {
2514 if (water_prayer(FALSE)) {
2515 /* attempted water prayer on a non-coaligned altar */
2516 u.ublesscnt += rnz(250);
2518 gods_upset(u.ualign.type);
2524 (void) water_prayer(TRUE);
2525 pleased(alignment); /* nice */
2534 /* Knights & Priest(esse)s only please */
2535 struct monst *mtmp, *mtmp2;
2536 int once, range, xlev;
2538 if (!Role_if(PM_PRIEST) && !Role_if(PM_KNIGHT)) {
2539 /* Try to use the "turn undead" spell.
2541 * This used to be based on whether hero knows the name of the
2542 * turn undead spellbook, but it's possible to know--and be able
2543 * to cast--the spell while having lost the book ID to amnesia.
2544 * (It also used to tell spelleffects() to cast at self?)
2548 for (sp_no = 0; sp_no < MAXSPELL; ++sp_no) {
2549 if (spl_book[sp_no].sp_id == NO_SPELL)
2551 else if (spl_book[sp_no].sp_id == SPE_TURN_UNDEAD)
2552 return spelleffects(sp_no, FALSE);
2555 You("don't know how to turn undead!");
2557 You("
\95s
\8e\80\82Ì
\90¶
\82«
\95¨
\82ð
\93y
\82É
\96ß
\82·
\95û
\96@
\82ð
\92m
\82ç
\82È
\82¢
\81I");
2560 u.uconduct.gnostic++;
2562 if ((u.ualign.type != A_CHAOTIC
2563 && (is_demon(youmonst.data) || is_undead(youmonst.data)))
2564 || u.ugangr > 6) { /* "Die, mortal!" */
2566 pline("For some reason, %s seems to ignore you.", u_gname());
2568 pline("
\82È
\82º
\82©
\81C%s
\82Í
\82 \82È
\82½
\82ð
\96³
\8e\8b\82µ
\82½
\82æ
\82¤
\82¾
\81D", u_gname());
2570 exercise(A_WIS, FALSE);
2575 pline("Since you are in Gehennom, %s won't help you.", u_gname());
2577 pline("
\83Q
\83w
\83i
\82É%s
\82Ì
\97Í
\82Í
\93Í
\82©
\82È
\82¢
\81D", u_gname());
2582 pline("Calling upon %s, you chant an arcane formula.", u_gname());
2584 pline("%s
\82É
\8bF
\82è
\82ð
\8b\81\82ß
\82é
\82Æ
\81C
\82 \82È
\82½
\82Í
\95s
\89Â
\8ev
\8bc
\82È
\8c¾
\97t
\82Ì
\90¹
\89Ì
\82ð
\95·
\82¢
\82½
\81D", u_gname());
2585 exercise(A_WIS, TRUE);
2587 /* note: does not perform unturn_dead() on victims' inventories */
2588 range = BOLT_LIM + (u.ulevel / 5); /* 5 to 11 */
2591 for (mtmp = fmon; mtmp; mtmp = mtmp2) {
2594 if (DEADMONSTER(mtmp))
2596 if (!cansee(mtmp->mx, mtmp->my) || distu(mtmp->mx, mtmp->my) > range)
2599 if (!mtmp->mpeaceful
2600 && (is_undead(mtmp->data) || is_vampshifter(mtmp)
2601 || (is_demon(mtmp->data) && (u.ulevel > (MAXULEV / 2))))) {
2602 mtmp->msleeping = 0;
2606 pline("Unfortunately, your voice falters.");
2608 pline("
\8ec
\94O
\82È
\82ª
\82ç
\81C
\82 \82È
\82½
\82Ì
\90º
\82Í
\82Ç
\82à
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½
\81D");
2612 } else if (!resist(mtmp, '\0', 0, TELL)) {
2614 switch (mtmp->data->mlet) {
2615 /* this is intentional, lichs are tougher
2618 xlev += 2; /*FALLTHRU*/
2620 xlev += 2; /*FALLTHRU*/
2622 xlev += 2; /*FALLTHRU*/
2624 xlev += 2; /*FALLTHRU*/
2626 xlev += 2; /*FALLTHRU*/
2628 if (u.ulevel >= xlev && !resist(mtmp, '\0', 0, NOTELL)) {
2629 if (u.ualign.type == A_CHAOTIC) {
2630 mtmp->mpeaceful = 1;
2632 } else { /* damn them */
2639 monflee(mtmp, 0, FALSE, TRUE);
2645 nomul(-(5 - ((u.ulevel - 1) / 6))); /* -5 .. -1 */
2647 multi_reason = "trying to turn the monsters";
2649 multi_reason = "
\89ö
\95¨
\82ð
\93y
\82É
\96ß
\82»
\82¤
\82Æ
\82µ
\82Ä
\82¢
\82é
\8e\9e\82É";
2650 nomovemsg = You_can_move_again;
2657 return a_gname_at(u.ux, u.uy);
2660 /* returns the name of an altar's deity */
2665 if (!IS_ALTAR(levl[x][y].typ))
2668 return align_gname(a_align(x, y));
2671 /* returns the name of the hero's deity */
2675 return align_gname(u.ualign.type);
2679 align_gname(alignment)
2684 switch (alignment) {
2698 impossible("unknown alignment.");
2710 static const char *hallu_gods[] = {
2712 "the Flying Spaghetti Monster", /* Church of the FSM */
2713 "Eris", /* Discordianism */
2714 "the Martians", /* every science fiction ever */
2716 "AnDoR dRaKoN", /* ADOM */
2717 "the Central Bank of Yendor", /* economics */
2718 "Tooth Fairy", /* real world(?) */
2719 "Om", /* Discworld */
2720 "Yawgmoth", /* Magic: the Gathering */
2721 "Morgoth", /* LoTR */
2722 "Cthulhu", /* Lovecraft */
2723 "the Ori", /* Stargate */
2724 "destiny", /* why not? */
2725 "your Friend the Computer", /* Paranoia */
2727 "
\8bó
\94ò
\82Ô
\83X
\83p
\83Q
\83b
\83e
\83B
\83\82\83\93\83X
\83^
\81[", /* Church of the FSM */
2728 "
\83G
\83\8a\83X", /* Discordianism */
2729 "
\89Î
\90¯
\90l", /* every science fiction ever */
2730 "
\83]
\83\80", /* Crawl */
2731 "
\83A
\83\93\83h
\81[
\83\8b\81E
\83h
\83\89\83R
\83\93", /* ADOM */
2732 "
\83C
\83F
\83\93\83_
\81[
\92\86\89\9b\8bâ
\8ds", /* economics */
2733 "
\8e\95\82Ì
\97d
\90¸", /* real world(?) */
2734 "
\83I
\83\80", /* Discworld */
2735 "
\83\88\81[
\83O
\83\82\83X", /* Magic: the Gathering */
2736 "
\83\82\83\8b\83S
\83X", /* LoTR */
2737 "
\83N
\83g
\83D
\83\8b\83t", /* Lovecraft */
2738 "
\83I
\81[
\83\89\83C", /* Stargate */
2739 "
\83l
\90\", /* why not? */
2740 "
\90e
\88¤
\82È
\82é
\83R
\83\93\83s
\83\85\81[
\83^", /* Paranoia */
2744 /* hallucination handling for priest/minion names: select a random god
2745 iff character is hallucinating */
2747 halu_gname(alignment)
2750 const char *gnam = NULL;
2754 return align_gname(alignment);
2756 /* Some roles (Priest) don't have a pantheon unless we're playing as
2757 that role, so keep trying until we get a role which does have one.
2758 [If playing a Priest, the current pantheon will be twice as likely
2759 to get picked as any of the others. That's not significant enough
2760 to bother dealing with.] */
2762 which = randrole(TRUE);
2763 while (!roles[which].lgod);
2765 switch (rn2_on_display_rng(9)) {
2768 gnam = roles[which].lgod;
2772 gnam = roles[which].ngod;
2776 gnam = roles[which].cgod;
2780 gnam = hallu_gods[rn2_on_display_rng(SIZE(hallu_gods))];
2786 impossible("rn2 broken in halu_gname?!?");
2789 impossible("No random god name?");
2791 gnam = "your Friend the Computer"; /* Paranoia */
2793 gnam = "
\90e
\88¤
\82È
\82é
\83R
\83\93\83s
\83\85\81[
\83^"; /* Paranoia */
2803 align_gtitle(alignment)
2807 const char *gnam, *result = "god";
2809 const char *gnam, *result = "
\8eå
\90_";
2811 switch (alignment) {
2825 if (gnam && *gnam == '_')
2829 result = "
\8f\97\90_";
2837 aligntyp altaralign = a_align(x, y);
2839 if (!strcmp(align_gname(altaralign), u_gname())) {
2841 godvoice(altaralign, "How darest thou desecrate my altar!");
2843 godvoice(altaralign, "
\93ð
\81C
\89ä
\82ª
\8dÕ
\92d
\82ð
\89\98\82·
\82©
\81I");
2844 (void) adjattrib(A_WIS, -1, FALSE);
2847 pline("A voice (could it be %s?) whispers:", align_gname(altaralign));
2849 pline("
\82³
\82³
\82â
\82«
\90º(
\82½
\82Ô
\82ñ%s
\81H)
\82ª
\95·
\82±
\82¦
\82é:", align_gname(altaralign));
2851 verbalize("Thou shalt pay, infidel!");
2853 verbalize("
\88Ù
\92[
\8eÒ
\82æ
\81I
\95ñ
\82¢
\82ð
\8eó
\82¯
\82æ
\81I");
2858 /* assumes isok() at one space away, but not necessarily at two */
2860 blocked_boulder(dx, dy)
2863 register struct obj *otmp;
2867 for (otmp = level.objects[u.ux + dx][u.uy + dy]; otmp;
2868 otmp = otmp->nexthere) {
2869 if (otmp->otyp == BOULDER)
2870 count += otmp->quan;
2873 nx = u.ux + 2 * dx, ny = u.uy + 2 * dy; /* next spot beyond boulder(s) */
2876 /* no boulders--not blocked */
2879 /* possibly blocked depending on if it's pushable */
2882 /* this is only approximate since multiple boulders might sink */
2883 if (is_pool_or_lava(nx, ny)) /* does its own isok() check */
2884 break; /* still need Sokoban check below */
2887 /* more than one boulder--blocked after they push the top one;
2888 don't force them to push it first to find out */
2892 if (dx && dy && Sokoban) /* can't push boulder diagonally in Sokoban */
2896 if (IS_ROCK(levl[nx][ny].typ))
2898 if (sobj_at(BOULDER, nx, ny))