1 /* NetHack 3.6 trap.h $NHDT-Date: 1432512776 2015/05/25 00:12:56 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
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) */
13 uchar v_conjoined
; /* conjoined pit locations */
14 short v_tnote
; /* boards: 12 notes */
20 d_level dst
; /* destination for portals */
25 Bitfield(madeby_u
, 1); /* So monsters may take offence when you trap
26 them. Recognizing who made the trap isn't
27 completely unreasonable, everybody has
28 their own style. This flag is also needed
29 when you untrap a monster. It would be too
30 easy to make a monster peaceful if you could
31 set a trap for it and then untrap it. */
33 #define launch_otyp vl.v_launch_otyp
34 #define launch2 vl.v_launch2
35 #define conjoined vl.v_conjoined
36 #define tnote vl.v_tnote
39 extern struct trap
*ftrap
;
40 #define newtrap() (struct trap *) alloc(sizeof(struct trap))
41 #define dealloc_trap(trap) free((genericptr_t)(trap))
43 /* reasons for statue animation */
44 #define ANIMATE_NORMAL 0
45 #define ANIMATE_SHATTER 1
46 #define ANIMATE_SPELL 2
48 /* reasons for animate_statue's failure */
49 #define AS_OK 0 /* didn't fail */
50 #define AS_NO_MON 1 /* makemon failed */
51 #define AS_MON_IS_UNIQUE 2 /* statue monster is unique */
53 /* Note: if adding/removing a trap, adjust trap_engravings[] in mklev.c */
55 /* unconditional traps */
63 #define ROLLING_BOULDER_TRAP 7
64 #define SLP_GAS_TRAP 8
72 #define LEVEL_TELEP 16
73 #define MAGIC_PORTAL 17
75 #define STATUE_TRAP 19
79 #define VIBRATING_SQUARE 23