00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00034 #ifndef ATTACK_H
00035 #define ATTACK_H
00036
00045 #define NROFATTACKS 26
00046 #define NROFATTACKMESS 21
00047 #define MAXATTACKMESS 21
00048
00049
00050
00051 #define ATM_ARROW 0
00052 #define ATM_DRAIN 1
00053 #define ATM_ELEC 2
00054 #define ATM_COLD 3
00055 #define ATM_FIRE 4
00056 #define ATM_BASIC 5
00057 #define ATM_KARATE 6
00058 #define ATM_CLAW 7
00059 #define ATM_PUNCH 8
00060 #define ATM_SLASH 9
00061 #define ATM_PIERCE 10
00062 #define ATM_CLEAVE 11
00063 #define ATM_SLICE 12
00064 #define ATM_STAB 13
00065 #define ATM_WHIP 14
00066 #define ATM_CRUSH 15
00067 #define ATM_BLUD 16
00068 #define ATM_DOOR 17
00069 #define ATM_SUFFER 18
00070 #define ATM_WRAITH_FEED 19
00071
00072
00073
00074
00075
00076
00077 #define ATNR_PHYSICAL 0
00078 #define ATNR_MAGIC 1
00079 #define ATNR_FIRE 2
00080 #define ATNR_ELECTRICITY 3
00081 #define ATNR_COLD 4
00082 #define ATNR_CONFUSION 5
00083 #define ATNR_ACID 6
00084 #define ATNR_DRAIN 7
00085 #define ATNR_WEAPONMAGIC 8
00086 #define ATNR_GHOSTHIT 9
00087 #define ATNR_POISON 10
00088 #define ATNR_SLOW 11
00089 #define ATNR_PARALYZE 12
00090 #define ATNR_TURN_UNDEAD 13
00091 #define ATNR_FEAR 14
00092 #define ATNR_CANCELLATION 15
00093 #define ATNR_DEPLETE 16
00094 #define ATNR_DEATH 17
00095 #define ATNR_CHAOS 18
00096 #define ATNR_COUNTERSPELL 19
00097 #define ATNR_GODPOWER 20
00098 #define ATNR_HOLYWORD 21
00099 #define ATNR_BLIND 22
00100 #define ATNR_INTERNAL 23
00101 #define ATNR_LIFE_STEALING 24
00102 #define ATNR_DISEASE 25
00103
00104 #define AT_PHYSICAL 0x00000001
00105 #define AT_MAGIC 0x00000002
00106 #define AT_FIRE 0x00000004
00107 #define AT_ELECTRICITY 0x00000008
00108 #define AT_COLD 0x00000010
00109 #define AT_CONFUSION 0x00000020
00110 #define AT_ACID 0x00000040
00111 #define AT_DRAIN 0x00000080
00112 #define AT_WEAPONMAGIC 0x00000100
00113 #define AT_GHOSTHIT 0x00000200
00114 #define AT_POISON 0x00000400
00115 #define AT_SLOW 0x00000800
00116 #define AT_PARALYZE 0x00001000
00117 #define AT_TURN_UNDEAD 0x00002000
00118 #define AT_FEAR 0x00004000
00119 #define AT_CANCELLATION 0x00008000
00120 #define AT_DEPLETE 0x00010000
00121 #define AT_DEATH 0x00020000
00122 #define AT_CHAOS 0x00040000
00123 #define AT_COUNTERSPELL 0x00080000
00124 #define AT_GODPOWER 0x00100000
00125 #define AT_HOLYWORD 0x00200000
00126 #define AT_BLIND 0x00400000
00127 #define AT_INTERNAL 0x00800000
00128 #define AT_LIFE_STEALING \
00129 0x01000000
00130 #define AT_DISEASE 0x02000000
00131
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00146 typedef struct attackmess {
00147 int level;
00148 char *buf1;
00149 char *buf2;
00150 char *buf3;
00151 } attackmess_t;
00152
00153 typedef struct {
00154 int attacktype;
00155 int face;
00156 } Chaos_Attacks;
00157
00158 EXTERN attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS];
00159
00160 #ifndef INIT_C
00161 EXTERN Chaos_Attacks ATTACKS[22];
00162 EXTERN int resist_table[];
00163 EXTERN const char *const change_resist_msg[NROFATTACKS];
00164 EXTERN const char *const resist_plus[NROFATTACKS];
00165 EXTERN const char *const attacktype_desc[NROFATTACKS];
00166 EXTERN const char *const resist_save[NROFATTACKS];
00167
00168
00169
00170
00171 #else
00172
00173 EXTERN const char *const resist_save[NROFATTACKS] = {
00174 "physical ", "magic ", "fire ", "electricity ", "cold ", "confusion ", "acid ",
00175 "drain ", "weaponmagic ", "ghosthit ", "poison ", "slow ", "paralyze ",
00176 "turn_undead ", "fear ", "cancellation ", "deplete ", "death ", "chaos ",
00177 "counterspell ", "godpower ", "holyword ", "blind ", "internal ", "life_stealing ",
00178 "disease "
00179 };
00180
00182 EXTERN const char *const attacktype_desc[NROFATTACKS] = {
00183 "physical", "magic", "fire", "electricity", "cold", "confusion", "acid",
00184 "drain", "weapon magic", "ghost hit", "poison", "slow", "paralyze",
00185 "turn undead", "fear", "cancellation", "deplete", "death", "chaos",
00186 "counterspell", "god power", "holy word", "blind", "internal", "life stealing",
00187 "disease"
00188 };
00189
00191 EXTERN const char *const resist_plus[NROFATTACKS] = {
00192 "armour", "resist magic", "resist fire", "resist electricity", "resist cold",
00193 "resist confusion", "resist acid", "resist drain",
00194 "resist weaponmagic", "resist ghosthit", "resist poison", "resist slow",
00195 "resist paralyzation", "resist turn undead", "resist fear",
00196 "resist cancellation", "resist depletion", "resist death", "resist chaos",
00197 "resist counterspell", "resist god power", "resist holy word",
00198 "resist blindness", "resist internal", "resist life stealing",
00199 "resist diseases"
00200 };
00201
00206 EXTERN const char *const change_resist_msg[NROFATTACKS] = {
00207 "physical", "magic", "fire", "electricity", "cold", "confusion", "acid",
00208 "draining", "weapon magic", "ghosts", "poison", "slow", "paralyze",
00209 "turn undead", "fear", "cancellation", "depletion", "death attacks", "chaos",
00210 "counterspell", "god power", "holy word", "blinding attacks", "internal",
00211 "life stealing", "disease"
00212 };
00213
00214
00220 EXTERN int resist_table[] = {
00221 ATNR_PHYSICAL, ATNR_MAGIC, ATNR_FIRE,
00222 ATNR_ELECTRICITY, ATNR_COLD, ATNR_CONFUSION, ATNR_ACID, ATNR_DRAIN,
00223 ATNR_GHOSTHIT, ATNR_POISON, ATNR_SLOW, ATNR_PARALYZE, ATNR_TURN_UNDEAD,
00224 ATNR_FEAR, ATNR_DEPLETE, ATNR_DEATH, ATNR_HOLYWORD, ATNR_BLIND,
00225 ATNR_LIFE_STEALING, ATNR_DISEASE
00226 };
00227
00228
00230 EXTERN Chaos_Attacks ATTACKS[22] = {
00231 { AT_PHYSICAL, 0 },
00232 { AT_PHYSICAL, 0 },
00233 { AT_PHYSICAL, 0 },
00234 { AT_MAGIC, 1 },
00235 { AT_MAGIC, 1 },
00236 { AT_MAGIC, 1 },
00237 { AT_FIRE, 2 },
00238 { AT_FIRE, 2 },
00239 { AT_FIRE, 2 },
00240 { AT_ELECTRICITY, 3 },
00241 { AT_ELECTRICITY, 3 },
00242 { AT_ELECTRICITY, 3 },
00243 { AT_COLD, 4 },
00244 { AT_COLD, 4 },
00245 { AT_COLD, 4 },
00246 { AT_CONFUSION, 5 },
00247 { AT_POISON, 7 },
00248 { AT_POISON, 7 },
00249 { AT_POISON, 7 },
00250 { AT_SLOW, 8 },
00251 { AT_PARALYZE, 9 },
00252 { AT_FEAR, 10 }
00253 };
00254
00255 #endif
00256
00257 #define num_resist_table 19
00258
00259 #endif