ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/attack.h
Revision: 1.16
Committed: Thu Nov 8 19:43:24 2007 UTC (16 years, 6 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-2_4, rel-2_5, rel-2_52, rel-2_53, rel-2_32, rel-2_43, rel-2_42, rel-2_41
Changes since 1.15: +4 -4 lines
Log Message:
update copyrights and other minor stuff to deliantra

File Contents

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