--- deliantra/server/include/attack.h 2006/08/29 08:01:36 1.3 +++ deliantra/server/include/attack.h 2006/08/31 17:54:14 1.4 @@ -1,9 +1,4 @@ /* - * static char *rcsid_attack_h = - * "$Id$"; - */ - -/* CrossFire, A Multiplayer game for X-windows Copyright (C) 2002 Mark Wedel & Crossfire Development Team @@ -151,27 +146,17 @@ EXTERN attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; -#ifndef INIT_C -EXTERN int resist_table[]; -EXTERN char *change_resist_msg[NROFATTACKS]; -EXTERN char *resist_plus[NROFATTACKS]; -EXTERN char *attacktype_desc[NROFATTACKS]; -EXTERN char *resist_save[NROFATTACKS]; +#ifdef INIT_C -/* Beware, names require an _ if there is a space, else they will be read - * as for example: resist_life stealing 50! - */ -#else -EXTERN const char* resist_save[NROFATTACKS] = { -"physical ", "magic ", "fire ", "electricity ", "cold ", "confusion ", "acid ", -"drain ", "weaponmagic ", "ghosthit ", "poison ", "slow ", "paralyze ", -"turn_undead ", "fear ", "cancellation ", "deplete ", "death ", "chaos ", -"counterspell ", "godpower ", "holyword ", "blind " , "internal ", "life_stealing ", -"disease " +extern const keyword resist_save[NROFATTACKS] = { +KW_resist_physical, KW_resist_magic, KW_resist_fire, KW_resist_electricity, KW_resist_cold, KW_resist_confusion, KW_resist_acid, +KW_resist_drain, KW_resist_weaponmagic, KW_resist_ghosthit, KW_resist_poison, KW_resist_slow, KW_resist_paralyze, +KW_resist_turn_undead, KW_resist_fear, KW_resist_cancellation, KW_resist_deplete, KW_resist_death, KW_resist_chaos, +KW_resist_counterspell, KW_resist_godpower, KW_resist_holyword, KW_resist_blind , KW_resist_internal, KW_resist_life_stealing, +KW_resist_disease, }; -/* Short description of names of the attacktypes */ -EXTERN const char* attacktype_desc[NROFATTACKS] = { +extern const char* const attacktype_desc[NROFATTACKS] = { "physical", "magic", "fire", "electricity", "cold", "confusion", "acid", "drain", "weapon magic", "ghost hit", "poison", "slow", "paralyze", "turn undead", "fear", "cancellation", "deplete", "death", "chaos", @@ -179,9 +164,7 @@ "disease" }; -/* This is the array that is what the player sees. */ - -EXTERN const char* resist_plus[NROFATTACKS] = { +extern const char* const resist_plus[NROFATTACKS] = { "armour", "resist magic", "resist fire", "resist electricity", "resist cold", "resist confusion", "resist acid", "resist drain", "resist weaponmagic", "resist ghosthit", "resist poison", "resist slow", @@ -192,10 +175,7 @@ "resist diseases" }; -/* These are the descriptions of the resistances displayed when a - * player puts on/takes off an item. See change_abil() in living.c. - */ -EXTERN const char* change_resist_msg[NROFATTACKS] = { +extern const char* const change_resist_msg[NROFATTACKS] = { "physical", "magic", "fire", "electricity", "cold", "confusion", "acid", "draining", "weapon magic", "ghosts", "poison", "slow", "paralyze", "turn undead", "fear", "cancellation", "depletion", "death attacks", "chaos", @@ -203,16 +183,32 @@ "life stealing", "disease" }; +extern int resist_table[NROFATTACKS] = {ATNR_PHYSICAL, ATNR_MAGIC, ATNR_FIRE, + ATNR_ELECTRICITY,ATNR_COLD, ATNR_CONFUSION, ATNR_ACID, ATNR_DRAIN, + ATNR_GHOSTHIT, ATNR_POISON, ATNR_SLOW, ATNR_PARALYZE, ATNR_TURN_UNDEAD, + ATNR_FEAR, ATNR_DEPLETE, ATNR_DEATH, ATNR_HOLYWORD, ATNR_BLIND, + ATNR_LIFE_STEALING, ATNR_DISEASE}; + +#else + +extern const keyword resist_save[NROFATTACKS]; + +/* Short description of names of the attacktypes */ +extern const char* const attacktype_desc[NROFATTACKS]; + +/* This is the array that is what the player sees. */ +extern const char* const resist_plus[NROFATTACKS]; + +/* These are the descriptions of the resistances displayed when a + * player puts on/takes off an item. See change_abil() in living.c. + */ +extern const char* const change_resist_msg[NROFATTACKS]; /* If you want to weight things so certain resistances show up more often than * others, just add more entries in the table for the protections you want to * show up. */ -EXTERN int resist_table[] = {ATNR_PHYSICAL, ATNR_MAGIC, ATNR_FIRE, - ATNR_ELECTRICITY,ATNR_COLD, ATNR_CONFUSION, ATNR_ACID, ATNR_DRAIN, - ATNR_GHOSTHIT, ATNR_POISON, ATNR_SLOW, ATNR_PARALYZE, ATNR_TURN_UNDEAD, - ATNR_FEAR, ATNR_DEPLETE, ATNR_DEATH, ATNR_HOLYWORD, ATNR_BLIND, - ATNR_LIFE_STEALING, ATNR_DISEASE}; +extern int resist_table[NROFATTACKS]; #endif