1 /* NetHack 3.6 polyself.c $NHDT-Date: 1556497911 2019/04/29 00:31:51 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.132 $ */
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-2019 */
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 NDECL(break_armor);
32 STATIC_DCL void FDECL(drop_weapon, (int));
33 STATIC_DCL int FDECL(armor_to_dragon, (int));
34 STATIC_DCL void NDECL(newman);
35 STATIC_DCL void NDECL(polysense);
37 STATIC_VAR const char no_longer_petrify_resistant[] =
39 "No longer petrify-resistant, you";
41 "
\90Î
\89»
\82Ö
\82Ì
\92ï
\8dR
\97Í
\82ª
\82È
\82
\82È
\82Á
\82Ä
\81C
\82 \82È
\82½
\82Í";
43 /* controls whether taking on new form or becoming new man can also
44 change sex (ought to be an arg to polymon() and newman() instead) */
45 STATIC_VAR int sex_change_ok = 0;
47 /* update the youmonst.data structure pointer and intrinsics */
51 struct permonst *mdat = &mons[u.umonnum];
53 set_mon_data(&youmonst, mdat);
55 #define PROPSET(PropIndx, ON) \
58 u.uprops[PropIndx].intrinsic |= FROMFORM; \
60 u.uprops[PropIndx].intrinsic &= ~FROMFORM; \
63 PROPSET(FIRE_RES, resists_fire(&youmonst));
64 PROPSET(COLD_RES, resists_cold(&youmonst));
65 PROPSET(SLEEP_RES, resists_sleep(&youmonst));
66 PROPSET(DISINT_RES, resists_disint(&youmonst));
67 PROPSET(SHOCK_RES, resists_elec(&youmonst));
68 PROPSET(POISON_RES, resists_poison(&youmonst));
69 PROPSET(ACID_RES, resists_acid(&youmonst));
70 PROPSET(STONE_RES, resists_ston(&youmonst));
72 /* resists_drli() takes wielded weapon into account; suppress it */
73 struct obj *save_uwep = uwep;
76 PROPSET(DRAIN_RES, resists_drli(&youmonst));
79 /* resists_magm() takes wielded, worn, and carried equipment into
80 into account; cheat and duplicate its monster-specific part */
81 PROPSET(ANTIMAGIC, (dmgtype(mdat, AD_MAGM)
82 || mdat == &mons[PM_BABY_GRAY_DRAGON]
83 || dmgtype(mdat, AD_RBRE)));
84 PROPSET(SICK_RES, (mdat->mlet == S_FUNGUS || mdat == &mons[PM_GHOUL]));
86 PROPSET(STUNNED, (mdat == &mons[PM_STALKER] || is_bat(mdat)));
87 PROPSET(HALLUC_RES, dmgtype(mdat, AD_HALU));
88 PROPSET(SEE_INVIS, perceives(mdat));
89 PROPSET(TELEPAT, telepathic(mdat));
90 /* note that Infravision uses mons[race] rather than usual mons[role] */
91 PROPSET(INFRAVISION, infravision(Upolyd ? mdat : &mons[urace.malenum]));
92 PROPSET(INVIS, pm_invisible(mdat));
93 PROPSET(TELEPORT, can_teleport(mdat));
94 PROPSET(TELEPORT_CONTROL, control_teleport(mdat));
95 PROPSET(LEVITATION, is_floater(mdat));
96 /* floating eye is the only 'floater'; it is also flagged as a 'flyer';
97 suppress flying for it so that enlightenment doesn't confusingly
98 show latent flight capability always blocked by levitation */
99 PROPSET(FLYING, (is_flyer(mdat) && !is_floater(mdat)));
100 PROPSET(SWIMMING, is_swimmer(mdat));
101 /* [don't touch MAGICAL_BREATHING here; both Amphibious and Breathless
102 key off of it but include different monster forms...] */
103 PROPSET(PASSES_WALLS, passes_walls(mdat));
104 PROPSET(REGENERATION, regenerates(mdat));
105 PROPSET(REFLECTING, (mdat == &mons[PM_SILVER_DRAGON]));
108 float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */
111 #ifdef STATUS_HILITES
112 if (VIA_WINDOWPORT())
113 status_initialize(REASSESS_ONLY);
117 /* Levitation overrides Flying; set or clear BFlying|I_SPECIAL */
121 boolean stuck_in_floor = (u.utrap && u.utraptype != TT_PIT);
123 /* floating overrides flight; so does being trapped in the floor */
124 if ((HLevitation || ELevitation)
125 || ((HFlying || EFlying) && stuck_in_floor))
126 BFlying |= I_SPECIAL;
128 BFlying &= ~I_SPECIAL;
129 /* being trapped on the ground (bear trap, web, molten lava survived
130 with fire resistance, former lava solidified via cold, tethered
131 to a buried iron ball) overrides floating--the floor is reachable */
132 if ((HLevitation || ELevitation) && stuck_in_floor)
133 BLevitation |= I_SPECIAL;
135 BLevitation &= ~I_SPECIAL;
139 /* for changing into form that's immune to strangulation */
144 /* on -- maybe resume strangling */
146 /* when Strangled is already set, polymorphing from one
147 vulnerable form into another causes the counter to be reset */
148 if (uamul && uamul->otyp == AMULET_OF_STRANGULATION
149 && can_be_strangled(&youmonst)) {
153 Your("%s %s your %s!", simpleonames(uamul),
154 Strangled ? "still constricts" : "begins constricting",
155 body_part(NECK)); /* "throat" */
157 Your("%s%s%s
\82ð
\8di
\82ß%s
\81I", simpleonames(uamul),
158 Strangled ? "
\82Í
\82Ü
\82¾" : "
\82ª",
160 Strangled ? "
\82Ä
\82¢
\82é" : "
\82Í
\82¶
\82ß
\82½");
162 makeknown(AMULET_OF_STRANGULATION);
165 /* off -- maybe block strangling */
167 if (Strangled && !can_be_strangled(&youmonst)) {
171 You("are no longer being strangled.");
173 You("
\82à
\82Í
\82â
\92\82\91§
\82µ
\82Ä
\82¢
\82È
\82¢
\81D");
178 /* make a (new) human out of the player */
181 const char *fmt, *arg;
183 boolean sticky = (sticks(youmonst.data) && u.ustuck && !u.uswallow),
184 was_mimicking = (U_AP_TYPE == M_AP_OBJECT);
185 boolean was_blind = !!Blind;
188 u.acurr = u.macurr; /* restore old attribs */
190 u.umonnum = u.umonster;
191 flags.female = u.mfemale;
206 youmonst.m_ap_type = M_AP_NOTHING;
212 /* check whether player foolishly genocided self while poly'd */
214 /* intervening activity might have clobbered genocide info */
215 struct kinfo *kptr = find_delayed_killer(POLYMORPH);
217 if (kptr != (struct kinfo *) 0 && kptr->name[0]) {
218 killer.format = kptr->format;
219 Strcpy(killer.name, kptr->name);
221 killer.format = KILLED_BY;
223 Strcpy(killer.name, "self-genocide");
225 Strcpy(killer.name, "
\8e©
\8bs
\93I
\8bs
\8eE
\82Å");
227 dealloc_killer(kptr);
231 if (u.twoweap && !could_twoweap(youmonst.data))
234 if (u.utrap && u.utraptype == TT_PIT) {
235 set_utrap(rn1(6, 2), TT_PIT); /* time to escape resets */
237 if (was_blind && !Blind) { /* reverting from eyeless */
239 make_blinded(0L, TRUE); /* remove blindness */
241 check_strangling(TRUE);
243 if (!Levitation && !u.ustuck && is_pool_or_lava(u.ux, u.uy))
252 /* setting u.umonster for caveman/cavewoman or priest/priestess
253 swap unintentionally makes `Upolyd' appear to be true */
254 boolean already_polyd = (boolean) Upolyd;
256 /* Some monsters are always of one sex and their sex can't be changed;
257 * Succubi/incubi can change, but are handled below.
259 * !already_polyd check necessary because is_male() and is_female()
260 * are true if the player is a priest/priestess.
263 || (!is_male(youmonst.data) && !is_female(youmonst.data)
264 && !is_neuter(youmonst.data)))
265 flags.female = !flags.female;
266 if (already_polyd) /* poly'd: also change saved sex */
267 u.mfemale = !u.mfemale;
268 max_rank_sz(); /* [this appears to be superfluous] */
269 if ((already_polyd ? u.mfemale : flags.female) && urole.name.f)
270 Strcpy(pl_character, urole.name.f);
272 Strcpy(pl_character, urole.name.m);
273 u.umonster = ((already_polyd ? u.mfemale : flags.female)
274 && urole.femalenum != NON_PM)
277 if (!already_polyd) {
278 u.umonnum = u.umonster;
279 } else if (u.umonnum == PM_SUCCUBUS || u.umonnum == PM_INCUBUS) {
280 flags.female = !flags.female;
281 /* change monster type to match new sex */
282 u.umonnum = (u.umonnum == PM_SUCCUBUS) ? PM_INCUBUS : PM_SUCCUBUS;
290 int i, oldlvl, newlvl, hpmax, enmax;
293 newlvl = oldlvl + rn1(5, -2); /* new = old + {-2,-1,0,+1,+2} */
294 if (newlvl > 127 || newlvl < 1) { /* level went below 0? */
295 goto dead; /* old level is still intact (in case of lifesaving) */
297 if (newlvl > MAXULEV)
299 /* If your level goes down, your peak level goes down by
300 the same amount so that you can't simply use blessed
301 full healing to undo the decrease. But if your level
302 goes up, your peak level does *not* undergo the same
303 adjustment; you might end up losing out on the chance
304 to regain some levels previously lost to other causes. */
306 u.ulevelmax -= (oldlvl - newlvl);
307 if (u.ulevelmax < newlvl)
308 u.ulevelmax = newlvl;
311 if (sex_change_ok && !rn2(10))
314 adjabil(oldlvl, (int) u.ulevel);
315 reset_rndmonst(NON_PM); /* new monster generation criteria */
317 /* random experience points for the new experience level */
318 u.uexp = rndexp(FALSE);
320 /* set up new attribute points (particularly Con) */
325 * remove level-gain based HP from any extra HP accumulated
326 * (the "extra" might actually be negative);
327 * modify the extra, retaining {80%, 90%, 100%, or 110%};
328 * add in newly generated set of level-gain HP.
330 * (This used to calculate new HP in direct proportion to old HP,
331 * but that was subject to abuse: accumulate a large amount of
332 * extra HP, drain level down to 1, then polyself to level 2 or 3
333 * [lifesaving capability needed to handle level 0 and -1 cases]
334 * and the extra got multiplied by 2 or 3. Repeat the level
335 * drain and polyself steps until out of lifesaving capability.)
338 for (i = 0; i < oldlvl; i++)
339 hpmax -= (int) u.uhpinc[i];
340 /* hpmax * rn1(4,8) / 10; 0.95*hpmax on average */
341 hpmax = rounddiv((long) hpmax * (long) rn1(4, 8), 10);
342 for (i = 0; (u.ulevel = i) < newlvl; i++)
344 if (hpmax < u.ulevel)
345 hpmax = u.ulevel; /* min of 1 HP per level */
346 /* retain same proportion for current HP; u.uhp * hpmax / u.uhpmax */
347 u.uhp = rounddiv((long) u.uhp * (long) hpmax, u.uhpmax);
350 * Do the same for spell power.
353 for (i = 0; i < oldlvl; i++)
354 enmax -= (int) u.ueninc[i];
355 enmax = rounddiv((long) enmax * (long) rn1(4, 8), 10);
356 for (i = 0; (u.ulevel = i) < newlvl; i++)
358 if (enmax < u.ulevel)
360 u.uen = rounddiv((long) u.uen * (long) enmax,
361 ((u.uenmax < 1) ? 1 : u.uenmax));
363 /* [should alignment record be tweaked too?] */
365 u.uhunger = rn1(500, 500);
367 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
369 make_stoned(0L, (char *) 0, 0, (char *) 0);
371 if (Polymorph_control) { /* even when Stunned || Unaware */
375 dead: /* we come directly here if their experience level went to 0 or
378 Your("new form doesn't seem healthy enough to survive.");
380 Your("
\90V
\82µ
\82¢
\8ep
\82Í
\90¶
\82«
\82Ä
\82¢
\82
\82¾
\82¯
\82Ì
\97Í
\82ª
\82È
\82¢
\82æ
\82¤
\82¾
\81D");
381 killer.format = KILLED_BY_AN;
383 Strcpy(killer.name, "unsuccessful polymorph");
385 Strcpy(killer.name, "
\95Ï
\89»
\82Ì
\8e¸
\94s
\82Å");
388 return; /* lifesaved */
393 polyman("feel like a new %s!",
395 polyman("%s
\82Æ
\82µ
\82Ä
\90¶
\82Ü
\82ê
\82©
\82í
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81I",
396 /* use saved gender we're about to revert to, not current */
397 ((Upolyd ? u.mfemale : flags.female) && urace.individual.f)
399 : (urace.individual.m)
404 Your("body transforms, but there is still slime on you.");
406 Your("
\91Ì
\82Í
\95Ï
\89»
\82µ
\82½
\82ª
\81C
\83X
\83\89\83C
\83\80\82ª
\82Â
\82¢
\82½
\82Ü
\82Ü
\82¾
\81D");
407 make_slimed(10L, (const char *) 0);
412 (void) encumber_msg();
414 retouch_equipment(2);
416 selftouch(no_longer_petrify_resistant);
423 char buf[BUFSZ] = DUMMY;
424 int old_light, new_light, mntmp, class, tryct;
425 boolean forcecontrol = (psflags == 1), monsterpoly = (psflags == 2),
426 draconian = (uarm && Is_dragon_armor(uarm)),
427 iswere = (u.ulycn >= LOW_PM), isvamp = is_vampire(youmonst.data),
428 controllable_poly = Polymorph_control && !(Stunned || Unaware);
432 pline("You fail to transform!");
434 pline("
\82 \82È
\82½
\82Í
\95Ï
\89»
\82É
\8e¸
\94s
\82µ
\82½
\81I");
437 /* being Stunned|Unaware doesn't negate this aspect of Poly_control */
438 if (!Polymorph_control && !forcecontrol && !draconian && !iswere
440 if (rn2(20) > ACURR(A_CON)) {
441 You1(shudder_for_moment);
443 losehp(rnd(30), "system shock", KILLED_BY_AN);
445 losehp(rnd(30), "
\83V
\83X
\83e
\83\80\83V
\83\87\83b
\83N
\82Å", KILLED_BY_AN);
446 exercise(A_CON, FALSE);
450 old_light = emits_light(youmonst.data);
453 if (monsterpoly && isvamp)
456 if (controllable_poly || forcecontrol) {
461 getlin("Become what kind of monster? [type the name]", buf);
463 getlin("
\82Ç
\82Ì
\8eí
\82Ì
\89ö
\95¨
\82É
\82È
\82é
\81H[
\96¼
\91O
\82ð
\93ü
\82ê
\82Ä
\82Ë]", buf);
464 (void) mungspaces(buf);
465 if (*buf == '\033') {
466 /* user is cancelling controlled poly */
467 if (forcecontrol) { /* wizard mode #polyself */
471 Strcpy(buf, "*"); /* resort to random */
473 if (!strcmp(buf, "*") || !strcmp(buf, "random")) {
474 /* explicitly requesting random result */
475 tryct = 0; /* will skip thats_enough_tries */
476 continue; /* end do-while(--tryct > 0) loop */
479 mntmp = name_to_mon(buf);
480 if (mntmp < LOW_PM) {
482 class = name_to_monclass(buf, &mntmp);
483 if (class && mntmp == NON_PM)
484 mntmp = mkclass_poly(class);
486 if (mntmp < LOW_PM) {
489 pline("I've never heard of such monsters.");
491 pline("
\82»
\82ñ
\82È
\89ö
\95¨
\82Í
\95·
\82¢
\82½
\82±
\82Æ
\82ª
\82È
\82¢
\81D");
494 You_cant("polymorph into any of those.");
496 pline("
\82»
\82ê
\82É
\82È
\82é
\82±
\82Æ
\82Í
\82Å
\82«
\82È
\82¢
\81D");
497 } else if (iswere && (were_beastie(mntmp) == u.ulycn
498 || mntmp == counter_were(u.ulycn)
499 || (Upolyd && mntmp == PM_HUMAN))) {
501 /* Note: humans are illegal as monsters, but an
502 * illegal monster forces newman(), which is what we
503 * want if they specified a human.... */
504 } else if (!polyok(&mons[mntmp])
505 && !(mntmp == PM_HUMAN || your_race(&mons[mntmp])
506 || mntmp == urole.malenum
507 || mntmp == urole.femalenum)) {
510 /* mkclass_poly() can pick a !polyok()
511 candidate; if so, usually try again */
513 if (rn2(3) || --tryct > 0)
515 /* no retries left; put one back on counter
516 so that end of loop decrement will yield
517 0 and trigger thats_enough_tries message */
520 pm_name = mons[mntmp].mname;
521 if (the_unique_pm(&mons[mntmp]))
522 pm_name = the(pm_name);
523 else if (!type_is_pname(&mons[mntmp]))
524 pm_name = an(pm_name);
526 You_cant("polymorph into %s.", pm_name);
528 You_cant("%s
\82É
\95Ï
\89»
\82Å
\82«
\82È
\82¢
\81D", pm_name);
531 } while (--tryct > 0);
533 pline1(thats_enough_tries);
534 /* allow skin merging, even when polymorph is controlled */
535 if (draconian && (tryct <= 0 || mntmp == armor_to_dragon(uarm->otyp)))
537 if (isvamp && (tryct <= 0 || mntmp == PM_WOLF || mntmp == PM_FOG_CLOUD
538 || is_bat(&mons[mntmp])))
540 } else if (draconian || iswere || isvamp) {
541 /* special changes that don't require polyok() */
544 mntmp = armor_to_dragon(uarm->otyp);
545 if (!(mvitals[mntmp].mvflags & G_GENOD)) {
546 /* allow G_EXTINCT */
547 if (Is_dragon_scales(uarm)) {
548 /* dragon scales remain intact as uskin */
550 You("merge with your scaly armor.");
552 You("
\97Ø
\82Ì
\8aZ
\82Æ
\88ê
\91Ì
\89»
\82µ
\82½
\81D");
553 } else { /* dragon scale mail */
554 /* d.scale mail first reverts to scales */
561 /* similar to noarmor(invent.c),
562 shorten to "<color> scale mail" */
563 dsmail = strcpy(buf, simpleonames(uarm));
565 if ((p = strstri(dsmail, " dragon ")) != 0)
566 while ((p[1] = p[8]) != '\0')
569 /* tricky phrasing; dragon scale mail
570 is singular, dragon scales are plural */
572 Your("%s reverts to scales as you merge with them.",
575 Your("%s
\82Í
\97Ø
\82É
\96ß
\82Á
\82½
\81D",
578 /* uarm->spe enchantment remains unchanged;
579 re-converting scales to mail poses risk
580 of evaporation due to over enchanting */
581 uarm->otyp += GRAY_DRAGON_SCALES - GRAY_DRAGON_SCALE_MAIL;
583 context.botl = 1; /* AC is changing */
586 uarm = (struct obj *) 0;
587 /* save/restore hack */
588 uskin->owornmask |= I_SPECIAL;
593 if (Upolyd && were_beastie(mntmp) != u.ulycn)
594 mntmp = PM_HUMAN; /* Illegal; force newman() */
599 if (mntmp < LOW_PM || (mons[mntmp].geno & G_UNIQ))
600 mntmp = (youmonst.data != &mons[PM_VAMPIRE] && !rn2(10))
602 : !rn2(4) ? PM_FOG_CLOUD : PM_VAMPIRE_BAT;
603 if (controllable_poly) {
605 Sprintf(buf, "Become %s?", an(mons[mntmp].mname));
607 Sprintf(buf, "%s
\82É
\82È
\82é
\81H", mons[mntmp].mname);
612 /* if polymon fails, "you feel" message has been given
613 so don't follow up with another polymon or newman;
614 sex_change_ok left disabled here */
615 if (mntmp == PM_HUMAN)
616 newman(); /* werecritter */
618 (void) polymon(mntmp);
619 goto made_change; /* maybe not, but this is right anyway */
622 if (mntmp < LOW_PM) {
625 /* randomly pick an "ordinary" monster */
626 mntmp = rn1(SPECIAL_PM - LOW_PM, LOW_PM);
627 if (polyok(&mons[mntmp]) && !is_placeholder(&mons[mntmp]))
629 } while (--tryct > 0);
632 /* The below polyok() fails either if everything is genocided, or if
633 * we deliberately chose something illegal to force newman().
636 if (!polyok(&mons[mntmp]) || (!forcecontrol && !rn2(5))
637 || your_race(&mons[mntmp])) {
640 (void) polymon(mntmp);
642 sex_change_ok--; /* reset */
645 new_light = emits_light(youmonst.data);
646 if (old_light != new_light) {
648 del_light_source(LS_MONSTER, monst_to_any(&youmonst));
650 ++new_light; /* otherwise it's undetectable */
652 new_light_source(u.ux, u.uy, new_light, LS_MONSTER,
653 monst_to_any(&youmonst));
657 /* (try to) make a mntmp monster out of the player;
658 returns 1 if polymorph successful */
664 boolean sticky = sticks(youmonst.data) && u.ustuck && !u.uswallow,
665 was_blind = !!Blind, dochange = FALSE;
668 if (mvitals[mntmp].mvflags & G_GENOD) { /* allow G_EXTINCT */
670 You_feel("rather %s-ish.", mons[mntmp].mname);
672 You("%s
\82Á
\82Û
\82
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", mons[mntmp].mname);
673 exercise(A_WIS, TRUE);
678 u.uconduct.polyselfs++;
680 /* exercise used to be at the very end but only Wis was affected
681 there since the polymorph was always in effect by then */
682 exercise(A_CON, FALSE);
683 exercise(A_WIS, TRUE);
686 /* Human to monster; save human stats */
689 u.mfemale = flags.female;
691 /* Monster to monster; restore human stats, to be
692 * immediately changed to provide stats for the new monster
696 flags.female = u.mfemale;
699 /* if stuck mimicking gold, stop immediately */
700 if (multi < 0 && U_AP_TYPE == M_AP_OBJECT
701 && youmonst.data->mlet != S_MIMIC)
703 /* if becoming a non-mimic, stop mimicking anything */
704 if (mons[mntmp].mlet != S_MIMIC) {
705 /* as in polyman() */
706 youmonst.m_ap_type = M_AP_NOTHING;
708 if (is_male(&mons[mntmp])) {
711 } else if (is_female(&mons[mntmp])) {
714 } else if (!is_neuter(&mons[mntmp]) && mntmp != u.ulycn) {
715 if (sex_change_ok && !rn2(10))
720 Strcpy(buf, (u.umonnum != mntmp) ? "" : "new ");
721 #else /*
\93ú
\96{
\8cê
\82Æ
\82µ
\82Ä
\95s
\8e©
\91R
\82É
\82È
\82é
\82Ì
\82Å
\88ê
\92U
\82»
\82Ì
\82Ü
\82Ü
\82É
\82·
\82é*/
725 flags.female = !flags.female;
727 Strcat(buf, (is_male(&mons[mntmp]) || is_female(&mons[mntmp]))
728 ? "" : flags.female ? "female " : "male ");
730 Strcat(buf, (is_male(&mons[mntmp]) || is_female(&mons[mntmp]))
731 ? "" : flags.female ? "
\8f\97\82Ì" : "
\92j
\82Ì");
734 Strcat(buf, mons[mntmp].mname);
736 You("%s %s!", (u.umonnum != mntmp) ? "turn into" : "feel like", an(buf));
738 You("%s%s
\81I", an(buf), (u.umonnum != mntmp) ? "
\82É
\82È
\82Á
\82½" : "
\82Ì
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½");
740 if (Stoned && poly_when_stoned(&mons[mntmp])) {
741 /* poly_when_stoned already checked stone golem genocide */
742 mntmp = PM_STONE_GOLEM;
744 make_stoned(0L, "You turn to stone!", 0, (char *) 0);
746 make_stoned(0L, "
\90Î
\82É
\82È
\82Á
\82½
\81I", 0, (char *) 0);
749 u.mtimedone = rn1(500, 500);
753 /* New stats for monster, to last only as long as polymorphed.
754 * Currently only strength gets changed.
756 if (strongmonst(&mons[mntmp]))
757 ABASE(A_STR) = AMAX(A_STR) = STR18(100);
759 if (Stone_resistance && Stoned) { /* parnes@eniac.seas.upenn.edu */
761 make_stoned(0L, "You no longer seem to be petrifying.", 0,
763 make_stoned(0L, "
\90Î
\89»
\82©
\82ç
\89ð
\95ú
\82³
\82ê
\82½
\82æ
\82¤
\82¾
\81D", 0,
766 if (Sick_resistance && Sick) {
767 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
769 You("no longer feel sick.");
771 You("
\95a
\8bC
\82©
\82ç
\89ð
\95ú
\82³
\82ê
\82½
\82æ
\82¤
\82¾
\81D");
774 if (flaming(youmonst.data)) {
776 make_slimed(0L, "The slime burns away!");
778 make_slimed(0L, "
\83X
\83\89\83C
\83\80\82Í
\94R
\82¦
\82½
\81I");
779 } else if (mntmp == PM_GREEN_SLIME) {
781 make_slimed(0L, (char *) 0);
784 check_strangling(FALSE); /* maybe stop strangling */
785 if (nohands(youmonst.data))
789 mlvl = adj_lev(&mons[mntmp]);
790 * We can't do the above, since there's no such thing as an
791 * "experience level of you as a monster" for a polymorphed character.
793 mlvl = (int) mons[mntmp].mlevel;
794 if (youmonst.data->mlet == S_DRAGON && mntmp >= PM_GRAY_DRAGON) {
795 u.mhmax = In_endgame(&u.uz) ? (8 * mlvl) : (4 * mlvl + d(mlvl, 4));
796 } else if (is_golem(youmonst.data)) {
797 u.mhmax = golemhp(mntmp);
802 u.mhmax = d(mlvl, 8);
803 if (is_home_elemental(&mons[mntmp]))
808 if (u.ulevel < mlvl) {
809 /* Low level characters can't become high level monsters for long */
811 /* DRS/NS 2.2.6 messes up -- Peter Kendell */
812 int mtd = u.mtimedone, ulv = u.ulevel;
814 u.mtimedone = mtd * ulv / mlvl;
816 u.mtimedone = u.mtimedone * u.ulevel / mlvl;
820 if (uskin && mntmp != armor_to_dragon(uskin->otyp))
824 (void) hideunder(&youmonst);
826 if (u.utrap && u.utraptype == TT_PIT) {
827 set_utrap(rn1(6, 2), TT_PIT); /* time to escape resets */
829 if (was_blind && !Blind) { /* previous form was eyeless */
831 make_blinded(0L, TRUE); /* remove blindness */
833 newsym(u.ux, u.uy); /* Change symbol */
835 /* [note: this 'sticky' handling is only sufficient for changing from
836 grabber to engulfer or vice versa because engulfing by poly'd hero
837 always ends immediately so won't be in effect during a polymorph] */
838 if (!sticky && !u.uswallow && u.ustuck && sticks(youmonst.data))
840 else if (sticky && !sticks(youmonst.data))
844 if (touch_petrifies(u.usteed->data) && !Stone_resistance && rnl(3)) {
846 pline("%s touch %s.", no_longer_petrify_resistant,
849 pline("%s
\82Í%s
\82É
\90G
\82ê
\82½
\81D", no_longer_petrify_resistant,
853 Sprintf(buf, "riding %s", an(u.usteed->data->mname));
855 Sprintf(buf, "%s
\82É
\8fæ
\82Á
\82Ä", u.usteed->data->mname);
858 if (!can_ride(u.usteed))
859 dismount_steed(DISMOUNT_POLY);
864 static const char use_thec[] = "Use the command #%s to %s.";
866 static const char use_thec[] = "#%s
\83R
\83}
\83\93\83h
\82Å%s
\82±
\82Æ
\82ª
\82Å
\82«
\82é
\81D";
867 static const char monsterc[] = "monster";
869 if (can_breathe(youmonst.data))
871 pline(use_thec, monsterc, "use your breath weapon");
873 pline(use_thec, monsterc, "
\91§
\82ð
\93f
\82«
\82©
\82¯
\82é");
874 if (attacktype(youmonst.data, AT_SPIT))
876 pline(use_thec, monsterc, "spit venom");
878 pline(use_thec, monsterc, "
\93Å
\82ð
\93f
\82");
879 if (youmonst.data->mlet == S_NYMPH)
881 pline(use_thec, monsterc, "remove an iron ball");
883 pline(use_thec, monsterc, "
\93S
\8b\85\82ð
\82Í
\82¸
\82·");
884 if (attacktype(youmonst.data, AT_GAZE))
886 pline(use_thec, monsterc, "gaze at monsters");
888 pline(use_thec, monsterc, "
\89ö
\95¨
\82ðáÉ
\82Þ");
889 if (is_hider(youmonst.data))
891 pline(use_thec, monsterc, "hide");
893 pline(use_thec, monsterc, "
\89B
\82ê
\82é");
894 if (is_were(youmonst.data))
896 pline(use_thec, monsterc, "summon help");
898 pline(use_thec, monsterc, "
\92\87\8aÔ
\82ð
\8f¢
\8a«
\82·
\82é");
899 if (webmaker(youmonst.data))
901 pline(use_thec, monsterc, "spin a web");
903 pline(use_thec, monsterc, "
\82
\82à
\82Ì
\91\83\82ð
\92£
\82é");
904 if (u.umonnum == PM_GREMLIN)
906 pline(use_thec, monsterc, "multiply in a fountain");
908 pline(use_thec, monsterc, "
\90ò
\82Ì
\92\86\82Å
\95ª
\97ô
\82·
\82é");
909 if (is_unicorn(youmonst.data))
911 pline(use_thec, monsterc, "use your horn");
913 pline(use_thec,monsterc, "
\8ap
\82ð
\8eg
\82¤");
914 if (is_mind_flayer(youmonst.data))
916 pline(use_thec, monsterc, "emit a mental blast");
918 pline(use_thec,monsterc, "
\90¸
\90_
\94g
\82ð
\94
\90¶
\82³
\82¹
\82é");
919 if (youmonst.data->msound == MS_SHRIEK) /* worthless, actually */
921 pline(use_thec, monsterc, "shriek");
923 pline(use_thec,monsterc, "
\8bà
\90Ø
\82è
\90º
\82ð
\82 \82°
\82é");
924 if (is_vampire(youmonst.data))
926 pline(use_thec, monsterc, "change shape");
928 pline(use_thec, monsterc, "
\8ep
\82ð
\95Ï
\82¦
\82é");
930 if (lays_eggs(youmonst.data) && flags.female &&
931 !(youmonst.data == &mons[PM_GIANT_EEL]
932 || youmonst.data == &mons[PM_ELECTRIC_EEL]))
934 pline(use_thec, "sit",
935 eggs_in_water(youmonst.data) ?
936 "spawn in the water" : "lay an egg");
937 #else /*
\93ú
\96{
\8cê
\82Å
\82Í
\90\85\92\86\82Å
\82à
\81u
\97\91\82ð
\8eY
\82Þ
\81v
\82Å
\96â
\91è
\82È
\82¢ */
938 pline(use_thec, "sit", "
\97\91\82ð
\8eY
\82Þ");
942 /* you now know what an egg of your type looks like */
943 if (lays_eggs(youmonst.data)) {
944 learn_egg_type(u.umonnum);
945 /* make queen bees recognize killer bee eggs */
946 learn_egg_type(egg_type_from_parent(u.umonnum, TRUE));
949 if ((!Levitation && !u.ustuck && !Flying && is_pool_or_lava(u.ux, u.uy))
950 || (Underwater && !Swimming))
952 if (Passes_walls && u.utrap
953 && (u.utraptype == TT_INFLOOR || u.utraptype == TT_BURIEDBALL)) {
954 if (u.utraptype == TT_INFLOOR) {
956 pline_The("rock seems to no longer trap you.");
958 pline("
\8aâ
\82É
\95Â
\82¶
\8d\9e\82ß
\82ç
\82ê
\82é
\82±
\82Æ
\82Í
\82È
\82¢
\82¾
\82ë
\82¤
\81D");
961 pline_The("buried ball is no longer bound to you.");
963 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");
964 buried_ball_to_freedom();
967 } else if (likes_lava(youmonst.data) && u.utrap
968 && u.utraptype == TT_LAVA) {
970 pline_The("%s now feels soothing.", hliquid("lava"));
972 pline_The("%s
\82ª
\90¸
\90_
\82ð
\97\8e\82¿
\82Â
\82©
\82¹
\82Ä
\82
\82ê
\82é
\81D", hliquid("
\97n
\8aâ"));
975 if (amorphous(youmonst.data) || is_whirly(youmonst.data)
976 || unsolid(youmonst.data)) {
979 You("slip out of the iron chain.");
981 You("
\93S
\82Ì
\8d½
\82©
\82ç
\82·
\82é
\82è
\82Æ
\94²
\82¯
\82½
\81D");
983 } else if (u.utrap && u.utraptype == TT_BURIEDBALL) {
985 You("slip free of the buried ball and chain.");
987 You("
\96\84\82Ü
\82Á
\82Ä
\82¢
\82é
\8b\85\82Æ
\8d½
\82©
\82ç
\82·
\82é
\82è
\82Æ
\94²
\82¯
\82½
\81D");
988 buried_ball_to_freedom();
991 if (u.utrap && (u.utraptype == TT_WEB || u.utraptype == TT_BEARTRAP)
992 && (amorphous(youmonst.data) || is_whirly(youmonst.data)
993 || unsolid(youmonst.data) || (youmonst.data->msize <= MZ_SMALL
994 && u.utraptype == TT_BEARTRAP))) {
996 You("are no longer stuck in the %s.",
997 u.utraptype == TT_WEB ? "web" : "bear trap");
999 You("%s
\82©
\82ç
\92E
\8fo
\82µ
\82½
\81D",
1000 u.utraptype == TT_WEB ? "
\82
\82à
\82Ì
\91\83" : "
\8cF
\82Ìã©");
1002 /* probably should burn webs too if PM_FIRE_ELEMENTAL */
1005 if (webmaker(youmonst.data) && u.utrap && u.utraptype == TT_WEB) {
1007 You("orient yourself on the web.");
1009 You("
\82
\82à
\82Ì
\91\83\82É
\93K
\89\9e\82µ
\82½
\81D");
1012 check_strangling(TRUE); /* maybe start strangling */
1015 vision_full_recalc = 1;
1017 (void) encumber_msg();
1019 retouch_equipment(2);
1020 /* this might trigger a recursive call to polymon() [stone golem
1021 wielding cockatrice corpse and hit by stone-to-flesh, becomes
1022 flesh golem above, now gets transformed back into stone golem] */
1024 selftouch(no_longer_petrify_resistant);
1031 register struct obj *otmp;
1033 if (breakarm(youmonst.data)) {
1034 if ((otmp = uarm) != 0) {
1038 You("break out of your armor!");
1040 You("
\8aZ
\82ð
\89ó
\82µ
\82½
\81I");
1041 exercise(A_STR, FALSE);
1042 (void) Armor_gone();
1045 if ((otmp = uarmc) != 0) {
1046 if (otmp->oartifact) {
1048 Your("%s falls off!", cloak_simple_name(otmp));
1050 Your("%s
\82Í
\92E
\82°
\97\8e\82¿
\82½
\81I", cloak_simple_name(otmp));
1055 Your("%s tears apart!", cloak_simple_name(otmp));
1057 Your("%s
\82Í
\82¸
\82½
\82¸
\82½
\82É
\88ø
\82«
\97ô
\82©
\82ê
\82½
\81I", cloak_simple_name(otmp));
1064 Your("shirt rips to shreds!");
1066 Your("
\83V
\83\83\83c
\82Í
\88ø
\82«
\97ô
\82©
\82ê
\82½
\81I");
1069 } else if (sliparm(youmonst.data)) {
1070 if (((otmp = uarm) != 0) && (racial_exception(&youmonst, otmp) < 1)) {
1074 Your("armor falls around you!");
1076 Your("
\8aZ
\82Í
\82 \82È
\82½
\82Ì
\82Ü
\82í
\82è
\82É
\97\8e\82¿
\82½
\81I");
1077 (void) Armor_gone();
1080 if ((otmp = uarmc) != 0) {
1081 if (is_whirly(youmonst.data))
1083 Your("%s falls, unsupported!", cloak_simple_name(otmp));
1085 Your("%s
\82Í
\82·
\82Æ
\82ñ
\82Æ
\97\8e\82¿
\82½
\81I", cloak_simple_name(otmp));
1088 You("shrink out of your %s!", cloak_simple_name(otmp));
1090 You("%s
\82©
\82ç
\8fk
\82Ý
\8fo
\82½
\81I", cloak_simple_name(otmp));
1094 if ((otmp = uarmu) != 0) {
1095 if (is_whirly(youmonst.data))
1097 You("seep right through your shirt!");
1099 You("
\83V
\83\83\83c
\82©
\82ç
\82µ
\82Ý
\8fo
\82½
\81I");
1102 You("become much too small for your shirt!");
1104 You("
\83V
\83\83\83c
\82æ
\82è
\82¸
\82Á
\82Æ
\8f¬
\82³
\82
\82È
\82Á
\82½
\81I");
1105 setworn((struct obj *) 0, otmp->owornmask & W_ARMU);
1109 if (has_horns(youmonst.data)) {
1110 if ((otmp = uarmh) != 0) {
1111 if (is_flimsy(otmp) && !donning(otmp)) {
1113 char hornbuf[BUFSZ];
1115 /* Future possibilities: This could damage/destroy helmet */
1116 Sprintf(hornbuf, "horn%s", plur(num_horns(youmonst.data)));
1117 Your("%s %s through %s.", hornbuf, vtense(hornbuf, "pierce"),
1120 Your("
\8ap
\82ª%s
\82ð
\82Â
\82ç
\82Ê
\82¢
\82½
\81D", yname(otmp));
1126 Your("%s falls to the %s!", helm_simple_name(otmp),
1127 surface(u.ux, u.uy));
1129 Your("%s
\82Í%s
\82É
\97\8e\82¿
\82½
\81I", helm_simple_name(otmp),
1130 surface(u.ux, u.uy));
1132 (void) Helmet_off();
1137 if (nohands(youmonst.data) || verysmall(youmonst.data)) {
1138 if ((otmp = uarmg) != 0) {
1141 /* Drop weapon along with gloves */
1143 You("drop your gloves%s!", uwep ? " and weapon" : "");
1145 You("
\8f¬
\8eè%s
\82ð
\97\8e\82µ
\82½
\81I", uwep ? "
\82â
\95\90\8aí" : "");
1147 (void) Gloves_off();
1150 if ((otmp = uarms) != 0) {
1152 You("can no longer hold your shield!");
1154 You("
\82à
\82¤
\8f\82\82ð
\8e\9d\82Á
\82Ä
\82ç
\82ê
\82È
\82¢
\81I");
1155 (void) Shield_off();
1158 if ((otmp = uarmh) != 0) {
1162 Your("%s falls to the %s!", helm_simple_name(otmp),
1163 surface(u.ux, u.uy));
1165 Your("%s
\82Í%s
\82É
\97\8e\82¿
\82½
\81I", helm_simple_name(otmp),
1166 surface(u.ux, u.uy));
1168 (void) Helmet_off();
1172 if (nohands(youmonst.data) || verysmall(youmonst.data)
1173 || slithy(youmonst.data) || youmonst.data->mlet == S_CENTAUR) {
1174 if ((otmp = uarmf) != 0) {
1177 if (is_whirly(youmonst.data))
1179 Your("boots fall away!");
1181 Your("
\8cC
\82Í
\92E
\82°
\97\8e\82¿
\82½
\81I");
1184 Your("boots %s off your feet!",
1185 verysmall(youmonst.data) ? "slide" : "are pushed");
1187 Your("
\8cC
\82Í
\82 \82È
\82½
\82Ì
\91«
\82©
\82ç%s
\81I",
1188 verysmall(youmonst.data) ? "
\8a\8a\82è
\97\8e\82¿
\82½" : "
\92E
\82°
\97\8e\82¿
\82½");
1202 const char *what, *which, *whichtoo;
1204 const char *which, *whichtoo;
1206 boolean candropwep, candropswapwep, updateinv = TRUE;
1209 /* !alone check below is currently superfluous but in the
1210 * future it might not be so if there are monsters which cannot
1211 * wear gloves but can wield weapons
1213 if (!alone || cantwield(youmonst.data)) {
1214 candropwep = canletgo(uwep, "");
1215 candropswapwep = !u.twoweap || canletgo(uswapwep, "");
1218 what = (candropwep && candropswapwep) ? "drop" : "release";
1221 which = is_sword(uwep) ? "sword" : weapon_descr(uwep);
1223 which = is_sword(uwep) ? "
\8c\95" : weapon_descr(uwep);
1227 is_sword(uswapwep) ? "sword" : weapon_descr(uswapwep);
1229 is_sword(uswapwep) ? "
\8c\95" : weapon_descr(uswapwep);
1230 if (strcmp(which, whichtoo))
1234 which = "
\95\90\8aí";
1236 #if 0 /*JP*//*
\95¡
\90\94\8c`
\82É
\82µ
\82È
\82¢*/
1237 if (uwep->quan != 1L || u.twoweap)
1238 which = makeplural(which);
1242 You("find you must %s %s %s!", what,
1243 the_your[!!strncmp(which, "corpse", 6)], which);
1245 You("%s
\82ð
\97\8e\82Æ
\82µ
\82½
\82±
\82Æ
\82É
\8bC
\82Ã
\82¢
\82½
\81I", which);
1248 /* if either uwep or wielded uswapwep is flagged as 'in_use'
1249 then don't drop it or explicitly update inventory; leave
1250 those actions to caller (or caller's caller, &c) */
1256 else if (candropswapwep)
1263 else if (candropwep)
1268 } else if (!could_twoweap(youmonst.data)) {
1277 boolean was_flying = (Flying != 0);
1279 /* You can't revert back while unchanging */
1283 killer.format = NO_KILLER_PREFIX;
1284 Strcpy(killer.name, "killed while stuck in creature form");
1286 killer.format = KILLED_BY;
1287 Strcpy(killer.name, "
\8c³
\82Ì
\8ep
\82Ö
\96ß
\82ê
\82¸
\82É");
1290 } else if (uamul && uamul->otyp == AMULET_OF_UNCHANGING) {
1292 Your("%s %s!", simpleonames(uamul), otense(uamul, "fail"));
1294 Your("%s
\82É
\8e¸
\94s
\82µ
\82½
\81I", simpleonames(uamul));
1296 makeknown(AMULET_OF_UNCHANGING);
1300 if (emits_light(youmonst.data))
1301 del_light_source(LS_MONSTER, monst_to_any(&youmonst));
1303 polyman("return to %s form!", urace.adj);
1305 polyman("%s
\82É
\96ß
\82Á
\82½
\81I", urace.adj);
1308 /* can only happen if some bit of code reduces u.uhp
1309 instead of u.mh while poly'd */
1311 Your("old form was not healthy enough to survive.");
1313 Your("
\8c³
\82Ì
\8ep
\82Í
\90¶
\82«
\82Ä
\82¢
\82
\82¾
\82¯
\82Ì
\97Í
\82ª
\82È
\82¢
\81D");
1315 Sprintf(killer.name, "reverting to unhealthy %s form", urace.adj);
1317 Sprintf(killer.name, "
\95s
\8c\92\8dN
\82È%s
\82Ì
\8ep
\82É
\96ß
\82Á
\82Ä", urace.adj);
1318 killer.format = KILLED_BY;
1324 vision_full_recalc = 1;
1325 (void) encumber_msg();
1326 if (was_flying && !Flying && u.usteed)
1328 You("and %s return gently to the %s.",
1329 mon_nam(u.usteed), surface(u.ux, u.uy));
1331 You("
\82Æ%s
\82Í%s
\82É
\92\85\92n
\82µ
\82½
\81D",
1332 mon_nam(u.usteed), surface(u.ux, u.uy));
1334 retouch_equipment(2);
1336 selftouch(no_longer_petrify_resistant);
1342 struct attack *mattk;
1346 You_cant("breathe. Sorry.");
1348 You_cant("
\91§
\82ð
\93f
\82
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81D
\8ec
\94O
\81D");
1353 You("don't have enough energy to breathe!");
1355 You("
\91§
\82ð
\93f
\82
\82Ì
\82É
\8f\
\95ª
\82È
\83G
\83l
\83\8b\83M
\81[
\82ª
\82È
\82©
\82Á
\82½
\81D");
1361 if (!getdir((char *) 0))
1364 mattk = attacktype_fordmg(youmonst.data, AT_BREA, AD_ANY);
1366 impossible("bad breath attack?"); /* mouthwash needed... */
1367 else if (!u.dx && !u.dy && !u.dz)
1370 buzz((int) (20 + mattk->adtyp - 1), (int) mattk->damn, u.ux, u.uy,
1379 struct attack *mattk;
1381 if (!getdir((char *) 0))
1383 mattk = attacktype_fordmg(youmonst.data, AT_SPIT, AD_ANY);
1385 impossible("bad spit attack?");
1387 switch (mattk->adtyp) {
1390 otmp = mksobj(BLINDING_VENOM, TRUE, FALSE);
1393 impossible("bad attack type in dospit");
1396 otmp = mksobj(ACID_VENOM, TRUE, FALSE);
1399 otmp->spe = 1; /* to indicate it's yours */
1400 throwit(otmp, 0L, FALSE);
1409 if (u.utrap && u.utraptype == TT_BURIEDBALL) {
1411 pline_The("ball and chain are buried firmly in the %s.",
1412 surface(u.ux, u.uy));
1414 pline_The("
\8b\85\82Æ
\8d½
\82Í%s
\82É
\82µ
\82Á
\82©
\82è
\82Æ
\96\84\82Ü
\82Á
\82Ä
\82¢
\82é
\81D.",
1415 surface(u.ux, u.uy));
1420 You("are not chained to anything!");
1422 You("
\89½
\82à
\82Â
\82È
\82ª
\82ê
\82Ä
\82¢
\82È
\82¢
\81I");
1432 register struct trap *ttmp = t_at(u.ux, u.uy);
1434 if (Levitation || Is_airlevel(&u.uz) || Underwater
1435 || Is_waterlevel(&u.uz)) {
1437 You("must be on the ground to spin a web.");
1439 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");
1444 You("release web fluid inside %s.", mon_nam(u.ustuck));
1446 You("%s
\82Ì
\93à
\82Å
\82
\82à
\82Ì
\91\83\82ð
\93f
\82«
\8fo
\82µ
\82½
\81D", mon_nam(u.ustuck));
1447 if (is_animal(u.ustuck->data)) {
1448 expels(u.ustuck, u.ustuck->data, TRUE);
1451 if (is_whirly(u.ustuck->data)) {
1454 for (i = 0; i < NATTK; i++)
1455 if (u.ustuck->data->mattk[i].aatyp == AT_ENGL)
1458 impossible("Swallower has no engulfing attack?");
1463 switch (u.ustuck->data->mattk[i].adtyp) {
1466 Strcpy(sweep, "ignites and ");
1468 Strcpy(sweep, "
\94
\89Î
\82µ");
1472 Strcpy(sweep, "fries and ");
1474 Strcpy(sweep, "
\8fÅ
\82°");
1478 Strcpy(sweep, "freezes, shatters and ");
1480 Strcpy(sweep, "
\93\80\82è
\82Â
\82«
\81C
\82±
\82È
\82²
\82È
\82É
\82È
\82è");
1484 pline_The("web %sis swept away!", sweep);
1486 pline("
\82
\82à
\82Ì
\91\83\82Í%s
\82È
\82
\82È
\82Á
\82½
\81I", sweep);
1489 } /* default: a nasty jelly-like creature */
1491 pline_The("web dissolves into %s.", mon_nam(u.ustuck));
1493 pline("
\82
\82à
\82Ì
\91\83\82Í
\95ª
\89ð
\82µ
\82Ä%s
\82É
\82È
\82Á
\82½
\81D", mon_nam(u.ustuck));
1498 You("cannot spin webs while stuck in a trap.");
1500 You("ã©
\82É
\82Í
\82Ü
\82Á
\82Ä
\82¢
\82é
\8aÔ
\82Í
\82
\82à
\82Ì
\91\83\82ð
\92£
\82ê
\82È
\82¢
\81D");
1503 exercise(A_DEX, TRUE);
1505 switch (ttmp->ttyp) {
1509 You("spin a web, covering up the pit.");
1511 You("
\82
\82à
\82Ì
\91\83\82ð
\92£
\82è
\81C
\97\8e\82µ
\8c\8a\82ð
\95¢
\82Á
\82½
\81D");
1513 bury_objs(u.ux, u.uy);
1518 pline_The("squeaky board is muffled.");
1520 pline("
\82«
\82µ
\82Þ
\94Â
\82Í
\95¢
\82í
\82ê
\82½
\81D");
1527 case VIBRATING_SQUARE:
1529 Your("webbing vanishes!");
1531 Your("
\82
\82à
\82Ì
\91\83\82Í
\8fÁ
\82¦
\82½
\81I");
1535 You("make the web thicker.");
1537 You("
\82
\82à
\82Ì
\91\83\82ð
\82æ
\82è
\8cú
\82
\82µ
\82½
\81D");
1542 You("web over the %s.",
1543 (ttmp->ttyp == TRAPDOOR) ? "trap door" : "hole");
1545 You("%s
\82ð
\82
\82à
\82Ì
\91\83\82Å
\95¢
\82Á
\82½
\81D",
1546 (ttmp->ttyp == TRAPDOOR) ? "
\97\8e\82µ
\94à" : "
\8c\8a");
1551 case ROLLING_BOULDER_TRAP:
1553 You("spin a web, jamming the trigger.");
1555 You("
\82
\82à
\82Ì
\91\83\82ð
\92£
\82Á
\82Ä
\81C
\83X
\83C
\83b
\83`
\82ð
\93®
\82©
\82È
\82
\82µ
\82½
\81D");
1571 You("have triggered a trap!");
1573 You("ã©
\82ð
\8en
\93®
\82³
\82¹
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I");
1577 impossible("Webbing over trap type %d?", ttmp->ttyp);
1580 } else if (On_stairs(u.ux, u.uy)) {
1581 /* cop out: don't let them hide the stairs */
1583 Your("web fails to impede access to the %s.",
1584 (levl[u.ux][u.uy].typ == STAIRS) ? "stairs" : "ladder");
1586 Your("
\82
\82à
\82Ì
\91\83\82Í%s
\82Ö
\82Ì
\88Ú
\93®
\82ð
\8e×
\96\82\82Å
\82«
\82È
\82¢
\81D",
1587 (levl[u.ux][u.uy].typ == STAIRS) ? "
\8aK
\92i" : "
\82Í
\82µ
\82²");
1591 ttmp = maketrap(u.ux, u.uy, WEB);
1605 You("lack the energy to send forth a call for help!");
1607 You("
\8f\95\82¯
\82ð
\8cÄ
\82Ô
\82¾
\82¯
\82Ì
\91Ì
\97Í
\82ª
\82È
\82¢
\81I");
1614 You("call upon your brethren for help!");
1616 You("
\92\87\8aÔ
\82ð
\8cÄ
\82ñ
\82¾
\81I");
1617 exercise(A_WIS, TRUE);
1618 if (!were_summon(youmonst.data, TRUE, &placeholder, (char *) 0))
1620 pline("But none arrive.");
1622 pline("
\82µ
\82©
\82µ
\81C
\89½
\82à
\97\88\82È
\82¢
\81D");
1629 register struct monst *mtmp;
1635 for (i = 0; i < NATTK; i++) {
1636 if (youmonst.data->mattk[i].aatyp == AT_GAZE) {
1637 adtyp = youmonst.data->mattk[i].adtyp;
1641 if (adtyp != AD_CONF && adtyp != AD_FIRE) {
1642 impossible("gaze attack %d?", adtyp);
1648 You_cant("see anything to gaze at.");
1650 You("
\96Ú
\82ª
\8c©
\82¦
\82È
\82¢
\82Ì
\82Å
\81C
\82É
\82ç
\82ß
\82È
\82¢
\81D");
1652 } else if (Hallucination) {
1654 You_cant("gaze at anything you can see.");
1656 You_cant("
\8c©
\82¦
\82é
\82à
\82Ì
\82ð
\89½
\82à
\82É
\82ç
\82ß
\82È
\82¢
\81D");
1661 You("lack the energy to use your special gaze!");
1663 You("
\82É
\82ç
\82Þ
\82¾
\82¯
\82Ì
\91Ì
\97Í
\82ª
\82È
\82¢
\81I");
1669 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
1670 if (DEADMONSTER(mtmp))
1672 if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my)) {
1674 if (Invis && !perceives(mtmp->data)) {
1676 pline("%s seems not to notice your gaze.", Monnam(mtmp));
1678 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\82É
\82ç
\82Ý
\82É
\8bC
\82ª
\82Â
\82¢
\82Ä
\82È
\82¢
\82æ
\82¤
\82¾
\81D", Monnam(mtmp));
1679 } else if (mtmp->minvis && !See_invisible) {
1681 You_cant("see where to gaze at %s.", Monnam(mtmp));
1683 You("%s
\82Í
\8c©
\82¦
\82È
\82¢
\82Ì
\82Å
\81C
\82É
\82ç
\82ß
\82È
\82¢", Monnam(mtmp));
1684 } else if (M_AP_TYPE(mtmp) == M_AP_FURNITURE
1685 || M_AP_TYPE(mtmp) == M_AP_OBJECT) {
1688 } else if (flags.safe_dog && mtmp->mtame && !Confusion) {
1690 You("avoid gazing at %s.", y_monnam(mtmp));
1692 You("%s
\82©
\82ç
\96Ú
\82ð
\82»
\82ç
\82µ
\82Ä
\82µ
\82Ü
\82Á
\82½
\81D", y_monnam(mtmp));
1694 if (flags.confirm && mtmp->mpeaceful && !Confusion) {
1696 Sprintf(qbuf, "Really %s %s?",
1697 (adtyp == AD_CONF) ? "confuse" : "attack",
1700 Sprintf(qbuf, "
\96{
\93\96\82É%s
\82ð%s
\81H",
1702 (adtyp == AD_CONF) ? "
\8d¬
\97\90\82³
\82¹
\82é" : "
\8dU
\8c\82\82·
\82é");
1704 if (yn(qbuf) != 'y')
1707 setmangry(mtmp, TRUE);
1708 if (!mtmp->mcanmove || mtmp->mstun || mtmp->msleeping
1709 || !mtmp->mcansee || !haseyes(mtmp->data)) {
1713 /* No reflection check for consistency with when a monster
1714 * gazes at *you*--only medusa gaze gets reflected then.
1716 if (adtyp == AD_CONF) {
1719 Your("gaze confuses %s!", mon_nam(mtmp));
1721 Your("
\82É
\82ç
\82Ý
\82Í%s
\82ð
\8d¬
\97\90\82³
\82¹
\82½
\81I", mon_nam(mtmp));
1724 pline("%s is getting more and more confused.",
1726 pline("%s
\82Í
\82Ü
\82·
\82Ü
\82·
\8d¬
\97\90\82µ
\82½
\81I",
1729 } else if (adtyp == AD_FIRE) {
1730 int dmg = d(2, 6), lev = (int) u.ulevel;
1733 You("attack %s with a fiery gaze!", mon_nam(mtmp));
1735 You("
\89\8a\82Ì
\82É
\82ç
\82Ý
\82Å%s
\82ð
\8dU
\8c\82\82µ
\82½
\81I", mon_nam(mtmp));
1736 if (resists_fire(mtmp)) {
1738 pline_The("fire doesn't burn %s!", mon_nam(mtmp));
1740 pline("%s
\82Í
\89\8a\82Å
\94R
\82¦
\82È
\82©
\82Á
\82½
\81I", mon_nam(mtmp));
1744 (void) destroy_mitem(mtmp, SCROLL_CLASS, AD_FIRE);
1746 (void) destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
1748 (void) destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE);
1751 if (DEADMONSTER(mtmp))
1754 /* For consistency with passive() in uhitm.c, this only
1755 * affects you if the monster is still alive.
1757 if (DEADMONSTER(mtmp))
1760 if (mtmp->data == &mons[PM_FLOATING_EYE] && !mtmp->mcan) {
1763 You("are frozen by %s gaze!",
1764 s_suffix(mon_nam(mtmp)));
1766 You("%s
\82Ì
\82É
\82ç
\82Ý
\82Å
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81I",
1769 nomul((u.ulevel > 6 || rn2(4))
1770 ? -d((int) mtmp->m_lev + 1,
1771 (int) mtmp->data->mattk[0].damd)
1774 multi_reason = "frozen by a monster's gaze";
1776 multi_reason = "
\89ö
\95¨
\82Ì
\82É
\82ç
\82Ý
\82Å
\8dd
\92¼
\82µ
\82Ä
\82¢
\82é
\8e\9e\82É";
1781 You("stiffen momentarily under %s gaze.",
1782 s_suffix(mon_nam(mtmp)));
1784 You("%s
\82Ì
\82É
\82ç
\82Ý
\82Å
\88ê
\8fu
\8dd
\92¼
\82µ
\82½
\81D",
1788 /* Technically this one shouldn't affect you at all because
1789 * the Medusa gaze is an active monster attack that only
1790 * works on the monster's turn, but for it to *not* have an
1791 * effect would be too weird.
1793 if (mtmp->data == &mons[PM_MEDUSA] && !mtmp->mcan) {
1795 pline("Gazing at the awake %s is not a very good idea.",
1797 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",
1799 /* as if gazing at a sleeping anything is fruitful... */
1801 You("turn to stone...");
1803 You("
\90Î
\82É
\82È
\82Á
\82½
\81D
\81D
\81D");
1804 killer.format = KILLED_BY;
1806 Strcpy(killer.name, "deliberately meeting Medusa's gaze");
1808 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Ä");
1816 You("gaze at no place in particular.");
1818 You("
\8eÀ
\8dÛ
\82É
\82Í
\89½
\82à
\82É
\82ç
\82ß
\82È
\82©
\82Á
\82½
\81D");
1825 boolean ismimic = youmonst.data->mlet == S_MIMIC,
1826 on_ceiling = is_clinger(youmonst.data) || Flying;
1828 /* can't hide while being held (or holding) or while trapped
1829 (except for floor hiders [trapper or mimic] in pits) */
1830 if (u.ustuck || (u.utrap && (u.utraptype != TT_PIT || on_ceiling))) {
1832 You_cant("hide while you're %s.",
1833 !u.ustuck ? "trapped"
1834 : u.uswallow ? (is_animal(u.ustuck->data) ? "swallowed"
1836 : !sticks(youmonst.data) ? "being held"
1837 : (humanoid(u.ustuck->data) ? "holding someone"
1838 : "holding that creature"));
1840 You_cant("%s
\8aÔ
\82Í
\89B
\82ê
\82ç
\82ê
\82È
\82¢
\81D",
1841 !u.ustuck ? "
\95ß
\82Ü
\82Á
\82Ä
\82¢
\82é"
1842 : u.uswallow ? "
\88ù
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82é"
1843 : !sticks(youmonst.data) ? "
\95ß
\82Ü
\82¦
\82ç
\82ê
\82Ä
\82¢
\82é"
1844 : humanoid(u.ustuck->data) ? "
\92N
\82©
\82ð
\82Â
\82©
\82ñ
\82Å
\82¢
\82é"
1845 : "
\89ö
\95¨
\82ð
\82Â
\82©
\82ñ
\82Å
\82¢
\82é");
1848 || (ismimic && U_AP_TYPE != M_AP_NOTHING)) {
1850 youmonst.m_ap_type = M_AP_NOTHING;
1855 /* note: the eel and hides_under cases are hypothetical;
1856 such critters aren't offered the option of hiding via #monster */
1857 if (youmonst.data->mlet == S_EEL && !is_pool(u.ux, u.uy)) {
1858 if (IS_FOUNTAIN(levl[u.ux][u.uy].typ))
1860 The("fountain is not deep enough to hide in.");
1862 The("
\90ò
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\82Ù
\82Ç
\90[
\82
\82È
\82¢
\81D");
1865 There("is no %s to hide in here.", hliquid("water"));
1867 There("
\82±
\82±
\82É
\82Í
\89B
\82ê
\82é
\82½
\82ß
\82Ì%s
\82ª
\82È
\82¢
\81D", hliquid("
\90\85"));
1871 if (hides_under(youmonst.data) && !level.objects[u.ux][u.uy]) {
1873 There("is nothing to hide under here.");
1875 There("
\82±
\82±
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\82à
\82Ì
\82ª
\82È
\82¢
\81D");
1879 /* Planes of Air and Water */
1880 if (on_ceiling && !has_ceiling(&u.uz)) {
1882 There("is nowhere to hide above you.");
1884 There("
\82 \82È
\82½
\82Ì
\8fã
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\8fê
\8f\8a\82ª
\82È
\82¢
\81D");
1888 if ((is_hider(youmonst.data) && !Flying) /* floor hider */
1889 && (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz))) {
1891 There("is nowhere to hide beneath you.");
1893 There("
\82 \82È
\82½
\82Ì
\89º
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\8fê
\8f\8a\82ª
\82È
\82¢
\81D");
1897 /* TODO? inhibit floor hiding at furniture locations, or
1898 * else make youhiding() give smarter messages at such spots.
1901 if (u.uundetected || (ismimic && U_AP_TYPE != M_AP_NOTHING)) {
1902 youhiding(FALSE, 1); /* "you are already hiding" */
1907 /* should bring up a dialog "what would you like to imitate?" */
1908 youmonst.m_ap_type = M_AP_OBJECT;
1909 youmonst.mappearance = STRANGE_OBJECT;
1913 youhiding(FALSE, 0); /* "you are now hiding" */
1920 struct permonst *savedat = youmonst.data;
1922 if (is_vampire(youmonst.data)) {
1924 if (savedat != youmonst.data) {
1926 You("transform into %s.", an(youmonst.data->mname));
1928 You("%s
\82Ì
\8ep
\82É
\82È
\82Á
\82½
\81D", youmonst.data->mname);
1938 struct monst *mtmp, *nmon;
1942 You("concentrate but lack the energy to maintain doing so.");
1944 You("
\8fW
\92\86\82µ
\82½
\81D
\82µ
\82©
\82µ
\83G
\83l
\83\8b\83M
\81[
\82ª
\91«
\82è
\82È
\82¢
\81D");
1951 You("concentrate.");
1953 You("
\8fW
\92\86\82µ
\82½
\81D");
1955 pline("A wave of psychic energy pours out.");
1957 pline("
\90¸
\90_
\83G
\83l
\83\8b\83M
\81[
\94g
\82ª
\95ú
\8eU
\82µ
\82½
\81D");
1958 for (mtmp = fmon; mtmp; mtmp = nmon) {
1962 if (DEADMONSTER(mtmp))
1964 if (distu(mtmp->mx, mtmp->my) > BOLT_LIM * BOLT_LIM)
1966 if (mtmp->mpeaceful)
1968 u_sen = telepathic(mtmp->data) && !mtmp->mcansee;
1969 if (u_sen || (telepathic(mtmp->data) && rn2(2)) || !rn2(10)) {
1971 You("lock in on %s %s.", s_suffix(mon_nam(mtmp)),
1973 : telepathic(mtmp->data) ? "latent telepathy" : "mind");
1975 pline("%s
\82Ì%s
\82è
\8d\9e\82ñ
\82¾
\81D", mon_nam(mtmp),
1976 u_sen ? "
\90¸
\90_
\82É
\93ü"
1977 : telepathic(mtmp->data) ? "
\90ö
\8dÝ
\93I
\90¸
\90_
\82É
\93ü" : "
\90[
\91w
\88Ó
\8e¯
\82É
\90ö");
1979 mtmp->mhp -= rnd(15);
1980 if (DEADMONSTER(mtmp))
1991 impossible("uunstick: no ustuck?");
1995 pline("%s is no longer in your clutches.", Monnam(u.ustuck));
1997 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\8eè
\82©
\82ç
\93¦
\82ê
\82½
\81D", Monnam(u.ustuck));
2008 Your("skin returns to its original form.");
2010 Your("
\94ç
\95\86\82Í
\96{
\97\88\82Ì
\8ep
\82É
\96ß
\82Á
\82½
\81D");
2012 uskin = (struct obj *) 0;
2013 /* undo save/restore hack */
2014 uarm->owornmask &= ~I_SPECIAL;
2019 mbodypart(mon, part)
2023 static NEARDATA const char
2025 *humanoid_parts[] = { "arm", "eye", "face", "finger",
2026 "fingertip", "foot", "hand", "handed",
2027 "head", "leg", "light headed", "neck",
2028 "spine", "toe", "hair", "blood",
2029 "lung", "nose", "stomach" },
2031 *humanoid_parts[] = {
2032 "
\98r", "
\96Ú", "
\8aç", "
\8ew",
2033 "
\8ew
\90æ", "
\91«", "
\8eè", "
\8eè
\82É
\82·
\82é",
2034 "
\93ª", "
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2035 "
\94w
\8d\9c", "
\92Ü
\90æ", "
\94¯", "
\8c\8c",
2036 "
\94x", "
\95@", "
\88Ý"},
2039 *jelly_parts[] = { "pseudopod", "dark spot", "front",
2040 "pseudopod extension", "pseudopod extremity",
2041 "pseudopod root", "grasp", "grasped",
2042 "cerebral area", "lower pseudopod", "viscous",
2043 "middle", "surface", "pseudopod extremity",
2044 "ripples", "juices", "surface", "sensor",
2048 "
\8b[
\8e\97\90G
\8eè", "
\8d\95\82¢
\94Á
\93_", "
\91O
\96Ê",
2049 "
\8b[
\8e\97\90G
\8eè
\82Ì
\90æ", "
\8b[
\8e\97\90G
\8eè",
2050 "
\8b[
\8e\97\90G
\8eè
\82Ì
\8a²", "
\90G
\8eè", "
\88¬
\82é",
2051 "
\94]
\82Ì
\97Ì
\88æ", "
\89º
\95û
\82Ì
\8b[
\8e\97\90G
\8eè", "
\82Ë
\82Î
\82Ë
\82Î
\82µ
\82Ä
\82«
\82½",
2052 "
\92\86\8aÔ
\97Ì
\88æ", "
\95\
\96Ê", "
\8b[
\8e\97\90G
\8eè",
2053 "
\94g
\96ä", "
\91Ì
\89t", "
\95\
\96Ê", "
\8a´
\8ao
\8aí",
2057 *animal_parts[] = { "forelimb", "eye", "face",
2058 "foreclaw", "claw tip", "rear claw",
2059 "foreclaw", "clawed", "head",
2060 "rear limb", "light headed", "neck",
2061 "spine", "rear claw tip", "fur",
2062 "blood", "lung", "nose",
2066 "
\91O
\91«", "
\96Ú", "
\8aç",
2067 "
\91O
\92Ü", "
\92Ü
\90æ", "
\8cã
\92Ü",
2068 "
\91O
\92Ü", "
\82Ð
\82Á
\82©
\82¯
\82é", "
\93ª",
2069 "
\8cã
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2070 "
\94w
\8d\9c", "
\8cã
\92Ü
\90æ", "
\96Ñ
\94ç",
2071 "
\8c\8c", "
\94x", "
\95@",
2075 *bird_parts[] = { "wing", "eye", "face", "wing",
2076 "wing tip", "foot", "wing", "winged",
2077 "head", "leg", "light headed", "neck",
2078 "spine", "toe", "feathers", "blood",
2079 "lung", "bill", "stomach" },
2082 "
\97\83", "
\96Ú", "
\8aç", "
\97\83",
2083 "
\97\83\82Ì
\90æ", "
\91«", "
\97\83", "
\97\83\82É
\82Æ
\82é",
2084 "
\93ª", "
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2085 "
\94w
\8d\9c", "
\92Ü
\90æ", "
\89H
\96Ñ", "
\8c\8c",
2086 "
\94x", "
\82
\82¿
\82Î
\82µ", "
\88Ý" },
2089 *horse_parts[] = { "foreleg", "eye", "face",
2090 "forehoof", "hoof tip", "rear hoof",
2091 "forehoof", "hooved", "head",
2092 "rear leg", "light headed", "neck",
2093 "backbone", "rear hoof tip", "mane",
2094 "blood", "lung", "nose",
2098 "
\91O
\91«", "
\96Ú", "
\8aç",
2099 "
\91O
\92û", "
\92û", "
\8cã
\92û",
2100 "
\91O
\92Ü", "
\92û
\82É
\82Í
\82³
\82Þ", "
\93ª",
2101 "
\8cã
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2102 "
\94w
\8d\9c", "
\8cã
\92Ü
\90æ", "
\82½
\82Ä
\82ª
\82Ý",
2103 "
\8c\8c", "
\94x", "
\95@",
2107 *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
2108 "tentacle tip", "lower appendage", "tentacle",
2109 "tentacled", "body", "lower tentacle",
2110 "rotational", "equator", "body",
2111 "lower tentacle tip", "cilia", "life force",
2112 "retina", "olfactory nerve", "interior" },
2115 "
\93Ë
\8bN", "
\8e\8b\8ao
\90_
\8co", "
\91Ì", "
\90G
\8eè",
2116 "
\90G
\8eè
\82Ì
\90æ", "
\89º
\82Ì
\93Ë
\8bN", "
\90G
\8eè",
2117 "
\90G
\8eè
\82É
\8e\9d\82Â", "
\91Ì", "
\89º
\82Ì
\90G
\8eè",
2118 "
\89ñ
\93]
\82µ
\82½", "
\92\86\90S
\90ü", "
\91Ì",
2119 "
\89º
\82Ì
\90G
\8eè
\82Ì
\90æ", "
\91@
\96Ñ", "
\90¶
\96½
\97Í",
2120 "
\96Ô
\96\8c", "
\9ak
\8ao
\92\86\90\95", "
\93à
\95\94" },
2123 *fungus_parts[] = { "mycelium", "visual area", "front",
2124 "hypha", "hypha", "root",
2125 "strand", "stranded", "cap area",
2126 "rhizome", "sporulated", "stalk",
2127 "root", "rhizome tip", "spores",
2128 "juices", "gill", "gill",
2132 "
\8bÛ
\8e\85\91Ì", "
\8e\8b\8ao
\97Ì
\88æ", "
\91O",
2133 "
\8bÛ
\8e\85", "
\8bÛ
\8e\85", "
\8dª",
2134 "
\90G
\8eè", "
\90G
\8eè
\82É
\82©
\82ç
\82Ý
\82Â
\82¯
\82é", "
\8eP",
2135 "
\8dª
\8cs", "
\8d¬
\97\90\82·
\82é", "
\8e²",
2136 "
\8dª", "
\8dª
\8cs
\82Ì
\90æ", "
\89è
\96E",
2137 "
\91Ì
\89t", "
\82¦
\82ç", "
\82¦
\82ç",
2141 *vortex_parts[] = { "region", "eye", "front",
2142 "minor current", "minor current", "lower current",
2143 "swirl", "swirled", "central core",
2144 "lower current", "addled", "center",
2145 "currents", "edge", "currents",
2146 "life force", "center", "leading edge",
2150 "
\97Ì
\88æ", "
\96Ú", "
\91O",
2151 "
\8f¬
\82³
\82¢
\97¬
\82ê", "
\8f¬
\82³
\82¢
\97¬
\82ê", "
\89º
\95\94\82Ì
\97¬
\82ê",
2152 "
\89Q
\8aª", "
\89Q
\82É
\8aª
\82", "
\89Q
\82Ì
\92\86\90S",
2153 "
\89º
\95\94\82Ì
\97¬
\82ê", "
\8d¬
\97\90\82µ
\82½", "
\92\86\90S
\95\94",
2154 "
\97¬
\82ê", "
\8aO
\8eü", "
\8bC
\97¬",
2155 "
\90¶
\96½
\97Í", "
\92\86\90S", "
\91O
\89\8f",
2159 *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
2160 "large scale tip", "rear region", "scale gap",
2161 "scale gapped", "head", "rear region",
2162 "light headed", "neck", "length", "rear scale",
2163 "scales", "blood", "lung", "forked tongue",
2167 "
\91Þ
\89»
\82µ
\82½
\91«", "
\96Ú", "
\8aç", "
\91å
\82«
\82È
\97Ø",
2168 "
\91å
\82«
\82È
\97Ø
\82Ì
\90æ", "
\8cã
\95\94\95ª", "
\97Ø
\82Ì
\8c\84\8aÔ",
2169 "
\97Ø
\82Ì
\8c\84\8aÔ
\82É
\82Â
\82¯
\82é", "
\93ª", "
\8cã
\95\94\95ª",
2170 "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ", "
\91Ì", "
\8cã
\95\94\95ª
\82Ì
\8aZ",
2171 "
\97Ø", "
\8c\8c", "
\94x", "
\90ã",
2175 *worm_parts[] = { "anterior segment", "light sensitive cell",
2176 "clitellum", "setae", "setae", "posterior segment",
2177 "segment", "segmented", "anterior segment",
2178 "posterior", "over stretched", "clitellum",
2179 "length", "posterior setae", "setae", "blood",
2180 "skin", "prostomium", "stomach" },
2183 "
\91O
\8bæ", "
\8a´
\8cõ
\90«
\8d×
\96E",
2184 "
\8aÂ
\91Ñ", "
\8ap", "
\8ap", "
\8cã
\8bæ",
2185 "
\90ß", "
\90ß
\82É
\82Â
\82¯
\82é", "
\91O
\8bæ",
2186 "
\8cã
\95\94", "
\90L
\82Ñ
\82·
\82¬
\82½", "
\8aÂ
\91Ñ",
2187 "
\91Ì", "
\8cã
\95\94\82Ì
\8ap", "
\8ap", "
\8c\8c",
2188 "
\94ç
\95\86", "
\8cû
\91O
\97t", "
\88Ý" },
2191 *fish_parts[] = { "fin", "eye", "premaxillary", "pelvic axillary",
2192 "pelvic fin", "anal fin", "pectoral fin", "finned",
2193 "head", "peduncle", "played out", "gills",
2194 "dorsal fin", "caudal fin", "scales", "blood",
2195 "gill", "nostril", "stomach" };
2198 "
\82Ð
\82ê", "
\96Ú", "
\8aç", "
\82Ð
\82ê
\82Ì
\90æ",
2199 "
\82Ð
\82ê
\82Ì
\90æ", "
\94ö
\82Ñ
\82ê", "
\8b¹
\82Ð
\82ê", "
\82Ð
\82ê
\82Å
\8e\9d\82Â",
2200 "
\93ª", "
\94ö
\95¿", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\82¦
\82ç",
2201 "
\94w
\82Ñ
\82ê", "
\94ö
\82Ñ
\82ê", "
\97Ø", "
\8c\8c",
2202 "
\82¦
\82ç", "
\95@", "
\88Ý" };
2204 #if 0 /*JP*//*
\8eg
\82í
\82È
\82¢*/
2205 /* claw attacks are overloaded in mons[]; most humanoids with
2206 such attacks should still reference hands rather than claws */
2207 static const char not_claws[] = {
2208 S_HUMAN, S_MUMMY, S_ZOMBIE, S_ANGEL, S_NYMPH, S_LEPRECHAUN,
2209 S_QUANTMECH, S_VAMPIRE, S_ORC, S_GIANT, /* quest nemeses */
2210 '\0' /* string terminator; assert( S_xxx != 0 ); */
2213 struct permonst *mptr = mon->data;
2216 /* paw
\82Í
\8c¢
\82Æ
\82©
\94L
\82Ì
\8eè
\81Cclaw
\82Í
\83^
\83J
\82Ì
\91«
\82Ì
\82æ
\82¤
\82È
\82©
\82¬
\82Â
\82ß
\81C
2217 \82Ç
\82¿
\82ç
\82à
\93ú
\96{
\8cê
\82¶
\82á
\81u
\8eè
\81v
\82Å
\82¢
\82¢
\82Å
\82µ
\82å
\82¤
\81D
2219 /* some special cases */
2220 if (mptr->mlet == S_DOG || mptr->mlet == S_FELINE
2221 || mptr->mlet == S_RODENT || mptr == &mons[PM_OWLBEAR]) {
2231 return horse_parts[part]; /* "foreleg", "rear leg" */
2233 break; /* for other parts, use animal_parts[] below */
2235 } else if (mptr->mlet == S_YETI) { /* excl. owlbear due to 'if' above */
2236 /* opposable thumbs, hence "hands", "arms", "legs", &c */
2237 return humanoid_parts[part]; /* yeti/sasquatch, monkey/ape */
2239 if ((part == HAND || part == HANDED)
2240 && (humanoid(mptr) && attacktype(mptr, AT_CLAW)
2241 && !index(not_claws, mptr->mlet) && mptr != &mons[PM_STONE_GOLEM]
2242 && mptr != &mons[PM_INCUBUS] && mptr != &mons[PM_SUCCUBUS]))
2243 return (part == HAND) ? "claw" : "clawed";
2245 #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*/
2246 if ((mptr == &mons[PM_MUMAK] || mptr == &mons[PM_MASTODON])
2250 if (mptr == &mons[PM_SHARK] && part == HAIR)
2252 return "skin"; /* sharks don't have scales */
2254 return "
\93ª"; /* sharks don't have scales */
2256 if ((mptr == &mons[PM_JELLYFISH] || mptr == &mons[PM_KRAKEN])
2257 && (part == ARM || part == FINGER || part == HAND || part == FOOT
2263 if (mptr == &mons[PM_FLOATING_EYE] && part == EYE)
2267 return "
\8ap
\96\8c";
2268 if (humanoid(mptr) && (part == ARM || part == FINGER || part == FINGERTIP
2269 || part == HAND || part == HANDED))
2270 return humanoid_parts[part];
2271 if (mptr == &mons[PM_RAVEN])
2272 return bird_parts[part];
2273 if (mptr->mlet == S_CENTAUR || mptr->mlet == S_UNICORN
2274 || (mptr == &mons[PM_ROTHE] && part != HAIR))
2275 return horse_parts[part];
2276 if (mptr->mlet == S_LIGHT) {
2280 else if (part == ARM || part == FINGER || part == FINGERTIP
2286 if (part == HANDED || part == ARM || part == FINGER
2287 || part == FINGERTIP || part == HAND) {
2292 if (mptr == &mons[PM_STALKER] && part == HEAD)
2297 if (mptr->mlet == S_EEL && mptr != &mons[PM_JELLYFISH])
2298 return fish_parts[part];
2299 if (mptr->mlet == S_WORM)
2300 return worm_parts[part];
2301 if (slithy(mptr) || (mptr->mlet == S_DRAGON && part == HAIR))
2302 return snake_parts[part];
2303 if (mptr->mlet == S_EYE)
2304 return sphere_parts[part];
2305 if (mptr->mlet == S_JELLY || mptr->mlet == S_PUDDING
2306 || mptr->mlet == S_BLOB || mptr == &mons[PM_JELLYFISH])
2307 return jelly_parts[part];
2308 if (mptr->mlet == S_VORTEX || mptr->mlet == S_ELEMENTAL)
2309 return vortex_parts[part];
2310 if (mptr->mlet == S_FUNGUS)
2311 return fungus_parts[part];
2313 return humanoid_parts[part];
2314 return animal_parts[part];
2321 return mbodypart(&youmonst, part);
2327 /* Returns gender of polymorphed player;
2328 * 0/1=same meaning as flags.female, 2=none.
2330 if (is_neuter(youmonst.data) || !humanoid(youmonst.data))
2332 return flags.female;
2336 ugolemeffects(damtype, dam)
2341 /* We won't bother with "slow"/"haste" since players do not
2342 * have a monster-specific slow/haste so there is no way to
2343 * restore the old velocity once they are back to human.
2345 if (u.umonnum != PM_FLESH_GOLEM && u.umonnum != PM_IRON_GOLEM)
2349 if (u.umonnum == PM_FLESH_GOLEM)
2350 heal = (dam + 5) / 6; /* Approx 1 per die */
2353 if (u.umonnum == PM_IRON_GOLEM)
2357 if (heal && (u.mh < u.mhmax)) {
2363 pline("Strangely, you feel better than before.");
2365 pline("
\8aï
\96
\82È
\82±
\82Æ
\82É
\81C
\91O
\82æ
\82è
\8bC
\95ª
\82ª
\82æ
\82
\82È
\82Á
\82½
\81D");
2366 exercise(A_STR, TRUE);
2371 armor_to_dragon(atyp)
2375 case GRAY_DRAGON_SCALE_MAIL:
2376 case GRAY_DRAGON_SCALES:
2377 return PM_GRAY_DRAGON;
2378 case SILVER_DRAGON_SCALE_MAIL:
2379 case SILVER_DRAGON_SCALES:
2380 return PM_SILVER_DRAGON;
2381 #if 0 /* DEFERRED */
2382 case SHIMMERING_DRAGON_SCALE_MAIL:
2383 case SHIMMERING_DRAGON_SCALES:
2384 return PM_SHIMMERING_DRAGON;
2386 case RED_DRAGON_SCALE_MAIL:
2387 case RED_DRAGON_SCALES:
2388 return PM_RED_DRAGON;
2389 case ORANGE_DRAGON_SCALE_MAIL:
2390 case ORANGE_DRAGON_SCALES:
2391 return PM_ORANGE_DRAGON;
2392 case WHITE_DRAGON_SCALE_MAIL:
2393 case WHITE_DRAGON_SCALES:
2394 return PM_WHITE_DRAGON;
2395 case BLACK_DRAGON_SCALE_MAIL:
2396 case BLACK_DRAGON_SCALES:
2397 return PM_BLACK_DRAGON;
2398 case BLUE_DRAGON_SCALE_MAIL:
2399 case BLUE_DRAGON_SCALES:
2400 return PM_BLUE_DRAGON;
2401 case GREEN_DRAGON_SCALE_MAIL:
2402 case GREEN_DRAGON_SCALES:
2403 return PM_GREEN_DRAGON;
2404 case YELLOW_DRAGON_SCALE_MAIL:
2405 case YELLOW_DRAGON_SCALES:
2406 return PM_YELLOW_DRAGON;
2412 /* some species have awareness of other species */
2416 short warnidx = NON_PM;
2418 context.warntype.speciesidx = NON_PM;
2419 context.warntype.species = 0;
2420 context.warntype.polyd = 0;
2421 HWarn_of_mon &= ~FROMRACE;
2423 switch (u.umonnum) {
2424 case PM_PURPLE_WORM:
2425 warnidx = PM_SHRIEKER;
2428 case PM_VAMPIRE_LORD:
2429 context.warntype.polyd = M2_HUMAN | M2_ELF;
2430 HWarn_of_mon |= FROMRACE;
2433 if (warnidx >= LOW_PM) {
2434 context.warntype.speciesidx = warnidx;
2435 context.warntype.species = &mons[warnidx];
2436 HWarn_of_mon |= FROMRACE;
2440 /* True iff hero's role or race has been genocided */
2444 return (boolean) ((mvitals[urole.malenum].mvflags & G_GENOD)
2445 || (urole.femalenum != NON_PM
2446 && (mvitals[urole.femalenum].mvflags & G_GENOD))
2447 || (mvitals[urace.malenum].mvflags & G_GENOD)
2448 || (urace.femalenum != NON_PM
2449 && (mvitals[urace.femalenum].mvflags & G_GENOD)));
2452 /* how hero feels "inside" after self-genocide of role or race */
2456 /* self-genocide used to always say "you feel dead inside" but that
2457 seems silly when you're polymorphed into something undead;
2458 monkilled() distinguishes between living (killed) and non (destroyed)
2459 for monster death message; we refine the nonliving aspect a bit */
2461 return !nonliving(youmonst.data)
2462 ? "dead" /* living, including demons */
2463 : !weirdnonliving(youmonst.data)
2464 ? "condemned" /* undead plus manes */
2465 : "empty"; /* golems plus vortices */
2467 return !nonliving(youmonst.data)
2468 ? "
\8e\80\82ñ
\82¾" /*
\90¶
\95¨
\82Æ
\88«
\96\82 */
2469 : !weirdnonliving(youmonst.data)
2470 ? "
\94j
\89ó
\82³
\82ê
\82½" /*
\83A
\83\93\83f
\83b
\83h
\82Æ
\96S
\97ì */
2471 : "
\82È
\82
\82È
\82Á
\82½"; /*
\83S
\81[
\83\8c\83\80\82Æ
\89Q */