105 double att_mult, prot_mult, spec_mult;
110 att_mult = prot_mult = spec_mult = 1.0;
137 exp *= att_mult*prot_mult*spec_mult;
154 for (tmp = ob->
inv; tmp != NULL; tmp = tmp->
below)
172 int lastlevel = 0, comp;
173 sint64 lastexp = -1, tmpexp;
179 LOG(
llevError,
"Fatal error: could not open experience table (%s)\n", buf);
182 while (fgets(buf,
MAX_BUF-1, fp) != NULL) {
187 if ((cp = strrchr(buf,
'\n')) != NULL)
194 while (isspace(*cp) && *cp != 0)
198 LOG(
llevDebug,
"Got more than one max_level value from exp_table file?\n");
203 LOG(
llevDebug,
"Got invalid max_level from exp_table file? %s\n", buf);
208 while (isdigit(*cp) && *cp != 0) {
210 LOG(
llevError,
"max_level is not set in exp_table file. Did you remember to update it?\n");
218 if (tmpexp <= lastexp) {
220 LOG(
llevError,
"Experience for level %d is lower than previous level (%lld <= %lld)\n", lastlevel+1, tmpexp, lastexp);
222 LOG(
llevError,
"Experience for level %d is lower than previous level (%I64d <= %I64d)\n", lastlevel+1, tmpexp, lastexp);
231 levels[lastlevel] = tmpexp;
236 while (isdigit(*cp) && *cp != 0)
238 while (!isdigit(*cp) && *cp != 0)
int has_ability(const object *ob)
void close_and_delete(FILE *fp, int compressed)
void dump_experience(void)
void init_experience(void)
#define FLAG_SEE_INVISIBLE
void free_experience(void)
sint64 new_exp(const object *ob)
#define QUERY_FLAG(xyz, p)
int strncasecmp(const char *s1, const char *s2, int n)
sint16 resist[NROFATTACKS]
int snprintf(char *dest, int max, const char *format,...)
static const float exp_att_mult[NROFATTACKS+2]
void LOG(LogLevel logLevel, const char *format,...)
#define FREE_AND_CLEAR(xyz)
#define FLAG_REFL_MISSILE
FILE * open_and_uncompress(const char *name, int flag, int *compressed)
static const float exp_prot_mult[NROFATTACKS+2]