Lines Matching defs:trap
1 /* $NetBSD: hack.trap.c,v 1.10 2011/08/07 06:03:45 dholland Exp $ */
66 __RCSID("$NetBSD: hack.trap.c,v 1.10 2011/08/07 06:03:45 dholland Exp $");
77 " bear trap",
78 "n arrow trap",
79 " dart trap",
81 " teleportation trap",
83 " sleeping gas trap",
92 struct trap *
95 struct trap *ttmp;
109 dotrap(struct trap *trap)
111 int ttype = trap->ttyp;
114 if (trap->tseen && !rn2(5) && ttype != PIT)
117 trap->tseen = 1;
125 pline("You float over a bear trap.");
130 pline("A bear trap closes on your foot!");
133 deltrap(trap);
151 pline("A trap door in the ceiling opens and a rock falls on your head!");
164 pline("A trap door opens up under you!");
183 if (trap->once) {
184 deltrap(trap);
205 impossible("You hit a trap of type %u", trap->ttyp);
213 struct trap *trap = t_at(mtmp->mx, mtmp->my);
216 if (!trap) {
222 int tt = trap->ttyp;
226 /* he has been in such a trap - perhaps he escapes */
235 pline("%s is caught in a bear trap!",
283 pline("A trap door in the ceiling opens and a rock hits %s!", monnam(mtmp));
296 impossible("Some monster encountered a strange trap.");
330 struct trap *trap;
332 if ((trap = t_at(u.ux, u.uy)) != NULL)
333 switch (trap->ttyp) {
341 dotrap(trap);