1 /* SCCS Id: @(#)trap.h 3.4 2000/08/30 */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed. See license for details. */
5 /* note for 3.1.0 and later: no longer manipulated by 'makedefs' */
11 short v_launch_otyp; /* type of object to be triggered */
12 coord v_launch2; /* secondary launch point (for boulders) */
18 d_level dst; /* destination for portals */
23 Bitfield(madeby_u,1); /* So monsters may take offence when you trap
24 them. Recognizing who made the trap isn't
25 completely unreasonable, everybody has
26 their own style. This flag is also needed
27 when you untrap a monster. It would be too
28 easy to make a monster peaceful if you could
29 set a trap for it and then untrap it. */
31 #define launch_otyp vl.v_launch_otyp
32 #define launch2 vl.v_launch2
35 extern struct trap *ftrap;
36 #define newtrap() (struct trap *) alloc(sizeof(struct trap))
37 #define dealloc_trap(trap) free((genericptr_t) (trap))
39 /* reasons for statue animation */
40 #define ANIMATE_NORMAL 0
41 #define ANIMATE_SHATTER 1
42 #define ANIMATE_SPELL 2
44 /* reasons for animate_statue's failure */
45 #define AS_OK 0 /* didn't fail */
46 #define AS_NO_MON 1 /* makemon failed */
47 #define AS_MON_IS_UNIQUE 2 /* statue monster is unique */
49 /* Note: if adding/removing a trap, adjust trap_engravings[] in mklev.c */
51 /* unconditional traps */
59 #define ROLLING_BOULDER_TRAP 7
60 #define SLP_GAS_TRAP 8
68 #define LEVEL_TELEP 16
69 #define MAGIC_PORTAL 17
71 #define STATUE_TRAP 19