1 /* NetHack 3.6 were.c $NHDT-Date: 1432512763 2015/05/25 00:12:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed. See license for details. */
9 register struct monst *mon;
11 if (!is_were(mon->data))
14 if (is_human(mon->data)) {
15 if (!Protection_from_shape_changers
16 && !rn2(night() ? (flags.moonphase == FULL_MOON ? 3 : 30)
17 : (flags.moonphase == FULL_MOON ? 10 : 50))) {
18 new_were(mon); /* change into animal form */
19 if (!Deaf && !canseemon(mon)) {
22 switch (monsndx(mon->data)) {
33 howler = "
\83W
\83\83\83b
\83J
\83\8b";
41 You_hear("a %s howling at the moon.", howler);
43 You_hear("
\8c\8e\96é
\82É%s
\82ª
\96i
\82¦
\82é
\90º
\82ð
\95·
\82¢
\82½
\81D", howler);
46 } else if (!rn2(30) || Protection_from_shape_changers) {
47 new_were(mon); /* change back into human form */
57 return (PM_HUMAN_WEREWOLF);
58 case PM_HUMAN_WEREWOLF:
61 return (PM_HUMAN_WEREJACKAL);
62 case PM_HUMAN_WEREJACKAL:
63 return (PM_WEREJACKAL);
65 return (PM_HUMAN_WERERAT);
66 case PM_HUMAN_WERERAT:
73 /* convert monsters similar to werecritters into appropriate werebeast */
102 register struct monst *mon;
106 pm = counter_were(monsndx(mon->data));
108 impossible("unknown lycanthrope %s.", mon->data->mname);
112 if (canseemon(mon) && !Hallucination)
114 pline("%s changes into a %s.", Monnam(mon),
115 is_human(&mons[pm]) ? "human" : mons[pm].mname + 4);
117 pline("%s
\82Í%s
\82Ì
\8ep
\82É
\82È
\82Á
\82½
\81D", Monnam(mon),
118 is_human(&mons[pm]) ? "
\90l
\8aÔ" : mons[pm].mname + 4);
121 set_mon_data(mon, &mons[pm], 0);
122 if (mon->msleeping || !mon->mcanmove) {
123 /* transformation wakens and/or revitalizes */
125 mon->mfrozen = 0; /* not asleep or paralyzed */
128 /* regenerate by 1/4 of the lost hit points */
129 mon->mhp += (mon->mhpmax - mon->mhp) / 4;
130 newsym(mon->mx, mon->my);
131 mon_break_armor(mon, FALSE);
132 possibly_unwield(mon, FALSE);
135 int were_summon(ptr, yours, visible,
136 genbuf) /* were-creature (even you) summons a horde */
137 register struct permonst *ptr;
138 register boolean yours;
139 int *visible; /* number of visible helpers created */
142 register int i, typ, pm = monsndx(ptr);
143 register struct monst *mtmp;
147 if (Protection_from_shape_changers && !yours)
149 for (i = rnd(5); i > 0; i--) {
152 case PM_HUMAN_WERERAT:
154 rn2(3) ? PM_SEWER_RAT : rn2(3) ? PM_GIANT_RAT : PM_RABID_RAT;
157 Strcpy(genbuf, "rat");
159 Strcpy(genbuf, "
\83l
\83Y
\83~");
162 case PM_HUMAN_WEREJACKAL:
166 Strcpy(genbuf, "jackal");
168 Strcpy(genbuf, "
\83W
\83\83\83b
\83J
\83\8b");
171 case PM_HUMAN_WEREWOLF:
172 typ = rn2(5) ? PM_WOLF : PM_WINTER_WOLF;
175 Strcpy(genbuf, "wolf");
177 Strcpy(genbuf, "
\98T");
182 mtmp = makemon(&mons[typ], u.ux, u.uy, NO_MM_FLAGS);
189 (void) tamedog(mtmp, (struct obj *) 0);
198 boolean controllable_poly = Polymorph_control && !(Stunned || Unaware);
200 if (Unchanging || (u.umonnum == u.ulycn))
202 if (controllable_poly) {
204 /* `+4' => skip "were" prefix to get name of beast */
205 Sprintf(qbuf, "Do you want to change into %s?",
206 an(mons[u.ulycn].mname + 4));
207 #else /*JP:
\93ú
\96{
\8cê
\82Å
\82Í
\82»
\82±
\82Ü
\82Å
\82µ
\82È
\82¢ */
208 Sprintf(qbuf,"%s
\82É
\95Ï
\89»
\82µ
\82Ü
\82·
\82©
\81H",
209 mons[u.ulycn].mname + 4);
214 (void) polymon(u.ulycn);
221 boolean controllable_poly = Polymorph_control && !(Stunned || Unaware);
225 You_feel("purified.");
227 You("
\8fò
\82ß
\82ç
\82ê
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D");
228 u.ulycn = NON_PM; /* cure lycanthropy */
230 if (!Unchanging && is_were(youmonst.data)
232 && (!controllable_poly || yn("Remain in beast form?") == 'n'))
234 && (!controllable_poly || yn("
\8fb
\82Ì
\8ep
\82Ì
\82Ü
\82Ü
\82Å
\82¢
\82é
\81H") == 'n'))