OSDN Git Service

日本語版
[nazghul-jp/nazghul-jp.git] / src / dup_constants.h
1 //
2 // nazghul - an old-school RPG engine
3 // Copyright (C) 2002, 2003 Gordon McNutt
4 //
5 // This program is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free
7 // Software Foundation; either version 2 of the License, or (at your option)
8 // any later version.
9 //
10 // This program is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13 // more details.
14 //
15 // You should have received a copy of the GNU General Public License along with
16 // this program; if not, write to the Free Foundation, Inc., 59 Temple Place,
17 // Suite 330, Boston, MA 02111-1307 USA
18 //
19 // Gordon McNutt
20 // gmcnutt@users.sourceforge.net
21 //
22 #ifndef dup_constants_h
23 #define dup_constants_h
24
25 // This section defines the mechanism events reserved by the game engine.
26 #define MECH_ATTACK       1
27 #define MECH_STEP         2
28 #define MECH_HANDLE       3
29 #define MECH_OPEN         4
30 #define MECH_CLOSE        5
31 #define MECH_LOCK         6
32 #define MECH_UNLOCK       7
33 #define MECH_MAGIC_LOCK   8
34 #define MECH_MAGIC_UNLOCK 9
35 #define MECH_TURN         10
36 #define MECH_FULL_MOON    11
37
38 // This value marks the beginning of the unreserved events. A game script can
39 // define its own events and number them starting from here.
40 #define MECH_FIRST_UNRESERVED_EVENT 100
41
42 /* Effects */
43 // gmcnutt: EFFECT_NATURAL was bit 30, and is intended to be used for natural
44 // abilities (like snakes spitting venom) so that they will not be affected by
45 // negate magic. But I ran into a problem: I needed to add EFFECT_RESTORE for
46 // mana restoration potions, but I found that using a constant with bit 31 set
47 // did not work out right. The parser uses atol(), which sees the high bit set
48 // and I think assumes it's an overflow, so it converts the value to LONG_MAX,
49 // which isn't what we intended. Since I'm basically out of bits something had
50 // to give, and I sacrificed EFFECT_NATURAL for EFFECT_RESTORE.
51 //
52 // During the 0.3.x development line we'll address this issue. A simple thing
53 // to do would be to start using multi-byte bitmaps and fix the parser. But the
54 // new effect system may make this a non-issue anyway, so let's wait and see.
55 //
56 #define EFFECT_NATURAL      0
57 #define EFFECT_NONE         0
58 #define EFFECT_POISON       1   /* 0 */
59 #define EFFECT_BURN         2   /* 1 */
60 #define EFFECT_SLEEP        4   /* 2 */
61 #define EFFECT_LIGHT        8   /* 3 */
62 #define EFFECT_CURE         16  /* 4 */
63 #define EFFECT_HEAL         32  /* 5 */
64 #define EFFECT_AWAKEN       64  /* 6 */
65 #define EFFECT_CHARM        128 /* 7 */
66 #define EFFECT_DAMAGE       256 /* 8 */
67 #define EFFECT_UNLOCK       512 /* 9 */
68 #define EFFECT_REPEL        1024        /* 10 */
69 #define EFFECT_LOCATE       2048        /* 11 */
70 #define EFFECT_SUMMON       4096        /* 12 */
71 #define EFFECT_WIND_CHANGE  8192        /* 13 */
72 #define EFFECT_TELEPORT     16384       /* 14 */
73 #define EFFECT_DESTROY      32768       /* 15 */
74 #define EFFECT_ARMOUR       65536       /* 16 */
75 #define EFFECT_REVEAL       131072      /* 17 */
76 #define EFFECT_QUICK        262144      /* 18 */
77 #define EFFECT_NEGATE       524288      /* 19 */
78 #define EFFECT_TREMOR       1048576     /* 20 */
79 #define EFFECT_CONFUSE      2097152     /* 21 */
80 #define EFFECT_SHOW_TERRAIN 4194304     /* 22 */
81 #define EFFECT_WIND         8388608     /* 23 */
82 #define EFFECT_PEER         16777216    /* 24 */
83 #define EFFECT_CLONE        33554432    /* 25 */
84 #define EFFECT_INVISIBLE    67108864    /* 26 */
85 #define EFFECT_TIME_STOP    134217728   /* 27 */
86 #define EFFECT_RESURRECT    268435456   /* 28 */
87 #define EFFECT_GATE_TRAVEL  536870912   /* 29 */
88 #define EFFECT_RESTORE      1073741824  /* 30 */
89 // WARNING: bit 31 will not work as intended! We are out of bits!
90
91 #endif