1 /* NetHack 3.6 potion.c $NHDT-Date: 1549074254 2019/02/02 02:24:14 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.160 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /*-Copyright (c) Robert Patrick Rankin, 2013. */
4 /* NetHack may be freely redistributed. See license for details. */
6 /* JNetHack Copyright */
7 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000 */
8 /* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2019 */
9 /* JNetHack may be freely redistributed. See license for details. */
13 boolean notonhead = FALSE;
15 static NEARDATA int nothing, unkn;
16 static NEARDATA const char beverages[] = { POTION_CLASS, 0 };
18 STATIC_DCL long FDECL(itimeout, (long));
19 STATIC_DCL long FDECL(itimeout_incr, (long, int));
20 STATIC_DCL void NDECL(ghost_from_bottle);
22 FDECL(H2Opotion_dip, (struct obj *, struct obj *, BOOLEAN_P, const char *));
23 STATIC_DCL short FDECL(mixtype, (struct obj *, struct obj *));
25 /* force `val' to be within valid range for intrinsic timeout value */
38 /* increment `old' by `incr' and force result to be valid intrinsic timeout */
40 itimeout_incr(old, incr)
44 return itimeout((old & TIMEOUT) + (long) incr);
47 /* set the timeout field of intrinsic `which' */
49 set_itimeout(which, val)
53 *which |= itimeout(val);
56 /* increment the timeout field of intrinsic `which' */
58 incr_itimeout(which, incr)
62 set_itimeout(which, itimeout_incr(*which, incr));
66 make_confused(xtime, talk)
70 long old = HConfusion;
78 You_feel("less %s now.", Hallucination ? "trippy" : "confused");
80 You("%s
\82ª
\82¨
\82³
\82Ü
\82Á
\82½
\81D", Hallucination ? "
\83w
\83\8d\83w
\83\8d" : "
\8d¬
\97\90");
82 if ((xtime && !old) || (!xtime && old))
85 set_itimeout(&HConfusion, xtime);
89 make_stunned(xtime, talk)
102 Hallucination ? "less wobbly" : "a bit steadier");
105 Hallucination ? "
\82Ö
\82ë
\82è
\82ç
\82ª
\82¨
\82³
\82Ü
\82Á
\82½" : "
\82¾
\82ñ
\82¾
\82ñ
\82µ
\82Á
\82©
\82è
\82µ
\82Ä
\82«
\82½");
112 You("wobble in the saddle.");
114 You("
\88Æ
\82Ì
\8fã
\82Å
\82®
\82ç
\82®
\82ç
\82µ
\82½
\81D");
117 You("%s...", stagger(youmonst.data, "stagger"));
119 You("
\82
\82ç
\82
\82ç
\82µ
\82½
\81D
\81D
\81D");
122 if ((!xtime && old) || (xtime && !old))
125 set_itimeout(&HStun, xtime);
128 /* Sick is overloaded with both fatal illness and food poisoning (via
129 u.usick_type bit mask), but delayed killer can only support one or
130 the other at a time. They should become separate intrinsics.... */
132 make_sick(xtime, cause, talk, type)
134 const char *cause; /* sickness cause */
141 #if 0 /* tell player even if hero is unconscious */
151 You_feel("deathly sick.");
153 You("
\95a
\8bC
\82Å
\8e\80\82É
\82»
\82¤
\82¾
\81D");
158 You_feel("%s worse.", xtime <= Sick / 2L ? "much" : "even");
160 You("%s
\88«
\89»
\82µ
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82·
\82é
\81D", xtime <= Sick/2L ? "
\82³
\82ç
\82É" : "
\82à
\82Á
\82Æ");
162 set_itimeout(&Sick, xtime);
163 u.usick_type |= type;
165 } else if (old && (type & u.usick_type)) {
166 /* was sick, now not */
167 u.usick_type &= ~type;
168 if (u.usick_type) { /* only partly cured */
171 You_feel("somewhat better.");
173 You("
\82¿
\82å
\82Á
\82Æ
\82æ
\82
\82È
\82Á
\82½
\81D");
174 set_itimeout(&Sick, Sick * 2); /* approximation */
178 You_feel("cured. What a relief!");
180 pline("
\89ñ
\95\9c\82µ
\82½
\81D
\82 \82 \8f\95\82©
\82Á
\82½
\81I");
181 Sick = 0L; /* set_itimeout(&Sick, 0L) */
186 kptr = find_delayed_killer(SICK);
188 exercise(A_CON, FALSE);
189 /* setting delayed_killer used to be unconditional, but that's
190 not right when make_sick(0) is called to cure food poisoning
191 if hero was also fatally ill; this is only approximate */
192 if (xtime || !old || !kptr) {
193 int kpfx = ((cause && !strcmp(cause, "#wizintrinsic"))
194 ? KILLED_BY : KILLED_BY_AN);
196 delayed_killer(SICK, kpfx, cause);
199 dealloc_killer(kptr);
203 make_slimed(xtime, msg)
209 #if 0 /* tell player even if hero is unconscious */
213 set_itimeout(&Slimed, xtime);
214 if ((xtime != 0L) ^ (old != 0L)) {
220 dealloc_killer(find_delayed_killer(SLIMED));
223 /* start or stop petrification */
225 make_stoned(xtime, msg, killedby, killername)
229 const char *killername;
233 #if 0 /* tell player even if hero is unconscious */
237 set_itimeout(&Stoned, xtime);
238 if ((xtime != 0L) ^ (old != 0L)) {
244 dealloc_killer(find_delayed_killer(STONED));
246 delayed_killer(STONED, killedby, killername);
250 make_vomiting(xtime, talk)
259 set_itimeout(&Vomiting, xtime);
264 You_feel("much less nauseated now.");
266 You("
\93f
\82«
\8bC
\82ª
\82¨
\82³
\82Ü
\82Á
\82½
\81D");
270 static const char vismsg[] = "vision seems to %s for a moment but is %s now.";
272 static const char vismsg[] = "
\8e\8b\8aE
\82Í
\88ê
\8fu%s
\82È
\82Á
\82½
\82ª
\82Ü
\82½%s
\82È
\82Á
\82½
\81D";
274 static const char eyemsg[] = "%s momentarily %s.";
276 static const char eyemsg[] = "%s
\82Í
\88ê
\8fu%s
\81D";
279 make_blinded(xtime, talk)
284 boolean u_could_see, can_see_now;
289 /* we need to probe ahead in case the Eyes of the Overworld
290 are or will be overriding blindness */
291 u_could_see = !Blind;
292 Blinded = xtime ? 1L : 0L;
293 can_see_now = !Blind;
294 Blinded = old; /* restore */
299 if (can_see_now && !u_could_see) { /* regaining sight */
303 pline("Far out! Everything is all cosmic again!");
305 pline("
\82°
\81I
\82È
\82É
\82à
\82©
\82à
\82ª
\82Ü
\82½
\93ø
\90F
\82É
\8c©
\82¦
\82é
\81I");
308 You("can see again.");
310 You("
\82Ü
\82½
\8c©
\82¦
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81D");
312 } else if (old && !xtime) {
313 /* clearing temporary blindness without toggling blindness */
315 if (!haseyes(youmonst.data)) {
316 strange_feeling((struct obj *) 0, (char *) 0);
317 } else if (Blindfolded) {
319 eyes = body_part(EYE);
320 if (eyecount(youmonst.data) != 1)
321 eyes = makeplural(eyes);
322 Your(eyemsg, eyes, vtense(eyes, "itch"));
324 Your(eyemsg, body_part(EYE), "
\82©
\82ä
\82
\82È
\82Á
\82½");
326 } else { /* Eyes of the Overworld */
328 Your(vismsg, "brighten", Hallucination ? "sadder" : "normal");
330 Your(vismsg, "
\96¾
\82é
\82", Hallucination ? "
\8dª
\88Ã
\82É" : "
\95\81\92Ê
\82É");
335 if (u_could_see && !can_see_now) { /* losing sight */
339 pline("Oh, bummer! Everything is dark! Help!");
341 pline("
\88Ã
\82¢
\82æ
\81[
\81C
\8b·
\82¢
\82æ
\81[
\81C
\8b°
\82¢
\82æ
\81[
\81I");
344 pline("A cloud of darkness falls upon you.");
346 pline("
\88Ã
\8d\95\82Ì
\89_
\82ª
\82 \82È
\82½
\82ð
\95¢
\82Á
\82½
\81D");
348 /* Before the hero goes blind, set the ball&chain variables. */
351 } else if (!old && xtime) {
352 /* setting temporary blindness without toggling blindness */
354 if (!haseyes(youmonst.data)) {
355 strange_feeling((struct obj *) 0, (char *) 0);
356 } else if (Blindfolded) {
358 eyes = body_part(EYE);
359 if (eyecount(youmonst.data) != 1)
360 eyes = makeplural(eyes);
361 Your(eyemsg, eyes, vtense(eyes, "twitch"));
363 Your(eyemsg, body_part(EYE), "
\83s
\83N
\83s
\83N
\82µ
\82½");
365 } else { /* Eyes of the Overworld */
367 Your(vismsg, "dim", Hallucination ? "happier" : "normal");
369 Your(vismsg, "
\94\96\88Ã
\82", Hallucination ? "
\83n
\83b
\83s
\81[
\82É" : "
\95\81\92Ê
\82É");
374 set_itimeout(&Blinded, xtime);
376 if (u_could_see ^ can_see_now) { /* one or the other but not both */
381 /* blindness has just started or just ended--caller enforces that;
382 called by Blindf_on(), Blindf_off(), and make_blinded() */
386 boolean Stinging = (uwep && (EWarn_of_mon & W_WEP) != 0L);
388 /* blindness has just been toggled */
389 context.botl = TRUE; /* status conditions need update */
390 vision_full_recalc = 1; /* vision has changed */
391 /* this vision recalculation used to be deferred until moveloop(),
392 but that made it possible for vision irregularities to occur
393 (cited case was force bolt hitting an adjacent potion of blindness
394 and then a secret door; hero was blinded by vapors but then got the
395 message "a door appears in the wall" because wall spot was IN_SIGHT) */
397 if (Blind_telepat || Infravision || Stinging)
398 see_monsters(); /* also counts EWarn_of_mon monsters */
400 * Avoid either of the sequences
401 * "Sting starts glowing", [become blind], "Sting stops quivering" or
402 * "Sting starts quivering", [regain sight], "Sting stops glowing"
403 * by giving "Sting is quivering" when becoming blind or
404 * "Sting is glowing" when regaining sight so that the eventual
405 * "stops" message matches the most recent "Sting is ..." one.
409 /* update dknown flag for inventory picked up while blind */
411 learn_unseen_invent();
415 make_hallucinated(xtime, talk, mask)
416 long xtime; /* nonzero if this is an attempt to turn on hallucination */
418 long mask; /* nonzero if resistance status should change by mask */
420 long old = HHallucination;
422 const char *message, *verb;
428 message = (!xtime) ? "Everything %s SO boring now."
429 : "Oh wow! Everything %s so cosmic!";
431 message = (!xtime) ? "
\89½
\82à
\82©
\82à
\82ª
\81\96\91Þ
\8bü
\81\96\82É%s
\82é
\81D"
432 : "
\83\8f\81[
\83I
\81I
\89½
\82à
\82©
\82à
\93ø
\90F
\82É%s
\82é
\81I";
435 verb = (!Blind) ? "looks" : "feels";
437 verb = (!Blind) ? "
\8c©
\82¦" : "
\8a´
\82¶";
444 EHalluc_resistance |= mask;
446 EHalluc_resistance &= ~mask;
448 if (!EHalluc_resistance && (!!HHallucination != !!xtime))
450 set_itimeout(&HHallucination, xtime);
452 /* clearing temporary hallucination without toggling vision */
453 if (!changed && !HHallucination && old && talk) {
454 if (!haseyes(youmonst.data)) {
455 strange_feeling((struct obj *) 0, (char *) 0);
458 const char *eyes = body_part(EYE);
460 if (eyecount(youmonst.data) != 1)
461 eyes = makeplural(eyes);
462 Your(eyemsg, eyes, vtense(eyes, "itch"));
464 Your(eyemsg, body_part(EYE), "
\82©
\82ä
\82
\82È
\82Á
\82½");
466 } else { /* Grayswandir */
468 Your(vismsg, "flatten", "normal");
470 Your(vismsg, "
\82¨
\82©
\82µ
\82", "
\95\81\92Ê
\82É");
476 /* in case we're mimicking an orange (hallucinatory form
477 of mimicking gold) update the mimicking's-over message */
482 swallowed(0); /* redraw swallow display */
484 /* The see_* routines should be called *before* the pline. */
490 /* for perm_inv and anything similar
491 (eg. Qt windowport's equipped items display) */
496 pline(message, verb);
502 make_deaf(xtime, talk)
511 set_itimeout(&HDeaf, xtime);
512 if ((xtime != 0L) ^ (old != 0L)) {
516 You(old ? "can hear again." : "are unable to hear anything.");
518 You(old ? "
\82Ü
\82½
\95·
\82±
\82¦
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81D" : "
\89½
\82à
\95·
\82±
\82¦
\82È
\82
\82È
\82Á
\82½
\81D");
527 Hallucination ? "Far out, man! You"
528 : "Gee! All of a sudden, you",
529 See_invisible ? "can see right through yourself"
530 : "can't see yourself");
532 pline("%s
\82 \82È
\82½
\82Í%s
\81D",
533 Hallucination ? "
\83\8f\81[
\83I
\81I" : "
\82°
\81I
\93Ë
\91R",
534 See_invisible ? "
\8e©
\95ª
\8e©
\90g
\82ª
\82¿
\82á
\82ñ
\82Æ
\8c©
\82¦
\82È
\82
\82È
\82Á
\82½"
535 : "
\8e©
\95ª
\8e©
\90g
\82ª
\8c©
\82¦
\82È
\82
\82È
\82Á
\82½");
542 struct monst *mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy, NO_MM_FLAGS);
546 pline("This bottle turns out to be empty.");
548 pline("
\95r
\82Í
\8bó
\82Á
\82Û
\82¾
\82Á
\82½
\81D");
553 pline("As you open the bottle, %s emerges.", something);
555 pline("
\95r
\82ð
\8aJ
\82¯
\82é
\82Æ
\81C
\89½
\82©
\82ª
\8fo
\82Ä
\82«
\82½
\81D");
559 pline("As you open the bottle, an enormous %s emerges!",
560 Hallucination ? rndmonnam(NULL) : (const char *) "ghost");
562 pline("
\95r
\82ð
\8aJ
\82¯
\82é
\82Æ
\81C
\8b\90\91å
\82È%s
\82ª
\8fo
\82Ä
\82«
\82½
\81I",
563 Hallucination ? rndmonnam(NULL) : (const char *) "
\97H
\97ì");
567 You("are frightened to death, and unable to move.");
569 You("
\82Ü
\82Á
\82³
\82¨
\82É
\82È
\82Á
\82Ä
\8bÁ
\82«
\81C
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81D");
572 multi_reason = "being frightened to death";
574 multi_reason = "
\8e\80\82Ê
\82Ù
\82Ç
\8bÁ
\82¢
\82½
\8c\84\82É";
576 nomovemsg = "You regain your composure.";
578 nomovemsg = "
\82 \82È
\82½
\82Í
\95½
\90Ã
\82ð
\8eæ
\82è
\96ß
\82µ
\82½
\81D";
581 /* "Quaffing is like drinking, except you spill more." - Terry Pratchett */
585 register struct obj *otmp;
586 const char *potion_descr;
590 pline("If you can't breathe air, how can you drink liquid?");
592 pline("
\91§
\82à
\82Å
\82«
\82È
\82¢
\82Ì
\82É
\81C
\82Ç
\82¤
\82â
\82Á
\82Ä
\89t
\91Ì
\82ð
\88ù
\82Þ
\82ñ
\82¾
\82¢
\81H");
595 /* Is there a fountain to drink from here? */
596 if (IS_FOUNTAIN(levl[u.ux][u.uy].typ)
597 /* not as low as floor level but similar restrictions apply */
598 && can_reach_floor(FALSE)) {
600 if (yn("Drink from the fountain?") == 'y') {
602 if (yn("
\90ò
\82Ì
\90\85\82ð
\88ù
\82Ý
\82Ü
\82·
\82©
\81H") == 'y') {
607 /* Or a kitchen sink? */
608 if (IS_SINK(levl[u.ux][u.uy].typ)
609 /* not as low as floor level but similar restrictions apply */
610 && can_reach_floor(FALSE)) {
612 if (yn("Drink from the sink?") == 'y') {
614 if (yn("
\97¬
\82µ
\91ä
\82Ì
\90\85\82ð
\88ù
\82Ý
\82Ü
\82·
\82©
\81H") == 'y') {
619 /* Or are you surrounded by water? */
620 if (Underwater && !u.uswallow) {
622 if (yn("Drink the water around you?") == 'y') {
624 if (yn("
\82Ü
\82í
\82è
\82Ì
\90\85\82ð
\88ù
\82Ý
\82Ü
\82·
\82©
\81H") == 'y') {
626 pline("Do you know what lives in this water?");
628 pline("
\82±
\82Ì
\90\85\92\86\82Å
\89½
\82ª
\90¶
\82«
\82Ä
\82¢
\82é
\82Ì
\82©
\92m
\82Á
\82Ä
\82é
\82©
\82¢
\81H");
633 otmp = getobj(beverages, "drink");
637 /* quan > 1 used to be left to useup(), but we need to force
638 the current potion to be unworn, and don't want to do
639 that for the entire stack when starting with more than 1.
640 [Drinking a wielded potion of polymorph can trigger a shape
641 change which causes hero's weapon to be dropped. In 3.4.x,
642 that led to an "object lost" panic since subsequent useup()
643 was no longer dealing with an inventory item. Unwearing
644 the current potion is intended to keep it in inventory.] */
645 if (otmp->quan > 1L) {
646 otmp = splitobj(otmp, 1L);
647 otmp->owornmask = 0L; /* rest of original stuck unaffected */
648 } else if (otmp->owornmask) {
649 remove_worn_item(otmp, FALSE);
651 otmp->in_use = TRUE; /* you've opened the stopper */
653 potion_descr = OBJ_DESCR(objects[otmp->otyp]);
656 if (!strcmp(potion_descr, "milky")
658 if (!strcmp(potion_descr, "
\83~
\83\8b\83N
\90F
\82Ì")
659 && !(mvitals[PM_GHOST].mvflags & G_GONE)
660 && !rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_GHOST].born))) {
665 } else if (!strcmp(potion_descr, "smoky")
667 } else if (!strcmp(potion_descr, "
\89\8c\82ª
\82Å
\82Ä
\82¢
\82é")
668 && !(mvitals[PM_DJINNI].mvflags & G_GONE)
669 && !rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_DJINNI].born))) {
670 djinni_from_bottle(otmp);
675 return dopotion(otmp);
680 register struct obj *otmp;
686 if ((retval = peffects(otmp)) >= 0)
692 You("have a %s feeling for a moment, then it passes.",
693 Hallucination ? "normal" : "peculiar");
695 You("%s
\8bC
\95ª
\82É
\82¨
\82»
\82í
\82ê
\82½
\82ª
\81C
\82·
\82®
\82É
\8fÁ
\82¦
\82³
\82Á
\82½
\81D",
696 Hallucination ? "
\95\81\92Ê
\82Ì" : "
\93Æ
\93Á
\82È");
699 if (otmp->dknown && !objects[otmp->otyp].oc_name_known) {
701 makeknown(otmp->otyp);
702 more_experienced(0, 10);
703 } else if (!objects[otmp->otyp].oc_uname)
712 register struct obj *otmp;
714 register int i, ii, lim;
716 switch (otmp->otyp) {
717 case POT_RESTORE_ABILITY:
718 case SPE_RESTORE_ABILITY:
722 pline("Ulch! This makes you feel mediocre!");
724 pline("
\82¤
\81[
\82ñ
\81C
\82Ç
\82¤
\82à
\82³
\82¦
\82È
\82¢
\82È
\82 \81D");
727 /* unlike unicorn horn, overrides Fixed_abil */
729 pline("Wow! This makes you feel %s!",
731 ? (unfixable_trouble_count(FALSE) ? "better" : "great")
734 pline("
\83\8f\81[
\83I
\81I
\8bC
\95ª
\82ª%s
\82È
\82Á
\82½
\81I",
736 ? (unfixable_trouble_count(FALSE) ? "
\82¾
\82¢
\82Ô
\82æ
\82" : "
\82Æ
\82Ä
\82à
\82æ
\82")
739 i = rn2(A_MAX); /* start at a random point */
740 for (ii = 0; ii < A_MAX; ii++) {
742 /* this used to adjust 'lim' for A_STR when u.uhs was
743 WEAK or worse, but that's handled via ATEMP(A_STR) now */
744 if (ABASE(i) < lim) {
747 /* only first found if not blessed */
755 /* when using the potion (not the spell) also restore lost levels,
756 to make the potion more worth keeping around for players with
757 the spell or with a unihorn; this is better than full healing
758 in that it can restore all of them, not just half, and a
759 blessed potion restores them all at once */
760 if (otmp->otyp == POT_RESTORE_ABILITY && u.ulevel < u.ulevelmax) {
763 } while (u.ulevel < u.ulevelmax && otmp->blessed);
767 case POT_HALLUCINATION:
768 if (Hallucination || Halluc_resistance)
770 (void) make_hallucinated(itimeout_incr(HHallucination,
771 rn1(200, 600 - 300 * bcsign(otmp))),
775 if (!otmp->blessed && !otmp->cursed) {
777 pline("This tastes like %s.", hliquid("water"));
779 pline("%s
\82Ì
\82æ
\82¤
\82È
\96¡
\82ª
\82·
\82é
\81D", hliquid("
\90\85"));
780 u.uhunger += rnd(10);
785 if (is_undead(youmonst.data) || is_demon(youmonst.data)
786 || u.ualign.type == A_CHAOTIC) {
789 pline("This burns like %s!", hliquid("acid"));
791 pline("%s
\82Ì
\82æ
\82¤
\82É
\90ã
\82ª
\82Ð
\82è
\82Ð
\82è
\82·
\82é
\81I", hliquid("
\8e_"));
792 exercise(A_CON, FALSE);
793 if (u.ulycn >= LOW_PM) {
795 Your("affinity to %s disappears!",
797 Your("%s
\82Ö
\82Ì
\90e
\8bß
\8a´
\82Í
\82È
\82
\82È
\82Á
\82½
\81I",
798 makeplural(mons[u.ulycn].mname));
799 if (youmonst.data == &mons[u.ulycn])
801 set_ulycn(NON_PM); /* cure lycanthropy */
804 losehp(Maybe_Half_Phys(d(2, 6)), "potion of holy water",
806 losehp(Maybe_Half_Phys(d(2, 6)), "
\90¹
\90\85\82Å",
808 } else if (otmp->cursed) {
810 You_feel("quite proud of yourself.");
812 You("
\8e©
\91¸
\90S
\82ð
\8a´
\82¶
\82½
\81D");
813 healup(d(2, 6), 0, 0, 0);
814 if (u.ulycn >= LOW_PM && !Upolyd)
816 exercise(A_CON, TRUE);
821 You_feel("full of awe.");
823 You("
\88Ø
\95|
\82Ì
\94O
\82É
\82©
\82ç
\82ê
\82½
\81D");
824 make_sick(0L, (char *) 0, TRUE, SICK_ALL);
825 exercise(A_WIS, TRUE);
826 exercise(A_CON, TRUE);
827 if (u.ulycn >= LOW_PM)
828 you_unwere(TRUE); /* "Purified" */
829 /* make_confused(0L, TRUE); */
831 if (u.ualign.type == A_LAWFUL) {
833 pline("This burns like %s!", hliquid("acid"));
835 pline("%s
\82Ì
\82æ
\82¤
\82É
\90ã
\82ª
\82Ð
\82è
\82Ð
\82è
\82·
\82é
\81I", hliquid("
\8e_"));
837 losehp(Maybe_Half_Phys(d(2, 6)), "potion of unholy water",
839 losehp(Maybe_Half_Phys(d(2, 6)), "
\95s
\8fò
\82È
\90\85\82Å",
843 You_feel("full of dread.");
845 You("
\8b°
\95|
\82Ì
\94O
\82É
\82©
\82ç
\82ê
\82½
\81D");
846 if (u.ulycn >= LOW_PM && !Upolyd)
848 exercise(A_CON, FALSE);
855 pline("Ooph! This tastes like %s%s!",
856 otmp->odiluted ? "watered down " : "",
857 Hallucination ? "dandelion wine" : "liquid fire");
859 pline("
\82¤
\82¥
\82Á
\82Õ
\81I
\82±
\82ê
\82Í%s%s
\82Ì
\82æ
\82¤
\82È
\96¡
\82ª
\82·
\82é
\81I",
860 otmp->odiluted ? "
\90\85\82Å
\94\96\82ß
\82½" : "",
861 Hallucination ? "
\82½
\82ñ
\82Û
\82Û
\82Ì
\82¨
\8eð" : "
\94R
\97¿
\83I
\83C
\83\8b");
864 make_confused(itimeout_incr(HConfusion, d(3, 8)), FALSE);
865 /* the whiskey makes us feel better */
867 healup(1, 0, FALSE, FALSE);
868 u.uhunger += 10 * (2 + bcsign(otmp));
870 exercise(A_WIS, FALSE);
875 You("
\8bC
\90â
\82µ
\82½
\81D");
878 nomovemsg = "You awake with a headache.";
880 nomovemsg = "
\96Ú
\82ª
\82³
\82ß
\82½
\82ª
\93ª
\92É
\82ª
\82·
\82é
\81D";
883 case POT_ENLIGHTENMENT:
887 You("have an uneasy feeling...");
889 You("
\95s
\88À
\82È
\8bC
\8e\9d\82É
\82È
\82Á
\82½
\81D
\81D
\81D");
890 exercise(A_WIS, FALSE);
893 (void) adjattrib(A_INT, 1, FALSE);
894 (void) adjattrib(A_WIS, 1, FALSE);
897 You_feel("self-knowledgeable...");
899 You("
\8e©
\95ª
\8e©
\90g
\82ª
\94»
\82é
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D
\81D
\81D");
900 display_nhwindow(WIN_MESSAGE, FALSE);
901 enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
903 pline_The("feeling subsides.");
905 pline("
\82»
\82Ì
\8a´
\82¶
\82Í
\82È
\82
\82È
\82Á
\82½
\81D");
906 exercise(A_WIS, TRUE);
909 case SPE_INVISIBILITY:
910 /* spell cannot penetrate mummy wrapping */
911 if (BInvis && uarmc->otyp == MUMMY_WRAPPING) {
913 You_feel("rather itchy under %s.", yname(uarmc));
915 You("%s
\82Ì
\89º
\82ª
\83\80\83Y
\83\80\83Y
\82µ
\82½
\81D", xname(uarmc));
919 case POT_INVISIBILITY:
920 if (Invis || Blind || BInvis) {
923 self_invis_message();
926 HInvis |= FROMOUTSIDE;
928 incr_itimeout(&HInvis, rn1(15, 31));
929 newsym(u.ux, u.uy); /* update position */
932 pline("For some reason, you feel your presence is known.");
934 pline("
\82È
\82º
\82©
\81C
\91¶
\8dÝ
\82ª
\92m
\82ç
\82ê
\82Ä
\82¢
\82é
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D");
938 case POT_SEE_INVISIBLE: /* tastes like fruit juice in Rogue */
939 case POT_FRUIT_JUICE: {
940 int msg = Invisible && !Blind;
945 pline("Yecch! This tastes %s.",
946 Hallucination ? "overripe" : "rotten");
948 pline("
\83I
\83F
\81[
\81I
\82±
\82ê
\82Í%s
\83W
\83\85\81[
\83X
\82Ì
\96¡
\82ª
\82·
\82é
\81D",
949 Hallucination ? "
\8fn
\82µ
\82·
\82¬
\82½" : "
\95\85\82Á
\82½");
955 ? "This tastes like 10%% real %s%s all-natural beverage."
956 : "This tastes like %s%s.",
957 otmp->odiluted ? "reconstituted " : "", fruitname(TRUE));
961 ? "10%%%s
\82Ì
\8f\83\8e©
\91R
\88ù
\97¿
\82Ì
\82æ
\82¤
\82È
\96¡
\82ª
\82·
\82é
\81D"
962 : "%s%s
\83W
\83\85\81[
\83X
\82Ì
\82æ
\82¤
\82È
\96¡
\82ª
\82·
\82é
\81D",
963 otmp->odiluted ? "
\90¬
\95ª
\92²
\90®
\82³
\82ê
\82½" : "", fruitname(TRUE));
965 if (otmp->otyp == POT_FRUIT_JUICE) {
966 u.uhunger += (otmp->odiluted ? 5 : 10) * (2 + bcsign(otmp));
971 /* Tell them they can see again immediately, which
972 * will help them identify the potion...
974 make_blinded(0L, TRUE);
977 HSee_invisible |= FROMOUTSIDE;
979 incr_itimeout(&HSee_invisible, rn1(100, 750));
980 set_mimic_blocking(); /* do special mimic handling */
981 see_monsters(); /* see invisible monsters */
982 newsym(u.ux, u.uy); /* see yourself! */
983 if (msg && !Blind) { /* Blind possible if polymorphed */
985 You("can see through yourself, but you are visible!");
987 You("
\93§
\96¾
\82Å
\82 \82é
\81D
\82µ
\82©
\82µ
\8c©
\82¦
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81I");
995 You("stiffen momentarily.");
997 You("
\88ê
\8fu
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81D");
999 if (Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz))
1001 You("are motionlessly suspended.");
1003 You("
\8bó
\92\86\82Å
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81D");
1006 You("are frozen in place!");
1008 You("
\82»
\82Ì
\8fê
\82Å
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81I");
1011 Your("%s are frozen to the %s!", makeplural(body_part(FOOT)),
1012 surface(u.ux, u.uy));
1014 You("
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81I");
1016 nomul(-(rn1(10, 25 - 12 * bcsign(otmp))));
1018 multi_reason = "frozen by a potion";
1020 multi_reason = "
\96ò
\82Å
\8dd
\92¼
\82µ
\82Ä
\82¢
\82é
\8e\9e\82É";
1021 nomovemsg = You_can_move_again;
1022 exercise(A_DEX, FALSE);
1026 if (Sleep_resistance || Free_action) {
1030 You("
\82 \82
\82Ñ
\82ð
\82µ
\82½
\81D");
1033 You("suddenly fall asleep!");
1035 pline("
\93Ë
\91R
\96°
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I");
1036 fall_asleep(-rn1(10, 25 - 12 * bcsign(otmp)), TRUE);
1039 case POT_MONSTER_DETECTION:
1040 case SPE_DETECT_MONSTERS:
1041 if (otmp->blessed) {
1044 if (Detect_monsters)
1047 /* after a while, repeated uses become less effective */
1048 if ((HDetect_monsters & TIMEOUT) >= 300L)
1052 incr_itimeout(&HDetect_monsters, i);
1053 for (x = 1; x < COLNO; x++) {
1054 for (y = 0; y < ROWNO; y++) {
1055 if (levl[x][y].glyph == GLYPH_INVISIBLE) {
1066 You_feel("lonely.");
1068 You("
\90S
\8d×
\82
\82È
\82Á
\82½
\81D");
1071 if (monster_detect(otmp, 0))
1072 return 1; /* nothing detected */
1073 exercise(A_WIS, TRUE);
1075 case POT_OBJECT_DETECTION:
1076 case SPE_DETECT_TREASURE:
1077 if (object_detect(otmp, 0))
1078 return 1; /* nothing detected */
1079 exercise(A_WIS, TRUE);
1083 pline("Yecch! This stuff tastes like poison.");
1085 pline("
\83E
\83F
\81[
\81I
\93Å
\82Ì
\82æ
\82¤
\82È
\96¡
\82ª
\82·
\82é
\81D");
1086 if (otmp->blessed) {
1088 pline("(But in fact it was mildly stale %s.)", fruitname(TRUE));
1090 pline("(
\82µ
\82©
\82µ
\8eÀ
\8dÛ
\82»
\82ê
\82Í
\8f
\82µ
\8cÃ
\82
\82È
\82Á
\82½%s
\81D)", fruitname(TRUE));
1091 if (!Role_if(PM_HEALER)) {
1092 /* NB: blessed otmp->fromsink is not possible */
1094 losehp(1, "mildly contaminated potion", KILLED_BY_AN);
1096 losehp(1, "
\95a
\8bC
\82É
\89\98\90õ
\82³
\82ê
\82½
\96ò
\82Å", KILLED_BY_AN);
1099 if (Poison_resistance)
1101 pline("(But in fact it was biologically contaminated %s.)",
1103 pline("(
\82µ
\82©
\82µ
\8eÀ
\8dÛ
\82»
\82ê
\82Í
\90¶
\95¨
\8aw
\93I
\82É
\89\98\90õ
\82³
\82ê
\82½%s
\82¾
\81D)",
1105 if (Role_if(PM_HEALER)) {
1107 pline("Fortunately, you have been immunized.");
1109 pline("
\8dK
\89^
\82È
\82±
\82Æ
\82É
\81C
\82 \82È
\82½
\82Í
\96Æ
\89u
\82ª
\82 \82é
\81D");
1111 char contaminant[BUFSZ];
1112 int typ = rn2(A_MAX);
1115 Sprintf(contaminant, "%s%s",
1116 (Poison_resistance) ? "mildly " : "",
1117 (otmp->fromsink) ? "contaminated tap water"
1118 : "contaminated potion");
1120 Sprintf(contaminant, "%s
\89\98\90õ
\82³
\82ê
\82½%s
\82Å",
1121 (Poison_resistance) ? "
\8f
\82µ" : "",
1122 (otmp->fromsink) ? "
\90\85"
1126 poisontell(typ, FALSE);
1127 (void) adjattrib(typ, Poison_resistance ? -1 : -rn1(4, 3),
1130 if (!Poison_resistance) {
1132 losehp(rnd(10) + 5 * !!(otmp->cursed), contaminant,
1135 losehp(rnd(10) + 5 * !!(otmp->cursed), contaminant,
1138 /* rnd loss is so that unblessed poorer than blessed */
1139 losehp(1 + rn2(2), contaminant,
1140 (otmp->fromsink) ? KILLED_BY : KILLED_BY_AN);
1142 exercise(A_CON, FALSE);
1145 if (Hallucination) {
1147 You("are shocked back to your senses!");
1149 You("
\8cÜ
\8a´
\82É
\8fÕ
\8c\82\82ð
\8eó
\82¯
\82½
\81I");
1150 (void) make_hallucinated(0L, FALSE, 0L);
1155 if (Hallucination) {
1157 pline("What a trippy feeling!");
1159 pline("
\82È
\82ñ
\82©
\83w
\83\8d\83w
\83\8d\82·
\82é
\81I");
1163 pline("Huh, What? Where am I?");
1165 pline("
\82Ù
\82¦
\81H
\8e\84\82Í
\92N
\81H");
1168 make_confused(itimeout_incr(HConfusion,
1169 rn1(7, 16 - 8 * bcsign(otmp))),
1172 case POT_GAIN_ABILITY:
1175 pline("Ulch! That potion tasted foul!");
1177 pline("
\83E
\83F
\81I
\88«
\8fL
\82ª
\82·
\82é
\81I");
1179 } else if (Fixed_abil) {
1181 } else { /* If blessed, increase all; if not, try up to */
1182 int itmp; /* 6 times to find one which can be increased. */
1184 i = -1; /* increment to 0 */
1185 for (ii = A_MAX; ii > 0; ii--) {
1186 i = (otmp->blessed ? i + 1 : rn2(A_MAX));
1187 /* only give "your X is already as high as it can get"
1188 message on last attempt (except blessed potions) */
1189 itmp = (otmp->blessed || ii == 1) ? 0 : -1;
1190 if (adjattrib(i, 1, itmp) && !otmp->blessed)
1196 /* skip when mounted; heal_legs() would heal steed's legs */
1197 if (Wounded_legs && !otmp->cursed && !u.usteed) {
1203 case SPE_HASTE_SELF:
1204 if (!Very_fast) { /* wwf@doe.carleton.ca */
1206 You("are suddenly moving %sfaster.", Fast ? "" : "much ");
1208 You("
\93Ë
\91R%s
\91¬
\82
\88Ú
\93®
\82Å
\82«
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81D", Fast ? "" : "
\82Æ
\82Ä
\82à");
1211 Your("%s get new energy.", makeplural(body_part(LEG)));
1213 pline("%s
\82É
\83G
\83l
\83\8b\83M
\81[
\82ª
\92\8d\82¬
\82±
\82Ü
\82ê
\82é
\82æ
\82¤
\82È
\8a´
\82¶
\82ª
\82µ
\82½
\81D", body_part(LEG));
1216 exercise(A_DEX, TRUE);
1217 incr_itimeout(&HFast, rn1(10, 100 + 60 * bcsign(otmp)));
1222 make_blinded(itimeout_incr(Blinded,
1223 rn1(200, 250 - 125 * bcsign(otmp))),
1226 case POT_GAIN_LEVEL:
1229 /* they went up a level */
1230 if ((ledger_no(&u.uz) == 1 && u.uhave.amulet)
1231 || Can_rise_up(u.ux, u.uy, &u.uz)) {
1233 const char *riseup = "rise up, through the %s!";
1235 const char *riseup ="%s
\82ð
\93Ë
\82«
\94²
\82¯
\82½
\81I";
1237 if (ledger_no(&u.uz) == 1) {
1238 You(riseup, ceiling(u.ux, u.uy));
1239 goto_level(&earth_level, FALSE, FALSE, FALSE);
1241 register int newlev = depth(&u.uz) - 1;
1244 get_level(&newlevel, newlev);
1245 if (on_level(&newlevel, &u.uz)) {
1247 pline("It tasted bad.");
1249 pline("
\82Æ
\82Ä
\82à
\82Ü
\82¸
\82¢
\81D");
1252 You(riseup, ceiling(u.ux, u.uy));
1253 goto_level(&newlevel, FALSE, FALSE, FALSE);
1257 You("have an uneasy feeling.");
1259 You("
\95s
\88À
\82È
\8bC
\8e\9d\82É
\82È
\82Á
\82½
\81D");
1263 /* blessed potions place you at a random spot in the
1264 middle of the new level instead of the low point */
1266 u.uexp = rndexp(TRUE);
1270 You_feel("better.");
1272 You("
\8bC
\95ª
\82ª
\82æ
\82
\82È
\82Á
\82½
\81D");
1273 healup(d(6 + 2 * bcsign(otmp), 4), !otmp->cursed ? 1 : 0,
1274 !!otmp->blessed, !otmp->cursed);
1275 exercise(A_CON, TRUE);
1277 case POT_EXTRA_HEALING:
1279 You_feel("much better.");
1281 You("
\8bC
\95ª
\82ª
\82Æ
\82Ä
\82à
\82æ
\82
\82È
\82Á
\82½
\81D");
1282 healup(d(6 + 2 * bcsign(otmp), 8),
1283 otmp->blessed ? 5 : !otmp->cursed ? 2 : 0, !otmp->cursed,
1285 (void) make_hallucinated(0L, TRUE, 0L);
1286 exercise(A_CON, TRUE);
1287 exercise(A_STR, TRUE);
1289 case POT_FULL_HEALING:
1291 You_feel("completely healed.");
1293 You("
\8a®
\91S
\82É
\89ñ
\95\9c\82µ
\82½
\81D");
1294 healup(400, 4 + 4 * bcsign(otmp), !otmp->cursed, TRUE);
1295 /* Restore one lost level if blessed */
1296 if (otmp->blessed && u.ulevel < u.ulevelmax) {
1297 /* when multiple levels have been lost, drinking
1298 multiple potions will only get half of them back */
1302 (void) make_hallucinated(0L, TRUE, 0L);
1303 exercise(A_STR, TRUE);
1304 exercise(A_CON, TRUE);
1306 case POT_LEVITATION:
1307 case SPE_LEVITATION:
1309 * BLevitation will be set if levitation is blocked due to being
1310 * inside rock (currently or formerly in phazing xorn form, perhaps)
1311 * but it doesn't prevent setting or incrementing Levitation timeout
1312 * (which will take effect after escaping from the rock if it hasn't
1315 if (!Levitation && !BLevitation) {
1316 /* kludge to ensure proper operation of float_up() */
1317 set_itimeout(&HLevitation, 1L);
1319 /* This used to set timeout back to 0, then increment it below
1320 for blessed and uncursed effects. But now we leave it so
1321 that cursed effect yields "you float down" on next turn.
1322 Blessed and uncursed get one extra turn duration. */
1323 } else /* already levitating, or can't levitate */
1327 /* 'already levitating' used to block the cursed effect(s)
1328 aside from ~I_SPECIAL; it was not clear whether that was
1329 intentional; either way, it no longer does (as of 3.6.1) */
1330 HLevitation &= ~I_SPECIAL; /* can't descend upon demand */
1332 ; /* rising via levitation is blocked */
1333 } else if ((u.ux == xupstair && u.uy == yupstair)
1334 || (sstairs.up && u.ux == sstairs.sx && u.uy == sstairs.sy)
1335 || (xupladder && u.ux == xupladder && u.uy == yupladder)) {
1337 /* in case we're already Levitating, which would have
1338 resulted in incrementing 'nothing' */
1339 nothing = 0; /* not nothing after all */
1340 } else if (has_ceiling(&u.uz)) {
1341 int dmg = rnd(!uarmh ? 10 : !is_metallic(uarmh) ? 6 : 3);
1344 You("hit your %s on the %s.", body_part(HEAD),
1345 ceiling(u.ux, u.uy));
1347 You("%s
\82ð%s
\82É
\82Ô
\82Â
\82¯
\82½
\81D", body_part(HEAD),
1348 ceiling(u.ux,u.uy));
1351 losehp(Maybe_Half_Phys(dmg), "colliding with the ceiling",
1353 losehp(Maybe_Half_Phys(dmg), "
\93V
\88ä
\82É
\93ª
\82ð
\82Ô
\82Â
\82¯
\82Ä",
1355 nothing = 0; /* not nothing after all */
1357 } else if (otmp->blessed) {
1358 /* at this point, timeout is already at least 1 */
1359 incr_itimeout(&HLevitation, rn1(50, 250));
1360 /* can descend at will (stop levitating via '>') provided timeout
1361 is the only factor (ie, not also wearing Lev ring or boots) */
1362 HLevitation |= I_SPECIAL;
1363 } else /* timeout is already at least 1 */
1364 incr_itimeout(&HLevitation, rn1(140, 10));
1366 if (Levitation && IS_SINK(levl[u.ux][u.uy].typ))
1368 /* levitating blocks flying */
1371 case POT_GAIN_ENERGY: { /* M. Stephenson */
1376 You_feel("lackluster.");
1378 You("
\88Ó
\8bC
\8fÁ
\92¾
\82µ
\82½
\81D");
1381 pline("Magical energies course through your body.");
1383 pline("
\96\82\96@
\82Ì
\83G
\83l
\83\8b\83M
\81[
\82ª
\82 \82È
\82½
\82Ì
\91Ì
\82É
\96\9e\82¿
\82½
\81D");
1385 /* old: num = rnd(5) + 5 * otmp->blessed + 1;
1386 * blessed: +7..11 max & current (+9 avg)
1387 * uncursed: +2.. 6 max & current (+4 avg)
1388 * cursed: -2.. 6 max & current (-4 avg)
1390 * blessed: +3..18 max (+10.5 avg), +9..54 current (+31.5 avg)
1391 * uncursed: +2..12 max (+ 7 avg), +6..36 current (+21 avg)
1392 * cursed: -1.. 6 max (- 3.5 avg), -3..18 current (-10.5 avg)
1394 num = d(otmp->blessed ? 3 : !otmp->cursed ? 2 : 1, 6);
1396 num = -num; /* subtract instead of add when cursed */
1401 if (u.uen > u.uenmax)
1403 else if (u.uen <= 0)
1406 exercise(A_WIS, TRUE);
1409 case POT_OIL: { /* P. Winner */
1410 boolean good_for_you = FALSE;
1412 if (otmp->lamplit) {
1413 if (likes_fire(youmonst.data)) {
1415 pline("Ahh, a refreshing drink.");
1417 pline("
\82í
\81[
\82¨
\81C
\90¶
\82«
\95Ô
\82é
\81D");
1418 good_for_you = TRUE;
1421 You("burn your %s.", body_part(FACE));
1423 Your("%s
\82Í
\8d\95\8fÅ
\82°
\82É
\82È
\82Á
\82½
\81D", body_part(FACE));
1426 losehp(d(Fire_resistance ? 1 : 3, 4), "burning potion of oil",
1428 losehp(d(Fire_resistance ? 1 : 3, 4), "
\94R
\82¦
\82Ä
\82¢
\82é
\96û
\82ð
\88ù
\82ñ
\82Å",
1431 } else if (otmp->cursed)
1433 pline("This tastes like castor oil.");
1435 pline("
\82Ð
\82Ü
\82µ
\96û
\82Ì
\82æ
\82¤
\82È
\96¡
\82ª
\82·
\82é
\81D");
1438 pline("That was smooth!");
1440 pline("
\8cû
\82 \82½
\82è
\82ª
\82æ
\82¢
\81I");
1441 exercise(A_WIS, good_for_you);
1445 if (Acid_resistance) {
1446 /* Not necessarily a creature who _likes_ acid */
1448 pline("This tastes %s.", Hallucination ? "tangy" : "sour");
1450 pline("%s
\96¡
\82ª
\82·
\82é
\81D", Hallucination ? "
\82Ò
\82è
\82Á
\82Æ
\82µ
\82½" : "
\8e_
\82Ì");
1455 pline("This burns%s!",
1456 otmp->blessed ? " a little" : otmp->cursed ? " a lot"
1459 pline("%s
\8fÅ
\82°
\82½
\81I",
1460 otmp->blessed ? "
\8f
\82µ" : otmp->cursed ? "
\82·
\82²
\82"
1463 dmg = d(otmp->cursed ? 2 : 1, otmp->blessed ? 4 : 8);
1465 losehp(Maybe_Half_Phys(dmg), "potion of acid", KILLED_BY_AN);
1467 losehp(Maybe_Half_Phys(dmg), "
\8e_
\82Ì
\96ò
\82ð
\88ù
\82ñ
\82Å", KILLED_BY_AN);
1468 exercise(A_CON, FALSE);
1471 fix_petrification();
1472 unkn++; /* holy/unholy water can burn like acid too */
1476 You_feel("a little %s.", Hallucination ? "normal" : "strange");
1478 You("
\8f
\82µ%s
\82È
\8a´
\82¶
\82ª
\82µ
\82½
\81D", Hallucination ? "
\95\81\92Ê" : "
\95Ï");
1483 impossible("What a funny potion! (%u)", otmp->otyp);
1491 make_totter(xtime, talk)
1492 long xtime; /* nonzero if this is an attempt to turn on hallucination */
1495 const char *message = 0;
1498 message = "
\95û
\8cü
\8a´
\8ao
\82ª
\90³
\8fí
\82É
\82È
\82Á
\82½
\81D";
1500 message = "
\95û
\8cü
\8a´
\8ao
\82ª
\96\83á
\83\82µ
\82½
\81D";
1502 set_itimeout(&Totter, xtime);
1508 healup(nhp, nxtra, curesick, cureblind)
1510 register boolean curesick, cureblind;
1516 u.mh = (u.mhmax += nxtra);
1519 if (u.uhp > u.uhpmax)
1520 u.uhp = (u.uhpmax += nxtra);
1524 /* 3.6.1: it's debatible whether healing magic should clean off
1525 mundane 'dirt', but if it doesn't, blindness isn't cured */
1527 make_blinded(0L, TRUE);
1528 /* heal deafness too */
1529 make_deaf(0L, TRUE);
1532 make_vomiting(0L, TRUE);
1533 make_sick(0L, (char *) 0, TRUE, SICK_ALL);
1540 strange_feeling(obj, txt)
1544 if (flags.beginner || !txt)
1546 You("have a %s feeling for a moment, then it passes.",
1547 Hallucination ? "normal" : "strange");
1549 You("%s
\8bC
\95ª
\82É
\82¨
\82»
\82í
\82ê
\82½
\82ª
\81C
\82·
\82®
\82É
\8fÁ
\82¦
\82³
\82Á
\82½
\81D",
1550 Hallucination ? "
\95\81\92Ê
\82Ì" : "
\8aï
\96
\82È");
1555 if (!obj) /* e.g., crystal ball finds no traps */
1558 if (obj->dknown && !objects[obj->otyp].oc_name_known
1559 && !objects[obj->otyp].oc_uname)
1566 const char *bottlenames[] = { "bottle", "phial", "flagon", "carafe",
1567 "flask", "jar", "vial" };
1569 const char *bottlenames[] = { "
\95r", "àÞ
\97\9e\95r", "
\88ê
\8f¡
\95r", "
\90\85\8d·
\82µ",
1570 "
\83t
\83\89\83X
\83R", "
\92Ù", "
\83K
\83\89\83X
\95r" };
1576 return bottlenames[rn2(SIZE(bottlenames))];
1579 /* handle item dipped into water potion or steed saddle splashed by same */
1581 H2Opotion_dip(potion, targobj, useeit, objphrase)
1582 struct obj *potion, *targobj;
1584 const char *objphrase; /* "Your widget glows" or "Steed's saddle glows" */
1586 void FDECL((*func), (OBJ_P)) = 0;
1587 const char *glowcolor = 0;
1588 #define COST_alter (-2)
1589 #define COST_none (-1)
1590 int costchange = COST_none;
1591 boolean altfmt = FALSE, res = FALSE;
1593 if (!potion || potion->otyp != POT_WATER)
1596 if (potion->blessed) {
1597 if (targobj->cursed) {
1599 glowcolor = NH_AMBER;
1600 costchange = COST_UNCURS;
1601 } else if (!targobj->blessed) {
1603 glowcolor = NH_LIGHT_BLUE;
1604 costchange = COST_alter;
1605 altfmt = TRUE; /* "with a <color> aura" */
1607 } else if (potion->cursed) {
1608 if (targobj->blessed) {
1611 glowcolor = "brown";
1613 glowcolor = "
\92\83\90F
\82Ì";
1614 costchange = COST_UNBLSS;
1615 } else if (!targobj->cursed) {
1617 glowcolor = NH_BLACK;
1618 costchange = COST_alter;
1622 /* dipping into uncursed water; carried() check skips steed saddle */
1623 if (carried(targobj)) {
1624 if (water_damage(targobj, 0, TRUE) != ER_NOTHING)
1629 /* give feedback before altering the target object;
1630 this used to set obj->bknown even when not seeing
1631 the effect; now hero has to see the glow, and bknown
1632 is cleared instead of set if perception is distorted */
1634 glowcolor = hcolor(glowcolor);
1635 /*JP:3.6.0
\8e\9e\93_
\82Å
\82Í
\93®
\8e\8c\82Í"glow"
\82¾
\82¯
\82È
\82Ì
\82Å
\8c\88\82ß
\8c\82\82¿*/
1638 pline("%s with %s aura.", objphrase, an(glowcolor));
1640 pline("%s
\82Í%s
\83I
\81[
\83\89\82É
\82Â
\82Â
\82Ü
\82ê
\82½
\81D", objphrase, glowcolor);
1644 pline("%s %s.", objphrase, glowcolor);
1646 pline("%s
\82Í%s
\8bP
\82¢
\82½
\81D", objphrase, jconj_adj(glowcolor));
1648 iflags.last_msg = PLNMSG_OBJ_GLOWS;
1649 targobj->bknown = !Hallucination;
1651 /* potions of water are the only shop goods whose price depends
1652 on their curse/bless state */
1653 if (targobj->unpaid && targobj->otyp == POT_WATER) {
1654 if (costchange == COST_alter)
1655 /* added blessing or cursing; update shop
1656 bill to reflect item's new higher price */
1657 alter_cost(targobj, 0L);
1658 else if (costchange != COST_none)
1659 /* removed blessing or cursing; you
1660 degraded it, now you'll have to buy it... */
1661 costly_alteration(targobj, costchange);
1663 /* finally, change curse/bless state */
1670 /* potion obj hits monster mon, which might be youmonst; obj always used up */
1672 potionhit(mon, obj, how)
1677 const char *botlnam = bottlename();
1678 boolean isyou = (mon == &youmonst);
1679 int distance, tx, ty;
1680 struct obj *saddle = (struct obj *) 0;
1681 boolean hit_saddle = FALSE, your_fault = (how <= POTHIT_HERO_THROW);
1684 tx = u.ux, ty = u.uy;
1687 pline_The("%s crashes on your %s and breaks into shards.", botlnam,
1690 pline("%s
\82ª
\82 \82È
\82½
\82Ì%s
\82Ì
\8fã
\82Å
\89ó
\82ê
\94j
\95Ð
\82Æ
\82È
\82Á
\82½
\81D", botlnam,
1694 losehp(Maybe_Half_Phys(rnd(2)),
1695 (how == POTHIT_OTHER_THROW) ? "propelled potion" /* scatter */
1698 #else /*
\82Ç
\82¿
\82ç
\82à
\81u
\93\8a\82°
\82ç
\82ê
\82½
\81v
\82Å
\82æ
\82¢*/
1699 losehp(Maybe_Half_Phys(rnd(2)), "
\93\8a\82°
\82ç
\82ê
\82½
\96ò
\82Å", KILLED_BY_AN);
1702 tx = mon->mx, ty = mon->my;
1703 /* sometimes it hits the saddle */
1704 if (((mon->misc_worn_check & W_SADDLE)
1705 && (saddle = which_armor(mon, W_SADDLE)))
1707 || (obj->otyp == POT_WATER
1708 && ((rnl(10) > 7 && obj->cursed)
1709 || (rnl(10) < 4 && obj->blessed) || !rn2(3)))))
1711 distance = distu(tx, ty);
1712 if (!cansee(tx, ty)) {
1716 pline("
\83K
\83V
\83\83\83\93\81I");
1718 char *mnam = mon_nam(mon);
1721 if (hit_saddle && saddle) {
1723 Sprintf(buf, "%s saddle",
1724 s_suffix(x_monnam(mon, ARTICLE_THE, (char *) 0,
1725 (SUPPRESS_IT | SUPPRESS_SADDLE),
1728 Sprintf(buf, "%s
\82Ì
\88Æ",
1729 x_monnam(mon, ARTICLE_THE, (char *) 0,
1730 (SUPPRESS_IT | SUPPRESS_SADDLE),
1733 } else if (has_head(mon->data)) {
1735 Sprintf(buf, "%s %s", s_suffix(mnam),
1736 (notonhead ? "body" : "head"));
1738 Sprintf(buf, "%s
\82Ì%s", mnam,
1739 (notonhead ? "
\91Ì" : "
\93ª"));
1745 pline_The("%s crashes on %s and breaks into shards.", botlnam,
1748 pline("%s
\82ª%s
\82Ì
\8fã
\82Å
\89ó
\82ê
\94j
\95Ð
\82Æ
\82È
\82Á
\82½
\81D", botlnam,
1752 if (rn2(5) && mon->mhp > 1 && !hit_saddle)
1756 /* oil doesn't instantly evaporate; Neither does a saddle hit */
1757 if (obj->otyp != POT_OIL && !hit_saddle && cansee(tx, ty))
1759 pline("%s.", Tobjnam(obj, "evaporate"));
1761 pline("%s
\82Í
\8fö
\94
\82µ
\82½
\81D", xname(obj));
1764 switch (obj->otyp) {
1767 explode_oil(obj, u.ux, u.uy);
1771 You_feel("a little %s.", Hallucination ? "normal" : "strange");
1773 You("%s
\82È
\8a´
\82¶
\82ª
\82µ
\82½
\81D", Hallucination ? "
\95\81\92Ê" : "
\95Ï");
1774 if (!Unchanging && !Antimagic)
1778 if (!Acid_resistance) {
1782 pline("This burns%s!",
1783 obj->blessed ? " a little"
1784 : obj->cursed ? " a lot" : "");
1786 pline("%s
\94R
\82¦
\82½
\81I",
1787 obj->blessed ? "
\8f
\82µ"
1788 : obj->cursed ? "
\82Í
\82°
\82µ
\82" : "");
1790 dmg = d(obj->cursed ? 2 : 1, obj->blessed ? 4 : 8);
1792 losehp(Maybe_Half_Phys(dmg), "potion of acid", KILLED_BY_AN);
1794 losehp(Maybe_Half_Phys(dmg), "
\8e_
\82Ì
\96ò
\82ð
\97\81\82Ñ
\82Ä", KILLED_BY_AN);
1798 } else if (hit_saddle && saddle) {
1799 char *mnam, buf[BUFSZ], saddle_glows[BUFSZ];
1800 boolean affected = FALSE;
1801 boolean useeit = !Blind && canseemon(mon) && cansee(tx, ty);
1803 mnam = x_monnam(mon, ARTICLE_THE, (char *) 0,
1804 (SUPPRESS_IT | SUPPRESS_SADDLE), FALSE);
1805 Sprintf(buf, "%s", upstart(s_suffix(mnam)));
1807 switch (obj->otyp) {
1810 Sprintf(saddle_glows, "%s %s", buf, aobjnam(saddle, "glow"));
1812 Sprintf(saddle_glows, "%s", buf);
1813 affected = H2Opotion_dip(obj, saddle, useeit, saddle_glows);
1816 /* Do we allow the saddle to polymorph? */
1819 if (useeit && !affected)
1821 pline("%s %s wet.", buf, aobjnam(saddle, "get"));
1823 pline("%s
\82Í
\94G
\82ê
\82½
\81D", buf);
1825 boolean angermon = your_fault, cureblind = FALSE;
1827 switch (obj->otyp) {
1828 case POT_FULL_HEALING:
1831 case POT_EXTRA_HEALING:
1838 if (mon->data == &mons[PM_PESTILENCE])
1841 case POT_RESTORE_ABILITY:
1842 case POT_GAIN_ABILITY:
1845 if (mon->mhp < mon->mhpmax) {
1846 mon->mhp = mon->mhpmax;
1849 pline("%s looks sound and hale again.", Monnam(mon));
1851 pline("%s
\82Í
\8c³
\8bC
\82É
\82È
\82Á
\82½
\82æ
\82¤
\82É
\8c©
\82¦
\82é
\81D", Monnam(mon));
1854 mcureblindness(mon, canseemon(mon));
1857 if (mon->data == &mons[PM_PESTILENCE])
1859 if (dmgtype(mon->data, AD_DISE)
1860 /* won't happen, see prior goto */
1861 || dmgtype(mon->data, AD_PEST)
1862 /* most common case */
1863 || resists_poison(mon)) {
1866 pline("%s looks unharmed.", Monnam(mon));
1868 pline("%s
\82Í
\82È
\82ñ
\82Æ
\82à
\82È
\82¢
\82æ
\82¤
\82¾
\81D", Monnam(mon));
1873 if ((mon->mhpmax > 3) && !resist(mon, POTION_CLASS, 0, NOTELL))
1875 if ((mon->mhp > 2) && !resist(mon, POTION_CLASS, 0, NOTELL))
1877 if (mon->mhp > mon->mhpmax)
1878 mon->mhp = mon->mhpmax;
1881 pline("%s looks rather ill.", Monnam(mon));
1883 pline("%s
\82Í
\95a
\8bC
\82Á
\82Û
\82
\8c©
\82¦
\82é
\81D", Monnam(mon));
1887 if (!resist(mon, POTION_CLASS, 0, NOTELL))
1890 case POT_INVISIBILITY: {
1891 boolean sawit = canspotmon(mon);
1894 mon_set_minvis(mon);
1895 if (sawit && !canspotmon(mon) && cansee(mon->mx, mon->my))
1896 map_invisible(mon->mx, mon->my);
1900 /* wakeup() doesn't rouse victims of temporary sleep */
1901 if (sleep_monst(mon, rnd(12), POTION_CLASS)) {
1903 pline("%s falls asleep.", Monnam(mon));
1905 pline("%s
\82Í
\96°
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½
\81D", Monnam(mon));
1910 if (mon->mcanmove) {
1911 /* really should be rnd(5) for consistency with players
1912 * breathing potions, but...
1914 paralyze_monst(mon, rnd(25));
1919 mon_adjust_speed(mon, 1, obj);
1922 if (haseyes(mon->data)) {
1923 int btmp = 64 + rn2(32)
1924 + rn2(32) * !resist(mon, POTION_CLASS, 0, NOTELL);
1926 btmp += mon->mblinded;
1927 mon->mblinded = min(btmp, 127);
1932 if (is_undead(mon->data) || is_demon(mon->data)
1933 || is_were(mon->data) || is_vampshifter(mon)) {
1936 pline("%s %s in pain!", Monnam(mon),
1937 is_silent(mon->data) ? "writhes" : "shrieks");
1939 pline("%s
\82Í
\8bê
\92É%s
\81I", Monnam(mon),
1940 is_silent(mon->data) ? "
\82É
\90g
\82à
\82¾
\82¦
\82µ
\82½" : "
\82Ì
\8b©
\82Ñ
\90º
\82ð
\82 \82°
\82½");
1942 if (!is_silent(mon->data))
1943 wake_nearto(tx, ty, mon->data->mlevel * 10);
1944 mon->mhp -= d(2, 6);
1945 /* should only be by you */
1946 if (DEADMONSTER(mon))
1948 else if (is_were(mon->data) && !is_human(mon->data))
1949 new_were(mon); /* revert to human */
1950 } else if (obj->cursed) {
1954 pline("%s looks healthier.", Monnam(mon));
1956 pline("%s
\82Í
\82æ
\82è
\8c³
\8bC
\82É
\82È
\82Á
\82½
\82æ
\82¤
\82É
\8c©
\82¦
\82é
\81D", Monnam(mon));
1957 mon->mhp += d(2, 6);
1958 if (mon->mhp > mon->mhpmax)
1959 mon->mhp = mon->mhpmax;
1960 if (is_were(mon->data) && is_human(mon->data)
1961 && !Protection_from_shape_changers)
1962 new_were(mon); /* transform into beast */
1964 } else if (mon->data == &mons[PM_GREMLIN]) {
1966 (void) split_mon(mon, (struct monst *) 0);
1967 } else if (mon->data == &mons[PM_IRON_GOLEM]) {
1970 pline("%s rusts.", Monnam(mon));
1972 pline("%s
\82Í
\8eK
\82Ñ
\82½
\81D", Monnam(mon));
1973 mon->mhp -= d(1, 6);
1974 /* should only be by you */
1975 if (DEADMONSTER(mon))
1981 explode_oil(obj, tx, ty);
1984 if (!resists_acid(mon) && !resist(mon, POTION_CLASS, 0, NOTELL)) {
1986 pline("%s %s in pain!", Monnam(mon),
1987 is_silent(mon->data) ? "writhes" : "shrieks");
1989 pline("%s
\82Í
\8bê
\92É%s
\81I", Monnam(mon),
1990 is_silent(mon->data) ? "
\82É
\90g
\82à
\82¾
\82¦
\82µ
\82½" : "
\82Ì
\8b©
\82Ñ
\90º
\82ð
\82 \82°
\82½");
1992 if (!is_silent(mon->data))
1993 wake_nearto(tx, ty, mon->data->mlevel * 10);
1994 mon->mhp -= d(obj->cursed ? 2 : 1, obj->blessed ? 4 : 8);
1995 if (DEADMONSTER(mon)) {
1999 monkilled(mon, "", AD_ACID);
2004 (void) bhitm(mon, obj);
2007 case POT_GAIN_LEVEL:
2008 case POT_LEVITATION:
2009 case POT_FRUIT_JUICE:
2010 case POT_MONSTER_DETECTION:
2011 case POT_OBJECT_DETECTION:
2015 /* target might have been killed */
2016 if (!DEADMONSTER(mon)) {
2024 /* Note: potionbreathe() does its own docall() */
2025 if ((distance == 0 || (distance < 3 && rn2(5)))
2026 && (!breathless(youmonst.data) || haseyes(youmonst.data)))
2028 else if (obj->dknown && !objects[obj->otyp].oc_name_known
2029 && !objects[obj->otyp].oc_uname && cansee(tx, ty))
2032 if (*u.ushops && obj->unpaid) {
2033 struct monst *shkp = shop_keeper(*in_rooms(u.ux, u.uy, SHOPBASE));
2035 /* neither of the first two cases should be able to happen;
2036 only the hero should ever have an unpaid item, and only
2037 when inside a tended shop */
2038 if (!shkp) /* if shkp was killed, unpaid ought to cleared already */
2040 else if (context.mon_moving) /* obj thrown by monster */
2041 subfrombill(obj, shkp);
2042 else /* obj thrown by hero */
2043 (void) stolen_value(obj, u.ux, u.uy, (boolean) shkp->mpeaceful,
2046 obfree(obj, (struct obj *) 0);
2049 /* vapors are inhaled or get in your eyes */
2052 register struct obj *obj;
2054 int i, ii, isdone, kn = 0;
2055 boolean cureblind = FALSE;
2057 /* potion of unholy water might be wielded; prevent
2058 you_were() -> drop_weapon() from dropping it so that it
2059 remains in inventory where our caller expects it to be */
2062 switch (obj->otyp) {
2063 case POT_RESTORE_ABILITY:
2064 case POT_GAIN_ABILITY:
2066 if (!breathless(youmonst.data))
2068 pline("Ulch! That potion smells terrible!");
2070 pline("
\83E
\83Q
\83F
\81I
\96ò
\82Í
\82à
\82Ì
\82·
\82²
\82¢
\93õ
\82¢
\82ª
\82·
\82é
\81I");
2071 else if (haseyes(youmonst.data)) {
2073 const char *eyes = body_part(EYE);
2075 if (eyecount(youmonst.data) != 1)
2076 eyes = makeplural(eyes);
2077 Your("%s %s!", eyes, vtense(eyes, "sting"));
2079 Your("%s
\82ª
\82¸
\82«
\82¸
\82«
\82·
\82é
\81I", body_part(EYE));
2084 i = rn2(A_MAX); /* start at a random point */
2085 for (isdone = ii = 0; !isdone && ii < A_MAX; ii++) {
2086 if (ABASE(i) < AMAX(i)) {
2088 /* only first found if not blessed */
2089 isdone = !(obj->blessed);
2097 case POT_FULL_HEALING:
2098 if (Upolyd && u.mh < u.mhmax)
2099 u.mh++, context.botl = 1;
2100 if (u.uhp < u.uhpmax)
2101 u.uhp++, context.botl = 1;
2104 case POT_EXTRA_HEALING:
2105 if (Upolyd && u.mh < u.mhmax)
2106 u.mh++, context.botl = 1;
2107 if (u.uhp < u.uhpmax)
2108 u.uhp++, context.botl = 1;
2113 if (Upolyd && u.mh < u.mhmax)
2114 u.mh++, context.botl = 1;
2115 if (u.uhp < u.uhpmax)
2116 u.uhp++, context.botl = 1;
2120 make_blinded(0L, !u.ucreamed);
2121 make_deaf(0L, TRUE);
2123 exercise(A_CON, TRUE);
2126 if (!Role_if(PM_HEALER)) {
2139 exercise(A_CON, FALSE);
2142 case POT_HALLUCINATION:
2144 You("have a momentary vision.");
2146 You("
\88ê
\8fu
\8c¶
\89e
\82É
\82Â
\82Â
\82Ü
\82ê
\82½
\81D");
2152 You_feel("somewhat dizzy.");
2154 You("
\82ß
\82Ü
\82¢
\82ð
\8a´
\82¶
\82½
\81D");
2155 make_confused(itimeout_incr(HConfusion, rnd(5)), FALSE);
2157 case POT_INVISIBILITY:
2158 if (!Blind && !Invis) {
2161 pline("For an instant you %s!",
2162 See_invisible ? "could see right through yourself"
2163 : "couldn't see yourself");
2165 pline("
\88ê
\8fu
\8e©
\95ª
\8e©
\90g
\82ª%s
\8c©
\82¦
\82È
\82
\82È
\82Á
\82½
\81I",
2166 See_invisible ? "
\90³
\82µ
\82"
2175 pline("%s seems to be holding you.", Something);
2177 pline("%s
\82ª
\82 \82È
\82½
\82ð
\82Â
\82©
\82Ü
\82¦
\82Ä
\82¢
\82é
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", Something);
2180 multi_reason = "frozen by a potion";
2182 multi_reason = "
\96ò
\82Å
\8dd
\92¼
\82µ
\82Ä
\82¢
\82é
\8e\9e\82É";
2183 nomovemsg = You_can_move_again;
2184 exercise(A_DEX, FALSE);
2187 You("stiffen momentarily.");
2189 You("
\88ê
\8fu
\8dd
\92¼
\82µ
\82½
\81D");
2193 if (!Free_action && !Sleep_resistance) {
2195 You_feel("rather tired.");
2197 You("
\82·
\82±
\82µ
\94æ
\82ê
\82½
\81D");
2200 multi_reason = "sleeping off a magical draught";
2202 multi_reason = "
\96\82\96@
\93I
\82É
\96°
\82Á
\82Ä
\82¢
\82é
\8aÔ
\82É";
2203 nomovemsg = You_can_move_again;
2204 exercise(A_DEX, FALSE);
2209 You("
\82 \82
\82Ñ
\82ð
\82µ
\82½
\81D");
2214 Your("knees seem more flexible now.");
2216 Your("
\95G
\82Í
\82æ
\82è
\82·
\82Î
\82â
\82
\93®
\82
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81D");
2217 incr_itimeout(&HFast, rnd(5));
2218 exercise(A_DEX, TRUE);
2221 if (!Blind && !Unaware) {
2224 pline("It suddenly gets dark.");
2226 pline("
\93Ë
\91R
\88Ã
\82
\82È
\82Á
\82½
\81D");
2228 make_blinded(itimeout_incr(Blinded, rnd(5)), FALSE);
2229 if (!Blind && !Unaware)
2230 Your1(vision_clears);
2233 if (u.umonnum == PM_GREMLIN) {
2234 (void) split_mon(&youmonst, (struct monst *) 0);
2235 } else if (u.ulycn >= LOW_PM) {
2236 /* vapor from [un]holy water will trigger
2237 transformation but won't cure lycanthropy */
2238 if (obj->blessed && youmonst.data == &mons[u.ulycn])
2240 else if (obj->cursed && !Upolyd)
2246 exercise(A_CON, FALSE);
2249 case POT_GAIN_LEVEL:
2250 case POT_LEVITATION:
2251 case POT_FRUIT_JUICE:
2252 case POT_MONSTER_DETECTION:
2253 case POT_OBJECT_DETECTION:
2258 /* note: no obfree() -- that's our caller's responsibility */
2261 makeknown(obj->otyp);
2262 else if (!objects[obj->otyp].oc_name_known
2263 && !objects[obj->otyp].oc_uname)
2268 /* returns the potion type when o1 is dipped in o2 */
2271 register struct obj *o1, *o2;
2273 /* cut down on the number of cases below */
2274 if (o1->oclass == POTION_CLASS
2275 && (o2->otyp == POT_GAIN_LEVEL || o2->otyp == POT_GAIN_ENERGY
2276 || o2->otyp == POT_HEALING || o2->otyp == POT_EXTRA_HEALING
2277 || o2->otyp == POT_FULL_HEALING || o2->otyp == POT_ENLIGHTENMENT
2278 || o2->otyp == POT_FRUIT_JUICE)) {
2290 case POT_GAIN_LEVEL:
2291 case POT_GAIN_ENERGY:
2292 return POT_EXTRA_HEALING;
2294 case POT_EXTRA_HEALING:
2296 case POT_GAIN_LEVEL:
2297 case POT_GAIN_ENERGY:
2298 return POT_FULL_HEALING;
2300 case POT_FULL_HEALING:
2302 case POT_GAIN_LEVEL:
2303 case POT_GAIN_ENERGY:
2304 return POT_GAIN_ABILITY;
2309 return POT_FRUIT_JUICE;
2310 case POT_HALLUCINATION:
2316 case AMETHYST: /* "a-methyst" == "not intoxicated" */
2317 if (o2->otyp == POT_BOOZE)
2318 return POT_FRUIT_JUICE;
2320 case POT_GAIN_LEVEL:
2321 case POT_GAIN_ENERGY:
2324 return (rn2(3) ? POT_BOOZE : POT_ENLIGHTENMENT);
2326 return POT_EXTRA_HEALING;
2327 case POT_EXTRA_HEALING:
2328 return POT_FULL_HEALING;
2329 case POT_FULL_HEALING:
2330 return POT_GAIN_ABILITY;
2331 case POT_FRUIT_JUICE:
2332 return POT_SEE_INVISIBLE;
2334 return POT_HALLUCINATION;
2337 case POT_FRUIT_JUICE:
2340 return POT_SICKNESS;
2341 case POT_ENLIGHTENMENT:
2344 case POT_GAIN_LEVEL:
2345 case POT_GAIN_ENERGY:
2346 return POT_SEE_INVISIBLE;
2349 case POT_ENLIGHTENMENT:
2351 case POT_LEVITATION:
2353 return POT_GAIN_LEVEL;
2355 case POT_FRUIT_JUICE:
2358 return POT_CONFUSION;
2363 return STRANGE_OBJECT;
2371 static const char Dip_[] = "Dip ";
2373 static const char Dip_[] = "
\90Z
\82·";
2374 register struct obj *potion, *obj;
2375 struct obj *singlepotion;
2379 char qbuf[QBUFSZ], obuf[QBUFSZ];
2381 const char *shortestname; /* last resort obj name for prompt */
2384 allowall[0] = ALL_CLASSES;
2386 if (!(obj = getobj(allowall, "dip")))
2389 if (inaccessible_equipment(obj, "dip", FALSE))
2391 if (inaccessible_equipment(obj, "
\82ð
\90Z
\82·", FALSE))
2395 shortestname = (is_plural(obj) || pair_of(obj)) ? "them" : "it";
2398 * Bypass safe_qbuf() since it doesn't handle varying suffix without
2399 * an awful lot of support work. Format the object once, even though
2400 * the fountain and pool prompts offer a lot more room for it.
2401 * 3.6.0 used thesimpleoname() unconditionally, which posed no risk
2402 * of buffer overflow but drew bug reports because it omits user-
2403 * supplied type name.
2404 * getobj: "What do you want to dip <the object> into? [xyz or ?*] "
2406 Strcpy(obuf, short_oname(obj, doname, thesimpleoname,
2407 /* 128 - (24 + 54 + 1) leaves 49 for <object> */
2408 QBUFSZ - sizeof "What do you want to dip \
2409 into? [abdeghjkmnpqstvwyzBCEFHIKLNOQRTUWXZ#-# or ?*] "));
2411 here = levl[u.ux][u.uy].typ;
2412 /* Is there a fountain to dip into here? */
2413 if (IS_FOUNTAIN(here)) {
2415 Sprintf(qbuf, "%s%s into the fountain?", Dip_,
2416 flags.verbose ? obuf : shortestname);
2418 Sprintf(qbuf, "
\90ò
\82É%s
\81H", Dip_);
2420 /* "Dip <the object> into the fountain?" */
2421 if (yn(qbuf) == 'y') {
2425 } else if (is_pool(u.ux, u.uy)) {
2426 const char *pooltype = waterbody_name(u.ux, u.uy);
2429 Sprintf(qbuf, "%s%s into the %s?", Dip_,
2430 flags.verbose ? obuf : shortestname, pooltype);
2431 #else /*JP:
\89p
\8cê
\82Å
\82Í
\89½
\82ð
\90Z
\82·
\82©
\82ð
\8aÜ
\82ß
\82Ä
\82¢
\82é
\82ª
\93ú
\96{
\8cê
\82Å
\82Í
\8f\88\97\9d\82Ì
\93s
\8d\87\82Å
\82Æ
\82è
\82 \82¦
\82¸
\8fÈ
\97ª*/
2432 Sprintf(qbuf, "%s
\82É%s
\81H", pooltype, Dip_);
2434 /* "Dip <the object> into the {pool, moat, &c}?" */
2435 if (yn(qbuf) == 'y') {
2437 floating_above(pooltype);
2438 } else if (u.usteed && !is_swimmer(u.usteed->data)
2439 && P_SKILL(P_RIDING) < P_BASIC) {
2440 rider_cant_reach(); /* not skilled enough to reach */
2442 if (obj->otyp == POT_ACID)
2444 if (water_damage(obj, 0, TRUE) != ER_DESTROYED && obj->in_use)
2452 /* "What do you want to dip <the object> into? [xyz or ?*] " */
2453 Sprintf(qbuf, "dip %s into", flags.verbose ? obuf : shortestname);
2455 /* "What do you want to dip into? [xyz or ?*] " */
2456 Sprintf(qbuf, "dip into");
2458 potion = getobj(beverages, qbuf);
2461 if (potion == obj && potion->quan == 1L) {
2463 pline("That is a potion bottle, not a Klein bottle!");
2465 pline("
\82±
\82ê
\82Í
\96ò
\95r
\82¾
\81I
\83N
\83\89\83C
\83\93\82Ì
\92Ù
\82¶
\82á
\82È
\82¢
\81I");
2468 potion->in_use = TRUE; /* assume it will be used up */
2469 if (potion->otyp == POT_WATER) {
2470 boolean useeit = !Blind || (obj == ublindf && Blindfolded_only);
2472 const char *obj_glows = Yobjnam2(obj, "glow");
2474 const char *obj_glows = cxname(obj);
2477 if (H2Opotion_dip(potion, obj, useeit, obj_glows))
2479 } else if (obj->otyp == POT_POLYMORPH || potion->otyp == POT_POLYMORPH) {
2480 /* some objects can't be polymorphed */
2481 if (obj->otyp == potion->otyp /* both POT_POLY */
2482 || obj->otyp == WAN_POLYMORPH || obj->otyp == SPE_POLYMORPH
2483 || obj == uball || obj == uskin
2484 || obj_resists(obj->otyp == POT_POLYMORPH ? potion : obj,
2486 pline1(nothing_happens);
2488 short save_otyp = obj->otyp;
2491 u.uconduct.polypiles++;
2493 obj = poly_obj(obj, STRANGE_OBJECT);
2496 * obj might be gone:
2497 * poly_obj() -> set_wear() -> Amulet_on() -> useup()
2498 * if obj->otyp is worn amulet and becomes AMULET_OF_CHANGE.
2501 makeknown(POT_POLYMORPH);
2503 } else if (obj->otyp != save_otyp) {
2504 makeknown(POT_POLYMORPH);
2506 prinv((char *) 0, obj, 0L);
2510 pline("Nothing seems to happen.");
2512 pline("
\89½
\82à
\8bN
\82±
\82ç
\82È
\82©
\82Á
\82½
\82æ
\82¤
\82¾
\81D");
2516 potion->in_use = FALSE; /* didn't go poof */
2518 } else if (obj->oclass == POTION_CLASS && obj->otyp != potion->otyp) {
2519 int amt = (int) obj->quan;
2522 mixture = mixtype(obj, potion);
2524 magic = (mixture != STRANGE_OBJECT) ? objects[mixture].oc_magic
2525 : (objects[obj->otyp].oc_magic || objects[potion->otyp].oc_magic);
2527 Strcpy(qbuf, "The"); /* assume full stack */
2531 if (amt > (magic ? 3 : 7)) {
2532 /* trying to dip multiple potions will usually affect only a
2533 subset; pick an amount between 3 and 8, inclusive, for magic
2534 potion result, between 7 and N for non-magic */
2536 amt = rnd(min(amt, 8) - (3 - 1)) + (3 - 1); /* 1..6 + 2 */
2538 amt = rnd(amt - (7 - 1)) + (7 - 1); /* 1..(N-6) + 6 */
2540 if ((long) amt < obj->quan) {
2541 obj = splitobj(obj, (long) amt);
2543 Sprintf(qbuf, "%ld of the", obj->quan);
2545 Sprintf(qbuf, "%ld
\96{
\82Ì", obj->quan);
2548 /* [N of] the {obj(s)} mix(es) with [one of] {the potion}... */
2550 pline("%s %s %s with %s%s...", qbuf, simpleonames(obj),
2551 otense(obj, "mix"), (potion->quan > 1L) ? "one of " : "",
2552 thesimpleoname(potion));
2553 #else /* [N
\96{
\82Ì]{obj}
\82ð{the potion}[
\82Ì
\88ê
\82Â]
\82Æ
\8d¬
\82º
\82½
\81D
\81D
\81D */
2554 pline("%s%s
\82ð%s%s
\82Æ
\8d¬
\82º
\82½
\81D
\81D
\81D", qbuf, simpleonames(obj),
2555 thesimpleoname(potion),
2556 (potion->quan > 1L) ? "
\82Ì
\88ê
\82Â" : "");
2558 /* get rid of 'dippee' before potential perm_invent updates */
2559 useup(potion); /* now gone */
2560 /* Mixing potions is dangerous...
2561 KMH, balance patch -- acid is particularly unstable */
2562 if (obj->cursed || obj->otyp == POT_ACID || !rn2(10)) {
2563 /* it would be better to use up the whole stack in advance
2564 of the message, but we can't because we need to keep it
2565 around for potionbreathe() [and we can't set obj->in_use
2566 to 'amt' because that's not implemented] */
2569 pline("BOOM! They explode!");
2571 pline("
\83o
\81[
\83\93\81I
\94\9a\94
\82µ
\82½
\81I");
2572 wake_nearto(u.ux, u.uy, (BOLT_LIM + 1) * (BOLT_LIM + 1));
2573 exercise(A_STR, FALSE);
2574 if (!breathless(youmonst.data) || haseyes(youmonst.data))
2577 losehp(amt + rnd(9), /* not physical damage */
2579 "alchemic blast", KILLED_BY_AN);
2581 "
\92²
\8d\87\82Ì
\8e¸
\94s
\82Å", KILLED_BY_AN);
2585 obj->blessed = obj->cursed = obj->bknown = 0;
2586 if (Blind || Hallucination)
2589 if (mixture != STRANGE_OBJECT) {
2590 obj->otyp = mixture;
2592 switch (obj->odiluted ? 1 : rnd(8)) {
2594 obj->otyp = POT_WATER;
2598 obj->otyp = POT_SICKNESS;
2601 struct obj *otmp = mkobj(POTION_CLASS, FALSE);
2603 obj->otyp = otmp->otyp;
2604 obfree(otmp, (struct obj *) 0);
2611 pline_The("mixture glows brightly and evaporates.");
2613 pline("
\8d¬
\82º
\82é
\82Æ
\96ò
\82Í
\96¾
\82é
\82
\8bP
\82«
\81C
\8fö
\94
\82µ
\82½
\81D");
2617 obj->odiluted = (obj->otyp != POT_WATER);
2619 if (obj->otyp == POT_WATER && !Hallucination) {
2621 pline_The("mixture bubbles%s.", Blind ? "" : ", then clears");
2623 pline("
\96ò
\82ð
\8d¬
\82º
\82é
\82Æ%s
\96A
\82¾
\82Á
\82½
\81D", Blind ? "" : "
\82µ
\82Î
\82ç
\82");
2624 } else if (!Blind) {
2626 pline_The("mixture looks %s.",
2628 pline("
\8d¬
\82º
\82½
\96ò
\82Í%s
\96ò
\82É
\8c©
\82¦
\82é
\81D",
2629 hcolor(OBJ_DESCR(objects[obj->otyp])));
2632 /* this is required when 'obj' was split off from a bigger stack,
2633 so that 'obj' will now be assigned its own inventory slot;
2634 it has a side-effect of merging 'obj' into another compatible
2635 stack if there is one, so we do it even when no split has
2636 been made in order to get the merge result for both cases;
2637 as a consequence, mixing while Fumbling drops the mixture */
2640 (void) hold_another_object(obj, "You drop %s!", doname(obj),
2643 (void) hold_another_object(obj, "%s
\82ð
\97\8e\82µ
\82½
\81I", doname(obj),
2649 if (potion->otyp == POT_ACID && obj->otyp == CORPSE
2650 && obj->corpsenm == PM_LICHEN && !Blind) {
2652 pline("%s %s %s around the edges.", The(cxname(obj)),
2653 otense(obj, "turn"),
2654 potion->odiluted ? hcolor(NH_ORANGE) : hcolor(NH_RED));
2656 pline("%s
\82Í
\82Ó
\82¿
\82ª%s
\82È
\82Á
\82½
\81D", The(cxname(obj)),
2657 jconj_adj(potion->odiluted ? hcolor(NH_ORANGE) : hcolor(NH_RED)));
2659 potion->in_use = FALSE; /* didn't go poof */
2663 if (potion->otyp == POT_WATER && obj->otyp == TOWEL) {
2665 pline_The("towel soaks it up!");
2667 pline_The("
\83^
\83I
\83\8b\82Í
\90\85\82ð
\8bz
\82¢
\8d\9e\82ñ
\82¾
\81I");
2668 /* wetting towel already done via water_damage() in H2Opotion_dip */
2672 if (is_poisonable(obj)) {
2673 if (potion->otyp == POT_SICKNESS && !obj->opoisoned) {
2676 if (potion->quan > 1L)
2678 Sprintf(buf, "One of %s", the(xname(potion)));
2680 Sprintf(buf, "%s
\82Ì
\88ê
\82Â", the(xname(potion)));
2682 Strcpy(buf, The(xname(potion)));
2684 pline("%s forms a coating on %s.", buf, the(xname(obj)));
2686 pline("%s
\82ª%s
\82É
\93h
\82ç
\82ê
\82½
\81D", buf, the(xname(obj)));
2687 obj->opoisoned = TRUE;
2689 } else if (obj->opoisoned && (potion->otyp == POT_HEALING
2690 || potion->otyp == POT_EXTRA_HEALING
2691 || potion->otyp == POT_FULL_HEALING)) {
2693 pline("A coating wears off %s.", the(xname(obj)));
2695 pline("
\93Å
\82ª%s
\82©
\82ç
\94\8d\82°
\82¨
\82¿
\82½
\81D", the(xname(obj)));
2701 if (potion->otyp == POT_ACID) {
2702 if (erode_obj(obj, 0, ERODE_CORRODE, EF_GREASE) != ER_NOTHING)
2706 if (potion->otyp == POT_OIL) {
2707 boolean wisx = FALSE;
2709 if (potion->lamplit) { /* burning */
2710 fire_damage(obj, TRUE, u.ux, u.uy);
2711 } else if (potion->cursed) {
2713 pline_The("potion spills and covers your %s with oil.",
2715 pline("
\96û
\82Í
\94ò
\82Ñ
\8eU
\82è
\82 \82È
\82½
\82Ì%s
\82É
\82©
\82©
\82Á
\82½
\81D",
2716 makeplural(body_part(FINGER)));
2717 incr_itimeout(&Glib, d(2, 10));
2718 } else if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) {
2719 /* the following cases apply only to weapons */
2721 /* Oil removes rust and corrosion, but doesn't unburn.
2722 * Arrows, etc are classed as metallic due to arrowhead
2723 * material, but dipping in oil shouldn't repair them.
2725 } else if ((!is_rustprone(obj) && !is_corrodeable(obj))
2726 || is_ammo(obj) || (!obj->oeroded && !obj->oeroded2)) {
2727 /* uses up potion, doesn't set obj->greased */
2729 pline("%s %s with an oily sheen.", Yname2(obj),
2730 otense(obj, "gleam"));
2732 pline("%s
\82Í
\96û
\82Ì
\8cõ
\91ò
\82Å
\82«
\82ç
\82è
\82Æ
\8cõ
\82Á
\82½
\81D", Yname2(obj));
2736 pline("%s %s less %s.", Yname2(obj), otense(obj, "are"),
2737 (obj->oeroded && obj->oeroded2)
2738 ? "corroded and rusty"
2739 : obj->oeroded ? "rusty" : "corroded");
2741 pline("%s
\82Ì%s
\82ª
\8eæ
\82ê
\82½
\81D", Yname2(obj),
2742 (obj->oeroded && obj->oeroded2)
2743 ? "
\95\85\90H
\82Æ
\8eK"
2744 : obj->oeroded ? "
\8eK" : "
\95\85\90H");
2746 if (obj->oeroded > 0)
2748 if (obj->oeroded2 > 0)
2752 exercise(A_WIS, wisx);
2753 makeknown(potion->otyp);
2759 /* Allow filling of MAGIC_LAMPs to prevent identification by player */
2760 if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP)
2761 && (potion->otyp == POT_OIL)) {
2762 /* Turn off engine before fueling, turn off fuel too :-) */
2763 if (obj->lamplit || potion->lamplit) {
2765 explode(u.ux, u.uy, 11, d(6, 6), 0, EXPL_FIERY);
2766 exercise(A_WIS, FALSE);
2769 /* Adding oil to an empty magic lamp renders it into an oil lamp */
2770 if ((obj->otyp == MAGIC_LAMP) && obj->spe == 0) {
2771 obj->otyp = OIL_LAMP;
2774 if (obj->age > 1000L) {
2776 pline("%s %s full.", Yname2(obj), otense(obj, "are"));
2778 pline("%s
\82É
\82Í
\82½
\82Á
\82Õ
\82è
\93ü
\82Á
\82Ä
\82¢
\82é
\81D", Yname2(obj));
2779 potion->in_use = FALSE; /* didn't go poof */
2782 You("fill %s with oil.", yname(obj));
2784 You("%s
\82É
\96û
\82ð
\93ü
\82ê
\82½
\81D", yname(obj));
2785 check_unpaid(potion); /* Yendorian Fuel Tax */
2786 /* burns more efficiently in a lamp than in a bottle;
2787 diluted potion provides less benefit but we don't attempt
2788 to track that the lamp now also has some non-oil in it */
2789 obj->age += (!potion->odiluted ? 4L : 3L) * potion->age / 2L;
2790 if (obj->age > 1500L)
2793 exercise(A_WIS, TRUE);
2801 potion->in_use = FALSE; /* didn't go poof */
2802 if ((obj->otyp == UNICORN_HORN || obj->otyp == AMETHYST)
2803 && (mixture = mixtype(obj, potion)) != STRANGE_OBJECT) {
2804 char oldbuf[BUFSZ], newbuf[BUFSZ];
2805 short old_otyp = potion->otyp;
2806 boolean old_dknown = FALSE;
2807 boolean more_than_one = potion->quan > 1L;
2810 if (potion->dknown) {
2813 Sprintf(oldbuf, "%s ", hcolor(OBJ_DESCR(objects[potion->otyp])));
2815 Sprintf(oldbuf, "%s", hcolor(OBJ_DESCR(objects[potion->otyp])));
2817 /* with multiple merged potions, split off one and
2819 if (potion->quan > 1L) {
2820 singlepotion = splitobj(potion, 1L);
2822 singlepotion = potion;
2824 costly_alteration(singlepotion, COST_NUTRLZ);
2825 singlepotion->otyp = mixture;
2826 singlepotion->blessed = 0;
2827 if (mixture == POT_WATER)
2828 singlepotion->cursed = singlepotion->odiluted = 0;
2830 singlepotion->cursed = obj->cursed; /* odiluted left as-is */
2831 singlepotion->bknown = FALSE;
2833 singlepotion->dknown = FALSE;
2835 singlepotion->dknown = !Hallucination;
2837 if (mixture == POT_WATER && singlepotion->dknown)
2838 Sprintf(newbuf, "clears");
2840 Sprintf(newbuf, "turns %s",
2841 hcolor(OBJ_DESCR(objects[mixture])));
2842 pline_The("%spotion%s %s.", oldbuf,
2843 more_than_one ? " that you dipped into" : "", newbuf);
2845 if (mixture == POT_WATER && singlepotion->dknown)
2846 Sprintf(newbuf, "
\93§
\96¾");
2848 Sprintf(newbuf, "%s
\96ò",
2849 hcolor(OBJ_DESCR(objects[mixture])));
2850 pline_The("%s%s
\96ò
\82Í%s
\82É
\82È
\82Á
\82½
\81D.", more_than_one ? "
\90Z
\82µ
\82½" : "",
2853 if (!objects[old_otyp].oc_uname
2854 && !objects[old_otyp].oc_name_known && old_dknown) {
2858 fakeobj.otyp = old_otyp;
2859 fakeobj.oclass = POTION_CLASS;
2863 obj_extract_self(singlepotion);
2864 singlepotion = hold_another_object(singlepotion,
2866 "You juggle and drop %s!",
2868 "
\82¨
\8eè
\8bÊ
\82µ
\82Ä%s
\82ð
\97\8e\82Æ
\82µ
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I",
2869 doname(singlepotion),
2871 nhUse(singlepotion);
2877 pline("Interesting...");
2879 pline("
\96Ê
\94\92\82¢
\81D
\81D
\81D");
2883 if (!objects[potion->otyp].oc_name_known
2884 && !objects[potion->otyp].oc_uname)
2890 /* *monp grants a wish and then leaves the game */
2893 struct monst **monp;
2895 struct monst *mon = *monp;
2896 int mx = mon->mx, my = mon->my, glyph = glyph_at(mx, my);
2898 /* remove the monster first in case wish proves to be fatal
2899 (blasted by artifact), to keep it out of resulting bones file */
2901 *monp = 0; /* inform caller that monster is gone */
2902 /* hide that removal from player--map is visible during wish prompt */
2903 tmp_at(DISP_ALWAYS, glyph);
2905 /* grant the wish */
2908 tmp_at(DISP_END, 0);
2912 djinni_from_bottle(obj)
2918 if (!(mtmp = makemon(&mons[PM_DJINNI], u.ux, u.uy, NO_MM_FLAGS))) {
2920 pline("It turns out to be empty.");
2922 if (obj->otyp == MAGIC_LAMP) {
2923 pline("
\83\89\83\93\83v
\82Í
\8bó
\82Á
\82Û
\82¾
\82Á
\82½
\81D");
2925 pline("
\96ò
\82Í
\8bó
\82Á
\82Û
\82¾
\82Á
\82½
\81D");
2933 pline("In a cloud of smoke, %s emerges!", a_monnam(mtmp));
2935 pline("
\89\8c\82Ì
\92\86\82©
\82ç
\81C%s
\82ª
\8c»
\82í
\82ê
\82½
\81I", a_monnam(mtmp));
2937 pline("%s speaks.", Monnam(mtmp));
2939 pline("%s
\82Í
\98b
\82µ
\82©
\82¯
\82½
\81D", Monnam(mtmp));
2942 You("smell acrid fumes.");
2944 You("
\83c
\83\93\82Æ
\82·
\82é
\93õ
\82¢
\82ª
\82µ
\82½
\81D");
2946 pline("%s speaks.", Something);
2948 pline("%s
\82ª
\98b
\82µ
\82©
\82¯
\82½
\81D", Something);
2953 chance = (chance == 4) ? rnd(4) : 0;
2954 else if (obj->cursed)
2955 chance = (chance == 0) ? rn2(4) : 4;
2956 /* 0,1,2,3,4: b=80%,5,5,5,5; nc=20%,20,20,20,20; c=5%,5,5,5,80 */
2961 verbalize("I am in your debt. I will grant one wish!");
2963 verbalize("
\82¨
\91O
\82É
\82Í
\8eØ
\82è
\82ª
\82Å
\82«
\82½
\81D
\88ê
\82Â
\8aè
\82¢
\82ð
\82©
\82È
\82¦
\82Ä
\82â
\82ë
\82¤
\81I");
2964 /* give a wish and discard the monster (mtmp set to null) */
2965 mongrantswish(&mtmp);
2969 verbalize("Thank you for freeing me!");
2971 verbalize("
\8e\84\82ð
\8f\95\82¯
\82Ä
\82
\82ê
\82½
\82±
\82Æ
\82ð
\8a´
\8eÓ
\82·
\82é
\81I");
2972 (void) tamedog(mtmp, (struct obj *) 0);
2976 verbalize("You freed me!");
2978 verbalize("
\89ð
\95ú
\82µ
\82Ä
\82
\82ê
\82½
\82Ì
\82Í
\82¨
\91O
\82©
\81I");
2979 mtmp->mpeaceful = TRUE;
2984 verbalize("It is about time!");
2986 verbalize("
\82³
\82ç
\82Î
\82¾
\81I");
2987 if (canspotmon(mtmp))
2989 pline("%s vanishes.", Monnam(mtmp));
2991 pline("%s
\82Í
\8fÁ
\82¦
\82½
\81D", Monnam(mtmp));
2996 verbalize("You disturbed me, fool!");
2998 verbalize("
\82¨
\82Ü
\82¦
\82Í
\8e\84\82Ì
\96°
\82è
\82ð
\96W
\82°
\82½
\81D
\82¨
\82ë
\82©
\82à
\82Ì
\82ß
\81I");
2999 mtmp->mpeaceful = FALSE;
3005 /* clone a gremlin or mold (2nd arg non-null implies heat as the trigger);
3006 hit points are cut in half (odd HP stays with original) */
3008 split_mon(mon, mtmp)
3009 struct monst *mon, /* monster being split */
3010 *mtmp; /* optional attacker whose heat triggered it */
3012 struct monst *mtmp2;
3018 Sprintf(reason, " from %s heat",
3019 (mtmp == &youmonst) ? the_your[1]
3020 : (const char *) s_suffix(mon_nam(mtmp)));
3022 Sprintf(reason, "%s
\82Ì
\94M
\82Å",
3023 (mtmp == &youmonst) ? the_your[1]
3024 : (const char *) mon_nam(mtmp));
3027 if (mon == &youmonst) {
3030 mtmp2->mhpmax = u.mhmax / 2;
3031 u.mhmax -= mtmp2->mhpmax;
3034 You("multiply%s!", reason);
3036 You("%s
\95ª
\97ô
\82µ
\82½
\81I", reason);
3039 mtmp2 = clone_mon(mon, 0, 0);
3041 mtmp2->mhpmax = mon->mhpmax / 2;
3042 mon->mhpmax -= mtmp2->mhpmax;
3043 if (canspotmon(mon))
3045 pline("%s multiplies%s!", Monnam(mon), reason);
3047 pline("%s
\82Í%s
\95ª
\97ô
\82µ
\82½
\81I", Monnam(mon), reason);