ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/attack.h
Revision: 1.27
Committed: Sat Nov 17 23:40:00 2018 UTC (5 years, 6 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.26: +1 -0 lines
Log Message:
copyright update 2018

File Contents

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