1 /* NetHack 3.6 polyself.c $NHDT-Date: 1573290419 2019/11/09 09:06:59 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.135 $ */
2 /* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
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-2022 */
8 /* JNetHack may be freely redistributed. See license for details. */
11 * Polymorph self routine.
13 * Note: the light source handling code assumes that both youmonst.m_id
14 * and youmonst.mx will always remain 0 when it handles the case of the
15 * player polymorphed into a light-emitting monster.
17 * Transformation sequences:
18 * /-> polymon poly into monster form
20 * \-> newman -> polyman fail to poly, get human form
22 * rehumanize -> polyman return to original form
24 * polymon (called directly) usually golem petrification
29 STATIC_DCL void FDECL(check_strangling, (BOOLEAN_P));
30 STATIC_DCL void FDECL(polyman, (const char *, const char *));
31 STATIC_DCL void FDECL(dropp, (struct obj *));
32 STATIC_DCL void NDECL(break_armor);
33 STATIC_DCL void FDECL(drop_weapon, (int));
34 STATIC_DCL int FDECL(armor_to_dragon, (int));
35 STATIC_DCL void NDECL(newman);
36 STATIC_DCL void NDECL(polysense);
38 STATIC_VAR const char no_longer_petrify_resistant[] =
40 "No longer petrify-resistant, you";
42 "
\90Î
\89»
\82Ö
\82Ì
\92ï
\8dR
\97Í
\82ª
\82È
\82
\82È
\82Á
\82Ä
\81C
\82 \82È
\82½
\82Í";
44 /* controls whether taking on new form or becoming new man can also
45 change sex (ought to be an arg to polymon() and newman() instead) */
46 STATIC_VAR int sex_change_ok = 0;
48 /* update the youmonst.data structure pointer and intrinsics */
52 struct permonst *mdat = &mons[u.umonnum];
54 set_mon_data(&youmonst, mdat);
56 #define PROPSET(PropIndx, ON) \
59 u.uprops[PropIndx].intrinsic |= FROMFORM; \
61 u.uprops[PropIndx].intrinsic &= ~FROMFORM; \
64 PROPSET(FIRE_RES, resists_fire(&youmonst));
65 PROPSET(COLD_RES, resists_cold(&youmonst));
66 PROPSET(SLEEP_RES, resists_sleep(&youmonst));
67 PROPSET(DISINT_RES, resists_disint(&youmonst));
68 PROPSET(SHOCK_RES, resists_elec(&youmonst));
69 PROPSET(POISON_RES, resists_poison(&youmonst));
70 PROPSET(ACID_RES, resists_acid(&youmonst));
71 PROPSET(STONE_RES, resists_ston(&youmonst));
73 /* resists_drli() takes wielded weapon into account; suppress it */
74 struct obj *save_uwep = uwep;
77 PROPSET(DRAIN_RES, resists_drli(&youmonst));
80 /* resists_magm() takes wielded, worn, and carried equipment into
81 into account; cheat and duplicate its monster-specific part */
82 PROPSET(ANTIMAGIC, (dmgtype(mdat, AD_MAGM)
83 || mdat == &mons[PM_BABY_GRAY_DRAGON]
84 || dmgtype(mdat, AD_RBRE)));
85 PROPSET(SICK_RES, (mdat->mlet == S_FUNGUS || mdat == &mons[PM_GHOUL]));
87 PROPSET(STUNNED, (mdat == &mons[PM_STALKER] || is_bat(mdat)));
88 PROPSET(HALLUC_RES, dmgtype(mdat, AD_HALU));
89 PROPSET(SEE_INVIS, perceives(mdat));
90 PROPSET(TELEPAT, telepathic(mdat));
91 /* note that Infravision uses mons[race] rather than usual mons[role] */
92 PROPSET(INFRAVISION, infravision(Upolyd ? mdat : &mons[urace.malenum]));
93 PROPSET(INVIS, pm_invisible(mdat));
94 PROPSET(TELEPORT, can_teleport(mdat));
95 PROPSET(TELEPORT_CONTROL, control_teleport(mdat));
96 PROPSET(LEVITATION, is_floater(mdat));
97 /* floating eye is the only 'floater'; it is also flagged as a 'flyer';
98 suppress flying for it so that enlightenment doesn't confusingly
99 show latent flight capability always blocked by levitation */
100 PROPSET(FLYING, (is_flyer(mdat) && !is_floater(mdat)));
101 PROPSET(SWIMMING, is_swimmer(mdat));
102 /* [don't touch MAGICAL_BREATHING here; both Amphibious and Breathless
103 key off of it but include different monster forms...] */
104 PROPSET(PASSES_WALLS, passes_walls(mdat));
105 PROPSET(REGENERATION, regenerates(mdat));
106 PROPSET(REFLECTING, (mdat == &mons[PM_SILVER_DRAGON]));
109 float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */
112 #ifdef STATUS_HILITES
113 if (VIA_WINDOWPORT())
114 status_initialize(REASSESS_ONLY);
118 /* Levitation overrides Flying; set or clear BFlying|I_SPECIAL */
122 boolean stuck_in_floor = (u.utrap && u.utraptype != TT_PIT);
124 /* floating overrides flight; so does being trapped in the floor */
125 if ((HLevitation || ELevitation)
126 || ((HFlying || EFlying) && stuck_in_floor))
127 BFlying |= I_SPECIAL;
129 BFlying &= ~I_SPECIAL;
130 /* being trapped on the ground (bear trap, web, molten lava survived
131 with fire resistance, former lava solidified via cold, tethered
132 to a buried iron ball) overrides floating--the floor is reachable */
133 if ((HLevitation || ELevitation) && stuck_in_floor)
134 BLevitation |= I_SPECIAL;
136 BLevitation &= ~I_SPECIAL;
140 /* for changing into form that's immune to strangulation */
145 /* on -- maybe resume strangling */
147 /* when Strangled is already set, polymorphing from one
148 vulnerable form into another causes the counter to be reset */
149 if (uamul && uamul->otyp == AMULET_OF_STRANGULATION
150 && can_be_strangled(&youmonst)) {
154 Your("%s %s your %s!", simpleonames(uamul),
155 Strangled ? "still constricts" : "begins constricting",
156 body_part(NECK)); /* "throat" */
158 Your("%s%s%s
\82ð
\8di
\82ß%s
\81I", simpleonames(uamul),
159 Strangled ? "
\82Í
\82Ü
\82¾" : "
\82ª",
161 Strangled ? "
\82Ä
\82¢
\82é" : "
\82Í
\82¶
\82ß
\82½");
163 makeknown(AMULET_OF_STRANGULATION);
166 /* off -- maybe block strangling */
168 if (Strangled && !can_be_strangled(&youmonst)) {
172 You("are no longer being strangled.");
174 You("
\82à
\82Í
\82â
\92\82\91§
\82µ
\82Ä
\82¢
\82È
\82¢
\81D");
179 /* make a (new) human out of the player */
182 const char *fmt, *arg;
184 boolean sticky = (sticks(youmonst.data) && u.ustuck && !u.uswallow),
185 was_mimicking = (U_AP_TYPE != M_AP_NOTHING);
186 boolean was_blind = !!Blind;
189 u.acurr = u.macurr; /* restore old attribs */
191 u.umonnum = u.umonster;
192 flags.female = u.mfemale;
207 youmonst.m_ap_type = M_AP_NOTHING;
208 youmonst.mappearance = 0;
214 /* check whether player foolishly genocided self while poly'd */
216 /* intervening activity might have clobbered genocide info */
217 struct kinfo *kptr = find_delayed_killer(POLYMORPH);
219 if (kptr != (struct kinfo *) 0 && kptr->name[0]) {
220 killer.format = kptr->format;
221 Strcpy(killer.name, kptr->name);
223 killer.format = KILLED_BY;
225 Strcpy(killer.name, "self-genocide");
227 Strcpy(killer.name, "
\8e©
\8bs
\93I
\8bs
\8eE
\82Å");
229 dealloc_killer(kptr);
233 if (u.twoweap && !could_twoweap(youmonst.data))
236 if (u.utrap && u.utraptype == TT_PIT) {
237 set_utrap(rn1(6, 2), TT_PIT); /* time to escape resets */
239 if (was_blind && !Blind) { /* reverting from eyeless */
241 make_blinded(0L, TRUE); /* remove blindness */
243 check_strangling(TRUE);
245 if (!Levitation && !u.ustuck && is_pool_or_lava(u.ux, u.uy))
254 /* setting u.umonster for caveman/cavewoman or priest/priestess
255 swap unintentionally makes `Upolyd' appear to be true */
256 boolean already_polyd = (boolean) Upolyd;
258 /* Some monsters are always of one sex and their sex can't be changed;
259 * Succubi/incubi can change, but are handled below.
261 * !already_polyd check necessary because is_male() and is_female()
262 * are true if the player is a priest/priestess.
265 || (!is_male(youmonst.data) && !is_female(youmonst.data)
266 && !is_neuter(youmonst.data)))
267 flags.female = !flags.female;
268 if (already_polyd) /* poly'd: also change saved sex */
269 u.mfemale = !u.mfemale;
270 max_rank_sz(); /* [this appears to be superfluous] */
271 if ((already_polyd ? u.mfemale : flags.female) && urole.name.f)
272 Strcpy(pl_character, urole.name.f);
274 Strcpy(pl_character, urole.name.m);
275 u.umonster = ((already_polyd ? u.mfemale : flags.female)
276 && urole.femalenum != NON_PM)
279 if (!already_polyd) {
280 u.umonnum = u.umonster;
281 } else if (u.umonnum == PM_SUCCUBUS || u.umonnum == PM_INCUBUS) {
282 flags.female = !flags.female;
283 /* change monster type to match new sex */
284 u.umonnum = (u.umonnum == PM_SUCCUBUS) ? PM_INCUBUS : PM_SUCCUBUS;
292 int i, oldlvl, newlvl, hpmax, enmax;
295 newlvl = oldlvl + rn1(5, -2); /* new = old + {-2,-1,0,+1,+2} */
296 if (newlvl > 127 || newlvl < 1) { /* level went below 0? */
297 goto dead; /* old level is still intact (in case of lifesaving) */
299 if (newlvl > MAXULEV)
301 /* If your level goes down, your peak level goes down by
302 the same amount so that you can't simply use blessed
303 full healing to undo the decrease. But if your level
304 goes up, your peak level does *not* undergo the same
305 adjustment; you might end up losing out on the chance
306 to regain some levels previously lost to other causes. */
308 u.ulevelmax -= (oldlvl - newlvl);
309 if (u.ulevelmax < newlvl)
310 u.ulevelmax = newlvl;
313 if (sex_change_ok && !rn2(10))
316 adjabil(oldlvl, (int) u.ulevel);
317 reset_rndmonst(NON_PM); /* new monster generation criteria */
319 /* random experience points for the new experience level */
320 u.uexp = rndexp(FALSE);
322 /* set up new attribute points (particularly Con) */
327 * remove level-gain based HP from any extra HP accumulated
328 * (the "extra" might actually be negative);
329 * modify the extra, retaining {80%, 90%, 100%, or 110%};
330 * add in newly generated set of level-gain HP.
332 * (This used to calculate new HP in direct proportion to old HP,
333 * but that was subject to abuse: accumulate a large amount of
334 * extra HP, drain level down to 1, then polyself to level 2 or 3
335 * [lifesaving capability needed to handle level 0 and -1 cases]
336 * and the extra got multiplied by 2 or 3. Repeat the level
337 * drain and polyself steps until out of lifesaving capability.)
340 for (i = 0; i < oldlvl; i++)
341 hpmax -= (int) u.uhpinc[i];
342 /* hpmax * rn1(4,8) / 10; 0.95*hpmax on average */
343 hpmax = rounddiv((long) hpmax * (long) rn1(4, 8), 10);
344 for (i = 0; (u.ulevel = i) < newlvl; i++)
346 if (hpmax < u.ulevel)
347 hpmax = u.ulevel; /* min of 1 HP per level */
348 /* retain same proportion for current HP; u.uhp * hpmax / u.uhpmax */
349 u.uhp = rounddiv((long) u.uhp * (long) hpmax, u.uhpmax);
352 * Do the same for spell power.
355 for (i = 0; i < oldlvl; i++)
356 enmax -= (int) u.ueninc[i];
357 enmax = rounddiv((long) enmax * (long) rn1(4, 8), 10);
358 for (i = 0; (u.ulevel = i) < newlvl; i++)
360 if (enmax < u.ulevel)
362 u.uen = rounddiv((long) u.uen * (long) enmax,
363 ((u.uenmax < 1) ? 1 : u.uenmax));
365 /* [should alignment record be tweaked too?] */
367 u.uhunger = rn1(500, 500);
369 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
371 make_stoned(0L, (char *) 0, 0, (char *) 0);
373 if (Polymorph_control) { /* even when Stunned || Unaware */
377 dead: /* we come directly here if their experience level went to 0 or
380 Your("new form doesn't seem healthy enough to survive.");
382 Your("
\90V
\82µ
\82¢
\8ep
\82Í
\90¶
\82«
\82Ä
\82¢
\82
\82¾
\82¯
\82Ì
\97Í
\82ª
\82È
\82¢
\82æ
\82¤
\82¾
\81D");
383 killer.format = KILLED_BY_AN;
385 Strcpy(killer.name, "unsuccessful polymorph");
387 Strcpy(killer.name, "
\95Ï
\89»
\82Ì
\8e¸
\94s
\82Å");
390 return; /* lifesaved */
395 polyman("feel like a new %s!",
397 polyman("%s
\82Æ
\82µ
\82Ä
\90¶
\82Ü
\82ê
\82©
\82í
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81I",
398 /* use saved gender we're about to revert to, not current */
399 ((Upolyd ? u.mfemale : flags.female) && urace.individual.f)
401 : (urace.individual.m)
406 Your("body transforms, but there is still slime on you.");
408 Your("
\91Ì
\82Í
\95Ï
\89»
\82µ
\82½
\82ª
\81C
\83X
\83\89\83C
\83\80\82ª
\82Â
\82¢
\82½
\82Ü
\82Ü
\82¾
\81D");
409 make_slimed(10L, (const char *) 0);
414 (void) encumber_msg();
416 retouch_equipment(2);
418 selftouch(no_longer_petrify_resistant);
425 char buf[BUFSZ] = DUMMY;
426 int old_light, new_light, mntmp, class, tryct;
427 boolean forcecontrol = (psflags == 1), monsterpoly = (psflags == 2),
428 draconian = (uarm && Is_dragon_armor(uarm)),
429 iswere = (u.ulycn >= LOW_PM), isvamp = is_vampire(youmonst.data),
430 controllable_poly = Polymorph_control && !(Stunned || Unaware);
434 pline("You fail to transform!");
436 pline("
\82 \82È
\82½
\82Í
\95Ï
\89»
\82É
\8e¸
\94s
\82µ
\82½
\81I");
439 /* being Stunned|Unaware doesn't negate this aspect of Poly_control */
440 if (!Polymorph_control && !forcecontrol && !draconian && !iswere
442 if (rn2(20) > ACURR(A_CON)) {
443 You1(shudder_for_moment);
445 losehp(rnd(30), "system shock", KILLED_BY_AN);
447 losehp(rnd(30), "
\83V
\83X
\83e
\83\80\83V
\83\87\83b
\83N
\82Å", KILLED_BY_AN);
448 exercise(A_CON, FALSE);
452 old_light = emits_light(youmonst.data);
455 if (monsterpoly && isvamp)
458 if (controllable_poly || forcecontrol) {
463 getlin("Become what kind of monster? [type the name]", buf);
465 getlin("
\82Ç
\82Ì
\8eí
\82Ì
\89ö
\95¨
\82É
\82È
\82é
\81H[
\96¼
\91O
\82ð
\93ü
\82ê
\82Ä
\82Ë]", buf);
466 (void) mungspaces(buf);
467 if (*buf == '\033') {
468 /* user is cancelling controlled poly */
469 if (forcecontrol) { /* wizard mode #polyself */
473 Strcpy(buf, "*"); /* resort to random */
475 if (!strcmp(buf, "*") || !strcmp(buf, "random")) {
476 /* explicitly requesting random result */
477 tryct = 0; /* will skip thats_enough_tries */
478 continue; /* end do-while(--tryct > 0) loop */
481 mntmp = name_to_mon(buf);
482 if (mntmp < LOW_PM) {
484 class = name_to_monclass(buf, &mntmp);
485 if (class && mntmp == NON_PM)
486 mntmp = mkclass_poly(class);
488 if (mntmp < LOW_PM) {
491 pline("I've never heard of such monsters.");
493 pline("
\82»
\82ñ
\82È
\89ö
\95¨
\82Í
\95·
\82¢
\82½
\82±
\82Æ
\82ª
\82È
\82¢
\81D");
496 You_cant("polymorph into any of those.");
498 pline("
\82»
\82ê
\82É
\82È
\82é
\82±
\82Æ
\82Í
\82Å
\82«
\82È
\82¢
\81D");
499 } else if (iswere && (were_beastie(mntmp) == u.ulycn
500 || mntmp == counter_were(u.ulycn)
501 || (Upolyd && mntmp == PM_HUMAN))) {
503 /* Note: humans are illegal as monsters, but an
504 * illegal monster forces newman(), which is what we
505 * want if they specified a human.... */
506 } else if (!polyok(&mons[mntmp])
507 && !(mntmp == PM_HUMAN || your_race(&mons[mntmp])
508 || mntmp == urole.malenum
509 || mntmp == urole.femalenum)) {
512 /* mkclass_poly() can pick a !polyok()
513 candidate; if so, usually try again */
515 if (rn2(3) || --tryct > 0)
517 /* no retries left; put one back on counter
518 so that end of loop decrement will yield
519 0 and trigger thats_enough_tries message */
522 pm_name = mons[mntmp].mname;
523 if (the_unique_pm(&mons[mntmp]))
524 pm_name = the(pm_name);
525 else if (!type_is_pname(&mons[mntmp]))
526 pm_name = an(pm_name);
528 You_cant("polymorph into %s.", pm_name);
530 You_cant("%s
\82É
\95Ï
\89»
\82Å
\82«
\82È
\82¢
\81D", pm_name);
533 } while (--tryct > 0);
535 pline1(thats_enough_tries);
536 /* allow skin merging, even when polymorph is controlled */
537 if (draconian && (tryct <= 0 || mntmp == armor_to_dragon(uarm->otyp)))
539 if (isvamp && (tryct <= 0 || mntmp == PM_WOLF || mntmp == PM_FOG_CLOUD
540 || is_bat(&mons[mntmp])))
542 } else if (draconian || iswere || isvamp) {
543 /* special changes that don't require polyok() */
546 mntmp = armor_to_dragon(uarm->otyp);
547 if (!(mvitals[mntmp].mvflags & G_GENOD)) {
548 /* allow G_EXTINCT */
549 if (Is_dragon_scales(uarm)) {
550 /* dragon scales remain intact as uskin */
552 You("merge with your scaly armor.");
554 You("
\97Ø
\82Ì
\8aZ
\82Æ
\88ê
\91Ì
\89»
\82µ
\82½
\81D");
555 } else { /* dragon scale mail */
556 /* d.scale mail first reverts to scales */
563 /* similar to noarmor(invent.c),
564 shorten to "<color> scale mail" */
565 dsmail = strcpy(buf, simpleonames(uarm));
567 if ((p = strstri(dsmail, " dragon ")) != 0)
568 while ((p[1] = p[8]) != '\0')
571 /* tricky phrasing; dragon scale mail
572 is singular, dragon scales are plural */
574 Your("%s reverts to scales as you merge with them.",
577 Your("%s
\82Í
\97Ø
\82É
\96ß
\82Á
\82½
\81D",
580 /* uarm->spe enchantment remains unchanged;
581 re-converting scales to mail poses risk
582 of evaporation due to over enchanting */
583 uarm->otyp += GRAY_DRAGON_SCALES - GRAY_DRAGON_SCALE_MAIL;
585 context.botl = 1; /* AC is changing */
588 uarm = (struct obj *) 0;
589 /* save/restore hack */
590 uskin->owornmask |= I_SPECIAL;
595 if (Upolyd && were_beastie(mntmp) != u.ulycn)
596 mntmp = PM_HUMAN; /* Illegal; force newman() */
601 if (mntmp < LOW_PM || (mons[mntmp].geno & G_UNIQ))
602 mntmp = (youmonst.data != &mons[PM_VAMPIRE] && !rn2(10))
604 : !rn2(4) ? PM_FOG_CLOUD : PM_VAMPIRE_BAT;
605 if (controllable_poly) {
607 Sprintf(buf, "Become %s?", an(mons[mntmp].mname));
609 Sprintf(buf, "%s
\82É
\82È
\82é
\81H", mons[mntmp].mname);
614 /* if polymon fails, "you feel" message has been given
615 so don't follow up with another polymon or newman;
616 sex_change_ok left disabled here */
617 if (mntmp == PM_HUMAN)
618 newman(); /* werecritter */
620 (void) polymon(mntmp);
621 goto made_change; /* maybe not, but this is right anyway */
624 if (mntmp < LOW_PM) {
627 /* randomly pick an "ordinary" monster */
628 mntmp = rn1(SPECIAL_PM - LOW_PM, LOW_PM);
629 if (polyok(&mons[mntmp]) && !is_placeholder(&mons[mntmp]))
631 } while (--tryct > 0);
634 /* The below polyok() fails either if everything is genocided, or if
635 * we deliberately chose something illegal to force newman().
638 if (!polyok(&mons[mntmp]) || (!forcecontrol && !rn2(5))
639 || your_race(&mons[mntmp])) {
642 (void) polymon(mntmp);
644 sex_change_ok--; /* reset */
647 new_light = emits_light(youmonst.data);
648 if (old_light != new_light) {
650 del_light_source(LS_MONSTER, monst_to_any(&youmonst));
652 ++new_light; /* otherwise it's undetectable */
654 new_light_source(u.ux, u.uy, new_light, LS_MONSTER,
655 monst_to_any(&youmonst));
659 /* (try to) make a mntmp monster out of the player;
660 returns 1 if polymorph successful */
666 boolean sticky = sticks(youmonst.data) && u.ustuck && !u.uswallow,
667 was_blind = !!Blind, dochange = FALSE;
670 if (mvitals[mntmp].mvflags & G_GENOD) { /* allow G_EXTINCT */
672 You_feel("rather %s-ish.", mons[mntmp].mname);
674 You("%s
\82Á
\82Û
\82
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", mons[mntmp].mname);
675 exercise(A_WIS, TRUE);
680 u.uconduct.polyselfs++;
682 /* exercise used to be at the very end but only Wis was affected
683 there since the polymorph was always in effect by then */
684 exercise(A_CON, FALSE);
685 exercise(A_WIS, TRUE);
688 /* Human to monster; save human stats */
691 u.mfemale = flags.female;
693 /* Monster to monster; restore human stats, to be
694 * immediately changed to provide stats for the new monster
698 flags.female = u.mfemale;
701 /* if stuck mimicking gold, stop immediately */
702 if (multi < 0 && U_AP_TYPE == M_AP_OBJECT
703 && youmonst.data->mlet != S_MIMIC)
705 /* if becoming a non-mimic, stop mimicking anything */
706 if (mons[mntmp].mlet != S_MIMIC) {
707 /* as in polyman() */
708 youmonst.m_ap_type = M_AP_NOTHING;
709 youmonst.mappearance = 0;
711 if (is_male(&mons[mntmp])) {
714 } else if (is_female(&mons[mntmp])) {
717 } else if (!is_neuter(&mons[mntmp]) && mntmp != u.ulycn) {
718 if (sex_change_ok && !rn2(10))
723 Strcpy(buf, (u.umonnum != mntmp) ? "" : "new ");
724 #else /*
\93ú
\96{
\8cê
\82Æ
\82µ
\82Ä
\95s
\8e©
\91R
\82É
\82È
\82é
\82Ì
\82Å
\88ê
\92U
\82»
\82Ì
\82Ü
\82Ü
\82É
\82·
\82é*/
728 flags.female = !flags.female;
730 Strcat(buf, (is_male(&mons[mntmp]) || is_female(&mons[mntmp]))
731 ? "" : flags.female ? "female " : "male ");
733 Strcat(buf, (is_male(&mons[mntmp]) || is_female(&mons[mntmp]))
734 ? "" : flags.female ? "
\8f\97\82Ì" : "
\92j
\82Ì");
737 Strcat(buf, mons[mntmp].mname);
739 You("%s %s!", (u.umonnum != mntmp) ? "turn into" : "feel like", an(buf));
741 You("%s%s
\81I", an(buf), (u.umonnum != mntmp) ? "
\82É
\82È
\82Á
\82½" : "
\82Ì
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½");
743 if (Stoned && poly_when_stoned(&mons[mntmp])) {
744 /* poly_when_stoned already checked stone golem genocide */
745 mntmp = PM_STONE_GOLEM;
747 make_stoned(0L, "You turn to stone!", 0, (char *) 0);
749 make_stoned(0L, "
\90Î
\82É
\82È
\82Á
\82½
\81I", 0, (char *) 0);
752 u.mtimedone = rn1(500, 500);
756 /* New stats for monster, to last only as long as polymorphed.
757 * Currently only strength gets changed.
759 if (strongmonst(&mons[mntmp]))
760 ABASE(A_STR) = AMAX(A_STR) = STR18(100);
762 if (Stone_resistance && Stoned) { /* parnes@eniac.seas.upenn.edu */
764 make_stoned(0L, "You no longer seem to be petrifying.", 0,
766 make_stoned(0L, "
\90Î
\89»
\82©
\82ç
\89ð
\95ú
\82³
\82ê
\82½
\82æ
\82¤
\82¾
\81D", 0,
769 if (Sick_resistance && Sick) {
770 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
772 You("no longer feel sick.");
774 You("
\95a
\8bC
\82©
\82ç
\89ð
\95ú
\82³
\82ê
\82½
\82æ
\82¤
\82¾
\81D");
777 if (flaming(youmonst.data)) {
779 make_slimed(0L, "The slime burns away!");
781 make_slimed(0L, "
\83X
\83\89\83C
\83\80\82Í
\94R
\82¦
\82½
\81I");
782 } else if (mntmp == PM_GREEN_SLIME) {
784 make_slimed(0L, (char *) 0);
787 check_strangling(FALSE); /* maybe stop strangling */
788 if (nohands(youmonst.data))
792 mlvl = adj_lev(&mons[mntmp]);
793 * We can't do the above, since there's no such thing as an
794 * "experience level of you as a monster" for a polymorphed character.
796 mlvl = (int) mons[mntmp].mlevel;
797 if (youmonst.data->mlet == S_DRAGON && mntmp >= PM_GRAY_DRAGON) {
798 u.mhmax = In_endgame(&u.uz) ? (8 * mlvl) : (4 * mlvl + d(mlvl, 4));
799 } else if (is_golem(youmonst.data)) {
800 u.mhmax = golemhp(mntmp);
805 u.mhmax = d(mlvl, 8);
806 if (is_home_elemental(&mons[mntmp]))
811 if (u.ulevel < mlvl) {
812 /* Low level characters can't become high level monsters for long */
814 /* DRS/NS 2.2.6 messes up -- Peter Kendell */
815 int mtd = u.mtimedone, ulv = u.ulevel;
817 u.mtimedone = mtd * ulv / mlvl;
819 u.mtimedone = u.mtimedone * u.ulevel / mlvl;
823 if (uskin && mntmp != armor_to_dragon(uskin->otyp))
827 (void) hideunder(&youmonst);
829 if (u.utrap && u.utraptype == TT_PIT) {
830 set_utrap(rn1(6, 2), TT_PIT); /* time to escape resets */
832 if (was_blind && !Blind) { /* previous form was eyeless */
834 make_blinded(0L, TRUE); /* remove blindness */
836 newsym(u.ux, u.uy); /* Change symbol */
838 /* [note: this 'sticky' handling is only sufficient for changing from
839 grabber to engulfer or vice versa because engulfing by poly'd hero
840 always ends immediately so won't be in effect during a polymorph] */
841 if (!sticky && !u.uswallow && u.ustuck && sticks(youmonst.data))
843 else if (sticky && !sticks(youmonst.data))
847 if (touch_petrifies(u.usteed->data) && !Stone_resistance && rnl(3)) {
849 pline("%s touch %s.", no_longer_petrify_resistant,
852 pline("%s
\82Í%s
\82É
\90G
\82ê
\82½
\81D", no_longer_petrify_resistant,
856 Sprintf(buf, "riding %s", an(u.usteed->data->mname));
858 Sprintf(buf, "%s
\82É
\8fæ
\82Á
\82Ä", u.usteed->data->mname);
861 if (!can_ride(u.usteed))
862 dismount_steed(DISMOUNT_POLY);
867 static const char use_thec[] = "Use the command #%s to %s.";
869 static const char use_thec[] = "#%s
\83R
\83}
\83\93\83h
\82Å%s
\82±
\82Æ
\82ª
\82Å
\82«
\82é
\81D";
870 static const char monsterc[] = "monster";
872 if (can_breathe(youmonst.data))
874 pline(use_thec, monsterc, "use your breath weapon");
876 pline(use_thec, monsterc, "
\91§
\82ð
\93f
\82«
\82©
\82¯
\82é");
877 if (attacktype(youmonst.data, AT_SPIT))
879 pline(use_thec, monsterc, "spit venom");
881 pline(use_thec, monsterc, "
\93Å
\82ð
\93f
\82");
882 if (youmonst.data->mlet == S_NYMPH)
884 pline(use_thec, monsterc, "remove an iron ball");
886 pline(use_thec, monsterc, "
\93S
\8b\85\82ð
\82Í
\82¸
\82·");
887 if (attacktype(youmonst.data, AT_GAZE))
889 pline(use_thec, monsterc, "gaze at monsters");
891 pline(use_thec, monsterc, "
\89ö
\95¨
\82ðáÉ
\82Þ");
892 if (is_hider(youmonst.data))
894 pline(use_thec, monsterc, "hide");
896 pline(use_thec, monsterc, "
\89B
\82ê
\82é");
897 if (is_were(youmonst.data))
899 pline(use_thec, monsterc, "summon help");
901 pline(use_thec, monsterc, "
\92\87\8aÔ
\82ð
\8f¢
\8a«
\82·
\82é");
902 if (webmaker(youmonst.data))
904 pline(use_thec, monsterc, "spin a web");
906 pline(use_thec, monsterc, "
\82
\82à
\82Ì
\91\83\82ð
\92£
\82é");
907 if (u.umonnum == PM_GREMLIN)
909 pline(use_thec, monsterc, "multiply in a fountain");
911 pline(use_thec, monsterc, "
\90ò
\82Ì
\92\86\82Å
\95ª
\97ô
\82·
\82é");
912 if (is_unicorn(youmonst.data))
914 pline(use_thec, monsterc, "use your horn");
916 pline(use_thec,monsterc, "
\8ap
\82ð
\8eg
\82¤");
917 if (is_mind_flayer(youmonst.data))
919 pline(use_thec, monsterc, "emit a mental blast");
921 pline(use_thec,monsterc, "
\90¸
\90_
\94g
\82ð
\94
\90¶
\82³
\82¹
\82é");
922 if (youmonst.data->msound == MS_SHRIEK) /* worthless, actually */
924 pline(use_thec, monsterc, "shriek");
926 pline(use_thec,monsterc, "
\8bà
\90Ø
\82è
\90º
\82ð
\82 \82°
\82é");
927 if (is_vampire(youmonst.data))
929 pline(use_thec, monsterc, "change shape");
931 pline(use_thec, monsterc, "
\8ep
\82ð
\95Ï
\82¦
\82é");
933 if (lays_eggs(youmonst.data) && flags.female &&
934 !(youmonst.data == &mons[PM_GIANT_EEL]
935 || youmonst.data == &mons[PM_ELECTRIC_EEL]))
937 pline(use_thec, "sit",
938 eggs_in_water(youmonst.data) ?
939 "spawn in the water" : "lay an egg");
940 #else /*
\93ú
\96{
\8cê
\82Å
\82Í
\90\85\92\86\82Å
\82à
\81u
\97\91\82ð
\8eY
\82Þ
\81v
\82Å
\96â
\91è
\82È
\82¢ */
941 pline(use_thec, "sit", "
\97\91\82ð
\8eY
\82Þ");
945 /* you now know what an egg of your type looks like */
946 if (lays_eggs(youmonst.data)) {
947 learn_egg_type(u.umonnum);
948 /* make queen bees recognize killer bee eggs */
949 learn_egg_type(egg_type_from_parent(u.umonnum, TRUE));
952 if ((!Levitation && !u.ustuck && !Flying && is_pool_or_lava(u.ux, u.uy))
953 || (Underwater && !Swimming))
955 if (Passes_walls && u.utrap
956 && (u.utraptype == TT_INFLOOR || u.utraptype == TT_BURIEDBALL)) {
957 if (u.utraptype == TT_INFLOOR) {
959 pline_The("rock seems to no longer trap you.");
961 pline("
\8aâ
\82É
\95Â
\82¶
\8d\9e\82ß
\82ç
\82ê
\82é
\82±
\82Æ
\82Í
\82È
\82¢
\82¾
\82ë
\82¤
\81D");
964 pline_The("buried ball is no longer bound to you.");
966 pline_The("
\96\84\82Ü
\82Á
\82½
\8b\85\82ª
\8e×
\96\82\82É
\82È
\82é
\82±
\82Æ
\82Í
\82È
\82¢
\82¾
\82ë
\82¤
\81D");
967 buried_ball_to_freedom();
970 } else if (likes_lava(youmonst.data) && u.utrap
971 && u.utraptype == TT_LAVA) {
973 pline_The("%s now feels soothing.", hliquid("lava"));
975 pline_The("%s
\82ª
\90¸
\90_
\82ð
\97\8e\82¿
\82Â
\82©
\82¹
\82Ä
\82
\82ê
\82é
\81D", hliquid("
\97n
\8aâ"));
978 if (amorphous(youmonst.data) || is_whirly(youmonst.data)
979 || unsolid(youmonst.data)) {
982 You("slip out of the iron chain.");
984 You("
\93S
\82Ì
\8d½
\82©
\82ç
\82·
\82é
\82è
\82Æ
\94²
\82¯
\82½
\81D");
986 } else if (u.utrap && u.utraptype == TT_BURIEDBALL) {
988 You("slip free of the buried ball and chain.");
990 You("
\96\84\82Ü
\82Á
\82Ä
\82¢
\82é
\8b\85\82Æ
\8d½
\82©
\82ç
\82·
\82é
\82è
\82Æ
\94²
\82¯
\82½
\81D");
991 buried_ball_to_freedom();
994 if (u.utrap && (u.utraptype == TT_WEB || u.utraptype == TT_BEARTRAP)
995 && (amorphous(youmonst.data) || is_whirly(youmonst.data)
996 || unsolid(youmonst.data) || (youmonst.data->msize <= MZ_SMALL
997 && u.utraptype == TT_BEARTRAP))) {
999 You("are no longer stuck in the %s.",
1000 u.utraptype == TT_WEB ? "web" : "bear trap");
1002 You("%s
\82©
\82ç
\92E
\8fo
\82µ
\82½
\81D",
1003 u.utraptype == TT_WEB ? "
\82
\82à
\82Ì
\91\83" : "
\8cF
\82Ìã©");
1005 /* probably should burn webs too if PM_FIRE_ELEMENTAL */
1008 if (webmaker(youmonst.data) && u.utrap && u.utraptype == TT_WEB) {
1010 You("orient yourself on the web.");
1012 You("
\82
\82à
\82Ì
\91\83\82É
\93K
\89\9e\82µ
\82½
\81D");
1015 check_strangling(TRUE); /* maybe start strangling */
1018 vision_full_recalc = 1;
1020 (void) encumber_msg();
1022 retouch_equipment(2);
1023 /* this might trigger a recursive call to polymon() [stone golem
1024 wielding cockatrice corpse and hit by stone-to-flesh, becomes
1025 flesh golem above, now gets transformed back into stone golem] */
1027 selftouch(no_longer_petrify_resistant);
1031 /* dropx() jacket for break_armor() */
1039 * Dropping worn armor while polymorphing might put hero into water
1040 * (loss of levitation boots or water walking boots that the new
1041 * form can't wear), where emergency_disrobe() could remove it from
1042 * inventory. Without this, dropx() could trigger an 'object lost'
1043 * panic. Right now, boots are the only armor which might encounter
1044 * this situation, but handle it for all armor.
1046 * Hypothetically, 'obj' could have merged with something (not
1047 * applicable for armor) and no longer be a valid pointer, so scan
1048 * inventory for it instead of trusting obj->where.
1050 for (otmp = invent; otmp; otmp = otmp->nobj) {
1061 register struct obj *otmp;
1063 if (breakarm(youmonst.data)) {
1064 if ((otmp = uarm) != 0) {
1068 You("break out of your armor!");
1070 You("
\8aZ
\82ð
\89ó
\82µ
\82½
\81I");
1071 exercise(A_STR, FALSE);
1072 (void) Armor_gone();
1075 if ((otmp = uarmc) != 0) {
1076 if (otmp->oartifact) {
1078 Your("%s falls off!", cloak_simple_name(otmp));
1080 Your("%s
\82Í
\92E
\82°
\97\8e\82¿
\82½
\81I", cloak_simple_name(otmp));
1085 Your("%s tears apart!", cloak_simple_name(otmp));
1087 Your("%s
\82Í
\82¸
\82½
\82¸
\82½
\82É
\88ø
\82«
\97ô
\82©
\82ê
\82½
\81I", cloak_simple_name(otmp));
1094 Your("shirt rips to shreds!");
1096 Your("
\83V
\83\83\83c
\82Í
\88ø
\82«
\97ô
\82©
\82ê
\82½
\81I");
1099 } else if (sliparm(youmonst.data)) {
1100 if (((otmp = uarm) != 0) && (racial_exception(&youmonst, otmp) < 1)) {
1104 Your("armor falls around you!");
1106 Your("
\8aZ
\82Í
\82 \82È
\82½
\82Ì
\82Ü
\82í
\82è
\82É
\97\8e\82¿
\82½
\81I");
1107 (void) Armor_gone();
1110 if ((otmp = uarmc) != 0) {
1111 if (is_whirly(youmonst.data))
1113 Your("%s falls, unsupported!", cloak_simple_name(otmp));
1115 Your("%s
\82Í
\82·
\82Æ
\82ñ
\82Æ
\97\8e\82¿
\82½
\81I", cloak_simple_name(otmp));
1118 You("shrink out of your %s!", cloak_simple_name(otmp));
1120 You("%s
\82©
\82ç
\8fk
\82Ý
\8fo
\82½
\81I", cloak_simple_name(otmp));
1124 if ((otmp = uarmu) != 0) {
1125 if (is_whirly(youmonst.data))
1127 You("seep right through your shirt!");
1129 You("
\83V
\83\83\83c
\82©
\82ç
\82µ
\82Ý
\8fo
\82½
\81I");
1132 You("become much too small for your shirt!");
1134 You("
\83V
\83\83\83c
\82æ
\82è
\82¸
\82Á
\82Æ
\8f¬
\82³
\82
\82È
\82Á
\82½
\81I");
1135 setworn((struct obj *) 0, otmp->owornmask & W_ARMU);
1139 if (has_horns(youmonst.data)) {
1140 if ((otmp = uarmh) != 0) {
1141 if (is_flimsy(otmp) && !donning(otmp)) {
1143 char hornbuf[BUFSZ];
1145 /* Future possibilities: This could damage/destroy helmet */
1146 Sprintf(hornbuf, "horn%s", plur(num_horns(youmonst.data)));
1147 Your("%s %s through %s.", hornbuf, vtense(hornbuf, "pierce"),
1150 Your("
\8ap
\82ª%s
\82ð
\82Â
\82ç
\82Ê
\82¢
\82½
\81D", yname(otmp));
1156 Your("%s falls to the %s!", helm_simple_name(otmp),
1157 surface(u.ux, u.uy));
1159 Your("%s
\82Í%s
\82É
\97\8e\82¿
\82½
\81I", helm_simple_name(otmp),
1160 surface(u.ux, u.uy));
1162 (void) Helmet_off();
1167 if (nohands(youmonst.data) || verysmall(youmonst.data)) {
1168 if ((otmp = uarmg) != 0) {
1171 /* Drop weapon along with gloves */
1173 You("drop your gloves%s!", uwep ? " and weapon" : "");
1175 You("
\8f¬
\8eè%s
\82ð
\97\8e\82µ
\82½
\81I", uwep ? "
\82â
\95\90\8aí" : "");
1177 (void) Gloves_off();
1178 /* Glib manipulation (ends immediately) handled by Gloves_off */
1181 if ((otmp = uarms) != 0) {
1183 You("can no longer hold your shield!");
1185 You("
\82à
\82¤
\8f\82\82ð
\8e\9d\82Á
\82Ä
\82ç
\82ê
\82È
\82¢
\81I");
1186 (void) Shield_off();
1189 if ((otmp = uarmh) != 0) {
1193 Your("%s falls to the %s!", helm_simple_name(otmp),
1194 surface(u.ux, u.uy));
1196 Your("%s
\82Í%s
\82É
\97\8e\82¿
\82½
\81I", helm_simple_name(otmp),
1197 surface(u.ux, u.uy));
1199 (void) Helmet_off();
1203 if (nohands(youmonst.data) || verysmall(youmonst.data)
1204 || slithy(youmonst.data) || youmonst.data->mlet == S_CENTAUR) {
1205 if ((otmp = uarmf) != 0) {
1208 if (is_whirly(youmonst.data))
1210 Your("boots fall away!");
1212 Your("
\8cC
\82Í
\92E
\82°
\97\8e\82¿
\82½
\81I");
1215 Your("boots %s off your feet!",
1216 verysmall(youmonst.data) ? "slide" : "are pushed");
1218 Your("
\8cC
\82Í
\82 \82È
\82½
\82Ì
\91«
\82©
\82ç%s
\81I",
1219 verysmall(youmonst.data) ? "
\8a\8a\82è
\97\8e\82¿
\82½" : "
\92E
\82°
\97\8e\82¿
\82½");
1233 const char *what, *which, *whichtoo;
1235 const char *which, *whichtoo;
1237 boolean candropwep, candropswapwep, updateinv = TRUE;
1240 /* !alone check below is currently superfluous but in the
1241 * future it might not be so if there are monsters which cannot
1242 * wear gloves but can wield weapons
1244 if (!alone || cantwield(youmonst.data)) {
1245 candropwep = canletgo(uwep, "");
1246 candropswapwep = !u.twoweap || canletgo(uswapwep, "");
1249 what = (candropwep && candropswapwep) ? "drop" : "release";
1252 which = is_sword(uwep) ? "sword" : weapon_descr(uwep);
1254 which = is_sword(uwep) ? "
\8c\95" : weapon_descr(uwep);
1258 is_sword(uswapwep) ? "sword" : weapon_descr(uswapwep);
1260 is_sword(uswapwep) ? "
\8c\95" : weapon_descr(uswapwep);
1261 if (strcmp(which, whichtoo))
1265 which = "
\95\90\8aí";
1267 #if 0 /*JP*//*
\95¡
\90\94\8c`
\82É
\82µ
\82È
\82¢*/
1268 if (uwep->quan != 1L || u.twoweap)
1269 which = makeplural(which);
1273 You("find you must %s %s %s!", what,
1274 the_your[!!strncmp(which, "corpse", 6)], which);
1276 You("%s
\82ð
\97\8e\82Æ
\82µ
\82½
\82±
\82Æ
\82É
\8bC
\82Ã
\82¢
\82½
\81I", which);
1279 /* if either uwep or wielded uswapwep is flagged as 'in_use'
1280 then don't drop it or explicitly update inventory; leave
1281 those actions to caller (or caller's caller, &c) */
1287 else if (candropswapwep)
1294 else if (candropwep)
1296 /* [note: dropp vs dropx -- if heart of ahriman is wielded, we
1297 might be losing levitation by dropping it; but that won't
1298 happen until the drop, unlike Boots_off() dumping hero into
1299 water and triggering emergency_disrobe() before dropx()] */
1303 } else if (!could_twoweap(youmonst.data)) {
1312 boolean was_flying = (Flying != 0);
1314 /* You can't revert back while unchanging */
1318 killer.format = NO_KILLER_PREFIX;
1319 Strcpy(killer.name, "killed while stuck in creature form");
1321 killer.format = KILLED_BY;
1322 Strcpy(killer.name, "
\8c³
\82Ì
\8ep
\82Ö
\96ß
\82ê
\82¸
\82É");
1325 } else if (uamul && uamul->otyp == AMULET_OF_UNCHANGING) {
1327 Your("%s %s!", simpleonames(uamul), otense(uamul, "fail"));
1329 Your("%s
\82É
\8e¸
\94s
\82µ
\82½
\81I", simpleonames(uamul));
1331 makeknown(AMULET_OF_UNCHANGING);
1335 if (emits_light(youmonst.data))
1336 del_light_source(LS_MONSTER, monst_to_any(&youmonst));
1338 polyman("return to %s form!", urace.adj);
1340 polyman("%s
\8ep
\82É
\96ß
\82Á
\82½
\81I", urace.adj);
1343 /* can only happen if some bit of code reduces u.uhp
1344 instead of u.mh while poly'd */
1346 Your("old form was not healthy enough to survive.");
1348 Your("
\8c³
\82Ì
\8ep
\82Í
\90¶
\82«
\82Ä
\82¢
\82
\82¾
\82¯
\82Ì
\97Í
\82ª
\82È
\82¢
\81D");
1350 Sprintf(killer.name, "reverting to unhealthy %s form", urace.adj);
1352 Sprintf(killer.name, "
\95s
\8c\92\8dN
\82È%s
\82Ì
\8ep
\82É
\96ß
\82Á
\82Ä", urace.adj);
1353 killer.format = KILLED_BY;
1359 vision_full_recalc = 1;
1360 (void) encumber_msg();
1361 if (was_flying && !Flying && u.usteed)
1363 You("and %s return gently to the %s.",
1364 mon_nam(u.usteed), surface(u.ux, u.uy));
1366 You("
\82Æ%s
\82Í%s
\82É
\92\85\92n
\82µ
\82½
\81D",
1367 mon_nam(u.usteed), surface(u.ux, u.uy));
1369 retouch_equipment(2);
1371 selftouch(no_longer_petrify_resistant);
1377 struct attack *mattk;
1381 You_cant("breathe. Sorry.");
1383 You_cant("
\91§
\82ð
\93f
\82
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81D
\8ec
\94O
\81D");
1388 You("don't have enough energy to breathe!");
1390 You("
\91§
\82ð
\93f
\82
\82Ì
\82É
\8f\
\95ª
\82È
\83G
\83l
\83\8b\83M
\81[
\82ª
\82È
\82©
\82Á
\82½
\81D");
1396 if (!getdir((char *) 0))
1399 mattk = attacktype_fordmg(youmonst.data, AT_BREA, AD_ANY);
1401 impossible("bad breath attack?"); /* mouthwash needed... */
1402 else if (!u.dx && !u.dy && !u.dz)
1405 buzz((int) (20 + mattk->adtyp - 1), (int) mattk->damn, u.ux, u.uy,
1414 struct attack *mattk;
1416 if (!getdir((char *) 0))
1418 mattk = attacktype_fordmg(youmonst.data, AT_SPIT, AD_ANY);
1420 impossible("bad spit attack?");
1422 switch (mattk->adtyp) {
1425 otmp = mksobj(BLINDING_VENOM, TRUE, FALSE);
1428 impossible("bad attack type in dospit");
1431 otmp = mksobj(ACID_VENOM, TRUE, FALSE);
1434 otmp->spe = 1; /* to indicate it's yours */
1435 throwit(otmp, 0L, FALSE);
1444 if (u.utrap && u.utraptype == TT_BURIEDBALL) {
1446 pline_The("ball and chain are buried firmly in the %s.",
1447 surface(u.ux, u.uy));
1449 pline_The("
\8b\85\82Æ
\8d½
\82Í%s
\82É
\82µ
\82Á
\82©
\82è
\82Æ
\96\84\82Ü
\82Á
\82Ä
\82¢
\82é
\81D.",
1450 surface(u.ux, u.uy));
1455 You("are not chained to anything!");
1457 You("
\89½
\82à
\82Â
\82È
\82ª
\82ê
\82Ä
\82¢
\82È
\82¢
\81I");
1467 register struct trap *ttmp = t_at(u.ux, u.uy);
1469 if (Levitation || Is_airlevel(&u.uz) || Underwater
1470 || Is_waterlevel(&u.uz)) {
1472 You("must be on the ground to spin a web.");
1474 You("
\82
\82à
\82Ì
\91\83\82ð
\92£
\82é
\82É
\82Í
\92n
\96Ê
\82Ì
\8fã
\82É
\82¢
\82È
\82
\82Ä
\82Í
\82È
\82ç
\82È
\82¢
\81D");
1479 You("release web fluid inside %s.", mon_nam(u.ustuck));
1481 You("%s
\82Ì
\93à
\82Å
\82
\82à
\82Ì
\91\83\82ð
\93f
\82«
\8fo
\82µ
\82½
\81D", mon_nam(u.ustuck));
1482 if (is_animal(u.ustuck->data)) {
1483 expels(u.ustuck, u.ustuck->data, TRUE);
1486 if (is_whirly(u.ustuck->data)) {
1489 for (i = 0; i < NATTK; i++)
1490 if (u.ustuck->data->mattk[i].aatyp == AT_ENGL)
1493 impossible("Swallower has no engulfing attack?");
1498 switch (u.ustuck->data->mattk[i].adtyp) {
1501 Strcpy(sweep, "ignites and ");
1503 Strcpy(sweep, "
\94
\89Î
\82µ");
1507 Strcpy(sweep, "fries and ");
1509 Strcpy(sweep, "
\8fÅ
\82°");
1513 Strcpy(sweep, "freezes, shatters and ");
1515 Strcpy(sweep, "
\93\80\82è
\82Â
\82«
\81C
\82±
\82È
\82²
\82È
\82É
\82È
\82è");
1519 pline_The("web %sis swept away!", sweep);
1521 pline("
\82
\82à
\82Ì
\91\83\82Í%s
\82È
\82
\82È
\82Á
\82½
\81I", sweep);
1524 } /* default: a nasty jelly-like creature */
1526 pline_The("web dissolves into %s.", mon_nam(u.ustuck));
1528 pline("
\82
\82à
\82Ì
\91\83\82Í
\95ª
\89ð
\82µ
\82Ä%s
\82É
\82È
\82Á
\82½
\81D", mon_nam(u.ustuck));
1533 You("cannot spin webs while stuck in a trap.");
1535 You("ã©
\82É
\82Í
\82Ü
\82Á
\82Ä
\82¢
\82é
\8aÔ
\82Í
\82
\82à
\82Ì
\91\83\82ð
\92£
\82ê
\82È
\82¢
\81D");
1538 exercise(A_DEX, TRUE);
1540 switch (ttmp->ttyp) {
1544 You("spin a web, covering up the pit.");
1546 You("
\82
\82à
\82Ì
\91\83\82ð
\92£
\82è
\81C
\97\8e\82µ
\8c\8a\82ð
\95¢
\82Á
\82½
\81D");
1548 bury_objs(u.ux, u.uy);
1553 pline_The("squeaky board is muffled.");
1555 pline("
\82«
\82µ
\82Þ
\94Â
\82Í
\95¢
\82í
\82ê
\82½
\81D");
1562 case VIBRATING_SQUARE:
1564 Your("webbing vanishes!");
1566 Your("
\82
\82à
\82Ì
\91\83\82Í
\8fÁ
\82¦
\82½
\81I");
1570 You("make the web thicker.");
1572 You("
\82
\82à
\82Ì
\91\83\82ð
\82æ
\82è
\8cú
\82
\82µ
\82½
\81D");
1577 You("web over the %s.",
1578 (ttmp->ttyp == TRAPDOOR) ? "trap door" : "hole");
1580 You("%s
\82ð
\82
\82à
\82Ì
\91\83\82Å
\95¢
\82Á
\82½
\81D",
1581 (ttmp->ttyp == TRAPDOOR) ? "
\97\8e\82µ
\94à" : "
\8c\8a");
1586 case ROLLING_BOULDER_TRAP:
1588 You("spin a web, jamming the trigger.");
1590 You("
\82
\82à
\82Ì
\91\83\82ð
\92£
\82Á
\82Ä
\81C
\83X
\83C
\83b
\83`
\82ð
\93®
\82©
\82È
\82
\82µ
\82½
\81D");
1606 You("have triggered a trap!");
1608 You("ã©
\82ð
\8en
\93®
\82³
\82¹
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I");
1612 impossible("Webbing over trap type %d?", ttmp->ttyp);
1615 } else if (On_stairs(u.ux, u.uy)) {
1616 /* cop out: don't let them hide the stairs */
1618 Your("web fails to impede access to the %s.",
1619 (levl[u.ux][u.uy].typ == STAIRS) ? "stairs" : "ladder");
1621 Your("
\82
\82à
\82Ì
\91\83\82Í%s
\82Ö
\82Ì
\88Ú
\93®
\82ð
\8e×
\96\82\82Å
\82«
\82È
\82¢
\81D",
1622 (levl[u.ux][u.uy].typ == STAIRS) ? "
\8aK
\92i" : "
\82Í
\82µ
\82²");
1626 ttmp = maketrap(u.ux, u.uy, WEB);
1640 You("lack the energy to send forth a call for help!");
1642 You("
\8f\95\82¯
\82ð
\8cÄ
\82Ô
\82¾
\82¯
\82Ì
\91Ì
\97Í
\82ª
\82È
\82¢
\81I");
1649 You("call upon your brethren for help!");
1651 You("
\92\87\8aÔ
\82ð
\8cÄ
\82ñ
\82¾
\81I");
1652 exercise(A_WIS, TRUE);
1653 if (!were_summon(youmonst.data, TRUE, &placeholder, (char *) 0))
1655 pline("But none arrive.");
1657 pline("
\82µ
\82©
\82µ
\81C
\89½
\82à
\97\88\82È
\82¢
\81D");
1664 register struct monst *mtmp;
1670 for (i = 0; i < NATTK; i++) {
1671 if (youmonst.data->mattk[i].aatyp == AT_GAZE) {
1672 adtyp = youmonst.data->mattk[i].adtyp;
1676 if (adtyp != AD_CONF && adtyp != AD_FIRE) {
1677 impossible("gaze attack %d?", adtyp);
1683 You_cant("see anything to gaze at.");
1685 You("
\96Ú
\82ª
\8c©
\82¦
\82È
\82¢
\82Ì
\82Å
\81C
\82É
\82ç
\82ß
\82È
\82¢
\81D");
1687 } else if (Hallucination) {
1689 You_cant("gaze at anything you can see.");
1691 You_cant("
\8c©
\82¦
\82é
\82à
\82Ì
\82ð
\89½
\82à
\82É
\82ç
\82ß
\82È
\82¢
\81D");
1696 You("lack the energy to use your special gaze!");
1698 You("
\82É
\82ç
\82Þ
\82¾
\82¯
\82Ì
\91Ì
\97Í
\82ª
\82È
\82¢
\81I");
1704 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
1705 if (DEADMONSTER(mtmp))
1707 if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my)) {
1709 if (Invis && !perceives(mtmp->data)) {
1711 pline("%s seems not to notice your gaze.", Monnam(mtmp));
1713 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\82É
\82ç
\82Ý
\82É
\8bC
\82ª
\82Â
\82¢
\82Ä
\82È
\82¢
\82æ
\82¤
\82¾
\81D", Monnam(mtmp));
1714 } else if (mtmp->minvis && !See_invisible) {
1716 You_cant("see where to gaze at %s.", Monnam(mtmp));
1718 You("%s
\82Í
\8c©
\82¦
\82È
\82¢
\82Ì
\82Å
\81C
\82É
\82ç
\82ß
\82È
\82¢", Monnam(mtmp));
1719 } else if (M_AP_TYPE(mtmp) == M_AP_FURNITURE
1720 || M_AP_TYPE(mtmp) == M_AP_OBJECT) {
1723 } else if (flags.safe_dog && mtmp->mtame && !Confusion) {
1725 You("avoid gazing at %s.", y_monnam(mtmp));
1727 You("%s
\82©
\82ç
\96Ú
\82ð
\82»
\82ç
\82µ
\82Ä
\82µ
\82Ü
\82Á
\82½
\81D", y_monnam(mtmp));
1729 if (flags.confirm && mtmp->mpeaceful && !Confusion) {
1731 Sprintf(qbuf, "Really %s %s?",
1732 (adtyp == AD_CONF) ? "confuse" : "attack",
1735 Sprintf(qbuf, "
\96{
\93\96\82É%s
\82ð%s
\81H",
1737 (adtyp == AD_CONF) ? "
\8d¬
\97\90\82³
\82¹
\82é" : "
\8dU
\8c\82\82·
\82é");
1739 if (yn(qbuf) != 'y')
1742 setmangry(mtmp, TRUE);
1743 if (!mtmp->mcanmove || mtmp->mstun || mtmp->msleeping
1744 || !mtmp->mcansee || !haseyes(mtmp->data)) {
1748 /* No reflection check for consistency with when a monster
1749 * gazes at *you*--only medusa gaze gets reflected then.
1751 if (adtyp == AD_CONF) {
1754 Your("gaze confuses %s!", mon_nam(mtmp));
1756 Your("
\82É
\82ç
\82Ý
\82Í%s
\82ð
\8d¬
\97\90\82³
\82¹
\82½
\81I", mon_nam(mtmp));
1759 pline("%s is getting more and more confused.",
1761 pline("%s
\82Í
\82Ü
\82·
\82Ü
\82·
\8d¬
\97\90\82µ
\82½
\81I",
1764 } else if (adtyp == AD_FIRE) {
1765 int dmg = d(2, 6), lev = (int) u.ulevel;
1768 You("attack %s with a fiery gaze!", mon_nam(mtmp));
1770 You("
\89\8a\82Ì
\82É
\82ç
\82Ý
\82Å%s
\82ð
\8dU
\8c\82\82µ
\82½
\81I", mon_nam(mtmp));
1771 if (resists_fire(mtmp)) {
1773 pline_The("fire doesn't burn %s!", mon_nam(mtmp));
1775 pline("%s
\82Í
\89\8a\82Å
\94R
\82¦
\82È
\82©
\82Á
\82½
\81I", mon_nam(mtmp));
1779 (void) destroy_mitem(mtmp, SCROLL_CLASS, AD_FIRE);
1781 (void) destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
1783 (void) destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE);
1786 if (DEADMONSTER(mtmp))
1789 /* For consistency with passive() in uhitm.c, this only
1790 * affects you if the monster is still alive.
1792 if (DEADMONSTER(mtmp))
1795 if (mtmp->data == &mons[PM_FLOATING_EYE] && !mtmp->mcan) {
1798 You("are frozen by %s gaze!",
1799 s_suffix(mon_nam(mtmp)));
1801 You("%s
\82Ì
\82É
\82ç
\82Ý
\82Å
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81I",
1804 nomul((u.ulevel > 6 || rn2(4))
1805 ? -d((int) mtmp->m_lev + 1,
1806 (int) mtmp->data->mattk[0].damd)
1809 multi_reason = "frozen by a monster's gaze";
1811 multi_reason = "
\89ö
\95¨
\82Ì
\82É
\82ç
\82Ý
\82Å
\8dd
\92¼
\82µ
\82Ä
\82¢
\82é
\8e\9e\82É";
1816 You("stiffen momentarily under %s gaze.",
1817 s_suffix(mon_nam(mtmp)));
1819 You("%s
\82Ì
\82É
\82ç
\82Ý
\82Å
\88ê
\8fu
\8dd
\92¼
\82µ
\82½
\81D",
1823 /* Technically this one shouldn't affect you at all because
1824 * the Medusa gaze is an active monster attack that only
1825 * works on the monster's turn, but for it to *not* have an
1826 * effect would be too weird.
1828 if (mtmp->data == &mons[PM_MEDUSA] && !mtmp->mcan) {
1830 pline("Gazing at the awake %s is not a very good idea.",
1832 pline("
\96Ú
\82ð
\8ao
\82Ü
\82µ
\82Ä
\82¢
\82é%s
\82ð
\82É
\82ç
\82Þ
\82Ì
\82Í
\8c«
\82¢
\82±
\82Æ
\82¶
\82á
\82È
\82¢
\81D",
1834 /* as if gazing at a sleeping anything is fruitful... */
1836 You("turn to stone...");
1838 You("
\90Î
\82É
\82È
\82Á
\82½
\81D
\81D
\81D");
1839 killer.format = KILLED_BY;
1841 Strcpy(killer.name, "deliberately meeting Medusa's gaze");
1843 Strcpy(killer.name, "
\82í
\82´
\82í
\82´
\83\81\83f
\83\85\81[
\83T
\82Ì
\82É
\82ç
\82Ý
\82ð
\82Ü
\82Æ
\82à
\82É
\8c©
\82Ä");
1851 You("gaze at no place in particular.");
1853 You("
\8eÀ
\8dÛ
\82É
\82Í
\89½
\82à
\82É
\82ç
\82ß
\82È
\82©
\82Á
\82½
\81D");
1860 boolean ismimic = youmonst.data->mlet == S_MIMIC,
1861 on_ceiling = is_clinger(youmonst.data) || Flying;
1863 /* can't hide while being held (or holding) or while trapped
1864 (except for floor hiders [trapper or mimic] in pits) */
1865 if (u.ustuck || (u.utrap && (u.utraptype != TT_PIT || on_ceiling))) {
1867 You_cant("hide while you're %s.",
1868 !u.ustuck ? "trapped"
1869 : u.uswallow ? (is_animal(u.ustuck->data) ? "swallowed"
1871 : !sticks(youmonst.data) ? "being held"
1872 : (humanoid(u.ustuck->data) ? "holding someone"
1873 : "holding that creature"));
1875 You_cant("%s
\8aÔ
\82Í
\89B
\82ê
\82ç
\82ê
\82È
\82¢
\81D",
1876 !u.ustuck ? "
\95ß
\82Ü
\82Á
\82Ä
\82¢
\82é"
1877 : u.uswallow ? "
\88ù
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82é"
1878 : !sticks(youmonst.data) ? "
\95ß
\82Ü
\82¦
\82ç
\82ê
\82Ä
\82¢
\82é"
1879 : humanoid(u.ustuck->data) ? "
\92N
\82©
\82ð
\82Â
\82©
\82ñ
\82Å
\82¢
\82é"
1880 : "
\89ö
\95¨
\82ð
\82Â
\82©
\82ñ
\82Å
\82¢
\82é");
1883 || (ismimic && U_AP_TYPE != M_AP_NOTHING)) {
1885 youmonst.m_ap_type = M_AP_NOTHING;
1890 /* note: the eel and hides_under cases are hypothetical;
1891 such critters aren't offered the option of hiding via #monster */
1892 if (youmonst.data->mlet == S_EEL && !is_pool(u.ux, u.uy)) {
1893 if (IS_FOUNTAIN(levl[u.ux][u.uy].typ))
1895 The("fountain is not deep enough to hide in.");
1897 The("
\90ò
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\82Ù
\82Ç
\90[
\82
\82È
\82¢
\81D");
1900 There("is no %s to hide in here.", hliquid("water"));
1902 There("
\82±
\82±
\82É
\82Í
\89B
\82ê
\82é
\82½
\82ß
\82Ì%s
\82ª
\82È
\82¢
\81D", hliquid("
\90\85"));
1906 if (hides_under(youmonst.data) && !level.objects[u.ux][u.uy]) {
1908 There("is nothing to hide under here.");
1910 There("
\82±
\82±
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\82à
\82Ì
\82ª
\82È
\82¢
\81D");
1914 /* Planes of Air and Water */
1915 if (on_ceiling && !has_ceiling(&u.uz)) {
1917 There("is nowhere to hide above you.");
1919 There("
\82 \82È
\82½
\82Ì
\8fã
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\8fê
\8f\8a\82ª
\82È
\82¢
\81D");
1923 if ((is_hider(youmonst.data) && !Flying) /* floor hider */
1924 && (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz))) {
1926 There("is nowhere to hide beneath you.");
1928 There("
\82 \82È
\82½
\82Ì
\89º
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\8fê
\8f\8a\82ª
\82È
\82¢
\81D");
1932 /* TODO? inhibit floor hiding at furniture locations, or
1933 * else make youhiding() give smarter messages at such spots.
1936 if (u.uundetected || (ismimic && U_AP_TYPE != M_AP_NOTHING)) {
1937 youhiding(FALSE, 1); /* "you are already hiding" */
1942 /* should bring up a dialog "what would you like to imitate?" */
1943 youmonst.m_ap_type = M_AP_OBJECT;
1944 youmonst.mappearance = STRANGE_OBJECT;
1948 youhiding(FALSE, 0); /* "you are now hiding" */
1955 struct permonst *savedat = youmonst.data;
1957 if (is_vampire(youmonst.data)) {
1959 if (savedat != youmonst.data) {
1961 You("transform into %s.", an(youmonst.data->mname));
1963 You("%s
\82Ì
\8ep
\82É
\82È
\82Á
\82½
\81D", youmonst.data->mname);
1973 struct monst *mtmp, *nmon;
1977 You("concentrate but lack the energy to maintain doing so.");
1979 You("
\8fW
\92\86\82µ
\82½
\81D
\82µ
\82©
\82µ
\83G
\83l
\83\8b\83M
\81[
\82ª
\91«
\82è
\82È
\82¢
\81D");
1986 You("concentrate.");
1988 You("
\8fW
\92\86\82µ
\82½
\81D");
1990 pline("A wave of psychic energy pours out.");
1992 pline("
\90¸
\90_
\83G
\83l
\83\8b\83M
\81[
\94g
\82ª
\95ú
\8eU
\82µ
\82½
\81D");
1993 for (mtmp = fmon; mtmp; mtmp = nmon) {
1997 if (DEADMONSTER(mtmp))
1999 if (distu(mtmp->mx, mtmp->my) > BOLT_LIM * BOLT_LIM)
2001 if (mtmp->mpeaceful)
2003 u_sen = telepathic(mtmp->data) && !mtmp->mcansee;
2004 if (u_sen || (telepathic(mtmp->data) && rn2(2)) || !rn2(10)) {
2006 You("lock in on %s %s.", s_suffix(mon_nam(mtmp)),
2008 : telepathic(mtmp->data) ? "latent telepathy" : "mind");
2010 pline("%s
\82Ì%s
\82è
\8d\9e\82ñ
\82¾
\81D", mon_nam(mtmp),
2011 u_sen ? "
\90¸
\90_
\82É
\93ü"
2012 : telepathic(mtmp->data) ? "
\90ö
\8dÝ
\93I
\90¸
\90_
\82É
\93ü" : "
\90[
\91w
\88Ó
\8e¯
\82É
\90ö");
2014 mtmp->mhp -= rnd(15);
2015 if (DEADMONSTER(mtmp))
2026 impossible("uunstick: no ustuck?");
2030 pline("%s is no longer in your clutches.", Monnam(u.ustuck));
2032 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\8eè
\82©
\82ç
\93¦
\82ê
\82½
\81D", Monnam(u.ustuck));
2043 Your("skin returns to its original form.");
2045 Your("
\94ç
\95\86\82Í
\96{
\97\88\82Ì
\8ep
\82É
\96ß
\82Á
\82½
\81D");
2047 uskin = (struct obj *) 0;
2048 /* undo save/restore hack */
2049 uarm->owornmask &= ~I_SPECIAL;
2054 mbodypart(mon, part)
2058 static NEARDATA const char
2060 *humanoid_parts[] = { "arm", "eye", "face", "finger",
2061 "fingertip", "foot", "hand", "handed",
2062 "head", "leg", "light headed", "neck",
2063 "spine", "toe", "hair", "blood",
2064 "lung", "nose", "stomach" },
2066 *humanoid_parts[] = {
2067 "
\98r", "
\96Ú", "
\8aç", "
\8ew",
2068 "
\8ew
\90æ", "
\91«", "
\8eè", "
\8eè
\82É
\82·
\82é",
2069 "
\93ª", "
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2070 "
\94w
\8d\9c", "
\92Ü
\90æ", "
\94¯", "
\8c\8c",
2071 "
\94x", "
\95@", "
\88Ý"},
2074 *jelly_parts[] = { "pseudopod", "dark spot", "front",
2075 "pseudopod extension", "pseudopod extremity",
2076 "pseudopod root", "grasp", "grasped",
2077 "cerebral area", "lower pseudopod", "viscous",
2078 "middle", "surface", "pseudopod extremity",
2079 "ripples", "juices", "surface", "sensor",
2083 "
\8b[
\8e\97\90G
\8eè", "
\8d\95\82¢
\94Á
\93_", "
\91O
\96Ê",
2084 "
\8b[
\8e\97\90G
\8eè
\82Ì
\90æ", "
\8b[
\8e\97\90G
\8eè",
2085 "
\8b[
\8e\97\90G
\8eè
\82Ì
\8a²", "
\90G
\8eè", "
\88¬
\82é",
2086 "
\94]
\82Ì
\97Ì
\88æ", "
\89º
\95û
\82Ì
\8b[
\8e\97\90G
\8eè", "
\82Ë
\82Î
\82Ë
\82Î
\82µ
\82Ä
\82«
\82½",
2087 "
\92\86\8aÔ
\97Ì
\88æ", "
\95\
\96Ê", "
\8b[
\8e\97\90G
\8eè",
2088 "
\94g
\96ä", "
\91Ì
\89t", "
\95\
\96Ê", "
\8a´
\8ao
\8aí",
2092 *animal_parts[] = { "forelimb", "eye", "face",
2093 "foreclaw", "claw tip", "rear claw",
2094 "foreclaw", "clawed", "head",
2095 "rear limb", "light headed", "neck",
2096 "spine", "rear claw tip", "fur",
2097 "blood", "lung", "nose",
2101 "
\91O
\91«", "
\96Ú", "
\8aç",
2102 "
\91O
\92Ü", "
\92Ü
\90æ", "
\8cã
\92Ü",
2103 "
\91O
\92Ü", "
\82Ð
\82Á
\82©
\82¯
\82é", "
\93ª",
2104 "
\8cã
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2105 "
\94w
\8d\9c", "
\8cã
\92Ü
\90æ", "
\96Ñ
\94ç",
2106 "
\8c\8c", "
\94x", "
\95@",
2110 *bird_parts[] = { "wing", "eye", "face", "wing",
2111 "wing tip", "foot", "wing", "winged",
2112 "head", "leg", "light headed", "neck",
2113 "spine", "toe", "feathers", "blood",
2114 "lung", "bill", "stomach" },
2117 "
\97\83", "
\96Ú", "
\8aç", "
\97\83",
2118 "
\97\83\82Ì
\90æ", "
\91«", "
\97\83", "
\97\83\82É
\82Æ
\82é",
2119 "
\93ª", "
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2120 "
\94w
\8d\9c", "
\92Ü
\90æ", "
\89H
\96Ñ", "
\8c\8c",
2121 "
\94x", "
\82
\82¿
\82Î
\82µ", "
\88Ý" },
2124 *horse_parts[] = { "foreleg", "eye", "face",
2125 "forehoof", "hoof tip", "rear hoof",
2126 "forehoof", "hooved", "head",
2127 "rear leg", "light headed", "neck",
2128 "backbone", "rear hoof tip", "mane",
2129 "blood", "lung", "nose",
2133 "
\91O
\91«", "
\96Ú", "
\8aç",
2134 "
\91O
\92û", "
\92û", "
\8cã
\92û",
2135 "
\91O
\92Ü", "
\92û
\82É
\82Í
\82³
\82Þ", "
\93ª",
2136 "
\8cã
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2137 "
\94w
\8d\9c", "
\8cã
\92Ü
\90æ", "
\82½
\82Ä
\82ª
\82Ý",
2138 "
\8c\8c", "
\94x", "
\95@",
2142 *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
2143 "tentacle tip", "lower appendage", "tentacle",
2144 "tentacled", "body", "lower tentacle",
2145 "rotational", "equator", "body",
2146 "lower tentacle tip", "cilia", "life force",
2147 "retina", "olfactory nerve", "interior" },
2150 "
\93Ë
\8bN", "
\8e\8b\8ao
\90_
\8co", "
\91Ì", "
\90G
\8eè",
2151 "
\90G
\8eè
\82Ì
\90æ", "
\89º
\82Ì
\93Ë
\8bN", "
\90G
\8eè",
2152 "
\90G
\8eè
\82É
\8e\9d\82Â", "
\91Ì", "
\89º
\82Ì
\90G
\8eè",
2153 "
\89ñ
\93]
\82µ
\82½", "
\92\86\90S
\90ü", "
\91Ì",
2154 "
\89º
\82Ì
\90G
\8eè
\82Ì
\90æ", "
\91@
\96Ñ", "
\90¶
\96½
\97Í",
2155 "
\96Ô
\96\8c", "
\9ak
\8ao
\92\86\90\95", "
\93à
\95\94" },
2158 *fungus_parts[] = { "mycelium", "visual area", "front",
2159 "hypha", "hypha", "root",
2160 "strand", "stranded", "cap area",
2161 "rhizome", "sporulated", "stalk",
2162 "root", "rhizome tip", "spores",
2163 "juices", "gill", "gill",
2167 "
\8bÛ
\8e\85\91Ì", "
\8e\8b\8ao
\97Ì
\88æ", "
\91O",
2168 "
\8bÛ
\8e\85", "
\8bÛ
\8e\85", "
\8dª",
2169 "
\90G
\8eè", "
\90G
\8eè
\82É
\82©
\82ç
\82Ý
\82Â
\82¯
\82é", "
\8eP",
2170 "
\8dª
\8cs", "
\8d¬
\97\90\82·
\82é", "
\8e²",
2171 "
\8dª", "
\8dª
\8cs
\82Ì
\90æ", "
\89è
\96E",
2172 "
\91Ì
\89t", "
\82¦
\82ç", "
\82¦
\82ç",
2176 *vortex_parts[] = { "region", "eye", "front",
2177 "minor current", "minor current", "lower current",
2178 "swirl", "swirled", "central core",
2179 "lower current", "addled", "center",
2180 "currents", "edge", "currents",
2181 "life force", "center", "leading edge",
2185 "
\97Ì
\88æ", "
\96Ú", "
\91O",
2186 "
\8f¬
\82³
\82¢
\97¬
\82ê", "
\8f¬
\82³
\82¢
\97¬
\82ê", "
\89º
\95\94\82Ì
\97¬
\82ê",
2187 "
\89Q
\8aª", "
\89Q
\82É
\8aª
\82", "
\89Q
\82Ì
\92\86\90S",
2188 "
\89º
\95\94\82Ì
\97¬
\82ê", "
\8d¬
\97\90\82µ
\82½", "
\92\86\90S
\95\94",
2189 "
\97¬
\82ê", "
\8aO
\8eü", "
\8bC
\97¬",
2190 "
\90¶
\96½
\97Í", "
\92\86\90S", "
\91O
\89\8f",
2194 *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
2195 "large scale tip", "rear region", "scale gap",
2196 "scale gapped", "head", "rear region",
2197 "light headed", "neck", "length", "rear scale",
2198 "scales", "blood", "lung", "forked tongue",
2202 "
\91Þ
\89»
\82µ
\82½
\91«", "
\96Ú", "
\8aç", "
\91å
\82«
\82È
\97Ø",
2203 "
\91å
\82«
\82È
\97Ø
\82Ì
\90æ", "
\8cã
\95\94\95ª", "
\97Ø
\82Ì
\8c\84\8aÔ",
2204 "
\97Ø
\82Ì
\8c\84\8aÔ
\82É
\82Â
\82¯
\82é", "
\93ª", "
\8cã
\95\94\95ª",
2205 "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ", "
\91Ì", "
\8cã
\95\94\95ª
\82Ì
\8aZ",
2206 "
\97Ø", "
\8c\8c", "
\94x", "
\90ã",
2210 *worm_parts[] = { "anterior segment", "light sensitive cell",
2211 "clitellum", "setae", "setae", "posterior segment",
2212 "segment", "segmented", "anterior segment",
2213 "posterior", "over stretched", "clitellum",
2214 "length", "posterior setae", "setae", "blood",
2215 "skin", "prostomium", "stomach" },
2218 "
\91O
\8bæ", "
\8a´
\8cõ
\90«
\8d×
\96E",
2219 "
\8aÂ
\91Ñ", "
\8ap", "
\8ap", "
\8cã
\8bæ",
2220 "
\90ß", "
\90ß
\82É
\82Â
\82¯
\82é", "
\91O
\8bæ",
2221 "
\8cã
\95\94", "
\90L
\82Ñ
\82·
\82¬
\82½", "
\8aÂ
\91Ñ",
2222 "
\91Ì", "
\8cã
\95\94\82Ì
\8ap", "
\8ap", "
\8c\8c",
2223 "
\94ç
\95\86", "
\8cû
\91O
\97t", "
\88Ý" },
2226 *fish_parts[] = { "fin", "eye", "premaxillary", "pelvic axillary",
2227 "pelvic fin", "anal fin", "pectoral fin", "finned",
2228 "head", "peduncle", "played out", "gills",
2229 "dorsal fin", "caudal fin", "scales", "blood",
2230 "gill", "nostril", "stomach" };
2233 "
\82Ð
\82ê", "
\96Ú", "
\8aç", "
\82Ð
\82ê
\82Ì
\90æ",
2234 "
\82Ð
\82ê
\82Ì
\90æ", "
\94ö
\82Ñ
\82ê", "
\8b¹
\82Ð
\82ê", "
\82Ð
\82ê
\82Å
\8e\9d\82Â",
2235 "
\93ª", "
\94ö
\95¿", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\82¦
\82ç",
2236 "
\94w
\82Ñ
\82ê", "
\94ö
\82Ñ
\82ê", "
\97Ø", "
\8c\8c",
2237 "
\82¦
\82ç", "
\95@", "
\88Ý" };
2239 #if 0 /*JP*//*
\8eg
\82í
\82È
\82¢*/
2240 /* claw attacks are overloaded in mons[]; most humanoids with
2241 such attacks should still reference hands rather than claws */
2242 static const char not_claws[] = {
2243 S_HUMAN, S_MUMMY, S_ZOMBIE, S_ANGEL, S_NYMPH, S_LEPRECHAUN,
2244 S_QUANTMECH, S_VAMPIRE, S_ORC, S_GIANT, /* quest nemeses */
2245 '\0' /* string terminator; assert( S_xxx != 0 ); */
2248 struct permonst *mptr = mon->data;
2251 /* paw
\82Í
\8c¢
\82Æ
\82©
\94L
\82Ì
\8eè
\81Cclaw
\82Í
\83^
\83J
\82Ì
\91«
\82Ì
\82æ
\82¤
\82È
\82©
\82¬
\82Â
\82ß
\81C
2252 \82Ç
\82¿
\82ç
\82à
\93ú
\96{
\8cê
\82¶
\82á
\81u
\8eè
\81v
\82Å
\82¢
\82¢
\82Å
\82µ
\82å
\82¤
\81D
2254 /* some special cases */
2255 if (mptr->mlet == S_DOG || mptr->mlet == S_FELINE
2256 || mptr->mlet == S_RODENT || mptr == &mons[PM_OWLBEAR]) {
2266 return horse_parts[part]; /* "foreleg", "rear leg" */
2268 break; /* for other parts, use animal_parts[] below */
2270 } else if (mptr->mlet == S_YETI) { /* excl. owlbear due to 'if' above */
2271 /* opposable thumbs, hence "hands", "arms", "legs", &c */
2272 return humanoid_parts[part]; /* yeti/sasquatch, monkey/ape */
2274 if ((part == HAND || part == HANDED)
2275 && (humanoid(mptr) && attacktype(mptr, AT_CLAW)
2276 && !index(not_claws, mptr->mlet) && mptr != &mons[PM_STONE_GOLEM]
2277 && mptr != &mons[PM_INCUBUS] && mptr != &mons[PM_SUCCUBUS]))
2278 return (part == HAND) ? "claw" : "clawed";
2280 #if 0 /*JP*//*trunk
\82Í
\8fÛ
\82Ì
\95@
\82ð
\88Ó
\96¡
\82·
\82é
\82»
\82¤
\82Å
\82·
\81B
\93ú
\96{
\8cê
\82Å
\82Í
\92P
\82É
\95@
\82Å
\82¢
\82¢
\82©
\82Æ
\81B*/
2281 if ((mptr == &mons[PM_MUMAK] || mptr == &mons[PM_MASTODON])
2285 if (mptr == &mons[PM_SHARK] && part == HAIR)
2287 return "skin"; /* sharks don't have scales */
2289 return "
\93ª"; /* sharks don't have scales */
2291 if ((mptr == &mons[PM_JELLYFISH] || mptr == &mons[PM_KRAKEN])
2292 && (part == ARM || part == FINGER || part == HAND || part == FOOT
2298 if (mptr == &mons[PM_FLOATING_EYE] && part == EYE)
2302 return "
\8ap
\96\8c";
2303 if (humanoid(mptr) && (part == ARM || part == FINGER || part == FINGERTIP
2304 || part == HAND || part == HANDED))
2305 return humanoid_parts[part];
2306 if (mptr == &mons[PM_RAVEN])
2307 return bird_parts[part];
2308 if (mptr->mlet == S_CENTAUR || mptr->mlet == S_UNICORN
2309 || (mptr == &mons[PM_ROTHE] && part != HAIR))
2310 return horse_parts[part];
2311 if (mptr->mlet == S_LIGHT) {
2315 else if (part == ARM || part == FINGER || part == FINGERTIP
2321 if (part == HANDED || part == ARM || part == FINGER
2322 || part == FINGERTIP || part == HAND) {
2327 if (mptr == &mons[PM_STALKER] && part == HEAD)
2332 if (mptr->mlet == S_EEL && mptr != &mons[PM_JELLYFISH])
2333 return fish_parts[part];
2334 if (mptr->mlet == S_WORM)
2335 return worm_parts[part];
2336 if (slithy(mptr) || (mptr->mlet == S_DRAGON && part == HAIR))
2337 return snake_parts[part];
2338 if (mptr->mlet == S_EYE)
2339 return sphere_parts[part];
2340 if (mptr->mlet == S_JELLY || mptr->mlet == S_PUDDING
2341 || mptr->mlet == S_BLOB || mptr == &mons[PM_JELLYFISH])
2342 return jelly_parts[part];
2343 if (mptr->mlet == S_VORTEX || mptr->mlet == S_ELEMENTAL)
2344 return vortex_parts[part];
2345 if (mptr->mlet == S_FUNGUS)
2346 return fungus_parts[part];
2348 return humanoid_parts[part];
2349 return animal_parts[part];
2356 return mbodypart(&youmonst, part);
2362 /* Returns gender of polymorphed player;
2363 * 0/1=same meaning as flags.female, 2=none.
2365 if (is_neuter(youmonst.data) || !humanoid(youmonst.data))
2367 return flags.female;
2371 ugolemeffects(damtype, dam)
2376 /* We won't bother with "slow"/"haste" since players do not
2377 * have a monster-specific slow/haste so there is no way to
2378 * restore the old velocity once they are back to human.
2380 if (u.umonnum != PM_FLESH_GOLEM && u.umonnum != PM_IRON_GOLEM)
2384 if (u.umonnum == PM_FLESH_GOLEM)
2385 heal = (dam + 5) / 6; /* Approx 1 per die */
2388 if (u.umonnum == PM_IRON_GOLEM)
2392 if (heal && (u.mh < u.mhmax)) {
2398 pline("Strangely, you feel better than before.");
2400 pline("
\8aï
\96
\82È
\82±
\82Æ
\82É
\81C
\91O
\82æ
\82è
\8bC
\95ª
\82ª
\82æ
\82
\82È
\82Á
\82½
\81D");
2401 exercise(A_STR, TRUE);
2406 armor_to_dragon(atyp)
2410 case GRAY_DRAGON_SCALE_MAIL:
2411 case GRAY_DRAGON_SCALES:
2412 return PM_GRAY_DRAGON;
2413 case SILVER_DRAGON_SCALE_MAIL:
2414 case SILVER_DRAGON_SCALES:
2415 return PM_SILVER_DRAGON;
2416 #if 0 /* DEFERRED */
2417 case SHIMMERING_DRAGON_SCALE_MAIL:
2418 case SHIMMERING_DRAGON_SCALES:
2419 return PM_SHIMMERING_DRAGON;
2421 case RED_DRAGON_SCALE_MAIL:
2422 case RED_DRAGON_SCALES:
2423 return PM_RED_DRAGON;
2424 case ORANGE_DRAGON_SCALE_MAIL:
2425 case ORANGE_DRAGON_SCALES:
2426 return PM_ORANGE_DRAGON;
2427 case WHITE_DRAGON_SCALE_MAIL:
2428 case WHITE_DRAGON_SCALES:
2429 return PM_WHITE_DRAGON;
2430 case BLACK_DRAGON_SCALE_MAIL:
2431 case BLACK_DRAGON_SCALES:
2432 return PM_BLACK_DRAGON;
2433 case BLUE_DRAGON_SCALE_MAIL:
2434 case BLUE_DRAGON_SCALES:
2435 return PM_BLUE_DRAGON;
2436 case GREEN_DRAGON_SCALE_MAIL:
2437 case GREEN_DRAGON_SCALES:
2438 return PM_GREEN_DRAGON;
2439 case YELLOW_DRAGON_SCALE_MAIL:
2440 case YELLOW_DRAGON_SCALES:
2441 return PM_YELLOW_DRAGON;
2447 /* some species have awareness of other species */
2451 short warnidx = NON_PM;
2453 context.warntype.speciesidx = NON_PM;
2454 context.warntype.species = 0;
2455 context.warntype.polyd = 0;
2456 HWarn_of_mon &= ~FROMRACE;
2458 switch (u.umonnum) {
2459 case PM_PURPLE_WORM:
2460 warnidx = PM_SHRIEKER;
2463 case PM_VAMPIRE_LORD:
2464 context.warntype.polyd = M2_HUMAN | M2_ELF;
2465 HWarn_of_mon |= FROMRACE;
2468 if (warnidx >= LOW_PM) {
2469 context.warntype.speciesidx = warnidx;
2470 context.warntype.species = &mons[warnidx];
2471 HWarn_of_mon |= FROMRACE;
2475 /* True iff hero's role or race has been genocided */
2479 return (boolean) ((mvitals[urole.malenum].mvflags & G_GENOD)
2480 || (urole.femalenum != NON_PM
2481 && (mvitals[urole.femalenum].mvflags & G_GENOD))
2482 || (mvitals[urace.malenum].mvflags & G_GENOD)
2483 || (urace.femalenum != NON_PM
2484 && (mvitals[urace.femalenum].mvflags & G_GENOD)));
2487 /* how hero feels "inside" after self-genocide of role or race */
2491 /* self-genocide used to always say "you feel dead inside" but that
2492 seems silly when you're polymorphed into something undead;
2493 monkilled() distinguishes between living (killed) and non (destroyed)
2494 for monster death message; we refine the nonliving aspect a bit */
2496 return !nonliving(youmonst.data)
2497 ? "dead" /* living, including demons */
2498 : !weirdnonliving(youmonst.data)
2499 ? "condemned" /* undead plus manes */
2500 : "empty"; /* golems plus vortices */
2502 return !nonliving(youmonst.data)
2503 ? "
\8e\80\82ñ
\82¾" /*
\90¶
\95¨
\82Æ
\88«
\96\82 */
2504 : !weirdnonliving(youmonst.data)
2505 ? "
\94j
\89ó
\82³
\82ê
\82½" /*
\83A
\83\93\83f
\83b
\83h
\82Æ
\96S
\97ì */
2506 : "
\82È
\82
\82È
\82Á
\82½"; /*
\83S
\81[
\83\8c\83\80\82Æ
\89Q */