--- deliantra/server/common/exp.C 2009/10/12 14:00:57 1.20 +++ deliantra/server/common/exp.C 2009/11/06 13:03:34 1.23 @@ -27,7 +27,7 @@ sint64 *levels; -float exp_att_mult[NROFATTACKS + 2] = { +static float exp_att_mult[NROFATTACKS + 2] = { 0.0, /* AT_PHYSICAL */ 0.0, /* AT_MAGIC */ 0.0, /* AT_FIRE */ @@ -50,7 +50,7 @@ 0.0 /* AT_COUNTERSPELL */ }; -float exp_prot_mult[NROFATTACKS + 2] = { +static float exp_prot_mult[NROFATTACKS + 2] = { 0.4, /* AT_PHYSICAL */ 0.5, /* AT_MAGIC */ 0.1, /* AT_FIRE */ @@ -74,6 +74,20 @@ }; /* + * Returns true if the monster specified has any innate abilities. + */ +static int +has_ability (const object *ob) +{ + object *tmp; + + for (tmp = ob->inv; tmp != NULL; tmp = tmp->below) + if (tmp->type == SPELL || tmp->type == SPELLBOOK) + return true; + return false; +} + +/* * new_exp() is an alternative way to calculate experience based * on the ability of a monster. * It's far from perfect, and doesn't consider everything which @@ -122,21 +136,6 @@ return (int) exp; } -/* - * Returns true if the monster specified has any innate abilities. - */ - -int -has_ability (const object *ob) -{ - object *tmp; - - for (tmp = ob->inv; tmp != NULL; tmp = tmp->below) - if (tmp->type == SPELL || tmp->type == SPELLBOOK) - return true; - return false; -} - /* This loads the experience table from the exp_table * file. This tends to exit on any errors, since it * populates the table as it goes along, so if there