ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/attack.h
Revision: 1.14
Committed: Mon May 28 21:15:56 2007 UTC (17 years ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.13: +17 -17 lines
Log Message:
- update copyrights in .h files, where applicable
- rename preprocess to genkeywords

File Contents

# Content
1 /*
2 * This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game.
3 *
4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 *
8 * Crossfire TRT is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51
20 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 *
22 * The authors can be reached via e-mail to <crossfire@schmorp.de>
23 */
24
25 #ifndef ATTACK_H
26 #define ATTACK_H
27
28 /*
29 * Attacktypes:
30 * ATNR_... is the attack number that is indexed into the
31 * the resist array in the object structure.
32 */
33
34 #define NROFATTACKMESS 20
35 #define MAXATTACKMESS 20
36
37 /* attack message numbers must be less than NROFATTACKMESS */
38
39 #define ATM_ARROW 0
40 #define ATM_DRAIN 1
41 #define ATM_ELEC 2
42 #define ATM_COLD 3
43 #define ATM_FIRE 4
44 #define ATM_BASIC 5
45 #define ATM_KARATE 6
46 #define ATM_CLAW 7
47 #define ATM_PUNCH 8
48 #define ATM_SLASH 9
49 #define ATM_PIERCE 10
50 #define ATM_CLEAVE 11
51 #define ATM_SLICE 12
52 #define ATM_STAB 13
53 #define ATM_WHIP 14
54 #define ATM_CRUSH 15
55 #define ATM_BLUD 16
56 #define ATM_DOOR 17
57 #define ATM_SUFFER 18
58
59 /* attack messages structure */
60 typedef struct attackmess {
61 int level;
62 char *buf1;
63 char *buf2;
64 char *buf3;
65 } attackmess_t;
66
67 EXTERN attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS];
68
69 enum {
70 # define def(uc, lc, name, plus, change) ATNR_ ## uc,
71 # include "attackinc.h"
72 # undef def
73 NROFATTACKS
74 };
75
76 enum {
77 # define def(uc, lc, name, plus, change) AT_ ## uc = 1UL << ATNR_ ## uc,
78 # include "attackinc.h"
79 # undef def
80 };
81
82 /* Short description of names of the attacktypes */
83 extern const char* const attacktype_desc[NROFATTACKS];
84
85 /* Note that internal should not ever be referenced in the last two
86 * tables. however, other resisttypes may be added, and if through some
87 * bug these do get used somehow, might as well make it more easier to notice
88 * and not have mystery values appear.
89 */
90
91 /* This is the array that is what the player sees. */
92 extern const char* const resist_plus[NROFATTACKS];
93
94 /* These are the descriptions of the resistances displayed when a
95 * player puts on/takes off an item. See change_abil() in living.c.
96 */
97 extern const char* const change_resist_msg[NROFATTACKS];
98
99 /* If you want to weight things so certain resistances show up more often than
100 * others, just add more entries in the table for the protections you want to
101 * show up.
102 */
103 extern int resist_table[NROFATTACKS];
104
105 #define num_resist_table 19
106
107 #endif
108