Home | History | Annotate | Download | only in hack

Lines Matching refs:mtmp

77 mhitu(struct monst *mtmp)
79 const struct permonst *mdat = mtmp->data;
86 if (mtmp != u.ustuck) {
89 monnam(mtmp));
93 done_in_by(mtmp);
98 switch (mdat->mlet) { /* now mtmp == u.ustuck */
100 youswld(mtmp, (u.uac > 0) ? u.uac + 4 : 4,
104 youswld(mtmp, rnd(6), 7, "The lurker above");
107 youswld(mtmp, d(2, 4), 12, "The purple worm");
115 done_in_by(mtmp);
122 if (mdat->mlet == ';' && mtmp->minvis && cansee(mtmp->mx, mtmp->my)) {
123 mtmp->minvis = 0;
124 pmon(mtmp);
127 tmp = hitu(mtmp, d(mdat->damn, mdat->damd));
131 tmp += hitu(mtmp, d(mdat->damn, mdat->damd));
133 ctmp = tmp && !mtmp->mcan &&
137 if (wiz_hit(mtmp))
141 if (!mtmp->cham && !mtmp->mcan && !rn2(13)) {
144 (void) hitu(mtmp, d(2, 6));
145 (void) hitu(mtmp, d(2, 6));
146 (void) hitu(mtmp, rnd(3));
147 (void) hitu(mtmp, rnd(3));
148 (void) hitu(mtmp, rn1(4, 2));
153 justswld(mtmp, "The trapper");
157 justswld(mtmp, "The lurker above");
163 Monnam(mtmp));
164 u.ustuck = mtmp;
165 } else if (u.ustuck == mtmp &&
166 levl[mtmp->mx][mtmp->my].typ == POOL) {
167 pline("%s drowns you ...", Monnam(mtmp));
183 (void) hitu(mtmp, rnd(6));
187 pline("You hear %s's hissing!", monnam(mtmp));
192 /* done_in_by(mtmp); */
197 if (rn2(6) || mtmp->mcan) {
198 (void) hitu(mtmp, d(3, 10));
199 (void) hitu(mtmp, rnd(8));
200 (void) hitu(mtmp, rnd(8));
204 buzz(-1, mtmp->mx, mtmp->my, u.ux - mtmp->mx, u.uy - mtmp->my);
207 (void) hitu(mtmp, d(2, (flags.moonphase == FULL_MOON) ? 3 : 4));
210 (void) hitu(mtmp, d(3, 6));
213 if (mtmp->mcan)
227 losehp_m(d(dn, 6), mtmp);
229 mondead(mtmp);
245 tmp = hitu(mtmp, rnd(3));
246 tmp &= hitu(mtmp, rnd(3));
248 (void) hitu(mtmp, rnd(4));
249 (void) hitu(mtmp, rnd(4));
253 if ((hitu(mtmp, rnd(4)) || !rn2(3)) && ctmp) {
259 stealgold(mtmp);
262 if (mtmp->mcan && !Blind) {
264 Amonnam(mtmp, "plain"));
266 rloc(mtmp);
267 } else if (steal(mtmp)) {
268 rloc(mtmp);
269 mtmp->mflee = 1;
275 Monnam(mtmp));
283 rloc(mtmp);
285 (void) hitu(mtmp, d(2, 6));
286 (void) hitu(mtmp, d(2, 6));
290 tmp = hitu(mtmp, rnd(6));
291 if (hitu(mtmp, rnd(6)) && tmp && /* hits with both paws */
293 u.ustuck = mtmp;
296 } else if (u.ustuck == mtmp) {
303 justswld(mtmp, "The purple worm");
305 (void) hitu(mtmp, d(2, 4));
308 (void) hitu(mtmp, rnd(2));
309 (void) hitu(mtmp, rnd(2));
332 (void) hitu(mtmp, rnd(8));
333 (void) hitu(mtmp, rnd(8));
336 (void) hitu(mtmp, rnd(6));
337 (void) hitu(mtmp, rnd(6));
341 rloc(mtmp);
344 mtmp->mflee = 1;
347 (void) hitu(mtmp, d(3, 4));
348 (void) hitu(mtmp, d(3, 4));
352 u.ustuck = mtmp;
367 wormhit(mtmp);
371 (void) hitu(mtmp, rnd(5));
372 (void) hitu(mtmp, rnd(5));
373 (void) hitu(mtmp, rnd(5));
379 Monnam(mtmp), (side == RIGHT_SIDE) ? "right" : "left");
381 losehp_m(2, mtmp);
385 if (mtmp->mcan)
387 mondead(mtmp);
395 (void) hitu(mtmp, rnd(6));
399 done_in_by(mtmp);
404 hitu(struct monst *mtmp, int dam)
412 if (mtmp->mhide && mtmp->mundetected) {
413 mtmp->mundetected = 0;
416 if ((obj = o_at(mtmp->mx, mtmp->my)) != NULL)
418 Xmonnam(mtmp), doname(obj));
429 tmp += mtmp->data->mlevel;
432 if ((Invis && mtmp->data->mlet != 'I') || !mtmp->mcansee)
434 if (mtmp->mtrapped)
440 pline("%s misses.", Monnam(mtmp));
446 pline("%s hits!", Monnam(mtmp));
447 losehp_m(dam, mtmp);