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) {
1291 Your("%s %s!", simpleonames(uamul), otense(uamul, "fail"));
1293 makeknown(AMULET_OF_UNCHANGING);
1297 if (emits_light(youmonst.data))
1298 del_light_source(LS_MONSTER, monst_to_any(&youmonst));
1300 polyman("return to %s form!", urace.adj);
1302 polyman("%s
\82É
\96ß
\82Á
\82½
\81I", urace.adj);
1305 /* can only happen if some bit of code reduces u.uhp
1306 instead of u.mh while poly'd */
1308 Your("old form was not healthy enough to survive.");
1310 Your("
\8c³
\82Ì
\8ep
\82Í
\90¶
\82«
\82Ä
\82¢
\82
\82¾
\82¯
\82Ì
\97Í
\82ª
\82È
\82¢
\81D");
1312 Sprintf(killer.name, "reverting to unhealthy %s form", urace.adj);
1314 Sprintf(killer.name, "
\95s
\8c\92\8dN
\82È%s
\82Ì
\8ep
\82É
\96ß
\82Á
\82Ä", urace.adj);
1315 killer.format = KILLED_BY;
1321 vision_full_recalc = 1;
1322 (void) encumber_msg();
1323 if (was_flying && !Flying && u.usteed)
1324 You("and %s return gently to the %s.",
1325 mon_nam(u.usteed), surface(u.ux, u.uy));
1326 retouch_equipment(2);
1328 selftouch(no_longer_petrify_resistant);
1334 struct attack *mattk;
1338 You_cant("breathe. Sorry.");
1340 You_cant("
\91§
\82ð
\93f
\82
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81D
\8ec
\94O
\81D");
1345 You("don't have enough energy to breathe!");
1347 You("
\91§
\82ð
\93f
\82
\82Ì
\82É
\8f\
\95ª
\82È
\83G
\83l
\83\8b\83M
\81[
\82ª
\82È
\82©
\82Á
\82½
\81D");
1353 if (!getdir((char *) 0))
1356 mattk = attacktype_fordmg(youmonst.data, AT_BREA, AD_ANY);
1358 impossible("bad breath attack?"); /* mouthwash needed... */
1359 else if (!u.dx && !u.dy && !u.dz)
1362 buzz((int) (20 + mattk->adtyp - 1), (int) mattk->damn, u.ux, u.uy,
1371 struct attack *mattk;
1373 if (!getdir((char *) 0))
1375 mattk = attacktype_fordmg(youmonst.data, AT_SPIT, AD_ANY);
1377 impossible("bad spit attack?");
1379 switch (mattk->adtyp) {
1382 otmp = mksobj(BLINDING_VENOM, TRUE, FALSE);
1385 impossible("bad attack type in dospit");
1388 otmp = mksobj(ACID_VENOM, TRUE, FALSE);
1391 otmp->spe = 1; /* to indicate it's yours */
1392 throwit(otmp, 0L, FALSE);
1401 if (u.utrap && u.utraptype == TT_BURIEDBALL) {
1403 pline_The("ball and chain are buried firmly in the %s.",
1404 surface(u.ux, u.uy));
1406 pline_The("
\8b\85\82Æ
\8d½
\82Í%s
\82É
\82µ
\82Á
\82©
\82è
\82Æ
\96\84\82Ü
\82Á
\82Ä
\82¢
\82é
\81D.",
1407 surface(u.ux, u.uy));
1412 You("are not chained to anything!");
1414 You("
\89½
\82à
\82Â
\82È
\82ª
\82ê
\82Ä
\82¢
\82È
\82¢
\81I");
1424 register struct trap *ttmp = t_at(u.ux, u.uy);
1426 if (Levitation || Is_airlevel(&u.uz) || Underwater
1427 || Is_waterlevel(&u.uz)) {
1429 You("must be on the ground to spin a web.");
1431 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");
1436 You("release web fluid inside %s.", mon_nam(u.ustuck));
1438 You("%s
\82Ì
\93à
\82Å
\82
\82à
\82Ì
\91\83\82ð
\93f
\82«
\8fo
\82µ
\82½
\81D", mon_nam(u.ustuck));
1439 if (is_animal(u.ustuck->data)) {
1440 expels(u.ustuck, u.ustuck->data, TRUE);
1443 if (is_whirly(u.ustuck->data)) {
1446 for (i = 0; i < NATTK; i++)
1447 if (u.ustuck->data->mattk[i].aatyp == AT_ENGL)
1450 impossible("Swallower has no engulfing attack?");
1455 switch (u.ustuck->data->mattk[i].adtyp) {
1458 Strcpy(sweep, "ignites and ");
1460 Strcpy(sweep, "
\94
\89Î
\82µ");
1464 Strcpy(sweep, "fries and ");
1466 Strcpy(sweep, "
\8fÅ
\82°");
1470 Strcpy(sweep, "freezes, shatters and ");
1472 Strcpy(sweep, "
\93\80\82è
\82Â
\82«
\81C
\82±
\82È
\82²
\82È
\82É
\82È
\82è");
1476 pline_The("web %sis swept away!", sweep);
1478 pline("
\82
\82à
\82Ì
\91\83\82Í%s
\82È
\82
\82È
\82Á
\82½
\81I", sweep);
1481 } /* default: a nasty jelly-like creature */
1483 pline_The("web dissolves into %s.", mon_nam(u.ustuck));
1485 pline("
\82
\82à
\82Ì
\91\83\82Í
\95ª
\89ð
\82µ
\82Ä%s
\82É
\82È
\82Á
\82½
\81D", mon_nam(u.ustuck));
1490 You("cannot spin webs while stuck in a trap.");
1492 You("ã©
\82É
\82Í
\82Ü
\82Á
\82Ä
\82¢
\82é
\8aÔ
\82Í
\82
\82à
\82Ì
\91\83\82ð
\92£
\82ê
\82È
\82¢
\81D");
1495 exercise(A_DEX, TRUE);
1497 switch (ttmp->ttyp) {
1501 You("spin a web, covering up the pit.");
1503 You("
\82
\82à
\82Ì
\91\83\82ð
\92£
\82è
\81C
\97\8e\82µ
\8c\8a\82ð
\95¢
\82Á
\82½
\81D");
1505 bury_objs(u.ux, u.uy);
1510 pline_The("squeaky board is muffled.");
1512 pline("
\82«
\82µ
\82Þ
\94Â
\82Í
\95¢
\82í
\82ê
\82½
\81D");
1519 case VIBRATING_SQUARE:
1521 Your("webbing vanishes!");
1523 Your("
\82
\82à
\82Ì
\91\83\82Í
\8fÁ
\82¦
\82½
\81I");
1527 You("make the web thicker.");
1529 You("
\82
\82à
\82Ì
\91\83\82ð
\82æ
\82è
\8cú
\82
\82µ
\82½
\81D");
1534 You("web over the %s.",
1535 (ttmp->ttyp == TRAPDOOR) ? "trap door" : "hole");
1537 You("%s
\82ð
\82
\82à
\82Ì
\91\83\82Å
\95¢
\82Á
\82½
\81D",
1538 (ttmp->ttyp == TRAPDOOR) ? "
\97\8e\82µ
\94à" : "
\8c\8a");
1543 case ROLLING_BOULDER_TRAP:
1545 You("spin a web, jamming the trigger.");
1547 You("
\82
\82à
\82Ì
\91\83\82ð
\92£
\82Á
\82Ä
\81C
\83X
\83C
\83b
\83`
\82ð
\93®
\82©
\82È
\82
\82µ
\82½
\81D");
1563 You("have triggered a trap!");
1565 You("ã©
\82ð
\8en
\93®
\82³
\82¹
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I");
1569 impossible("Webbing over trap type %d?", ttmp->ttyp);
1572 } else if (On_stairs(u.ux, u.uy)) {
1573 /* cop out: don't let them hide the stairs */
1575 Your("web fails to impede access to the %s.",
1576 (levl[u.ux][u.uy].typ == STAIRS) ? "stairs" : "ladder");
1578 Your("
\82
\82à
\82Ì
\91\83\82Í%s
\82Ö
\82Ì
\88Ú
\93®
\82ð
\8e×
\96\82\82Å
\82«
\82È
\82¢
\81D",
1579 (levl[u.ux][u.uy].typ == STAIRS) ? "
\8aK
\92i" : "
\82Í
\82µ
\82²");
1583 ttmp = maketrap(u.ux, u.uy, WEB);
1597 You("lack the energy to send forth a call for help!");
1599 You("
\8f\95\82¯
\82ð
\8cÄ
\82Ô
\82¾
\82¯
\82Ì
\91Ì
\97Í
\82ª
\82È
\82¢
\81I");
1606 You("call upon your brethren for help!");
1608 You("
\92\87\8aÔ
\82ð
\8cÄ
\82ñ
\82¾
\81I");
1609 exercise(A_WIS, TRUE);
1610 if (!were_summon(youmonst.data, TRUE, &placeholder, (char *) 0))
1612 pline("But none arrive.");
1614 pline("
\82µ
\82©
\82µ
\81C
\89½
\82à
\97\88\82È
\82¢
\81D");
1621 register struct monst *mtmp;
1627 for (i = 0; i < NATTK; i++) {
1628 if (youmonst.data->mattk[i].aatyp == AT_GAZE) {
1629 adtyp = youmonst.data->mattk[i].adtyp;
1633 if (adtyp != AD_CONF && adtyp != AD_FIRE) {
1634 impossible("gaze attack %d?", adtyp);
1640 You_cant("see anything to gaze at.");
1642 You("
\96Ú
\82ª
\8c©
\82¦
\82È
\82¢
\82Ì
\82Å
\81C
\82É
\82ç
\82ß
\82È
\82¢
\81D");
1644 } else if (Hallucination) {
1646 You_cant("gaze at anything you can see.");
1648 You_cant("
\8c©
\82¦
\82é
\82à
\82Ì
\82ð
\89½
\82à
\82É
\82ç
\82ß
\82È
\82¢
\81D");
1653 You("lack the energy to use your special gaze!");
1655 You("
\82É
\82ç
\82Þ
\82¾
\82¯
\82Ì
\91Ì
\97Í
\82ª
\82È
\82¢
\81I");
1661 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
1662 if (DEADMONSTER(mtmp))
1664 if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my)) {
1666 if (Invis && !perceives(mtmp->data)) {
1668 pline("%s seems not to notice your gaze.", Monnam(mtmp));
1670 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\82É
\82ç
\82Ý
\82É
\8bC
\82ª
\82Â
\82¢
\82Ä
\82È
\82¢
\82æ
\82¤
\82¾
\81D", Monnam(mtmp));
1671 } else if (mtmp->minvis && !See_invisible) {
1673 You_cant("see where to gaze at %s.", Monnam(mtmp));
1675 You("%s
\82Í
\8c©
\82¦
\82È
\82¢
\82Ì
\82Å
\81C
\82É
\82ç
\82ß
\82È
\82¢", Monnam(mtmp));
1676 } else if (M_AP_TYPE(mtmp) == M_AP_FURNITURE
1677 || M_AP_TYPE(mtmp) == M_AP_OBJECT) {
1680 } else if (flags.safe_dog && mtmp->mtame && !Confusion) {
1682 You("avoid gazing at %s.", y_monnam(mtmp));
1684 You("%s
\82©
\82ç
\96Ú
\82ð
\82»
\82ç
\82µ
\82Ä
\82µ
\82Ü
\82Á
\82½
\81D", y_monnam(mtmp));
1686 if (flags.confirm && mtmp->mpeaceful && !Confusion) {
1688 Sprintf(qbuf, "Really %s %s?",
1689 (adtyp == AD_CONF) ? "confuse" : "attack",
1692 Sprintf(qbuf, "
\96{
\93\96\82É%s
\82ð%s
\81H",
1694 (adtyp == AD_CONF) ? "
\8d¬
\97\90\82³
\82¹
\82é" : "
\8dU
\8c\82\82·
\82é");
1696 if (yn(qbuf) != 'y')
1699 setmangry(mtmp, TRUE);
1700 if (!mtmp->mcanmove || mtmp->mstun || mtmp->msleeping
1701 || !mtmp->mcansee || !haseyes(mtmp->data)) {
1705 /* No reflection check for consistency with when a monster
1706 * gazes at *you*--only medusa gaze gets reflected then.
1708 if (adtyp == AD_CONF) {
1711 Your("gaze confuses %s!", mon_nam(mtmp));
1713 Your("
\82É
\82ç
\82Ý
\82Í%s
\82ð
\8d¬
\97\90\82³
\82¹
\82½
\81I", mon_nam(mtmp));
1716 pline("%s is getting more and more confused.",
1718 pline("%s
\82Í
\82Ü
\82·
\82Ü
\82·
\8d¬
\97\90\82µ
\82½
\81I",
1721 } else if (adtyp == AD_FIRE) {
1722 int dmg = d(2, 6), lev = (int) u.ulevel;
1725 You("attack %s with a fiery gaze!", mon_nam(mtmp));
1727 You("
\89\8a\82Ì
\82É
\82ç
\82Ý
\82Å%s
\82ð
\8dU
\8c\82\82µ
\82½
\81I", mon_nam(mtmp));
1728 if (resists_fire(mtmp)) {
1730 pline_The("fire doesn't burn %s!", mon_nam(mtmp));
1732 pline("%s
\82Í
\89\8a\82Å
\94R
\82¦
\82È
\82©
\82Á
\82½
\81I", mon_nam(mtmp));
1736 (void) destroy_mitem(mtmp, SCROLL_CLASS, AD_FIRE);
1738 (void) destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
1740 (void) destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE);
1743 if (DEADMONSTER(mtmp))
1746 /* For consistency with passive() in uhitm.c, this only
1747 * affects you if the monster is still alive.
1749 if (DEADMONSTER(mtmp))
1752 if (mtmp->data == &mons[PM_FLOATING_EYE] && !mtmp->mcan) {
1755 You("are frozen by %s gaze!",
1756 s_suffix(mon_nam(mtmp)));
1758 You("%s
\82Ì
\82É
\82ç
\82Ý
\82Å
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81I",
1761 nomul((u.ulevel > 6 || rn2(4))
1762 ? -d((int) mtmp->m_lev + 1,
1763 (int) mtmp->data->mattk[0].damd)
1766 multi_reason = "frozen by a monster's gaze";
1768 multi_reason = "
\89ö
\95¨
\82Ì
\82É
\82ç
\82Ý
\82Å
\8dd
\92¼
\82µ
\82Ä
\82¢
\82é
\8e\9e\82É";
1773 You("stiffen momentarily under %s gaze.",
1774 s_suffix(mon_nam(mtmp)));
1776 You("%s
\82Ì
\82É
\82ç
\82Ý
\82Å
\88ê
\8fu
\8dd
\92¼
\82µ
\82½
\81D",
1780 /* Technically this one shouldn't affect you at all because
1781 * the Medusa gaze is an active monster attack that only
1782 * works on the monster's turn, but for it to *not* have an
1783 * effect would be too weird.
1785 if (mtmp->data == &mons[PM_MEDUSA] && !mtmp->mcan) {
1787 pline("Gazing at the awake %s is not a very good idea.",
1789 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",
1791 /* as if gazing at a sleeping anything is fruitful... */
1793 You("turn to stone...");
1795 You("
\90Î
\82É
\82È
\82Á
\82½
\81D
\81D
\81D");
1796 killer.format = KILLED_BY;
1798 Strcpy(killer.name, "deliberately meeting Medusa's gaze");
1800 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Ä");
1808 You("gaze at no place in particular.");
1810 You("
\8eÀ
\8dÛ
\82É
\82Í
\89½
\82à
\82É
\82ç
\82ß
\82È
\82©
\82Á
\82½
\81D");
1817 boolean ismimic = youmonst.data->mlet == S_MIMIC,
1818 on_ceiling = is_clinger(youmonst.data) || Flying;
1820 /* can't hide while being held (or holding) or while trapped
1821 (except for floor hiders [trapper or mimic] in pits) */
1822 if (u.ustuck || (u.utrap && (u.utraptype != TT_PIT || on_ceiling))) {
1824 You_cant("hide while you're %s.",
1825 !u.ustuck ? "trapped"
1826 : u.uswallow ? (is_animal(u.ustuck->data) ? "swallowed"
1828 : !sticks(youmonst.data) ? "being held"
1829 : (humanoid(u.ustuck->data) ? "holding someone"
1830 : "holding that creature"));
1832 You_cant("%s
\8aÔ
\82Í
\89B
\82ê
\82ç
\82ê
\82È
\82¢
\81D",
1833 !u.ustuck ? "
\95ß
\82Ü
\82Á
\82Ä
\82¢
\82é"
1834 : u.uswallow ? "
\88ù
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82é"
1835 : !sticks(youmonst.data) ? "
\95ß
\82Ü
\82¦
\82ç
\82ê
\82Ä
\82¢
\82é"
1836 : humanoid(u.ustuck->data) ? "
\92N
\82©
\82ð
\82Â
\82©
\82ñ
\82Å
\82¢
\82é"
1837 : "
\89ö
\95¨
\82ð
\82Â
\82©
\82ñ
\82Å
\82¢
\82é");
1840 || (ismimic && U_AP_TYPE != M_AP_NOTHING)) {
1842 youmonst.m_ap_type = M_AP_NOTHING;
1847 /* note: the eel and hides_under cases are hypothetical;
1848 such critters aren't offered the option of hiding via #monster */
1849 if (youmonst.data->mlet == S_EEL && !is_pool(u.ux, u.uy)) {
1850 if (IS_FOUNTAIN(levl[u.ux][u.uy].typ))
1852 The("fountain is not deep enough to hide in.");
1854 The("
\90ò
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\82Ù
\82Ç
\90[
\82
\82È
\82¢
\81D");
1857 There("is no %s to hide in here.", hliquid("water"));
1859 There("
\82±
\82±
\82É
\82Í
\89B
\82ê
\82é
\82½
\82ß
\82Ì%s
\82ª
\82È
\82¢
\81D", hliquid("
\90\85"));
1863 if (hides_under(youmonst.data) && !level.objects[u.ux][u.uy]) {
1865 There("is nothing to hide under here.");
1867 There("
\82±
\82±
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\82à
\82Ì
\82ª
\82È
\82¢
\81D");
1871 /* Planes of Air and Water */
1872 if (on_ceiling && !has_ceiling(&u.uz)) {
1874 There("is nowhere to hide above you.");
1876 There("
\82 \82È
\82½
\82Ì
\8fã
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\8fê
\8f\8a\82ª
\82È
\82¢
\81D");
1880 if ((is_hider(youmonst.data) && !Flying) /* floor hider */
1881 && (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz))) {
1883 There("is nowhere to hide beneath you.");
1885 There("
\82 \82È
\82½
\82Ì
\89º
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\8fê
\8f\8a\82ª
\82È
\82¢
\81D");
1889 /* TODO? inhibit floor hiding at furniture locations, or
1890 * else make youhiding() give smarter messages at such spots.
1893 if (u.uundetected || (ismimic && U_AP_TYPE != M_AP_NOTHING)) {
1894 youhiding(FALSE, 1); /* "you are already hiding" */
1899 /* should bring up a dialog "what would you like to imitate?" */
1900 youmonst.m_ap_type = M_AP_OBJECT;
1901 youmonst.mappearance = STRANGE_OBJECT;
1905 youhiding(FALSE, 0); /* "you are now hiding" */
1912 struct permonst *savedat = youmonst.data;
1914 if (is_vampire(youmonst.data)) {
1916 if (savedat != youmonst.data) {
1918 You("transform into %s.", an(youmonst.data->mname));
1920 You("%s
\82Ì
\8ep
\82É
\82È
\82Á
\82½
\81D", youmonst.data->mname);
1930 struct monst *mtmp, *nmon;
1934 You("concentrate but lack the energy to maintain doing so.");
1936 You("
\8fW
\92\86\82µ
\82½
\81D
\82µ
\82©
\82µ
\83G
\83l
\83\8b\83M
\81[
\82ª
\91«
\82è
\82È
\82¢
\81D");
1943 You("concentrate.");
1945 You("
\8fW
\92\86\82µ
\82½
\81D");
1947 pline("A wave of psychic energy pours out.");
1949 pline("
\90¸
\90_
\83G
\83l
\83\8b\83M
\81[
\94g
\82ª
\95ú
\8eU
\82µ
\82½
\81D");
1950 for (mtmp = fmon; mtmp; mtmp = nmon) {
1954 if (DEADMONSTER(mtmp))
1956 if (distu(mtmp->mx, mtmp->my) > BOLT_LIM * BOLT_LIM)
1958 if (mtmp->mpeaceful)
1960 u_sen = telepathic(mtmp->data) && !mtmp->mcansee;
1961 if (u_sen || (telepathic(mtmp->data) && rn2(2)) || !rn2(10)) {
1963 You("lock in on %s %s.", s_suffix(mon_nam(mtmp)),
1965 : telepathic(mtmp->data) ? "latent telepathy" : "mind");
1967 pline("%s
\82Ì%s
\82è
\8d\9e\82ñ
\82¾
\81D", mon_nam(mtmp),
1968 u_sen ? "
\90¸
\90_
\82É
\93ü"
1969 : telepathic(mtmp->data) ? "
\90ö
\8dÝ
\93I
\90¸
\90_
\82É
\93ü" : "
\90[
\91w
\88Ó
\8e¯
\82É
\90ö");
1971 mtmp->mhp -= rnd(15);
1972 if (DEADMONSTER(mtmp))
1983 impossible("uunstick: no ustuck?");
1987 pline("%s is no longer in your clutches.", Monnam(u.ustuck));
1989 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\8eè
\82©
\82ç
\93¦
\82ê
\82½
\81D", Monnam(u.ustuck));
2000 Your("skin returns to its original form.");
2002 Your("
\94ç
\95\86\82Í
\96{
\97\88\82Ì
\8ep
\82É
\96ß
\82Á
\82½
\81D");
2004 uskin = (struct obj *) 0;
2005 /* undo save/restore hack */
2006 uarm->owornmask &= ~I_SPECIAL;
2011 mbodypart(mon, part)
2015 static NEARDATA const char
2017 *humanoid_parts[] = { "arm", "eye", "face", "finger",
2018 "fingertip", "foot", "hand", "handed",
2019 "head", "leg", "light headed", "neck",
2020 "spine", "toe", "hair", "blood",
2021 "lung", "nose", "stomach" },
2023 *humanoid_parts[] = {
2024 "
\98r", "
\96Ú", "
\8aç", "
\8ew",
2025 "
\8ew
\90æ", "
\91«", "
\8eè", "
\8eè
\82É
\82·
\82é",
2026 "
\93ª", "
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2027 "
\94w
\8d\9c", "
\92Ü
\90æ", "
\94¯", "
\8c\8c",
2028 "
\94x", "
\95@", "
\88Ý"},
2031 *jelly_parts[] = { "pseudopod", "dark spot", "front",
2032 "pseudopod extension", "pseudopod extremity",
2033 "pseudopod root", "grasp", "grasped",
2034 "cerebral area", "lower pseudopod", "viscous",
2035 "middle", "surface", "pseudopod extremity",
2036 "ripples", "juices", "surface", "sensor",
2040 "
\8b[
\8e\97\90G
\8eè", "
\8d\95\82¢
\94Á
\93_", "
\91O
\96Ê",
2041 "
\8b[
\8e\97\90G
\8eè
\82Ì
\90æ", "
\8b[
\8e\97\90G
\8eè",
2042 "
\8b[
\8e\97\90G
\8eè
\82Ì
\8a²", "
\90G
\8eè", "
\88¬
\82é",
2043 "
\94]
\82Ì
\97Ì
\88æ", "
\89º
\95û
\82Ì
\8b[
\8e\97\90G
\8eè", "
\82Ë
\82Î
\82Ë
\82Î
\82µ
\82Ä
\82«
\82½",
2044 "
\92\86\8aÔ
\97Ì
\88æ", "
\95\
\96Ê", "
\8b[
\8e\97\90G
\8eè",
2045 "
\94g
\96ä", "
\91Ì
\89t", "
\95\
\96Ê", "
\8a´
\8ao
\8aí",
2049 *animal_parts[] = { "forelimb", "eye", "face",
2050 "foreclaw", "claw tip", "rear claw",
2051 "foreclaw", "clawed", "head",
2052 "rear limb", "light headed", "neck",
2053 "spine", "rear claw tip", "fur",
2054 "blood", "lung", "nose",
2058 "
\91O
\91«", "
\96Ú", "
\8aç",
2059 "
\91O
\92Ü", "
\92Ü
\90æ", "
\8cã
\92Ü",
2060 "
\91O
\92Ü", "
\82Ð
\82Á
\82©
\82¯
\82é", "
\93ª",
2061 "
\8cã
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2062 "
\94w
\8d\9c", "
\8cã
\92Ü
\90æ", "
\96Ñ
\94ç",
2063 "
\8c\8c", "
\94x", "
\95@",
2067 *bird_parts[] = { "wing", "eye", "face", "wing",
2068 "wing tip", "foot", "wing", "winged",
2069 "head", "leg", "light headed", "neck",
2070 "spine", "toe", "feathers", "blood",
2071 "lung", "bill", "stomach" },
2074 "
\97\83", "
\96Ú", "
\8aç", "
\97\83",
2075 "
\97\83\82Ì
\90æ", "
\91«", "
\97\83", "
\97\83\82É
\82Æ
\82é",
2076 "
\93ª", "
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2077 "
\94w
\8d\9c", "
\92Ü
\90æ", "
\89H
\96Ñ", "
\8c\8c",
2078 "
\94x", "
\82
\82¿
\82Î
\82µ", "
\88Ý" },
2081 *horse_parts[] = { "foreleg", "eye", "face",
2082 "forehoof", "hoof tip", "rear hoof",
2083 "forehoof", "hooved", "head",
2084 "rear leg", "light headed", "neck",
2085 "backbone", "rear hoof tip", "mane",
2086 "blood", "lung", "nose",
2090 "
\91O
\91«", "
\96Ú", "
\8aç",
2091 "
\91O
\92û", "
\92û", "
\8cã
\92û",
2092 "
\91O
\92Ü", "
\92û
\82É
\82Í
\82³
\82Þ", "
\93ª",
2093 "
\8cã
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2094 "
\94w
\8d\9c", "
\8cã
\92Ü
\90æ", "
\82½
\82Ä
\82ª
\82Ý",
2095 "
\8c\8c", "
\94x", "
\95@",
2099 *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
2100 "tentacle tip", "lower appendage", "tentacle",
2101 "tentacled", "body", "lower tentacle",
2102 "rotational", "equator", "body",
2103 "lower tentacle tip", "cilia", "life force",
2104 "retina", "olfactory nerve", "interior" },
2107 "
\93Ë
\8bN", "
\8e\8b\8ao
\90_
\8co", "
\91Ì", "
\90G
\8eè",
2108 "
\90G
\8eè
\82Ì
\90æ", "
\89º
\82Ì
\93Ë
\8bN", "
\90G
\8eè",
2109 "
\90G
\8eè
\82É
\8e\9d\82Â", "
\91Ì", "
\89º
\82Ì
\90G
\8eè",
2110 "
\89ñ
\93]
\82µ
\82½", "
\92\86\90S
\90ü", "
\91Ì",
2111 "
\89º
\82Ì
\90G
\8eè
\82Ì
\90æ", "
\91@
\96Ñ", "
\90¶
\96½
\97Í",
2112 "
\96Ô
\96\8c", "
\9ak
\8ao
\92\86\90\95", "
\93à
\95\94" },
2115 *fungus_parts[] = { "mycelium", "visual area", "front",
2116 "hypha", "hypha", "root",
2117 "strand", "stranded", "cap area",
2118 "rhizome", "sporulated", "stalk",
2119 "root", "rhizome tip", "spores",
2120 "juices", "gill", "gill",
2124 "
\8bÛ
\8e\85\91Ì", "
\8e\8b\8ao
\97Ì
\88æ", "
\91O",
2125 "
\8bÛ
\8e\85", "
\8bÛ
\8e\85", "
\8dª",
2126 "
\90G
\8eè", "
\90G
\8eè
\82É
\82©
\82ç
\82Ý
\82Â
\82¯
\82é", "
\8eP",
2127 "
\8dª
\8cs", "
\8d¬
\97\90\82·
\82é", "
\8e²",
2128 "
\8dª", "
\8dª
\8cs
\82Ì
\90æ", "
\89è
\96E",
2129 "
\91Ì
\89t", "
\82¦
\82ç", "
\82¦
\82ç",
2133 *vortex_parts[] = { "region", "eye", "front",
2134 "minor current", "minor current", "lower current",
2135 "swirl", "swirled", "central core",
2136 "lower current", "addled", "center",
2137 "currents", "edge", "currents",
2138 "life force", "center", "leading edge",
2142 "
\97Ì
\88æ", "
\96Ú", "
\91O",
2143 "
\8f¬
\82³
\82¢
\97¬
\82ê", "
\8f¬
\82³
\82¢
\97¬
\82ê", "
\89º
\95\94\82Ì
\97¬
\82ê",
2144 "
\89Q
\8aª", "
\89Q
\82É
\8aª
\82", "
\89Q
\82Ì
\92\86\90S",
2145 "
\89º
\95\94\82Ì
\97¬
\82ê", "
\8d¬
\97\90\82µ
\82½", "
\92\86\90S
\95\94",
2146 "
\97¬
\82ê", "
\8aO
\8eü", "
\8bC
\97¬",
2147 "
\90¶
\96½
\97Í", "
\92\86\90S", "
\91O
\89\8f",
2151 *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
2152 "large scale tip", "rear region", "scale gap",
2153 "scale gapped", "head", "rear region",
2154 "light headed", "neck", "length", "rear scale",
2155 "scales", "blood", "lung", "forked tongue",
2159 "
\91Þ
\89»
\82µ
\82½
\91«", "
\96Ú", "
\8aç", "
\91å
\82«
\82È
\97Ø",
2160 "
\91å
\82«
\82È
\97Ø
\82Ì
\90æ", "
\8cã
\95\94\95ª", "
\97Ø
\82Ì
\8c\84\8aÔ",
2161 "
\97Ø
\82Ì
\8c\84\8aÔ
\82É
\82Â
\82¯
\82é", "
\93ª", "
\8cã
\95\94\95ª",
2162 "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ", "
\91Ì", "
\8cã
\95\94\95ª
\82Ì
\8aZ",
2163 "
\97Ø", "
\8c\8c", "
\94x", "
\90ã",
2167 *worm_parts[] = { "anterior segment", "light sensitive cell",
2168 "clitellum", "setae", "setae", "posterior segment",
2169 "segment", "segmented", "anterior segment",
2170 "posterior", "over stretched", "clitellum",
2171 "length", "posterior setae", "setae", "blood",
2172 "skin", "prostomium", "stomach" },
2175 "
\91O
\8bæ", "
\8a´
\8cõ
\90«
\8d×
\96E",
2176 "
\8aÂ
\91Ñ", "
\8ap", "
\8ap", "
\8cã
\8bæ",
2177 "
\90ß", "
\90ß
\82É
\82Â
\82¯
\82é", "
\91O
\8bæ",
2178 "
\8cã
\95\94", "
\90L
\82Ñ
\82·
\82¬
\82½", "
\8aÂ
\91Ñ",
2179 "
\91Ì", "
\8cã
\95\94\82Ì
\8ap", "
\8ap", "
\8c\8c",
2180 "
\94ç
\95\86", "
\8cû
\91O
\97t", "
\88Ý" },
2183 *fish_parts[] = { "fin", "eye", "premaxillary", "pelvic axillary",
2184 "pelvic fin", "anal fin", "pectoral fin", "finned",
2185 "head", "peduncle", "played out", "gills",
2186 "dorsal fin", "caudal fin", "scales", "blood",
2187 "gill", "nostril", "stomach" };
2190 "
\82Ð
\82ê", "
\96Ú", "
\8aç", "
\82Ð
\82ê
\82Ì
\90æ",
2191 "
\82Ð
\82ê
\82Ì
\90æ", "
\94ö
\82Ñ
\82ê", "
\8b¹
\82Ð
\82ê", "
\82Ð
\82ê
\82Å
\8e\9d\82Â",
2192 "
\93ª", "
\94ö
\95¿", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\82¦
\82ç",
2193 "
\94w
\82Ñ
\82ê", "
\94ö
\82Ñ
\82ê", "
\97Ø", "
\8c\8c",
2194 "
\82¦
\82ç", "
\95@", "
\88Ý" };
2196 #if 0 /*JP*//*
\8eg
\82í
\82È
\82¢*/
2197 /* claw attacks are overloaded in mons[]; most humanoids with
2198 such attacks should still reference hands rather than claws */
2199 static const char not_claws[] = {
2200 S_HUMAN, S_MUMMY, S_ZOMBIE, S_ANGEL, S_NYMPH, S_LEPRECHAUN,
2201 S_QUANTMECH, S_VAMPIRE, S_ORC, S_GIANT, /* quest nemeses */
2202 '\0' /* string terminator; assert( S_xxx != 0 ); */
2205 struct permonst *mptr = mon->data;
2208 /* paw
\82Í
\8c¢
\82Æ
\82©
\94L
\82Ì
\8eè
\81Cclaw
\82Í
\83^
\83J
\82Ì
\91«
\82Ì
\82æ
\82¤
\82È
\82©
\82¬
\82Â
\82ß
\81C
2209 \82Ç
\82¿
\82ç
\82à
\93ú
\96{
\8cê
\82¶
\82á
\81u
\8eè
\81v
\82Å
\82¢
\82¢
\82Å
\82µ
\82å
\82¤
\81D
2211 /* some special cases */
2212 if (mptr->mlet == S_DOG || mptr->mlet == S_FELINE
2213 || mptr->mlet == S_RODENT || mptr == &mons[PM_OWLBEAR]) {
2223 return horse_parts[part]; /* "foreleg", "rear leg" */
2225 break; /* for other parts, use animal_parts[] below */
2227 } else if (mptr->mlet == S_YETI) { /* excl. owlbear due to 'if' above */
2228 /* opposable thumbs, hence "hands", "arms", "legs", &c */
2229 return humanoid_parts[part]; /* yeti/sasquatch, monkey/ape */
2231 if ((part == HAND || part == HANDED)
2232 && (humanoid(mptr) && attacktype(mptr, AT_CLAW)
2233 && !index(not_claws, mptr->mlet) && mptr != &mons[PM_STONE_GOLEM]
2234 && mptr != &mons[PM_INCUBUS] && mptr != &mons[PM_SUCCUBUS]))
2235 return (part == HAND) ? "claw" : "clawed";
2237 #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*/
2238 if ((mptr == &mons[PM_MUMAK] || mptr == &mons[PM_MASTODON])
2242 if (mptr == &mons[PM_SHARK] && part == HAIR)
2244 return "skin"; /* sharks don't have scales */
2246 return "
\93ª"; /* sharks don't have scales */
2248 if ((mptr == &mons[PM_JELLYFISH] || mptr == &mons[PM_KRAKEN])
2249 && (part == ARM || part == FINGER || part == HAND || part == FOOT
2255 if (mptr == &mons[PM_FLOATING_EYE] && part == EYE)
2259 return "
\8ap
\96\8c";
2260 if (humanoid(mptr) && (part == ARM || part == FINGER || part == FINGERTIP
2261 || part == HAND || part == HANDED))
2262 return humanoid_parts[part];
2263 if (mptr == &mons[PM_RAVEN])
2264 return bird_parts[part];
2265 if (mptr->mlet == S_CENTAUR || mptr->mlet == S_UNICORN
2266 || (mptr == &mons[PM_ROTHE] && part != HAIR))
2267 return horse_parts[part];
2268 if (mptr->mlet == S_LIGHT) {
2272 else if (part == ARM || part == FINGER || part == FINGERTIP
2278 if (part == HANDED || part == ARM || part == FINGER
2279 || part == FINGERTIP || part == HAND) {
2284 if (mptr == &mons[PM_STALKER] && part == HEAD)
2289 if (mptr->mlet == S_EEL && mptr != &mons[PM_JELLYFISH])
2290 return fish_parts[part];
2291 if (mptr->mlet == S_WORM)
2292 return worm_parts[part];
2293 if (slithy(mptr) || (mptr->mlet == S_DRAGON && part == HAIR))
2294 return snake_parts[part];
2295 if (mptr->mlet == S_EYE)
2296 return sphere_parts[part];
2297 if (mptr->mlet == S_JELLY || mptr->mlet == S_PUDDING
2298 || mptr->mlet == S_BLOB || mptr == &mons[PM_JELLYFISH])
2299 return jelly_parts[part];
2300 if (mptr->mlet == S_VORTEX || mptr->mlet == S_ELEMENTAL)
2301 return vortex_parts[part];
2302 if (mptr->mlet == S_FUNGUS)
2303 return fungus_parts[part];
2305 return humanoid_parts[part];
2306 return animal_parts[part];
2313 return mbodypart(&youmonst, part);
2319 /* Returns gender of polymorphed player;
2320 * 0/1=same meaning as flags.female, 2=none.
2322 if (is_neuter(youmonst.data) || !humanoid(youmonst.data))
2324 return flags.female;
2328 ugolemeffects(damtype, dam)
2333 /* We won't bother with "slow"/"haste" since players do not
2334 * have a monster-specific slow/haste so there is no way to
2335 * restore the old velocity once they are back to human.
2337 if (u.umonnum != PM_FLESH_GOLEM && u.umonnum != PM_IRON_GOLEM)
2341 if (u.umonnum == PM_FLESH_GOLEM)
2342 heal = (dam + 5) / 6; /* Approx 1 per die */
2345 if (u.umonnum == PM_IRON_GOLEM)
2349 if (heal && (u.mh < u.mhmax)) {
2355 pline("Strangely, you feel better than before.");
2357 pline("
\8aï
\96
\82È
\82±
\82Æ
\82É
\81C
\91O
\82æ
\82è
\8bC
\95ª
\82ª
\82æ
\82
\82È
\82Á
\82½
\81D");
2358 exercise(A_STR, TRUE);
2363 armor_to_dragon(atyp)
2367 case GRAY_DRAGON_SCALE_MAIL:
2368 case GRAY_DRAGON_SCALES:
2369 return PM_GRAY_DRAGON;
2370 case SILVER_DRAGON_SCALE_MAIL:
2371 case SILVER_DRAGON_SCALES:
2372 return PM_SILVER_DRAGON;
2373 #if 0 /* DEFERRED */
2374 case SHIMMERING_DRAGON_SCALE_MAIL:
2375 case SHIMMERING_DRAGON_SCALES:
2376 return PM_SHIMMERING_DRAGON;
2378 case RED_DRAGON_SCALE_MAIL:
2379 case RED_DRAGON_SCALES:
2380 return PM_RED_DRAGON;
2381 case ORANGE_DRAGON_SCALE_MAIL:
2382 case ORANGE_DRAGON_SCALES:
2383 return PM_ORANGE_DRAGON;
2384 case WHITE_DRAGON_SCALE_MAIL:
2385 case WHITE_DRAGON_SCALES:
2386 return PM_WHITE_DRAGON;
2387 case BLACK_DRAGON_SCALE_MAIL:
2388 case BLACK_DRAGON_SCALES:
2389 return PM_BLACK_DRAGON;
2390 case BLUE_DRAGON_SCALE_MAIL:
2391 case BLUE_DRAGON_SCALES:
2392 return PM_BLUE_DRAGON;
2393 case GREEN_DRAGON_SCALE_MAIL:
2394 case GREEN_DRAGON_SCALES:
2395 return PM_GREEN_DRAGON;
2396 case YELLOW_DRAGON_SCALE_MAIL:
2397 case YELLOW_DRAGON_SCALES:
2398 return PM_YELLOW_DRAGON;
2404 /* some species have awareness of other species */
2408 short warnidx = NON_PM;
2410 context.warntype.speciesidx = NON_PM;
2411 context.warntype.species = 0;
2412 context.warntype.polyd = 0;
2413 HWarn_of_mon &= ~FROMRACE;
2415 switch (u.umonnum) {
2416 case PM_PURPLE_WORM:
2417 warnidx = PM_SHRIEKER;
2420 case PM_VAMPIRE_LORD:
2421 context.warntype.polyd = M2_HUMAN | M2_ELF;
2422 HWarn_of_mon |= FROMRACE;
2425 if (warnidx >= LOW_PM) {
2426 context.warntype.speciesidx = warnidx;
2427 context.warntype.species = &mons[warnidx];
2428 HWarn_of_mon |= FROMRACE;
2432 /* True iff hero's role or race has been genocided */
2436 return (boolean) ((mvitals[urole.malenum].mvflags & G_GENOD)
2437 || (urole.femalenum != NON_PM
2438 && (mvitals[urole.femalenum].mvflags & G_GENOD))
2439 || (mvitals[urace.malenum].mvflags & G_GENOD)
2440 || (urace.femalenum != NON_PM
2441 && (mvitals[urace.femalenum].mvflags & G_GENOD)));
2444 /* how hero feels "inside" after self-genocide of role or race */
2448 /* self-genocide used to always say "you feel dead inside" but that
2449 seems silly when you're polymorphed into something undead;
2450 monkilled() distinguishes between living (killed) and non (destroyed)
2451 for monster death message; we refine the nonliving aspect a bit */
2453 return !nonliving(youmonst.data)
2454 ? "dead" /* living, including demons */
2455 : !weirdnonliving(youmonst.data)
2456 ? "condemned" /* undead plus manes */
2457 : "empty"; /* golems plus vortices */
2459 return !nonliving(youmonst.data)
2460 ? "
\8e\80\82ñ
\82¾" /*
\90¶
\95¨
\82Æ
\88«
\96\82 */
2461 : !weirdnonliving(youmonst.data)
2462 ? "
\94j
\89ó
\82³
\82ê
\82½" /*
\83A
\83\93\83f
\83b
\83h
\82Æ
\96S
\97ì */
2463 : "
\82È
\82
\82È
\82Á
\82½"; /*
\83S
\81[
\83\8c\83\80\82Æ
\89Q */