Crossfire Server, Trunk  R20513
holy.c
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 1999-2014 Mark Wedel and the Crossfire Development Team
5  * Copyright (c) 1992 Frank Tore Johansen
6  *
7  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
8  * welcome to redistribute it under certain conditions. For details, please
9  * see COPYING and LICENSE.
10  *
11  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
12  */
13 
19 #include "global.h"
20 
21 #include <assert.h>
22 #include <stdlib.h>
23 #include <string.h>
24 
25 #include "libproto.h"
26 #include "living.h"
27 #include "spells.h"
28 
29 static void add_god_to_list(archetype *god_arch);
30 
37 static godlink *init_godslist(void) {
38  godlink *gl = (godlink *)malloc(sizeof(godlink));
39  if (gl == NULL)
41  gl->name = NULL; /* how to describe the god to the player */
42  gl->arch = NULL; /* pointer to the archetype of this god */
43  gl->id = 0; /* id of the god */
44  gl->next = NULL; /* next god in this linked list */
45 
46  return gl;
47 }
48 
53 void init_gods(void) {
54  archetype *at = NULL;
55 
56  LOG(llevDebug, "Initializing gods...\n");
57  for (at = first_archetype; at != NULL; at = at->next)
58  if (at->clone.type == GOD)
59  add_god_to_list(at);
60 
61  LOG(llevDebug, "done.\n");
62 }
63 
70 static void add_god_to_list(archetype *god_arch) {
71  godlink *god;
72 
73  if (!god_arch) {
74  LOG(llevError, "ERROR: Tried to add null god to list!\n");
75  return;
76  }
77 
78  god = init_godslist();
79 
80  god->arch = god_arch;
81  god->name = add_string(god_arch->clone.name);
82  if (!first_god)
83  god->id = 1;
84  else {
85  god->id = first_god->id+1;
86  god->next = first_god;
87  }
88  first_god = god;
89 
90 #ifdef DEBUG_GODS
91  LOG(llevDebug, "Adding god %s (%d) to list\n", god->name, god->id);
92 #endif
93 }
94 
102  godlink *god = first_god;
103  int i;
104 
105  if (god)
106  for (i = RANDOM()%(god->id)+1; god; god = god->next)
107  if (god->id == i)
108  break;
109 
110  if (!god)
111  LOG(llevError, "get_rand_god(): can't find a random god!\n");
112  return god;
113 }
114 
123 const object *pntr_to_god_obj(godlink *godlnk) {
124  if (godlnk && godlnk->arch)
125  return &godlnk->arch->clone;
126  return NULL;
127 }
128 
137 int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen) {
138  int hassomething = 0, real = 0;
139  char temp[HUGE_BUF];
140  StringBuffer *add;
141  const char *name;
142 
143  name = god->name;
144 
145  /* preamble.. */
146  assert(buf);
147  stringbuffer_append_printf(buf, "This document contains knowledge concerning the diety %s", name);
148 
149  /* Always have as default information the god's descriptive terms. */
150  if (nstrtok(god->msg, ",") > 0) {
151  stringbuffer_append_string(buf, ", known as");
152  stringbuffer_append_string(buf, strtoktolin(god->msg, ",", temp, sizeof(temp)));
153  } else
154  stringbuffer_append_string(buf, "...");
155 
156  stringbuffer_append_string(buf, "\n ---\n");
157 
158  if (what & GOD_PATHS) {
159  /* spell paths */
160  int has_effect = 0;
161 
162  add = stringbuffer_new();
163  stringbuffer_append_printf(add, "It is rarely known fact that the priests of %s are mystically transformed. Effects of this include:\n", name);
164 
165  if (god->path_attuned) {
166  has_effect = 1;
167  describe_spellpath_attenuation("Attuned", god->path_attuned, add);
168  }
169  if (god->path_repelled) {
170  has_effect = 1;
171  describe_spellpath_attenuation("Repelled", god->path_repelled, add);
172  }
173  if (god->path_denied) {
174  has_effect = 1;
175  describe_spellpath_attenuation("Denied", god->path_denied, add);
176  }
177  if (has_effect) {
178  stringbuffer_append_string(add, "\n ---\n");
179 
180  if ((maxlen == 0) || (stringbuffer_length(add) + stringbuffer_length(buf) < maxlen)) {
182  free(stringbuffer_finish(add));
183  hassomething = 1;
184  } else {
185  free(stringbuffer_finish(add));
186  return real;
187  }
188  } else {
189  free(stringbuffer_finish(add));
190  }
191  what |= GOD_PATHS;
192  }
193 
194  if (what & GOD_IMMUNITIES) {
195  int has_effect = 0, tmpvar;
196  char tmpbuf[MAX_BUF];
197 
198  add = stringbuffer_new();
199  stringbuffer_append_printf(add, "\nThe priests of %s are known to make cast a mighty prayer of possession which gives the recipient ", name);
200 
201  for (tmpvar = 0; tmpvar < NROFATTACKS; tmpvar++) {
202  if (god->resist[tmpvar] == 100) {
203  has_effect = 1;
204  snprintf(tmpbuf, MAX_BUF, "Immunity to %s", attacktype_desc[tmpvar]);
205  }
206  }
207  if (has_effect) {
208  stringbuffer_append_printf(add, "%s\n ---\n", tmpbuf);
209  if ((maxlen == 0) || (stringbuffer_length(add) + stringbuffer_length(buf) < maxlen)) {
211  free(stringbuffer_finish(add));
212  hassomething = 1;
213  } else {
214  free(stringbuffer_finish(add));
215  return real;
216  }
217  } else {
218  free(stringbuffer_finish(add));
219  }
220  real |= GOD_IMMUNITIES;
221  }
222 
223  if (what & GOD_BLESSED) {
224  char *cp = stringbuffer_finish(describe_resistance(god, 1, 1, NULL));
225 
226  if (*cp) { /* This god does have protections */
227  add = stringbuffer_new();
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);
229 
230  if ((maxlen == 0) || (stringbuffer_length(add) + stringbuffer_length(buf) < maxlen)) {
232  free(stringbuffer_finish(add));
233  hassomething = 1;
234  } else {
235  free(stringbuffer_finish(add));
236  return real;
237  }
238  }
239  free(cp);
240  real |= GOD_BLESSED;
241  }
242 
243  if (what & GOD_SACRED) {
244  if (god->race && !(god->path_denied&PATH_SUMMON)) {
245  int i = nstrtok(god->race, ",");
246  add = stringbuffer_new();
247  stringbuffer_append_printf(add, "Creatures sacred to %s include the\n", name);
248 
249  if (i > 1)
250  stringbuffer_append_printf(add, "following races:%s\n ---\n", strtoktolin(god->race, ",", temp, sizeof(temp)));
251  else
252  stringbuffer_append_printf(add, "race of %s\n ---\n", strtoktolin(god->race, ",", temp, sizeof(temp)));
253 
254  if ((maxlen == 0) || (stringbuffer_length(add) + stringbuffer_length(buf) < maxlen)) {
256  free(stringbuffer_finish(add));
257  hassomething = 1;
258  } else {
259  free(stringbuffer_finish(add));
260  return real;
261  }
262  }
263  real |= GOD_SACRED;
264  }
265 
266  if (what & GOD_RESISTANCES) {
267  char *cp;
268  cp = stringbuffer_finish(describe_resistance(god, 1, 1, NULL));
269 
270  if (*cp) { /* This god does have protections */
271  add = stringbuffer_new();
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);
273 
274  if ((maxlen == 0) || (stringbuffer_length(add) + stringbuffer_length(buf) < maxlen)) {
276  free(stringbuffer_finish(add));
277  hassomething = 1;
278  } else {
279  free(stringbuffer_finish(add));
280  return real;
281  }
282  }
283  free(cp);
284  real |= GOD_RESISTANCES;
285  }
286 
287  if (what & GOD_HOLYWORD) {
288  if ((god->slaying) && !(god->path_denied&PATH_TURNING)) {
289  add = stringbuffer_new();
290  stringbuffer_append_printf(add, "The holy words of %s have the power to slay creatures belonging to the ", name);
291 
292  if (nstrtok(god->slaying, ",") > 1)
293  stringbuffer_append_printf(add, "following races:%s\n ---\n", strtoktolin(god->slaying, ",", temp, sizeof(temp)));
294  else
295  stringbuffer_append_printf(add, "race of%s\n ---\n", strtoktolin(god->slaying, ",", temp, sizeof(temp)));
296 
297  if ((maxlen == 0) || (stringbuffer_length(add) + stringbuffer_length(buf) < maxlen)) {
299  free(stringbuffer_finish(add));
300  hassomething = 1;
301  } else {
302  free(stringbuffer_finish(add));
303  return real;
304  }
305  }
306  real |= GOD_HOLYWORD;
307  }
308 
309  if (what & GOD_ENEMY) {
310  if (god->title) {
311  add = stringbuffer_new();
312  stringbuffer_append_printf(add, "The gods %s and %s are enemies.\n ---\n", name, god->title);
313 
314  if ((maxlen == 0) || (stringbuffer_length(add) + stringbuffer_length(buf) < maxlen)) {
316  free(stringbuffer_finish(add));
317  hassomething = 1;
318  } else {
319  free(stringbuffer_finish(add));
320  return real;
321  }
322  }
323  real |= GOD_ENEMY;
324  }
325 
326  if (hassomething == 0) {
327  /* we got no information beyond the preamble! */
328  stringbuffer_append_string(buf, " Unfortunately the rest of the information is hopelessly garbled!\n ---\n");
329  }
330 
331  return real;
332 }
333 
337 void free_all_god(void) {
338  godlink *god, *godnext;
339 
340  LOG(llevDebug, "Freeing god information\n");
341  for (god = first_god; god; god = godnext) {
342  godnext = god->next;
343  if (god->name)
344  free_string(god->name);
345  free(god);
346  }
347  first_god = NULL;
348 }
349 
350 #define DESCRIBE_ABILITY(retbuf, variable, name) \
351  if (variable) { \
352  int i, j = 0; \
353  strcat(retbuf, "(" name ": "); \
354  for (i = 0; i < NROFATTACKS; i++) \
355  if (variable&(1<<i)) { \
356  if (j) \
357  strcat(retbuf, ", "); \
358  else \
359  j = 1; \
360  strcat(retbuf, attacks[i]); \
361  } \
362  strcat(retbuf, ")"); \
363  }
364 
365 #define DESCRIBE_PATH(retbuf, variable, name) \
366  if (variable) { \
367  int i, j = 0; \
368  strcat(retbuf, "(" name ": "); \
369  for (i = 0; i < NRSPELLPATHS; i++) \
370  if (variable&(1<<i)) { \
371  if (j) \
372  strcat(retbuf, ", "); \
373  else \
374  j = 1; \
375  strcat(retbuf, spellpathnames[i]); \
376  } \
377  strcat(retbuf, ")"); \
378  }
379 
386 void dump_gods(void) {
387  godlink *glist;
388 
389  fprintf(stderr, "\n");
390  for (glist = first_god; glist; glist = glist->next) {
391  const object *god = pntr_to_god_obj(glist);
392  char tmpbuf[HUGE_BUF], *final;
393  int tmpvar, gifts = 0;
394 
395  fprintf(stderr, "GOD: %s\n", god->name);
396  fprintf(stderr, " avatar stats:\n");
397  fprintf(stderr, " S:%d C:%d D:%d I:%d W:%d P:%d\n", god->stats.Str, god->stats.Con, god->stats.Dex, god->stats.Int, god->stats.Wis, god->stats.Pow);
398  fprintf(stderr, " lvl:%d speed:%4.2f\n", god->level, god->speed);
399  fprintf(stderr, " wc:%d ac:%d hp:%d dam:%d\n", god->stats.wc, god->stats.ac, god->stats.hp, god->stats.dam);
400  fprintf(stderr, " enemy: %s\n", god->title ? god->title : "NONE");
401  if (god->other_arch) {
402  object *serv = &god->other_arch->clone;
403  fprintf(stderr, " servant stats: (%s)\n", god->other_arch->name);
404  fprintf(stderr, " S:%d C:%d D:%d I:%d W:%d P:%d\n", serv->stats.Str, serv->stats.Con, serv->stats.Dex, serv->stats.Int, serv->stats.Wis, serv->stats.Pow);
405  fprintf(stderr, " lvl:%d speed:%4.2f\n", serv->level, serv->speed);
406  fprintf(stderr, " wc:%d ac:%d hp:%d dam:%d\n", serv->stats.wc, serv->stats.ac, serv->stats.hp, serv->stats.dam);
407  } else
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"));
411  final = stringbuffer_finish(describe_resistance(god, 1, 1, NULL));
412  fprintf(stderr, "%s", final);
413  free(final);
414  snprintf(tmpbuf, sizeof(tmpbuf), " attacktype:");
415  if ((tmpvar = god->attacktype)) {
416  strcat(tmpbuf, "\n ");
417  DESCRIBE_ABILITY(tmpbuf, tmpvar, "Attacks");
418  }
419  strcat(tmpbuf, "\n aura:");
420 
421  strcat(tmpbuf, "\n paths:");
422  if ((tmpvar = god->path_attuned)) {
423  strcat(tmpbuf, "\n ");
424  DESCRIBE_PATH(tmpbuf, tmpvar, "Attuned");
425  }
426  if ((tmpvar = god->path_repelled)) {
427  strcat(tmpbuf, "\n ");
428  DESCRIBE_PATH(tmpbuf, tmpvar, "Repelled");
429  }
430  if ((tmpvar = god->path_denied)) {
431  strcat(tmpbuf, "\n ");
432  DESCRIBE_PATH(tmpbuf, tmpvar, "Denied");
433  }
434  fprintf(stderr, "%s\n", tmpbuf);
435  fprintf(stderr, " Desc: %s", god->msg ? god->msg : "---\n");
436  fprintf(stderr, " Priest gifts/limitations: ");
437  if (!QUERY_FLAG(god, FLAG_USE_WEAPON)) { gifts = 1; fprintf(stderr, "\n weapon use is forbidden"); }
438  if (!QUERY_FLAG(god, FLAG_USE_ARMOUR)) { gifts = 1; fprintf(stderr, "\n no armour may be worn"); }
439  if (QUERY_FLAG(god, FLAG_UNDEAD)) { gifts = 1; fprintf(stderr, "\n is undead"); }
440  if (QUERY_FLAG(god, FLAG_SEE_IN_DARK)) { gifts = 1; fprintf(stderr, "\n has infravision "); }
441  if (QUERY_FLAG(god, FLAG_XRAYS)) { gifts = 1; fprintf(stderr, "\n has X-ray vision"); }
442  if (QUERY_FLAG(god, FLAG_REFL_MISSILE)) { gifts = 1; fprintf(stderr, "\n reflect missiles"); }
443  if (QUERY_FLAG(god, FLAG_REFL_SPELL)) { gifts = 1; fprintf(stderr, "\n reflect spells"); }
444  if (QUERY_FLAG(god, FLAG_STEALTH)) { gifts = 1; fprintf(stderr, "\n is stealthy"); }
445  if (QUERY_FLAG(god, FLAG_MAKE_INVIS)) { gifts = 1; fprintf(stderr, "\n is (permanently) invisible"); }
446  if (QUERY_FLAG(god, FLAG_BLIND)) { gifts = 1; fprintf(stderr, "\n is blind"); }
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");
454  }
455 }
Error, serious thing.
Definition: logger.h:11
int8_t Int
Definition: living.h:35
#define FLAG_SEE_IN_DARK
if set ob not effected by darkness
Definition: define.h:338
int8_t ac
Armour Class, how hard to hit, the lower the better.
Definition: living.h:37
#define GOD_BLESSED
Write various information (resistances?).
Definition: god.h:28
Spell-related defines: spellpath, subtypes, ...
const char * race
Human, goblin, dragon, etc.
Definition: object.h:318
#define PATH_TURNING
Definition: spells.h:29
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
Append the contents of a string buffer instance to another string buffer instance.
Definition: stringbuffer.c:131
#define FLAG_USE_ARMOUR
(Monster) can wear armour/shield/helmet
Definition: define.h:296
struct archt * arch
Pointer to the archetype of this god.
Definition: god.h:14
void fatal(enum fatal_error err)
fatal() is meant to be called whenever a fatal signal is intercepted.
Definition: utils.c:596
StringBuffer * stringbuffer_new(void)
Create a new string buffer.
Definition: stringbuffer.c:57
int32_t last_heal
Last healed.
Definition: object.h:357
void free_string(sstring str)
This will reduce the refcount, and if it has reached 0, str will be freed.
Definition: shstr.c:280
#define HUGE_BUF
Used for messages - some can be quite long.
Definition: define.h:37
object clone
An object from which to do object_copy()
Definition: object.h:470
const char * slaying
Which race to do double damage to.
Definition: object.h:319
int32_t last_sp
As last_heal, but for spell points.
Definition: object.h:358
#define FLAG_STEALTH
Will wake monsters with less range.
Definition: define.h:313
#define GOD_HOLYWORD
Write holy word information.
Definition: god.h:25
Used to link together the gods.
Definition: god.h:12
#define FLAG_USE_WEAPON
(Monster) can wield weapons
Definition: define.h:297
void dump_gods(void)
Prints all gods to stderr.
Definition: holy.c:386
const char * name
Name of this god.
Definition: god.h:13
uint32_t path_attuned
Paths the object is attuned to.
Definition: object.h:343
Global type definitions and header inclusions.
uint32_t path_repelled
Paths the object is repelled from.
Definition: object.h:344
struct archt * other_arch
Pointer used for various things - mostly used for what this objects turns into or what this object cr...
Definition: object.h:413
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
Definition: object.h:465
int8_t Con
Definition: living.h:35
int16_t hp
Hit Points.
Definition: living.h:39
#define FLAG_UNDEAD
Monster is undead.
Definition: define.h:270
#define GOD_RESISTANCES
Write resistances.
Definition: god.h:26
const char * title
Of foo, etc.
Definition: object.h:317
int nstrtok(const char *buf1, const char *buf2)
Simple routine to return the number of list items in buf1 as separated by the value of buf2...
Definition: readable.c:650
uint32_t path_denied
Paths the object is denied access to.
Definition: object.h:345
#define FLAG_REFL_SPELL
Spells (some) will reflect from object.
Definition: define.h:275
#define DESCRIBE_ABILITY(retbuf, variable, name)
Definition: holy.c:350
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Append a string to a string buffer instance.
Definition: stringbuffer.c:95
int8_t Wis
Definition: living.h:35
#define snprintf
Definition: win32.h:46
#define GOD_IMMUNITIES
Write immunities.
Definition: god.h:29
int16_t dam
How much damage this object does when hitting.
Definition: living.h:45
godlink * get_rand_god(void)
Returns a random god.
Definition: holy.c:101
const char * name
The name of the object, obviously...
Definition: object.h:311
size_t stringbuffer_length(StringBuffer *sb)
Return the current length of the buffer.
Definition: stringbuffer.c:154
int16_t last_grace
As last_sp, except for grace.
Definition: object.h:359
const object * pntr_to_god_obj(godlink *godlnk)
Returns a pointer to the object We need to be VERY careful about using this, as we are returning a po...
Definition: holy.c:123
#define FLAG_XRAYS
X-ray vision.
Definition: define.h:301
EXTERN godlink * first_god
God list.
Definition: global.h:124
int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen)
Describe a god.
Definition: holy.c:137
int8_t luck
Affects thaco and ac from time to time.
Definition: living.h:38
float speed
The overall speed of this object.
Definition: object.h:328
#define QUERY_FLAG(xyz, p)
Definition: define.h:225
static void add_god_to_list(archetype *god_arch)
Adds specified god to linked list, gives it an id.
Definition: holy.c:70
EXTERN const char *const attacktype_desc[NROFATTACKS]
Definition: attack.h:138
struct glnk * next
Next god.
Definition: god.h:16
#define MAX_BUF
Used for all kinds of things.
Definition: define.h:35
int32_t last_eat
How long since we last ate.
Definition: object.h:356
int8_t wc
Weapon Class, how skilled, the lower the better.
Definition: living.h:36
int8_t Str
Definition: living.h:35
int16_t resist[NROFATTACKS]
Resistance adjustments for attacks.
Definition: object.h:341
uint32_t attacktype
Bitmask of attacks this object does.
Definition: object.h:342
static godlink * init_godslist(void)
Initializes a god structure.
Definition: holy.c:37
#define FLAG_BLIND
If set, object cannot see (visually)
Definition: define.h:337
#define RANDOM()
Definition: define.h:679
#define GOD_ENEMY
Write down god&#39;s enemy.
Definition: god.h:24
living stats
Str, Con, Dex, etc.
Definition: object.h:368
int8_t Dex
Definition: living.h:35
Only for debugging purposes.
Definition: logger.h:13
#define DESCRIBE_PATH(retbuf, variable, name)
Definition: holy.c:365
#define GOD_PATHS
Path information.
Definition: god.h:30
uint8_t type
PLAYER, BULLET, etc.
Definition: object.h:338
#define GOD_SACRED
Write sacred creatures.
Definition: god.h:27
struct archt * next
Next archetype in a linked list.
Definition: object.h:467
#define NROFATTACKS
Definition: attack.h:17
void init_gods(void)
This takes a look at all of the archetypes to find the objects which correspond to the GODS (type GOD...
Definition: holy.c:53
const char * msg
If this is a book/sign/magic mouth/etc.
Definition: object.h:322
#define FLAG_MAKE_INVIS
(Item) gives invisibility when applied
Definition: define.h:329
char * strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size)
Takes a string in buf1 and separates it into a list of strings delimited by buf2. ...
Definition: readable.c:680
sstring add_string(const char *str)
This will add &#39;str&#39; to the hash table.
Definition: shstr.c:124
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
Generates the visible naming for resistances.
Definition: item.c:383
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Append a formatted string to a string buffer instance.
Definition: stringbuffer.c:104
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
Describe the specified path attenuation.
Definition: utils.c:533
int8_t Pow
Definition: living.h:35
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
Definition: logger.c:51
void free_all_god(void)
Frees all god information.
Definition: holy.c:337
Structure containing object statistics.
A buffer that will be expanded as content is added to it.
Definition: stringbuffer.c:25
#define FLAG_REFL_MISSILE
Arrows will reflect from object.
Definition: define.h:273
int16_t level
Level of creature or object.
Definition: object.h:351
Definition: object.h:148
int id
Id of the god.
Definition: god.h:15
EXTERN archetype * first_archetype
First archetype.
Definition: global.h:122
const char * name
More definite name, like "generate_kobold".
Definition: object.h:466
char * stringbuffer_finish(StringBuffer *sb)
Deallocate the string buffer instance and return the string.
Definition: stringbuffer.c:76
#define PATH_SUMMON
Definition: spells.h:19