Lines Matching defs:mtmp
85 struct monst *mtmp;
119 mtmp = newmonst(ptr->pxlth);
120 *mtmp = zeromonst; /* clear all entries in structure */
122 ((char *) &(mtmp->mextra[0]))[i] = 0;
123 mtmp->nmon = fmon;
124 fmon = mtmp;
125 mtmp->m_id = flags.ident++;
126 mtmp->data = ptr;
127 mtmp->mxlth = ptr->pxlth;
129 mtmp->mhpmax = mtmp->mhp = 80;
131 mtmp->mhpmax = mtmp->mhp = rnd(4);
133 mtmp->mhpmax = mtmp->mhp = d(ptr->mlevel, 8);
134 mtmp->mx = x;
135 mtmp->my = y;
136 mtmp->mcansee = 1;
138 mtmp->mimic = 1;
139 mtmp->mappearance = ']';
143 mnexto(mtmp);
145 rloc(mtmp);
148 mtmp->mhide = mtmp->mundetected = 1;
150 if (mtmp->mx && mtmp->my)
151 (void) mkobj_at(0, mtmp->mx, mtmp->my);
154 mtmp->cham = 1;
155 (void) newcham(mtmp, &mons[dlevel + 14 + rn2(CMNUM - 14 - dlevel)]);
158 mtmp->minvis = 1;
162 mtmp->msleep = 1;
165 if (ptr->mlet == 'w' && getwn(mtmp))
166 initworm(mtmp);
180 return (mtmp);
239 rloc(struct monst *mtmp)
242 char ch = mtmp->data->mlet;
245 if (ch == 'w' && mtmp->mx)
252 mtmp->mx = tx;
253 mtmp->my = ty;
254 if (u.ustuck == mtmp) {
262 pmon(mtmp);