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.24 |
* Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 |
root |
1.19 |
* Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 |
|
|
* Copyright (©) 1992 Frank Tore Johansen |
7 |
root |
1.25 |
* |
8 |
root |
1.18 |
* Deliantra is free software: you can redistribute it and/or modify it under |
9 |
|
|
* the terms of the Affero GNU General Public License as published by the |
10 |
|
|
* Free Software Foundation, either version 3 of the License, or (at your |
11 |
|
|
* option) any later version. |
12 |
root |
1.25 |
* |
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 |
root |
1.25 |
* |
18 |
root |
1.18 |
* You should have received a copy of the Affero GNU General Public License |
19 |
|
|
* and the GNU General Public License along with this program. If not, see |
20 |
|
|
* <http://www.gnu.org/licenses/>. |
21 |
root |
1.25 |
* |
22 |
root |
1.16 |
* The authors can be reached via e-mail to <support@deliantra.net> |
23 |
pippijn |
1.13 |
*/ |
24 |
root |
1.1 |
|
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 |
root |
1.21 |
enum |
70 |
|
|
{ |
71 |
root |
1.7 |
# define def(uc, lc, name, plus, change) ATNR_ ## uc, |
72 |
root |
1.6 |
# include "attackinc.h" |
73 |
|
|
# undef def |
74 |
|
|
NROFATTACKS |
75 |
root |
1.1 |
}; |
76 |
|
|
|
77 |
root |
1.21 |
enum |
78 |
|
|
{ |
79 |
root |
1.7 |
# define def(uc, lc, name, plus, change) AT_ ## uc = 1UL << ATNR_ ## uc, |
80 |
root |
1.6 |
# include "attackinc.h" |
81 |
|
|
# undef def |
82 |
root |
1.1 |
}; |
83 |
|
|
|
84 |
root |
1.22 |
/* lowercase attacktype identifiers */ |
85 |
|
|
extern const char* const attacktype_name[NROFATTACKS]; |
86 |
|
|
|
87 |
|
|
/* short description of names of the attacktypes */ |
88 |
root |
1.6 |
extern const char* const attacktype_desc[NROFATTACKS]; |
89 |
root |
1.4 |
|
90 |
root |
1.6 |
/* Note that internal should not ever be referenced in the last two |
91 |
|
|
* tables. however, other resisttypes may be added, and if through some |
92 |
|
|
* bug these do get used somehow, might as well make it more easier to notice |
93 |
|
|
* and not have mystery values appear. |
94 |
|
|
*/ |
95 |
root |
1.4 |
|
96 |
|
|
/* This is the array that is what the player sees. */ |
97 |
|
|
extern const char* const resist_plus[NROFATTACKS]; |
98 |
|
|
|
99 |
|
|
/* These are the descriptions of the resistances displayed when a |
100 |
|
|
* player puts on/takes off an item. See change_abil() in living.c. |
101 |
|
|
*/ |
102 |
|
|
extern const char* const change_resist_msg[NROFATTACKS]; |
103 |
root |
1.1 |
|
104 |
|
|
/* If you want to weight things so certain resistances show up more often than |
105 |
|
|
* others, just add more entries in the table for the protections you want to |
106 |
|
|
* show up. |
107 |
|
|
*/ |
108 |
root |
1.4 |
extern int resist_table[NROFATTACKS]; |
109 |
root |
1.1 |
|
110 |
|
|
#define num_resist_table 19 |
111 |
|
|
|
112 |
|
|
#endif |
113 |
root |
1.6 |
|