1 /* NetHack 3.6 polyself.c $NHDT-Date: 1448496566 2015/11/26 00:09:26 $ $NHDT-Branch: master $:$NHDT-Revision: 1.104 $ */
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-2016 */
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 void NDECL(uunstick);
34 STATIC_DCL int FDECL(armor_to_dragon, (int));
35 STATIC_DCL void NDECL(newman);
36 STATIC_DCL boolean FDECL(polysense, (struct permonst *));
38 STATIC_VAR const char no_longer_petrify_resistant[] =
40 "No longer petrify-resistant, you";
42 "
\90Î
\89»
\82Ö
\82Ì
\92ï
\8dR
\97Í
\82ª
\82È
\82
\82È
\82Á
\82Ä
\81C
\82 \82È
\82½
\82Í";
44 /* controls whether taking on new form or becoming new man can also
45 change sex (ought to be an arg to polymon() and newman() instead) */
46 STATIC_VAR int sex_change_ok = 0;
48 /* update the youmonst.data structure pointer and intrinsics */
52 struct permonst *mdat = &mons[u.umonnum];
54 set_mon_data(&youmonst, mdat, 0);
56 #define PROPSET(PropIndx, ON) \
59 u.uprops[PropIndx].intrinsic |= FROMFORM; \
61 u.uprops[PropIndx].intrinsic &= ~FROMFORM; \
64 PROPSET(FIRE_RES, resists_fire(&youmonst));
65 PROPSET(COLD_RES, resists_cold(&youmonst));
66 PROPSET(SLEEP_RES, resists_sleep(&youmonst));
67 PROPSET(DISINT_RES, resists_disint(&youmonst));
68 PROPSET(SHOCK_RES, resists_elec(&youmonst));
69 PROPSET(POISON_RES, resists_poison(&youmonst));
70 PROPSET(ACID_RES, resists_acid(&youmonst));
71 PROPSET(STONE_RES, resists_ston(&youmonst));
73 /* resists_drli() takes wielded weapon into account; suppress it */
74 struct obj *save_uwep = uwep;
77 PROPSET(DRAIN_RES, resists_drli(&youmonst));
80 /* resists_magm() takes wielded, worn, and carried equipment into
81 into account; cheat and duplicate its monster-specific part */
82 PROPSET(ANTIMAGIC, (dmgtype(mdat, AD_MAGM)
83 || mdat == &mons[PM_BABY_GRAY_DRAGON]
84 || dmgtype(mdat, AD_RBRE)));
85 PROPSET(SICK_RES, (mdat->mlet == S_FUNGUS || mdat == &mons[PM_GHOUL]));
87 PROPSET(STUNNED, (mdat == &mons[PM_STALKER] || is_bat(mdat)));
88 PROPSET(HALLUC_RES, dmgtype(mdat, AD_HALU));
89 PROPSET(SEE_INVIS, perceives(mdat));
90 PROPSET(TELEPAT, telepathic(mdat));
91 PROPSET(INFRAVISION, infravision(mdat));
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 PROPSET(FLYING, is_flyer(mdat));
97 PROPSET(SWIMMING, is_swimmer(mdat));
98 /* [don't touch MAGICAL_BREATHING here; both Amphibious and Breathless
99 key off of it but include different monster forms...] */
100 PROPSET(PASSES_WALLS, passes_walls(mdat));
101 PROPSET(REGENERATION, regenerates(mdat));
102 PROPSET(REFLECTING, (mdat == &mons[PM_SILVER_DRAGON]));
104 float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */
108 #ifdef STATUS_VIA_WINDOWPORT
109 status_initialize(REASSESS_ONLY);
113 /* Levitation overrides Flying; set or clear BFlying|I_SPECIAL */
117 /* floating overrides flight; normally float_up() and float_down()
118 handle this, but sometimes they're skipped */
119 if (HLevitation || ELevitation)
120 BFlying |= I_SPECIAL;
122 BFlying &= ~I_SPECIAL;
125 /* for changing into form that's immune to strangulation */
130 /* on -- maybe resume strangling */
132 /* when Strangled is already set, polymorphing from one
133 vulnerable form into another causes the counter to be reset */
134 if (uamul && uamul->otyp == AMULET_OF_STRANGULATION
135 && can_be_strangled(&youmonst)) {
137 Your("%s %s your %s!", simpleonames(uamul),
138 Strangled ? "still constricts" : "begins constricting",
139 body_part(NECK)); /* "throat" */
141 Your("%s%s%s
\82ð
\8di
\82ß%s
\81I", simpleonames(uamul),
142 Strangled ? "
\82Í
\82Ü
\82¾" : "
\82ª",
144 Strangled ? "
\82Ä
\82¢
\82é" : "
\82Í
\82¶
\82ß
\82½");
147 makeknown(AMULET_OF_STRANGULATION);
150 /* off -- maybe block strangling */
152 if (Strangled && !can_be_strangled(&youmonst)) {
155 You("are no longer being strangled.");
157 You("
\82à
\82Í
\82â
\92\82\91§
\82µ
\82Ä
\82¢
\82È
\82¢
\81D");
162 /* make a (new) human out of the player */
165 const char *fmt, *arg;
167 boolean sticky = (sticks(youmonst.data) && u.ustuck && !u.uswallow),
168 was_mimicking = (youmonst.m_ap_type == M_AP_OBJECT);
169 boolean was_blind = !!Blind;
172 u.acurr = u.macurr; /* restore old attribs */
174 u.umonnum = u.umonster;
175 flags.female = u.mfemale;
190 youmonst.m_ap_type = M_AP_NOTHING;
196 /* check whether player foolishly genocided self while poly'd */
197 if ((mvitals[urole.malenum].mvflags & G_GENOD)
198 || (urole.femalenum != NON_PM
199 && (mvitals[urole.femalenum].mvflags & G_GENOD))
200 || (mvitals[urace.malenum].mvflags & G_GENOD)
201 || (urace.femalenum != NON_PM
202 && (mvitals[urace.femalenum].mvflags & G_GENOD))) {
203 /* intervening activity might have clobbered genocide info */
204 struct kinfo *kptr = find_delayed_killer(POLYMORPH);
206 if (kptr != (struct kinfo *) 0 && kptr->name[0]) {
207 killer.format = kptr->format;
208 Strcpy(killer.name, kptr->name);
210 killer.format = KILLED_BY;
212 Strcpy(killer.name, "self-genocide");
214 Strcpy(killer.name, "
\8e©
\8bs
\93I
\8bs
\8eE
\82Å");
216 dealloc_killer(kptr);
220 if (u.twoweap && !could_twoweap(youmonst.data))
223 if (u.utraptype == TT_PIT && u.utrap) {
224 u.utrap = rn1(6, 2); /* time to escape resets */
226 if (was_blind && !Blind) { /* reverting from eyeless */
228 make_blinded(0L, TRUE); /* remove blindness */
230 check_strangling(TRUE);
232 if (!Levitation && !u.ustuck && is_pool_or_lava(u.ux, u.uy))
241 /* setting u.umonster for caveman/cavewoman or priest/priestess
242 swap unintentionally makes `Upolyd' appear to be true */
243 boolean already_polyd = (boolean) Upolyd;
245 /* Some monsters are always of one sex and their sex can't be changed;
246 * Succubi/incubi can change, but are handled below.
248 * !already_polyd check necessary because is_male() and is_female()
249 * are true if the player is a priest/priestess.
252 || (!is_male(youmonst.data) && !is_female(youmonst.data)
253 && !is_neuter(youmonst.data)))
254 flags.female = !flags.female;
255 if (already_polyd) /* poly'd: also change saved sex */
256 u.mfemale = !u.mfemale;
257 max_rank_sz(); /* [this appears to be superfluous] */
258 if ((already_polyd ? u.mfemale : flags.female) && urole.name.f)
259 Strcpy(pl_character, urole.name.f);
261 Strcpy(pl_character, urole.name.m);
262 u.umonster = ((already_polyd ? u.mfemale : flags.female)
263 && urole.femalenum != NON_PM)
266 if (!already_polyd) {
267 u.umonnum = u.umonster;
268 } else if (u.umonnum == PM_SUCCUBUS || u.umonnum == PM_INCUBUS) {
269 flags.female = !flags.female;
270 /* change monster type to match new sex */
271 u.umonnum = (u.umonnum == PM_SUCCUBUS) ? PM_INCUBUS : PM_SUCCUBUS;
279 int i, oldlvl, newlvl, hpmax, enmax;
282 newlvl = oldlvl + rn1(5, -2); /* new = old + {-2,-1,0,+1,+2} */
283 if (newlvl > 127 || newlvl < 1) { /* level went below 0? */
284 goto dead; /* old level is still intact (in case of lifesaving) */
286 if (newlvl > MAXULEV)
288 /* If your level goes down, your peak level goes down by
289 the same amount so that you can't simply use blessed
290 full healing to undo the decrease. But if your level
291 goes up, your peak level does *not* undergo the same
292 adjustment; you might end up losing out on the chance
293 to regain some levels previously lost to other causes. */
295 u.ulevelmax -= (oldlvl - newlvl);
296 if (u.ulevelmax < newlvl)
297 u.ulevelmax = newlvl;
300 if (sex_change_ok && !rn2(10))
303 adjabil(oldlvl, (int) u.ulevel);
304 reset_rndmonst(NON_PM); /* new monster generation criteria */
306 /* random experience points for the new experience level */
307 u.uexp = rndexp(FALSE);
309 /* set up new attribute points (particularly Con) */
314 * remove level-gain based HP from any extra HP accumulated
315 * (the "extra" might actually be negative);
316 * modify the extra, retaining {80%, 90%, 100%, or 110%};
317 * add in newly generated set of level-gain HP.
319 * (This used to calculate new HP in direct proportion to old HP,
320 * but that was subject to abuse: accumulate a large amount of
321 * extra HP, drain level down to 1, then polyself to level 2 or 3
322 * [lifesaving capability needed to handle level 0 and -1 cases]
323 * and the extra got multiplied by 2 or 3. Repeat the level
324 * drain and polyself steps until out of lifesaving capability.)
327 for (i = 0; i < oldlvl; i++)
328 hpmax -= (int) u.uhpinc[i];
329 /* hpmax * rn1(4,8) / 10; 0.95*hpmax on average */
330 hpmax = rounddiv((long) hpmax * (long) rn1(4, 8), 10);
331 for (i = 0; (u.ulevel = i) < newlvl; i++)
333 if (hpmax < u.ulevel)
334 hpmax = u.ulevel; /* min of 1 HP per level */
335 /* retain same proportion for current HP; u.uhp * hpmax / u.uhpmax */
336 u.uhp = rounddiv((long) u.uhp * (long) hpmax, u.uhpmax);
339 * Do the same for spell power.
342 for (i = 0; i < oldlvl; i++)
343 enmax -= (int) u.ueninc[i];
344 enmax = rounddiv((long) enmax * (long) rn1(4, 8), 10);
345 for (i = 0; (u.ulevel = i) < newlvl; i++)
347 if (enmax < u.ulevel)
349 u.uen = rounddiv((long) u.uen * (long) enmax,
350 ((u.uenmax < 1) ? 1 : u.uenmax));
352 /* [should alignment record be tweaked too?] */
354 u.uhunger = rn1(500, 500);
356 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
358 make_stoned(0L, (char *) 0, 0, (char *) 0);
360 if (Polymorph_control) { /* even when Stunned || Unaware */
364 dead: /* we come directly here if their experience level went to 0 or
367 Your("new form doesn't seem healthy enough to survive.");
369 Your("
\90V
\82µ
\82¢
\8ep
\82Í
\90¶
\82«
\82Ä
\82¢
\82
\82¾
\82¯
\82Ì
\97Í
\82ª
\82È
\82¢
\82æ
\82¤
\82¾
\81D");
370 killer.format = KILLED_BY_AN;
372 Strcpy(killer.name, "unsuccessful polymorph");
374 Strcpy(killer.name, "
\95Ï
\89»
\82Ì
\8e¸
\94s
\82Å");
377 (void) polysense(youmonst.data);
378 return; /* lifesaved */
383 polyman("feel like a new %s!",
385 polyman("%s
\82Æ
\82µ
\82Ä
\90¶
\82Ü
\82ê
\82©
\82í
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81I",
386 /* use saved gender we're about to revert to, not current */
387 (u.mfemale && urace.individual.f)
389 : (urace.individual.m) ? urace.individual.m : urace.noun);
392 Your("body transforms, but there is still slime on you.");
394 Your("
\91Ì
\82Í
\95Ï
\89»
\82µ
\82½
\82ª
\81C
\83X
\83\89\83C
\83\80\82ª
\82Â
\82¢
\82½
\82Ü
\82Ü
\82¾
\81D");
395 make_slimed(10L, (const char *) 0);
398 (void) polysense(youmonst.data);
401 (void) encumber_msg();
403 retouch_equipment(2);
405 selftouch(no_longer_petrify_resistant);
413 int old_light, new_light, mntmp, class, tryct;
414 boolean forcecontrol = (psflags == 1), monsterpoly = (psflags == 2),
415 draconian = (uarm && Is_dragon_armor(uarm)),
416 iswere = (u.ulycn >= LOW_PM), isvamp = is_vampire(youmonst.data),
417 controllable_poly = Polymorph_control && !(Stunned || Unaware);
421 pline("You fail to transform!");
423 pline("
\82 \82È
\82½
\82Í
\95Ï
\89»
\82É
\8e¸
\94s
\82µ
\82½
\81I");
426 /* being Stunned|Unaware doesn't negate this aspect of Poly_control */
427 if (!Polymorph_control && !forcecontrol && !draconian && !iswere
429 if (rn2(20) > ACURR(A_CON)) {
430 You1(shudder_for_moment);
432 losehp(rnd(30), "system shock", KILLED_BY_AN);
434 losehp(rnd(30), "
\83V
\83X
\83e
\83\80\83V
\83\87\83b
\83N
\82Å", KILLED_BY_AN);
435 exercise(A_CON, FALSE);
439 old_light = emits_light(youmonst.data);
442 if (monsterpoly && isvamp)
445 if (controllable_poly || forcecontrol) {
450 getlin("Become what kind of monster? [type the name]", buf);
452 getlin("
\82Ç
\82Ì
\8eí
\82Ì
\89ö
\95¨
\82É
\82È
\82é
\81H[
\96¼
\91O
\82ð
\93ü
\82ê
\82Ä
\82Ë]", buf);
453 (void) mungspaces(buf);
454 if (*buf == '\033') {
455 /* user is cancelling controlled poly */
456 if (forcecontrol) { /* wizard mode #polyself */
460 Strcpy(buf, "*"); /* resort to random */
462 if (!strcmp(buf, "*") || !strcmp(buf, "random")) {
463 /* explicitly requesting random result */
464 tryct = 0; /* will skip thats_enough_tries */
465 continue; /* end do-while(--tryct > 0) loop */
468 mntmp = name_to_mon(buf);
469 if (mntmp < LOW_PM) {
471 class = name_to_monclass(buf, &mntmp);
472 if (class && mntmp == NON_PM)
473 mntmp = mkclass_poly(class);
475 if (mntmp < LOW_PM) {
478 pline("I've never heard of such monsters.");
480 pline("
\82»
\82ñ
\82È
\89ö
\95¨
\82Í
\95·
\82¢
\82½
\82±
\82Æ
\82ª
\82È
\82¢
\81D");
483 You_cant("polymorph into any of those.");
485 pline("
\82»
\82ê
\82É
\82È
\82é
\82±
\82Æ
\82Í
\82Å
\82«
\82È
\82¢
\81D");
486 } else if (iswere && (were_beastie(mntmp) == u.ulycn
487 || mntmp == counter_were(u.ulycn)
488 || (Upolyd && mntmp == PM_HUMAN))) {
490 /* Note: humans are illegal as monsters, but an
491 * illegal monster forces newman(), which is what we
492 * want if they specified a human.... */
493 } else if (!polyok(&mons[mntmp])
494 && !(mntmp == PM_HUMAN || your_race(&mons[mntmp])
495 || mntmp == urole.malenum
496 || mntmp == urole.femalenum)) {
499 /* mkclass_poly() can pick a !polyok()
500 candidate; if so, usually try again */
502 if (rn2(3) || --tryct > 0)
504 /* no retries left; put one back on counter
505 so that end of loop decrement will yield
506 0 and trigger thats_enough_tries message */
509 pm_name = mons[mntmp].mname;
510 if (the_unique_pm(&mons[mntmp]))
511 pm_name = the(pm_name);
512 else if (!type_is_pname(&mons[mntmp]))
513 pm_name = an(pm_name);
515 You_cant("polymorph into %s.", pm_name);
517 You_cant("%s
\82É
\95Ï
\89»
\82Å
\82«
\82È
\82¢
\81D", pm_name);
520 } while (--tryct > 0);
522 pline1(thats_enough_tries);
523 /* allow skin merging, even when polymorph is controlled */
524 if (draconian && (tryct <= 0 || mntmp == armor_to_dragon(uarm->otyp)))
526 if (isvamp && (tryct <= 0 || mntmp == PM_WOLF || mntmp == PM_FOG_CLOUD
527 || is_bat(&mons[mntmp])))
529 } else if (draconian || iswere || isvamp) {
530 /* special changes that don't require polyok() */
533 mntmp = armor_to_dragon(uarm->otyp);
534 if (!(mvitals[mntmp].mvflags & G_GENOD)) {
535 /* allow G_EXTINCT */
536 if (Is_dragon_scales(uarm)) {
537 /* dragon scales remain intact as uskin */
539 You("merge with your scaly armor.");
541 You("
\97Ø
\82Ì
\8aZ
\82Æ
\88ê
\91Ì
\89»
\82µ
\82½
\81D");
542 } else { /* dragon scale mail */
543 /* d.scale mail first reverts to scales */
546 /* similar to noarmor(invent.c),
547 shorten to "<color> scale mail" */
548 dsmail = strcpy(buf, simpleonames(uarm));
550 if ((p = strstri(dsmail, " dragon ")) != 0)
551 while ((p[1] = p[8]) != '\0')
554 /* tricky phrasing; dragon scale mail
555 is singular, dragon scales are plural */
557 Your("%s reverts to scales as you merge with them.",
560 Your("%s
\82Í
\97Ø
\82É
\96ß
\82Á
\82½
\81D",
563 /* uarm->spe enchantment remains unchanged;
564 re-converting scales to mail poses risk
565 of evaporation due to over enchanting */
566 uarm->otyp += GRAY_DRAGON_SCALES - GRAY_DRAGON_SCALE_MAIL;
568 context.botl = 1; /* AC is changing */
571 uarm = (struct obj *) 0;
572 /* save/restore hack */
573 uskin->owornmask |= I_SPECIAL;
578 if (Upolyd && were_beastie(mntmp) != u.ulycn)
579 mntmp = PM_HUMAN; /* Illegal; force newman() */
584 if (mntmp < LOW_PM || (mons[mntmp].geno & G_UNIQ))
585 mntmp = (youmonst.data != &mons[PM_VAMPIRE] && !rn2(10))
587 : !rn2(4) ? PM_FOG_CLOUD : PM_VAMPIRE_BAT;
588 if (controllable_poly) {
590 Sprintf(buf, "Become %s?", an(mons[mntmp].mname));
592 Sprintf(buf, "%s
\82É
\82È
\82é
\81H", mons[mntmp].mname);
597 /* if polymon fails, "you feel" message has been given
598 so don't follow up with another polymon or newman;
599 sex_change_ok left disabled here */
600 if (mntmp == PM_HUMAN)
601 newman(); /* werecritter */
603 (void) polymon(mntmp);
604 goto made_change; /* maybe not, but this is right anyway */
607 if (mntmp < LOW_PM) {
610 /* randomly pick an "ordinary" monster */
611 mntmp = rn1(SPECIAL_PM - LOW_PM, LOW_PM);
612 if (polyok(&mons[mntmp]) && !is_placeholder(&mons[mntmp]))
614 } while (--tryct > 0);
617 /* The below polyok() fails either if everything is genocided, or if
618 * we deliberately chose something illegal to force newman().
621 if (!polyok(&mons[mntmp]) || (!forcecontrol && !rn2(5))
622 || your_race(&mons[mntmp])) {
625 (void) polymon(mntmp);
627 sex_change_ok--; /* reset */
630 new_light = emits_light(youmonst.data);
631 if (old_light != new_light) {
633 del_light_source(LS_MONSTER, monst_to_any(&youmonst));
635 ++new_light; /* otherwise it's undetectable */
637 new_light_source(u.ux, u.uy, new_light, LS_MONSTER,
638 monst_to_any(&youmonst));
642 /* (try to) make a mntmp monster out of the player;
643 returns 1 if polymorph successful */
648 boolean sticky = sticks(youmonst.data) && u.ustuck && !u.uswallow,
649 was_blind = !!Blind, dochange = FALSE;
652 if (mvitals[mntmp].mvflags & G_GENOD) { /* allow G_EXTINCT */
654 You_feel("rather %s-ish.", mons[mntmp].mname);
656 You("%s
\82Á
\82Û
\82
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", mons[mntmp].mname);
657 exercise(A_WIS, TRUE);
662 u.uconduct.polyselfs++;
664 /* exercise used to be at the very end but only Wis was affected
665 there since the polymorph was always in effect by then */
666 exercise(A_CON, FALSE);
667 exercise(A_WIS, TRUE);
670 /* Human to monster; save human stats */
673 u.mfemale = flags.female;
675 /* Monster to monster; restore human stats, to be
676 * immediately changed to provide stats for the new monster
680 flags.female = u.mfemale;
683 /* if stuck mimicking gold, stop immediately */
684 if (multi < 0 && youmonst.m_ap_type == M_AP_OBJECT
685 && youmonst.data->mlet != S_MIMIC)
687 /* if becoming a non-mimic, stop mimicking anything */
688 if (mons[mntmp].mlet != S_MIMIC) {
689 /* as in polyman() */
690 youmonst.m_ap_type = M_AP_NOTHING;
692 if (is_male(&mons[mntmp])) {
695 } else if (is_female(&mons[mntmp])) {
698 } else if (!is_neuter(&mons[mntmp]) && mntmp != u.ulycn) {
699 if (sex_change_ok && !rn2(10))
703 flags.female = !flags.female;
706 (u.umonnum != mntmp) ? "turn into a" : "feel like a new",
707 (is_male(&mons[mntmp]) || is_female(&mons[mntmp]))
709 : flags.female ? "female " : "male ",
712 You("%s%s
\82É
\82È
\82Á
\82½%s
\81I",
713 (is_male(&mons[mntmp]) || is_female(&mons[mntmp]))
715 : flags.female ? "
\8f\97\82Ì" : "
\92j
\82Ì",
717 (u.umonnum != mntmp) ? "" : "
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½");
720 if (u.umonnum != mntmp)
722 You("turn into %s!", an(mons[mntmp].mname));
724 You("%s
\82É
\82È
\82Á
\82½
\81I", mons[mntmp].mname);
727 You_feel("like a new %s!", mons[mntmp].mname);
729 You("
\95Ê
\82Ì%s
\82É
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81I", mons[mntmp].mname);
731 if (Stoned && poly_when_stoned(&mons[mntmp])) {
732 /* poly_when_stoned already checked stone golem genocide */
733 mntmp = PM_STONE_GOLEM;
735 make_stoned(0L, "You turn to stone!", 0, (char *) 0);
737 make_stoned(0L, "
\90Î
\82É
\82È
\82Á
\82½
\81I", 0, (char *) 0);
740 u.mtimedone = rn1(500, 500);
744 /* New stats for monster, to last only as long as polymorphed.
745 * Currently only strength gets changed.
747 if (strongmonst(&mons[mntmp]))
748 ABASE(A_STR) = AMAX(A_STR) = STR18(100);
750 if (Stone_resistance && Stoned) { /* parnes@eniac.seas.upenn.edu */
752 make_stoned(0L, "You no longer seem to be petrifying.", 0,
754 make_stoned(0L, "
\90Î
\89»
\82©
\82ç
\89ð
\95ú
\82³
\82ê
\82½
\82æ
\82¤
\82¾
\81D", 0,
757 if (Sick_resistance && Sick) {
758 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
760 You("no longer feel sick.");
762 You("
\95a
\8bC
\82©
\82ç
\89ð
\95ú
\82³
\82ê
\82½
\82æ
\82¤
\82¾
\81D");
765 if (flaming(youmonst.data)) {
767 make_slimed(0L, "The slime burns away!");
769 make_slimed(0L, "
\83X
\83\89\83C
\83\80\82Í
\94R
\82¦
\82½
\81I");
770 } else if (mntmp == PM_GREEN_SLIME) {
772 make_slimed(0L, (char *) 0);
775 check_strangling(FALSE); /* maybe stop strangling */
776 if (nohands(youmonst.data))
780 mlvl = adj_lev(&mons[mntmp]);
781 * We can't do the above, since there's no such thing as an
782 * "experience level of you as a monster" for a polymorphed character.
784 mlvl = (int) mons[mntmp].mlevel;
785 if (youmonst.data->mlet == S_DRAGON && mntmp >= PM_GRAY_DRAGON) {
786 u.mhmax = In_endgame(&u.uz) ? (8 * mlvl) : (4 * mlvl + d(mlvl, 4));
787 } else if (is_golem(youmonst.data)) {
788 u.mhmax = golemhp(mntmp);
793 u.mhmax = d(mlvl, 8);
794 if (is_home_elemental(&mons[mntmp]))
799 if (u.ulevel < mlvl) {
800 /* Low level characters can't become high level monsters for long */
802 /* DRS/NS 2.2.6 messes up -- Peter Kendell */
803 int mtd = u.mtimedone, ulv = u.ulevel;
805 u.mtimedone = mtd * ulv / mlvl;
807 u.mtimedone = u.mtimedone * u.ulevel / mlvl;
811 if (uskin && mntmp != armor_to_dragon(uskin->otyp))
815 (void) hideunder(&youmonst);
817 if (u.utraptype == TT_PIT && u.utrap) {
818 u.utrap = rn1(6, 2); /* time to escape resets */
820 if (was_blind && !Blind) { /* previous form was eyeless */
822 make_blinded(0L, TRUE); /* remove blindness */
824 newsym(u.ux, u.uy); /* Change symbol */
826 if (!sticky && !u.uswallow && u.ustuck && sticks(youmonst.data))
828 else if (sticky && !sticks(youmonst.data))
831 if (touch_petrifies(u.usteed->data) && !Stone_resistance && rnl(3)) {
835 pline("%s touch %s.", no_longer_petrify_resistant,
838 pline("%s
\82Í%s
\82É
\90G
\82ê
\82½
\81D", no_longer_petrify_resistant,
842 Sprintf(buf, "riding %s", an(u.usteed->data->mname));
844 Sprintf(buf, "%s
\82É
\8fæ
\82Á
\82Ä", u.usteed->data->mname);
847 if (!can_ride(u.usteed))
848 dismount_steed(DISMOUNT_POLY);
853 static const char use_thec[] = "Use the command #%s to %s.";
855 static const char use_thec[] = "#%s
\83R
\83}
\83\93\83h
\82Å%s
\82±
\82Æ
\82ª
\82Å
\82«
\82é
\81D";
856 static const char monsterc[] = "monster";
858 if (can_breathe(youmonst.data))
860 pline(use_thec, monsterc, "use your breath weapon");
862 pline(use_thec,monsterc, "
\91§
\82ð
\93f
\82«
\82©
\82¯
\82é");
863 if (attacktype(youmonst.data, AT_SPIT))
865 pline(use_thec, monsterc, "spit venom");
867 pline(use_thec,monsterc, "
\93Å
\82ð
\93f
\82");
868 if (youmonst.data->mlet == S_NYMPH)
870 pline(use_thec, monsterc, "remove an iron ball");
872 pline(use_thec,monsterc, "
\93S
\8b\85\82ð
\82Í
\82¸
\82·");
873 if (attacktype(youmonst.data, AT_GAZE))
875 pline(use_thec, monsterc, "gaze at monsters");
877 pline(use_thec,monsterc, "
\89ö
\95¨
\82ðáÉ
\82Þ");
878 if (is_hider(youmonst.data))
880 pline(use_thec, monsterc, "hide");
882 pline(use_thec,monsterc, "
\89B
\82ê
\82é");
883 if (is_were(youmonst.data))
885 pline(use_thec, monsterc, "summon help");
887 pline(use_thec,monsterc, "
\92\87\8aÔ
\82ð
\8f¢
\8a«
\82·
\82é");
888 if (webmaker(youmonst.data))
890 pline(use_thec, monsterc, "spin a web");
892 pline(use_thec,monsterc, "
\82
\82à
\82Ì
\91\83\82ð
\92£
\82é");
893 if (u.umonnum == PM_GREMLIN)
895 pline(use_thec, monsterc, "multiply in a fountain");
897 pline(use_thec,monsterc, "
\90ò
\82Ì
\92\86\82Å
\95ª
\97ô
\82·
\82é");
898 if (is_unicorn(youmonst.data))
900 pline(use_thec, monsterc, "use your horn");
902 pline(use_thec,monsterc, "
\8ap
\82ð
\8eg
\82¤");
903 if (is_mind_flayer(youmonst.data))
905 pline(use_thec, monsterc, "emit a mental blast");
907 pline(use_thec,monsterc, "
\90¸
\90_
\94g
\82ð
\94
\90¶
\82³
\82¹
\82é");
908 if (youmonst.data->msound == MS_SHRIEK) /* worthless, actually */
910 pline(use_thec, monsterc, "shriek");
912 pline(use_thec,monsterc, "
\8bà
\90Ø
\82è
\90º
\82ð
\82 \82°
\82é");
913 if (is_vampire(youmonst.data))
915 pline(use_thec, monsterc, "change shape");
917 pline(use_thec, monsterc, "
\8ep
\82ð
\95Ï
\82¦
\82é");
919 if (lays_eggs(youmonst.data) && flags.female)
921 pline(use_thec, "sit", "lay an egg");
923 pline(use_thec, "sit", "
\97\91\82ð
\8eY
\82Þ");
926 /* you now know what an egg of your type looks like */
927 if (lays_eggs(youmonst.data)) {
928 learn_egg_type(u.umonnum);
929 /* make queen bees recognize killer bee eggs */
930 learn_egg_type(egg_type_from_parent(u.umonnum, TRUE));
933 if ((!Levitation && !u.ustuck && !Flying && is_pool_or_lava(u.ux, u.uy))
934 || (Underwater && !Swimming))
936 if (Passes_walls && u.utrap
937 && (u.utraptype == TT_INFLOOR || u.utraptype == TT_BURIEDBALL)) {
939 if (u.utraptype == TT_INFLOOR)
941 pline_The("rock seems to no longer trap you.");
943 pline("
\8aâ
\82É
\95Â
\82¶
\8d\9e\82ß
\82ç
\82ê
\82é
\82±
\82Æ
\82Í
\82È
\82¢
\82¾
\82ë
\82¤
\81D");
946 pline_The("buried ball is no longer bound to you.");
948 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");
949 buried_ball_to_freedom();
951 } else if (likes_lava(youmonst.data) && u.utrap
952 && u.utraptype == TT_LAVA) {
955 pline_The("lava now feels soothing.");
957 pline("
\97n
\8aâ
\82ª
\90¸
\90_
\82ð
\97\8e\82¿
\82Â
\82©
\82¹
\82Ä
\82
\82ê
\82é
\81D");
959 if (amorphous(youmonst.data) || is_whirly(youmonst.data)
960 || unsolid(youmonst.data)) {
963 You("slip out of the iron chain.");
965 You("
\93S
\82Ì
\8d½
\82©
\82ç
\82·
\82é
\82è
\82Æ
\94²
\82¯
\82½
\81D");
967 } else if (u.utrap && u.utraptype == TT_BURIEDBALL) {
969 You("slip free of the buried ball and chain.");
971 You("
\96\84\82Ü
\82Á
\82Ä
\82¢
\82é
\8b\85\82Æ
\8d½
\82©
\82ç
\82·
\82é
\82è
\82Æ
\94²
\82¯
\82½
\81D");
972 buried_ball_to_freedom();
975 if (u.utrap && (u.utraptype == TT_WEB || u.utraptype == TT_BEARTRAP)
976 && (amorphous(youmonst.data) || is_whirly(youmonst.data)
977 || unsolid(youmonst.data) || (youmonst.data->msize <= MZ_SMALL
978 && u.utraptype == TT_BEARTRAP))) {
980 You("are no longer stuck in the %s.",
981 u.utraptype == TT_WEB ? "web" : "bear trap");
983 You("%s
\82©
\82ç
\92E
\8fo
\82µ
\82½
\81D",
984 u.utraptype == TT_WEB ? "
\82
\82à
\82Ì
\91\83" : "
\8cF
\82Ìã©");
986 /* probably should burn webs too if PM_FIRE_ELEMENTAL */
989 if (webmaker(youmonst.data) && u.utrap && u.utraptype == TT_WEB) {
991 You("orient yourself on the web.");
993 You("
\82
\82à
\82Ì
\91\83\82É
\93K
\89\9e\82µ
\82½
\81D");
996 check_strangling(TRUE); /* maybe start strangling */
997 (void) polysense(youmonst.data);
1000 vision_full_recalc = 1;
1002 (void) encumber_msg();
1004 retouch_equipment(2);
1005 /* this might trigger a recursive call to polymon() [stone golem
1006 wielding cockatrice corpse and hit by stone-to-flesh, becomes
1007 flesh golem above, now gets transformed back into stone golem] */
1009 selftouch(no_longer_petrify_resistant);
1016 register struct obj *otmp;
1018 if (breakarm(youmonst.data)) {
1019 if ((otmp = uarm) != 0) {
1023 You("break out of your armor!");
1025 You("
\8aZ
\82ð
\89ó
\82µ
\82½
\81I");
1026 exercise(A_STR, FALSE);
1027 (void) Armor_gone();
1030 if ((otmp = uarmc) != 0) {
1031 if (otmp->oartifact) {
1033 Your("%s falls off!", cloak_simple_name(otmp));
1035 Your("%s
\82Í
\92E
\82°
\97\8e\82¿
\82½
\81I", cloak_simple_name(otmp));
1040 Your("%s tears apart!", cloak_simple_name(otmp));
1042 Your("%s
\82Í
\82¸
\82½
\82¸
\82½
\82É
\88ø
\82«
\97ô
\82©
\82ê
\82½
\81I", cloak_simple_name(otmp));
1049 Your("shirt rips to shreds!");
1051 Your("
\83V
\83\83\83c
\82Í
\88ø
\82«
\97ô
\82©
\82ê
\82½
\81I");
1054 } else if (sliparm(youmonst.data)) {
1055 if (((otmp = uarm) != 0) && (racial_exception(&youmonst, otmp) < 1)) {
1059 Your("armor falls around you!");
1061 Your("
\8aZ
\82Í
\82 \82È
\82½
\82Ì
\82Ü
\82í
\82è
\82É
\97\8e\82¿
\82½
\81I");
1062 (void) Armor_gone();
1065 if ((otmp = uarmc) != 0) {
1066 if (is_whirly(youmonst.data))
1068 Your("%s falls, unsupported!", cloak_simple_name(otmp));
1070 Your("%s
\82Í
\82·
\82Æ
\82ñ
\82Æ
\97\8e\82¿
\82½
\81I", cloak_simple_name(otmp));
1073 You("shrink out of your %s!", cloak_simple_name(otmp));
1075 You("%s
\82©
\82ç
\8fk
\82Ý
\8fo
\82½
\81I", cloak_simple_name(otmp));
1079 if ((otmp = uarmu) != 0) {
1080 if (is_whirly(youmonst.data))
1082 You("seep right through your shirt!");
1084 You("
\83V
\83\83\83c
\82©
\82ç
\82µ
\82Ý
\8fo
\82½
\81I");
1087 You("become much too small for your shirt!");
1089 You("
\83V
\83\83\83c
\82æ
\82è
\82¸
\82Á
\82Æ
\8f¬
\82³
\82
\82È
\82Á
\82½
\81I");
1090 setworn((struct obj *) 0, otmp->owornmask & W_ARMU);
1094 if (has_horns(youmonst.data)) {
1095 if ((otmp = uarmh) != 0) {
1096 if (is_flimsy(otmp) && !donning(otmp)) {
1098 char hornbuf[BUFSZ];
1100 /* Future possibilities: This could damage/destroy helmet */
1101 Sprintf(hornbuf, "horn%s", plur(num_horns(youmonst.data)));
1102 Your("%s %s through %s.", hornbuf, vtense(hornbuf, "pierce"),
1105 Your("
\8ap
\82ª%s
\82ð
\82Â
\82ç
\82Ê
\82¢
\82½
\81D", yname(otmp));
1111 Your("%s falls to the %s!", helm_simple_name(otmp),
1112 surface(u.ux, u.uy));
1114 Your("%s
\82Í%s
\82É
\97\8e\82¿
\82½
\81I", helm_simple_name(otmp),
1115 surface(u.ux, u.uy));
1117 (void) Helmet_off();
1122 if (nohands(youmonst.data) || verysmall(youmonst.data)) {
1123 if ((otmp = uarmg) != 0) {
1126 /* Drop weapon along with gloves */
1128 You("drop your gloves%s!", uwep ? " and weapon" : "");
1130 You("
\8f¬
\8eè%s
\82ð
\97\8e\82µ
\82½
\81I", uwep ? "
\82â
\95\90\8aí" : "");
1132 (void) Gloves_off();
1135 if ((otmp = uarms) != 0) {
1137 You("can no longer hold your shield!");
1139 You("
\82à
\82¤
\8f\82\82ð
\8e\9d\82Á
\82Ä
\82ç
\82ê
\82È
\82¢
\81I");
1140 (void) Shield_off();
1143 if ((otmp = uarmh) != 0) {
1147 Your("%s falls to the %s!", helm_simple_name(otmp),
1148 surface(u.ux, u.uy));
1150 Your("%s
\82Í%s
\82É
\97\8e\82¿
\82½
\81I", helm_simple_name(otmp),
1151 surface(u.ux, u.uy));
1153 (void) Helmet_off();
1157 if (nohands(youmonst.data) || verysmall(youmonst.data)
1158 || slithy(youmonst.data) || youmonst.data->mlet == S_CENTAUR) {
1159 if ((otmp = uarmf) != 0) {
1162 if (is_whirly(youmonst.data))
1164 Your("boots fall away!");
1166 Your("
\8cC
\82Í
\92E
\82°
\97\8e\82¿
\82½
\81I");
1169 Your("boots %s off your feet!",
1170 verysmall(youmonst.data) ? "slide" : "are pushed");
1172 Your("
\8cC
\82Í
\82 \82È
\82½
\82Ì
\91«
\82©
\82ç%s
\81I",
1173 verysmall(youmonst.data) ? "
\8a\8a\82è
\97\8e\82¿
\82½" : "
\92E
\82°
\97\8e\82¿
\82½");
1186 const char *what, *which, *whichtoo;
1187 boolean candropwep, candropswapwep;
1190 /* !alone check below is currently superfluous but in the
1191 * future it might not be so if there are monsters which cannot
1192 * wear gloves but can wield weapons
1194 if (!alone || cantwield(youmonst.data)) {
1195 candropwep = canletgo(uwep, "");
1196 candropswapwep = !u.twoweap || canletgo(uswapwep, "");
1199 what = (candropwep && candropswapwep) ? "drop" : "release";
1202 which = is_sword(uwep) ? "sword" : weapon_descr(uwep);
1204 which = is_sword(uwep) ? "
\8c\95" : weapon_descr(uwep);
1208 is_sword(uswapwep) ? "sword" : weapon_descr(uswapwep);
1210 is_sword(uswapwep) ? "
\8c\95" : weapon_descr(uswapwep);
1211 if (strcmp(which, whichtoo))
1215 which = "
\95\90\8aí";
1217 #if 0 /*JP*//*
\95¡
\90\94\8c`
\82É
\82µ
\82È
\82¢*/
1218 if (uwep->quan != 1L || u.twoweap)
1219 which = makeplural(which);
1223 You("find you must %s %s %s!", what,
1224 the_your[!!strncmp(which, "corpse", 6)], which);
1226 You("%s
\82ð
\97\8e\82Æ
\82µ
\82½
\82±
\82Æ
\82É
\8bC
\82Ã
\82¢
\82½
\81I", which);
1240 } else if (!could_twoweap(youmonst.data)) {
1249 /* You can't revert back while unchanging */
1250 if (Unchanging && (u.mh < 1)) {
1251 killer.format = NO_KILLER_PREFIX;
1253 Strcpy(killer.name, "killed while stuck in creature form");
1255 Strcpy(killer.name, "
\8c³
\82Ì
\8ep
\82Ö
\96ß
\82ê
\82¸
\82É");
1259 if (emits_light(youmonst.data))
1260 del_light_source(LS_MONSTER, monst_to_any(&youmonst));
1262 polyman("return to %s form!", urace.adj);
1264 polyman("%s
\82É
\96ß
\82Á
\82½
\81I", urace.adj);
1267 /* can only happen if some bit of code reduces u.uhp
1268 instead of u.mh while poly'd */
1270 Your("old form was not healthy enough to survive.");
1272 Your("
\8c³
\82Ì
\8ep
\82Í
\90¶
\82«
\82Ä
\82¢
\82
\82¾
\82¯
\82Ì
\97Í
\82ª
\82È
\82¢
\81D");
1274 Sprintf(killer.name, "reverting to unhealthy %s form", urace.adj);
1276 Sprintf(killer.name, "
\95s
\8c\92\8dN
\82È%s
\82Ì
\8ep
\82É
\96ß
\82Á
\82Ä", urace.adj);
1277 killer.format = KILLED_BY;
1283 vision_full_recalc = 1;
1284 (void) encumber_msg();
1286 retouch_equipment(2);
1288 selftouch(no_longer_petrify_resistant);
1294 struct attack *mattk;
1298 You_cant("breathe. Sorry.");
1300 You_cant("
\91§
\82ð
\93f
\82
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81D
\8ec
\94O
\81D");
1305 You("don't have enough energy to breathe!");
1307 You("
\91§
\82ð
\93f
\82
\82Ì
\82É
\8f\
\95ª
\82È
\83G
\83l
\83\8b\83M
\81[
\82ª
\82È
\82©
\82Á
\82½
\81D");
1313 if (!getdir((char *) 0))
1316 mattk = attacktype_fordmg(youmonst.data, AT_BREA, AD_ANY);
1318 impossible("bad breath attack?"); /* mouthwash needed... */
1319 else if (!u.dx && !u.dy && !u.dz)
1322 buzz((int) (20 + mattk->adtyp - 1), (int) mattk->damn, u.ux, u.uy,
1331 struct attack *mattk;
1333 if (!getdir((char *) 0))
1335 mattk = attacktype_fordmg(youmonst.data, AT_SPIT, AD_ANY);
1337 impossible("bad spit attack?");
1339 switch (mattk->adtyp) {
1342 otmp = mksobj(BLINDING_VENOM, TRUE, FALSE);
1345 impossible("bad attack type in dospit");
1348 otmp = mksobj(ACID_VENOM, TRUE, FALSE);
1351 otmp->spe = 1; /* to indicate it's yours */
1352 throwit(otmp, 0L, FALSE);
1361 if (u.utrap && u.utraptype == TT_BURIEDBALL) {
1363 pline_The("ball and chain are buried firmly in the %s.",
1364 surface(u.ux, u.uy));
1366 pline_The("
\8b\85\82Æ
\8d½
\82Í%s
\82É
\82µ
\82Á
\82©
\82è
\82Æ
\96\84\82Ü
\82Á
\82Ä
\82¢
\82é
\81D.",
1367 surface(u.ux, u.uy));
1372 You("are not chained to anything!");
1374 You("
\89½
\82à
\82Â
\82È
\82ª
\82ê
\82Ä
\82¢
\82È
\82¢
\81I");
1384 register struct trap *ttmp = t_at(u.ux, u.uy);
1386 if (Levitation || Is_airlevel(&u.uz) || Underwater
1387 || Is_waterlevel(&u.uz)) {
1389 You("must be on the ground to spin a web.");
1391 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");
1396 You("release web fluid inside %s.", mon_nam(u.ustuck));
1398 You("%s
\82Ì
\93à
\82Å
\82
\82à
\82Ì
\91\83\82ð
\93f
\82«
\8fo
\82µ
\82½
\81D", mon_nam(u.ustuck));
1399 if (is_animal(u.ustuck->data)) {
1400 expels(u.ustuck, u.ustuck->data, TRUE);
1403 if (is_whirly(u.ustuck->data)) {
1406 for (i = 0; i < NATTK; i++)
1407 if (u.ustuck->data->mattk[i].aatyp == AT_ENGL)
1410 impossible("Swallower has no engulfing attack?");
1415 switch (u.ustuck->data->mattk[i].adtyp) {
1418 Strcpy(sweep, "ignites and ");
1420 Strcpy(sweep, "
\94
\89Î
\82µ");
1424 Strcpy(sweep, "fries and ");
1426 Strcpy(sweep, "
\8fÅ
\82°");
1430 Strcpy(sweep, "freezes, shatters and ");
1432 Strcpy(sweep, "
\93\80\82è
\82Â
\82«
\81C
\82±
\82È
\82²
\82È
\82É
\82È
\82è");
1436 pline_The("web %sis swept away!", sweep);
1438 pline("
\82
\82à
\82Ì
\91\83\82Í%s
\82È
\82
\82È
\82Á
\82½
\81I", sweep);
1441 } /* default: a nasty jelly-like creature */
1443 pline_The("web dissolves into %s.", mon_nam(u.ustuck));
1445 pline("
\82
\82à
\82Ì
\91\83\82Í
\95ª
\89ð
\82µ
\82Ä%s
\82É
\82È
\82Á
\82½
\81D", mon_nam(u.ustuck));
1450 You("cannot spin webs while stuck in a trap.");
1452 You("ã©
\82É
\82Í
\82Ü
\82Á
\82Ä
\82¢
\82é
\8aÔ
\82Í
\82
\82à
\82Ì
\91\83\82ð
\92£
\82ê
\82È
\82¢
\81D");
1455 exercise(A_DEX, TRUE);
1457 switch (ttmp->ttyp) {
1461 You("spin a web, covering up the pit.");
1463 You("
\82
\82à
\82Ì
\91\83\82ð
\92£
\82è
\81C
\97\8e\82µ
\8c\8a\82ð
\95¢
\82Á
\82½
\81D");
1465 bury_objs(u.ux, u.uy);
1470 pline_The("squeaky board is muffled.");
1472 pline("
\82«
\82µ
\82Þ
\94Â
\82Í
\95¢
\82í
\82ê
\82½
\81D");
1479 case VIBRATING_SQUARE:
1481 Your("webbing vanishes!");
1483 Your("
\82
\82à
\82Ì
\91\83\82Í
\8fÁ
\82¦
\82½
\81I");
1487 You("make the web thicker.");
1489 You("
\82
\82à
\82Ì
\91\83\82ð
\82æ
\82è
\8cú
\82
\82µ
\82½
\81D");
1494 You("web over the %s.",
1495 (ttmp->ttyp == TRAPDOOR) ? "trap door" : "hole");
1497 You("%s
\82ð
\82
\82à
\82Ì
\91\83\82Å
\95¢
\82Á
\82½
\81D",
1498 (ttmp->ttyp == TRAPDOOR) ? "
\97\8e\82µ
\94à" : "
\8c\8a");
1503 case ROLLING_BOULDER_TRAP:
1505 You("spin a web, jamming the trigger.");
1507 You("
\82
\82à
\82Ì
\91\83\82ð
\92£
\82Á
\82Ä
\81C
\83X
\83C
\83b
\83`
\82ð
\93®
\82©
\82È
\82
\82µ
\82½
\81D");
1523 You("have triggered a trap!");
1525 You("ã©
\82ð
\8en
\93®
\82³
\82¹
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I");
1529 impossible("Webbing over trap type %d?", ttmp->ttyp);
1532 } else if (On_stairs(u.ux, u.uy)) {
1533 /* cop out: don't let them hide the stairs */
1535 Your("web fails to impede access to the %s.",
1536 (levl[u.ux][u.uy].typ == STAIRS) ? "stairs" : "ladder");
1538 Your("
\82
\82à
\82Ì
\91\83\82Í%s
\82Ö
\82Ì
\88Ú
\93®
\82ð
\8e×
\96\82\82Å
\82«
\82È
\82¢
\81D",
1539 (levl[u.ux][u.uy].typ == STAIRS) ? "
\8aK
\92i" : "
\82Í
\82µ
\82²");
1543 ttmp = maketrap(u.ux, u.uy, WEB);
1557 You("lack the energy to send forth a call for help!");
1559 You("
\8f\95\82¯
\82ð
\8cÄ
\82Ô
\82¾
\82¯
\82Ì
\91Ì
\97Í
\82ª
\82È
\82¢
\81I");
1566 You("call upon your brethren for help!");
1568 You("
\92\87\8aÔ
\82ð
\8cÄ
\82ñ
\82¾
\81I");
1569 exercise(A_WIS, TRUE);
1570 if (!were_summon(youmonst.data, TRUE, &placeholder, (char *) 0))
1572 pline("But none arrive.");
1574 pline("
\82µ
\82©
\82µ
\81C
\89½
\82à
\97\88\82È
\82¢
\81D");
1581 register struct monst *mtmp;
1587 for (i = 0; i < NATTK; i++) {
1588 if (youmonst.data->mattk[i].aatyp == AT_GAZE) {
1589 adtyp = youmonst.data->mattk[i].adtyp;
1593 if (adtyp != AD_CONF && adtyp != AD_FIRE) {
1594 impossible("gaze attack %d?", adtyp);
1600 You_cant("see anything to gaze at.");
1602 You("
\96Ú
\82ª
\8c©
\82¦
\82È
\82¢
\82Ì
\82Å
\81C
\82É
\82ç
\82ß
\82È
\82¢
\81D");
1604 } else if (Hallucination) {
1606 You_cant("gaze at anything you can see.");
1608 You_cant("
\8c©
\82¦
\82é
\82à
\82Ì
\82ð
\89½
\82à
\82É
\82ç
\82ß
\82È
\82¢
\81D");
1613 You("lack the energy to use your special gaze!");
1615 You("
\82É
\82ç
\82Þ
\82¾
\82¯
\82Ì
\91Ì
\97Í
\82ª
\82È
\82¢
\81I");
1621 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
1622 if (DEADMONSTER(mtmp))
1624 if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my)) {
1626 if (Invis && !perceives(mtmp->data)) {
1628 pline("%s seems not to notice your gaze.", Monnam(mtmp));
1630 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\82É
\82ç
\82Ý
\82É
\8bC
\82ª
\82Â
\82¢
\82Ä
\82È
\82¢
\82æ
\82¤
\82¾
\81D", Monnam(mtmp));
1631 } else if (mtmp->minvis && !See_invisible) {
1633 You_cant("see where to gaze at %s.", Monnam(mtmp));
1635 You("%s
\82Í
\8c©
\82¦
\82È
\82¢
\82Ì
\82Å
\81C
\82É
\82ç
\82ß
\82È
\82¢", Monnam(mtmp));
1636 } else if (mtmp->m_ap_type == M_AP_FURNITURE
1637 || mtmp->m_ap_type == M_AP_OBJECT) {
1640 } else if (flags.safe_dog && mtmp->mtame && !Confusion) {
1642 You("avoid gazing at %s.", y_monnam(mtmp));
1644 You("%s
\82©
\82ç
\96Ú
\82ð
\82»
\82ç
\82µ
\82Ä
\82µ
\82Ü
\82Á
\82½
\81D", y_monnam(mtmp));
1646 if (flags.confirm && mtmp->mpeaceful && !Confusion) {
1648 Sprintf(qbuf, "Really %s %s?",
1649 (adtyp == AD_CONF) ? "confuse" : "attack",
1652 Sprintf(qbuf, "
\96{
\93\96\82É%s
\82ð%s
\81H",
1654 (adtyp == AD_CONF) ? "
\8d¬
\97\90\82³
\82¹
\82é" : "
\8dU
\8c\82\82·
\82é");
1656 if (yn(qbuf) != 'y')
1660 if (!mtmp->mcanmove || mtmp->mstun || mtmp->msleeping
1661 || !mtmp->mcansee || !haseyes(mtmp->data)) {
1665 /* No reflection check for consistency with when a monster
1666 * gazes at *you*--only medusa gaze gets reflected then.
1668 if (adtyp == AD_CONF) {
1671 Your("gaze confuses %s!", mon_nam(mtmp));
1673 Your("
\82É
\82ç
\82Ý
\82Í%s
\82ð
\8d¬
\97\90\82³
\82¹
\82½
\81I", mon_nam(mtmp));
1676 pline("%s is getting more and more confused.",
1678 pline("%s
\82Í
\82Ü
\82·
\82Ü
\82·
\8d¬
\97\90\82µ
\82½
\81I",
1681 } else if (adtyp == AD_FIRE) {
1682 int dmg = d(2, 6), lev = (int) u.ulevel;
1685 You("attack %s with a fiery gaze!", mon_nam(mtmp));
1687 You("
\89\8a\82Ì
\82É
\82ç
\82Ý
\82Å%s
\82ð
\8dU
\8c\82\82µ
\82½
\81I", mon_nam(mtmp));
1688 if (resists_fire(mtmp)) {
1690 pline_The("fire doesn't burn %s!", mon_nam(mtmp));
1692 pline("%s
\82Í
\89\8a\82Å
\94R
\82¦
\82È
\82©
\82Á
\82½
\81I", mon_nam(mtmp));
1696 (void) destroy_mitem(mtmp, SCROLL_CLASS, AD_FIRE);
1698 (void) destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
1700 (void) destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE);
1706 /* For consistency with passive() in uhitm.c, this only
1707 * affects you if the monster is still alive.
1709 if (DEADMONSTER(mtmp))
1712 if (mtmp->data == &mons[PM_FLOATING_EYE] && !mtmp->mcan) {
1715 You("are frozen by %s gaze!",
1717 You("%s
\82Ì
\82É
\82ç
\82Ý
\82Å
\93®
\82¯
\82È
\82
\82È
\82Á
\82½
\81I",
1718 s_suffix(mon_nam(mtmp)));
1719 nomul((u.ulevel > 6 || rn2(4))
1720 ? -d((int) mtmp->m_lev + 1,
1721 (int) mtmp->data->mattk[0].damd)
1723 multi_reason = "frozen by a monster's gaze";
1728 You("stiffen momentarily under %s gaze.",
1730 You("%s
\82Ì
\82É
\82ç
\82Ý
\82Å
\88ê
\8fu
\8dd
\92¼
\82µ
\82½
\81D",
1731 s_suffix(mon_nam(mtmp)));
1733 /* Technically this one shouldn't affect you at all because
1734 * the Medusa gaze is an active monster attack that only
1735 * works on the monster's turn, but for it to *not* have an
1736 * effect would be too weird.
1738 if (mtmp->data == &mons[PM_MEDUSA] && !mtmp->mcan) {
1740 pline("Gazing at the awake %s is not a very good idea.",
1742 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",
1744 /* as if gazing at a sleeping anything is fruitful... */
1746 You("turn to stone...");
1748 You("
\90Î
\82É
\82È
\82Á
\82½
\81D
\81D
\81D");
1749 killer.format = KILLED_BY;
1751 Strcpy(killer.name, "deliberately meeting Medusa's gaze");
1753 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Ä");
1761 You("gaze at no place in particular.");
1763 You("
\8eÀ
\8dÛ
\82É
\82Í
\89½
\82à
\82É
\82ç
\82ß
\82È
\82©
\82Á
\82½
\81D");
1770 boolean ismimic = youmonst.data->mlet == S_MIMIC,
1771 on_ceiling = is_clinger(youmonst.data) || Flying;
1773 /* can't hide while being held (or holding) or while trapped
1774 (except for floor hiders [trapper or mimic] in pits) */
1775 if (u.ustuck || (u.utrap && (u.utraptype != TT_PIT || on_ceiling))) {
1777 You_cant("hide while you're %s.",
1778 !u.ustuck ? "trapped" : !sticks(youmonst.data)
1780 : humanoid(u.ustuck->data)
1782 : "holding that creature");
1784 You_cant("%s
\8aÔ
\82Í
\89B
\82ê
\82ç
\82ê
\82È
\82¢
\81D",
1785 !u.ustuck ? "
\95ß
\82Ü
\82Á
\82Ä
\82¢
\82é" : !sticks(youmonst.data)
1786 ? "
\95ß
\82Ü
\82¦
\82ç
\82ê
\82Ä
\82¢
\82é"
1787 : humanoid(u.ustuck->data)
1788 ? "
\92N
\82©
\82ð
\82Â
\82©
\82ñ
\82Å
\82¢
\82é"
1789 : "
\89ö
\95¨
\82ð
\82Â
\82©
\82ñ
\82Å
\82¢
\82é");
1792 || (ismimic && youmonst.m_ap_type != M_AP_NOTHING)) {
1794 youmonst.m_ap_type = M_AP_NOTHING;
1799 /* note: the eel and hides_under cases are hypothetical;
1800 such critters aren't offered the option of hiding via #monster */
1801 if (youmonst.data->mlet == S_EEL && !is_pool(u.ux, u.uy)) {
1802 if (IS_FOUNTAIN(levl[u.ux][u.uy].typ))
1804 The("fountain is not deep enough to hide in.");
1806 The("
\90ò
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\82Ù
\82Ç
\90[
\82
\82È
\82¢
\81D");
1809 There("is no water to hide in here.");
1811 There("
\82±
\82±
\82É
\82Í
\89B
\82ê
\82é
\82½
\82ß
\82Ì
\90\85\82ª
\82È
\82¢
\81D");
1815 if (hides_under(youmonst.data) && !level.objects[u.ux][u.uy]) {
1817 There("is nothing to hide under here.");
1819 There("
\82±
\82±
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\82à
\82Ì
\82ª
\82È
\82¢
\81D");
1823 /* Planes of Air and Water */
1824 if (on_ceiling && !has_ceiling(&u.uz)) {
1826 There("is nowhere to hide above you.");
1828 There("
\82 \82È
\82½
\82Ì
\8fã
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\8fê
\8f\8a\82ª
\82È
\82¢
\81D");
1832 if ((is_hider(youmonst.data) && !Flying) /* floor hider */
1833 && (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz))) {
1835 There("is nowhere to hide beneath you.");
1837 There("
\82 \82È
\82½
\82Ì
\89º
\82É
\82Í
\89B
\82ê
\82ç
\82ê
\82é
\8fê
\8f\8a\82ª
\82È
\82¢
\81D");
1841 /* TODO? inhibit floor hiding at furniture locations, or
1842 * else make youhiding() give smarter messages at such spots.
1845 if (u.uundetected || (ismimic && youmonst.m_ap_type != M_AP_NOTHING)) {
1846 youhiding(FALSE, 1); /* "you are already hiding" */
1851 /* should bring up a dialog "what would you like to imitate?" */
1852 youmonst.m_ap_type = M_AP_OBJECT;
1853 youmonst.mappearance = STRANGE_OBJECT;
1857 youhiding(FALSE, 0); /* "you are now hiding" */
1864 struct permonst *savedat = youmonst.data;
1866 if (is_vampire(youmonst.data)) {
1868 if (savedat != youmonst.data) {
1870 You("transform into %s.", an(youmonst.data->mname));
1872 You("%s
\82Ì
\8ep
\82É
\82È
\82Á
\82½
\81D", youmonst.data->mname);
1882 struct monst *mtmp, *nmon;
1886 You("concentrate but lack the energy to maintain doing so.");
1888 You("
\8fW
\92\86\82µ
\82½
\81D
\82µ
\82©
\82µ
\83G
\83l
\83\8b\83M
\81[
\82ª
\91«
\82è
\82È
\82¢
\81D");
1895 You("concentrate.");
1897 You("
\8fW
\92\86\82µ
\82½
\81D");
1899 pline("A wave of psychic energy pours out.");
1901 pline("
\90¸
\90_
\83G
\83l
\83\8b\83M
\81[
\94g
\82ª
\95ú
\8eU
\82µ
\82½
\81D");
1902 for (mtmp = fmon; mtmp; mtmp = nmon) {
1906 if (DEADMONSTER(mtmp))
1908 if (distu(mtmp->mx, mtmp->my) > BOLT_LIM * BOLT_LIM)
1910 if (mtmp->mpeaceful)
1912 u_sen = telepathic(mtmp->data) && !mtmp->mcansee;
1913 if (u_sen || (telepathic(mtmp->data) && rn2(2)) || !rn2(10)) {
1915 You("lock in on %s %s.", s_suffix(mon_nam(mtmp)),
1917 : telepathic(mtmp->data) ? "latent telepathy" : "mind");
1919 pline("%s
\82Ì%s
\82è
\8d\9e\82ñ
\82¾
\81D", mon_nam(mtmp),
1920 u_sen ? "
\90¸
\90_
\82É
\93ü"
1921 : telepathic(mtmp->data) ? "
\90ö
\8dÝ
\93I
\90¸
\90_
\82É
\93ü" : "
\90[
\91w
\88Ó
\8e¯
\82É
\90ö");
1923 mtmp->mhp -= rnd(15);
1935 pline("%s is no longer in your clutches.", Monnam(u.ustuck));
1937 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\8eè
\82©
\82ç
\93¦
\82ê
\82½
\81D", Monnam(u.ustuck));
1948 Your("skin returns to its original form.");
1950 Your("
\94ç
\95\86\82Í
\96{
\97\88\82Ì
\8ep
\82É
\96ß
\82Á
\82½
\81D");
1952 uskin = (struct obj *) 0;
1953 /* undo save/restore hack */
1954 uarm->owornmask &= ~I_SPECIAL;
1959 mbodypart(mon, part)
1963 static NEARDATA const char
1965 *humanoid_parts[] = { "arm", "eye", "face", "finger",
1966 "fingertip", "foot", "hand", "handed",
1967 "head", "leg", "light headed", "neck",
1968 "spine", "toe", "hair", "blood",
1969 "lung", "nose", "stomach" },
1971 *humanoid_parts[] = { "
\98r", "
\96Ú", "
\8aç", "
\8ew",
1972 "
\8ew
\90æ", "
\91«", "
\8eè", "
\8eè
\82É
\82·
\82é",
1973 "
\93ª", "
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
1974 "
\94w
\8d\9c", "
\92Ü
\90æ", "
\94¯", "
\8c\8c",
1975 "
\94x", "
\95@", "
\88Ý"},
1978 *jelly_parts[] = { "pseudopod", "dark spot", "front",
1979 "pseudopod extension", "pseudopod extremity",
1980 "pseudopod root", "grasp", "grasped",
1981 "cerebral area", "lower pseudopod", "viscous",
1982 "middle", "surface", "pseudopod extremity",
1983 "ripples", "juices", "surface", "sensor",
1986 *jelly_parts[] = { "
\8b[
\8e\97\90G
\8eè", "
\8d\95\82¢
\94Á
\93_", "
\91O
\96Ê",
1987 "
\8b[
\8e\97\90G
\8eè
\82Ì
\90æ", "
\8b[
\8e\97\90G
\8eè",
1988 "
\8b[
\8e\97\90G
\8eè
\82Ì
\8a²", "
\90G
\8eè", "
\88¬
\82é",
1989 "
\94]
\82Ì
\97Ì
\88æ", "
\89º
\95û
\82Ì
\8b[
\8e\97\90G
\8eè", "
\82Ë
\82Î
\82Ë
\82Î
\82µ
\82Ä
\82«
\82½",
1990 "
\92\86\8aÔ
\97Ì
\88æ", "
\95\
\96Ê", "
\8b[
\8e\97\90G
\8eè",
1991 "
\94g
\96ä", "
\91Ì
\89t", "
\95\
\96Ê", "
\8a´
\8ao
\8aí",
1995 *animal_parts[] = { "forelimb", "eye", "face",
1996 "foreclaw", "claw tip", "rear claw",
1997 "foreclaw", "clawed", "head",
1998 "rear limb", "light headed", "neck",
1999 "spine", "rear claw tip", "fur",
2000 "blood", "lung", "nose",
2003 *animal_parts[] = { "
\91O
\91«", "
\96Ú", "
\8aç",
2004 "
\91O
\92Ü", "
\92Ü
\90æ", "
\8cã
\92Ü",
2005 "
\91O
\92Ü", "
\82Ð
\82Á
\82©
\82¯
\82é", "
\93ª",
2006 "
\8cã
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2007 "
\94w
\8d\9c", "
\8cã
\92Ü
\90æ", "
\96Ñ
\94ç",
2008 "
\8c\8c", "
\94x", "
\95@",
2012 *bird_parts[] = { "wing", "eye", "face", "wing",
2013 "wing tip", "foot", "wing", "winged",
2014 "head", "leg", "light headed", "neck",
2015 "spine", "toe", "feathers", "blood",
2016 "lung", "bill", "stomach" },
2018 *bird_parts[] = { "
\97\83", "
\96Ú", "
\8aç", "
\97\83",
2019 "
\97\83\82Ì
\90æ", "
\91«", "
\97\83", "
\97\83\82É
\82Æ
\82é",
2020 "
\93ª", "
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2021 "
\94w
\8d\9c", "
\92Ü
\90æ", "
\89H
\96Ñ", "
\8c\8c",
2022 "
\94x", "
\82
\82¿
\82Î
\82µ", "
\88Ý" },
2025 *horse_parts[] = { "foreleg", "eye", "face",
2026 "forehoof", "hoof tip", "rear hoof",
2027 "forehoof", "hooved", "head",
2028 "rear leg", "light headed", "neck",
2029 "backbone", "rear hoof tip", "mane",
2030 "blood", "lung", "nose",
2033 *horse_parts[] = { "
\91O
\91«", "
\96Ú", "
\8aç",
2034 "
\91O
\92û", "
\92û", "
\8cã
\92û",
2035 "
\91O
\92Ü", "
\92û
\82É
\82Í
\82³
\82Þ", "
\93ª",
2036 "
\8cã
\91«", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ",
2037 "
\94w
\8d\9c", "
\8cã
\92Ü
\90æ", "
\82½
\82Ä
\82ª
\82Ý",
2038 "
\8c\8c", "
\94x", "
\95@",
2042 *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
2043 "tentacle tip", "lower appendage", "tentacle",
2044 "tentacled", "body", "lower tentacle",
2045 "rotational", "equator", "body",
2046 "lower tentacle tip", "cilia", "life force",
2047 "retina", "olfactory nerve", "interior" },
2049 *sphere_parts[] = { "
\93Ë
\8bN", "
\8e\8b\8ao
\90_
\8co", "
\91Ì", "
\90G
\8eè",
2050 "
\90G
\8eè
\82Ì
\90æ", "
\89º
\82Ì
\93Ë
\8bN", "
\90G
\8eè",
2051 "
\90G
\8eè
\82É
\8e\9d\82Â", "
\91Ì", "
\89º
\82Ì
\90G
\8eè",
2052 "
\89ñ
\93]
\82µ
\82½", "
\92\86\90S
\90ü", "
\91Ì",
2053 "
\89º
\82Ì
\90G
\8eè
\82Ì
\90æ", "
\91@
\96Ñ", "
\90¶
\96½
\97Í",
2054 "
\96Ô
\96\8c", "
\9ak
\8ao
\92\86\90\95", "
\93à
\95\94" },
2057 *fungus_parts[] = { "mycelium", "visual area", "front",
2058 "hypha", "hypha", "root",
2059 "strand", "stranded", "cap area",
2060 "rhizome", "sporulated", "stalk",
2061 "root", "rhizome tip", "spores",
2062 "juices", "gill", "gill",
2065 *fungus_parts[] = { "
\8bÛ
\8e\85\91Ì", "
\8e\8b\8ao
\97Ì
\88æ", "
\91O",
2066 "
\8bÛ
\8e\85", "
\8bÛ
\8e\85", "
\8dª",
2067 "
\90G
\8eè", "
\90G
\8eè
\82É
\82©
\82ç
\82Ý
\82Â
\82¯
\82é", "
\8eP",
2068 "
\8dª
\8cs", "
\8d¬
\97\90\82·
\82é", "
\8e²",
2069 "
\8dª", "
\8dª
\8cs
\82Ì
\90æ", "
\89è
\96E",
2070 "
\91Ì
\89t", "
\82¦
\82ç", "
\82¦
\82ç",
2074 *vortex_parts[] = { "region", "eye", "front",
2075 "minor current", "minor current", "lower current",
2076 "swirl", "swirled", "central core",
2077 "lower current", "addled", "center",
2078 "currents", "edge", "currents",
2079 "life force", "center", "leading edge",
2082 *vortex_parts[] = { "
\97Ì
\88æ", "
\96Ú", "
\91O",
2083 "
\8f¬
\82³
\82¢
\97¬
\82ê", "
\8f¬
\82³
\82¢
\97¬
\82ê", "
\89º
\95\94\82Ì
\97¬
\82ê",
2084 "
\89Q
\8aª", "
\89Q
\82É
\8aª
\82", "
\89Q
\82Ì
\92\86\90S",
2085 "
\89º
\95\94\82Ì
\97¬
\82ê", "
\8d¬
\97\90\82µ
\82½", "
\92\86\90S
\95\94",
2086 "
\97¬
\82ê", "
\8aO
\8eü", "
\8bC
\97¬",
2087 "
\90¶
\96½
\97Í", "
\92\86\90S", "
\91O
\89\8f",
2091 *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
2092 "large scale tip", "rear region", "scale gap",
2093 "scale gapped", "head", "rear region",
2094 "light headed", "neck", "length", "rear scale",
2095 "scales", "blood", "lung", "forked tongue",
2098 *snake_parts[] = { "
\91Þ
\89»
\82µ
\82½
\91«", "
\96Ú", "
\8aç", "
\91å
\82«
\82È
\97Ø",
2099 "
\91å
\82«
\82È
\97Ø
\82Ì
\90æ", "
\8cã
\95\94\95ª", "
\97Ø
\82Ì
\8c\84\8aÔ",
2100 "
\97Ø
\82Ì
\8c\84\8aÔ
\82É
\82Â
\82¯
\82é", "
\93ª", "
\8cã
\95\94\95ª",
2101 "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\8eñ", "
\91Ì", "
\8cã
\95\94\95ª
\82Ì
\8aZ",
2102 "
\97Ø", "
\8c\8c", "
\94x", "
\90ã",
2106 *worm_parts[] = { "anterior segment", "light sensitive cell",
2107 "clitellum", "setae", "setae", "posterior segment",
2108 "segment", "segmented", "anterior segment",
2109 "posterior", "over stretched", "clitellum",
2110 "length", "posterior setae", "setae", "blood",
2111 "skin", "prostomium", "stomach" },
2113 *worm_parts[] = { "
\91O
\8bæ", "
\8a´
\8cõ
\90«
\8d×
\96E",
2114 "
\8aÂ
\91Ñ", "
\8ap", "
\8ap", "
\8cã
\8bæ",
2115 "
\90ß", "
\90ß
\82É
\82Â
\82¯
\82é", "
\91O
\8bæ",
2116 "
\8cã
\95\94", "
\90L
\82Ñ
\82·
\82¬
\82½", "
\8aÂ
\91Ñ",
2117 "
\91Ì", "
\8cã
\95\94\82Ì
\8ap", "
\8ap", "
\8c\8c",
2118 "
\94ç
\95\86", "
\8cû
\91O
\97t", "
\88Ý" },
2121 *fish_parts[] = { "fin", "eye", "premaxillary", "pelvic axillary",
2122 "pelvic fin", "anal fin", "pectoral fin", "finned",
2123 "head", "peduncle", "played out", "gills",
2124 "dorsal fin", "caudal fin", "scales", "blood",
2125 "gill", "nostril", "stomach" };
2127 *fish_parts[] = { "
\82Ð
\82ê", "
\96Ú", "
\8aç", "
\82Ð
\82ê
\82Ì
\90æ",
2128 "
\82Ð
\82ê
\82Ì
\90æ", "
\94ö
\82Ñ
\82ê", "
\8b¹
\82Ð
\82ê", "
\82Ð
\82ê
\82Å
\8e\9d\82Â",
2129 "
\93ª", "
\94ö
\95¿", "
\82ß
\82Ü
\82¢
\82ª
\82µ
\82½", "
\82¦
\82ç",
2130 "
\94w
\82Ñ
\82ê", "
\94ö
\82Ñ
\82ê", "
\97Ø", "
\8c\8c",
2131 "
\82¦
\82ç", "
\95@", "
\88Ý" };
2133 #if 0 /*JP*//*
\8eg
\82í
\82È
\82¢*/
2134 /* claw attacks are overloaded in mons[]; most humanoids with
2135 such attacks should still reference hands rather than claws */
2136 static const char not_claws[] = {
2137 S_HUMAN, S_MUMMY, S_ZOMBIE, S_ANGEL, S_NYMPH, S_LEPRECHAUN,
2138 S_QUANTMECH, S_VAMPIRE, S_ORC, S_GIANT, /* quest nemeses */
2139 '\0' /* string terminator; assert( S_xxx != 0 ); */
2142 struct permonst *mptr = mon->data;
2145 /* paw
\82Í
\8c¢
\82Æ
\82©
\94L
\82Ì
\8eè
\81Cclaw
\82Í
\83^
\83J
\82Ì
\91«
\82Ì
\82æ
\82¤
\82È
\82©
\82¬
\82Â
\82ß
\81C
2146 \82Ç
\82¿
\82ç
\82à
\93ú
\96{
\8cê
\82¶
\82á
\81u
\8eè
\81v
\82Å
\82¢
\82¢
\82Å
\82µ
\82å
\82¤
\81D
2148 /* some special cases */
2149 if (mptr->mlet == S_DOG || mptr->mlet == S_FELINE
2150 || mptr->mlet == S_RODENT || mptr == &mons[PM_OWLBEAR]) {
2160 return horse_parts[part]; /* "foreleg", "rear leg" */
2162 break; /* for other parts, use animal_parts[] below */
2164 } else if (mptr->mlet == S_YETI) { /* excl. owlbear due to 'if' above */
2165 /* opposable thumbs, hence "hands", "arms", "legs", &c */
2166 return humanoid_parts[part]; /* yeti/sasquatch, monkey/ape */
2168 if ((part == HAND || part == HANDED)
2169 && (humanoid(mptr) && attacktype(mptr, AT_CLAW)
2170 && !index(not_claws, mptr->mlet) && mptr != &mons[PM_STONE_GOLEM]
2171 && mptr != &mons[PM_INCUBUS] && mptr != &mons[PM_SUCCUBUS]))
2172 return (part == HAND) ? "claw" : "clawed";
2174 #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*/
2175 if ((mptr == &mons[PM_MUMAK] || mptr == &mons[PM_MASTODON])
2179 if (mptr == &mons[PM_SHARK] && part == HAIR)
2181 return "skin"; /* sharks don't have scales */
2183 return "
\93ª"; /* sharks don't have scales */
2185 if ((mptr == &mons[PM_JELLYFISH] || mptr == &mons[PM_KRAKEN])
2186 && (part == ARM || part == FINGER || part == HAND || part == FOOT
2192 if (mptr == &mons[PM_FLOATING_EYE] && part == EYE)
2196 return "
\8ap
\96\8c";
2197 if (humanoid(mptr) && (part == ARM || part == FINGER || part == FINGERTIP
2198 || part == HAND || part == HANDED))
2199 return humanoid_parts[part];
2200 if (mptr == &mons[PM_RAVEN])
2201 return bird_parts[part];
2202 if (mptr->mlet == S_CENTAUR || mptr->mlet == S_UNICORN
2203 || (mptr == &mons[PM_ROTHE] && part != HAIR))
2204 return horse_parts[part];
2205 if (mptr->mlet == S_LIGHT) {
2209 else if (part == ARM || part == FINGER || part == FINGERTIP
2215 if (part == HANDED || part == ARM || part == FINGER
2216 || part == FINGERTIP || part == HAND) {
2221 if (mptr == &mons[PM_STALKER] && part == HEAD)
2226 if (mptr->mlet == S_EEL && mptr != &mons[PM_JELLYFISH])
2227 return fish_parts[part];
2228 if (mptr->mlet == S_WORM)
2229 return worm_parts[part];
2230 if (slithy(mptr) || (mptr->mlet == S_DRAGON && part == HAIR))
2231 return snake_parts[part];
2232 if (mptr->mlet == S_EYE)
2233 return sphere_parts[part];
2234 if (mptr->mlet == S_JELLY || mptr->mlet == S_PUDDING
2235 || mptr->mlet == S_BLOB || mptr == &mons[PM_JELLYFISH])
2236 return jelly_parts[part];
2237 if (mptr->mlet == S_VORTEX || mptr->mlet == S_ELEMENTAL)
2238 return vortex_parts[part];
2239 if (mptr->mlet == S_FUNGUS)
2240 return fungus_parts[part];
2242 return humanoid_parts[part];
2243 return animal_parts[part];
2250 return mbodypart(&youmonst, part);
2256 /* Returns gender of polymorphed player;
2257 * 0/1=same meaning as flags.female, 2=none.
2259 if (is_neuter(youmonst.data) || !humanoid(youmonst.data))
2261 return flags.female;
2265 ugolemeffects(damtype, dam)
2270 /* We won't bother with "slow"/"haste" since players do not
2271 * have a monster-specific slow/haste so there is no way to
2272 * restore the old velocity once they are back to human.
2274 if (u.umonnum != PM_FLESH_GOLEM && u.umonnum != PM_IRON_GOLEM)
2278 if (u.umonnum == PM_FLESH_GOLEM)
2279 heal = (dam + 5) / 6; /* Approx 1 per die */
2282 if (u.umonnum == PM_IRON_GOLEM)
2286 if (heal && (u.mh < u.mhmax)) {
2292 pline("Strangely, you feel better than before.");
2294 pline("
\8aï
\96
\82È
\82±
\82Æ
\82É
\81C
\91O
\82æ
\82è
\8bC
\95ª
\82ª
\82æ
\82
\82È
\82Á
\82½
\81D");
2295 exercise(A_STR, TRUE);
2300 armor_to_dragon(atyp)
2304 case GRAY_DRAGON_SCALE_MAIL:
2305 case GRAY_DRAGON_SCALES:
2306 return PM_GRAY_DRAGON;
2307 case SILVER_DRAGON_SCALE_MAIL:
2308 case SILVER_DRAGON_SCALES:
2309 return PM_SILVER_DRAGON;
2310 #if 0 /* DEFERRED */
2311 case SHIMMERING_DRAGON_SCALE_MAIL:
2312 case SHIMMERING_DRAGON_SCALES:
2313 return PM_SHIMMERING_DRAGON;
2315 case RED_DRAGON_SCALE_MAIL:
2316 case RED_DRAGON_SCALES:
2317 return PM_RED_DRAGON;
2318 case ORANGE_DRAGON_SCALE_MAIL:
2319 case ORANGE_DRAGON_SCALES:
2320 return PM_ORANGE_DRAGON;
2321 case WHITE_DRAGON_SCALE_MAIL:
2322 case WHITE_DRAGON_SCALES:
2323 return PM_WHITE_DRAGON;
2324 case BLACK_DRAGON_SCALE_MAIL:
2325 case BLACK_DRAGON_SCALES:
2326 return PM_BLACK_DRAGON;
2327 case BLUE_DRAGON_SCALE_MAIL:
2328 case BLUE_DRAGON_SCALES:
2329 return PM_BLUE_DRAGON;
2330 case GREEN_DRAGON_SCALE_MAIL:
2331 case GREEN_DRAGON_SCALES:
2332 return PM_GREEN_DRAGON;
2333 case YELLOW_DRAGON_SCALE_MAIL:
2334 case YELLOW_DRAGON_SCALES:
2335 return PM_YELLOW_DRAGON;
2342 * Some species have awareness of other species
2346 struct permonst *mptr;
2350 context.warntype.speciesidx = 0;
2351 context.warntype.species = 0;
2352 context.warntype.polyd = 0;
2354 switch (monsndx(mptr)) {
2355 case PM_PURPLE_WORM:
2356 warnidx = PM_SHRIEKER;
2359 case PM_VAMPIRE_LORD:
2360 context.warntype.polyd = M2_HUMAN | M2_ELF;
2361 HWarn_of_mon |= FROMRACE;
2365 context.warntype.speciesidx = warnidx;
2366 context.warntype.species = &mons[warnidx];
2367 HWarn_of_mon |= FROMRACE;
2370 context.warntype.speciesidx = 0;
2371 context.warntype.species = 0;
2372 HWarn_of_mon &= ~FROMRACE;