74 LOG(
llevError,
"ERROR: Tried to add null god to list!\n");
111 LOG(
llevError,
"get_rand_god(): can't find a random god!\n");
124 if (godlnk && godlnk->
arch)
138 int hassomething = 0, real = 0;
163 stringbuffer_append_printf(add,
"It is rarely known fact that the priests of %s are mystically transformed. Effects of this include:\n", name);
195 int has_effect = 0, tmpvar;
199 stringbuffer_append_printf(add,
"\nThe priests of %s are known to make cast a mighty prayer of possession which gives the recipient ", name);
202 if (god->
resist[tmpvar] == 100) {
228 stringbuffer_append_printf(add,
"\nThe priests of %s are known to be able to bestow a blessing which makes the recipient %s\n ---\n", name, cp);
272 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);
326 if (hassomething == 0) {
341 for (god =
first_god; god; god = godnext) {
350 #define DESCRIBE_ABILITY(retbuf, variable, name) \ 353 strcat(retbuf, "(" name ": "); \ 354 for (i = 0; i < NROFATTACKS; i++) \ 355 if (variable&(1<<i)) { \ 357 strcat(retbuf, ", "); \ 360 strcat(retbuf, attacks[i]); \ 362 strcat(retbuf, ")"); \ 365 #define DESCRIBE_PATH(retbuf, variable, name) \ 368 strcat(retbuf, "(" name ": "); \ 369 for (i = 0; i < NRSPELLPATHS; i++) \ 370 if (variable&(1<<i)) { \ 372 strcat(retbuf, ", "); \ 375 strcat(retbuf, spellpathnames[i]); \ 377 strcat(retbuf, ")"); \ 389 fprintf(stderr,
"\n");
393 int tmpvar, gifts = 0;
395 fprintf(stderr,
"GOD: %s\n", god->
name);
396 fprintf(stderr,
" avatar stats:\n");
398 fprintf(stderr,
" lvl:%d speed:%4.2f\n", god->
level, god->
speed);
400 fprintf(stderr,
" enemy: %s\n", god->
title ? god->
title :
"NONE");
405 fprintf(stderr,
" lvl:%d speed:%4.2f\n", serv->
level, serv->
speed);
408 fprintf(stderr,
" servant: NONE\n");
409 fprintf(stderr,
" aligned_race(s): %s\n", god->
race);
410 fprintf(stderr,
" enemy_race(s): %s\n", (god->
slaying ? god->
slaying :
"none"));
412 fprintf(stderr,
"%s",
final);
414 snprintf(tmpbuf,
sizeof(tmpbuf),
" attacktype:");
416 strcat(tmpbuf,
"\n ");
419 strcat(tmpbuf,
"\n aura:");
421 strcat(tmpbuf,
"\n paths:");
423 strcat(tmpbuf,
"\n ");
427 strcat(tmpbuf,
"\n ");
431 strcat(tmpbuf,
"\n ");
434 fprintf(stderr,
"%s\n", tmpbuf);
435 fprintf(stderr,
" Desc: %s", god->
msg ? god->
msg :
"---\n");
436 fprintf(stderr,
" Priest gifts/limitations: ");
447 if (god->
last_heal) { gifts = 1; fprintf(stderr,
"\n hp regenerate at %d", god->
last_heal); }
448 if (god->
last_sp) { gifts = 1; fprintf(stderr,
"\n sp regenerate at %d", god->
last_sp); }
449 if (god->
last_eat) { gifts = 1; fprintf(stderr,
"\n digestion is %s (%d)", god->
last_eat < 0 ?
"slowed" :
"faster", god->
last_eat); }
450 if (god->
last_grace) { gifts = 1; fprintf(stderr,
"\n grace regenerates at %d", god->
last_grace); }
451 if (god->
stats.
luck) { gifts = 1; fprintf(stderr,
"\n luck is %d", god->
stats.
luck); }
452 if (!gifts) fprintf(stderr,
"NONE");
453 fprintf(stderr,
"\n\n");
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
void fatal(enum fatal_error err)
StringBuffer * stringbuffer_new(void)
void free_string(sstring str)
struct archt * other_arch
int nstrtok(const char *buf1, const char *buf2)
#define DESCRIBE_ABILITY(retbuf, variable, name)
void stringbuffer_append_string(StringBuffer *sb, const char *str)
godlink * get_rand_god(void)
size_t stringbuffer_length(StringBuffer *sb)
const object * pntr_to_god_obj(godlink *godlnk)
EXTERN godlink * first_god
int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen)
#define QUERY_FLAG(xyz, p)
static void add_god_to_list(archetype *god_arch)
EXTERN const char *const attacktype_desc[NROFATTACKS]
int16_t resist[NROFATTACKS]
static godlink * init_godslist(void)
#define DESCRIBE_PATH(retbuf, variable, name)
char * strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size)
sstring add_string(const char *str)
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
void LOG(LogLevel logLevel, const char *format,...)
#define FLAG_REFL_MISSILE
EXTERN archetype * first_archetype
char * stringbuffer_finish(StringBuffer *sb)