Go to the documentation of this file.
59 LOG(
llevError,
"ERROR: Tried to add null god to list!\n");
110 LOG(
llevError,
"get_rand_god(): can't find a random god!\n");
123 if (godlnk && godlnk->
arch)
137 int hassomething = 0, real = 0;
194 int has_effect = 0, tmpvar;
201 if (god->
resist[tmpvar] == 100) {
271 stringbuffer_append_printf(add,
"%s has a potent aura which is extended to faithful priests. The effects of this aura include:\n%s\n ---\n",
name, cp);
325 if (hassomething == 0) {
340 for (god =
first_god; god; god = godnext) {
349 #define DESCRIBE_ABILITY(retbuf, variable, name) \
352 strcat(retbuf, "(" name ": "); \
353 for (i = 0; i < NROFATTACKS; i++) \
354 if (variable&(1<<i)) { \
356 strcat(retbuf, ", "); \
359 strcat(retbuf, attacks[i]); \
361 strcat(retbuf, ")"); \
364 #define DESCRIBE_PATH(retbuf, variable, name) \
367 strcat(retbuf, "(" name ": "); \
368 for (i = 0; i < NRSPELLPATHS; i++) \
369 if (variable&(1<<i)) { \
371 strcat(retbuf, ", "); \
374 strcat(retbuf, spellpathnames[i]); \
376 strcat(retbuf, ")"); \
388 fprintf(stderr,
"\n");
392 int tmpvar, gifts = 0;
394 fprintf(stderr,
"GOD: %s\n", god->
name);
395 fprintf(stderr,
" avatar stats:\n");
397 fprintf(stderr,
" lvl:%d speed:%4.2f\n", god->
level, god->
speed);
399 fprintf(stderr,
" enemy: %s\n", god->
title ? god->
title :
"NONE");
404 fprintf(stderr,
" lvl:%d speed:%4.2f\n", serv->
level, serv->
speed);
407 fprintf(stderr,
" servant: NONE\n");
408 fprintf(stderr,
" aligned_race(s): %s\n", god->
race);
409 fprintf(stderr,
" enemy_race(s): %s\n", (god->
slaying ? god->
slaying :
"none"));
411 fprintf(stderr,
"%s",
final);
413 snprintf(tmpbuf,
sizeof(tmpbuf),
" attacktype:");
415 strcat(tmpbuf,
"\n ");
418 strcat(tmpbuf,
"\n aura:");
420 strcat(tmpbuf,
"\n paths:");
422 strcat(tmpbuf,
"\n ");
426 strcat(tmpbuf,
"\n ");
430 strcat(tmpbuf,
"\n ");
433 fprintf(stderr,
"%s\n", tmpbuf);
434 fprintf(stderr,
" Desc: %s", god->
msg ? god->
msg :
"---\n");
435 fprintf(stderr,
" Priest gifts/limitations: ");
446 if (god->
last_heal) { gifts = 1; fprintf(stderr,
"\n hp regenerate at %d", god->
last_heal); }
447 if (god->
last_sp) { gifts = 1; fprintf(stderr,
"\n sp regenerate at %d", god->
last_sp); }
448 if (god->
last_eat) { gifts = 1; fprintf(stderr,
"\n digestion is %s (%d)", god->
last_eat < 0 ?
"slowed" :
"faster", god->
last_eat); }
449 if (god->
last_grace) { gifts = 1; fprintf(stderr,
"\n grace regenerates at %d", god->
last_grace); }
450 if (god->
stats.
luck) { gifts = 1; fprintf(stderr,
"\n luck is %d", god->
stats.
luck); }
451 if (!gifts) fprintf(stderr,
"NONE");
452 fprintf(stderr,
"\n\n");
sstring add_string(const char *str)
StringBuffer * stringbuffer_new(void)
static void add_god_to_list(archetype *god_arch)
#define QUERY_FLAG(xyz, p)
#define FLAG_REFL_MISSILE
void archetypes_for_each(arch_op op)
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
int nstrtok(const char *buf1, const char *buf2)
int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen)
void free_string(sstring str)
char * strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size)
void fatal(enum fatal_error err)
void stringbuffer_append_string(StringBuffer *sb, const char *str)
char * stringbuffer_finish(StringBuffer *sb)
struct archt * other_arch
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
#define DESCRIBE_PATH(retbuf, variable, name)
void LOG(LogLevel logLevel, const char *format,...)
size_t stringbuffer_length(StringBuffer *sb)
const EXTERN char *const attacktype_desc[NROFATTACKS]
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
godlink * get_rand_god(void)
const object * pntr_to_god_obj(godlink *godlnk)
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
EXTERN godlink * first_god
#define DESCRIBE_ABILITY(retbuf, variable, name)
static godlink * init_godslist(void)
int16_t resist[NROFATTACKS]