MCPcopy Create free account
hub / github.com/NetHack/NetHack / flash_str

Function flash_str

src/zap.c:6428–6445  ·  view source on GitHub ↗

Fills buf with the appropriate string for this ray. * In the hallucination case, insert "blast of ". * Assumes that the caller will specify typ in the appropriate range for * wand/spell/breath weapon. */

Source from the content-addressed store, hash-verified

6426 * Assumes that the caller will specify typ in the appropriate range for
6427 * wand/spell/breath weapon. */
6428const char*
6429flash_str(
6430 int typ,
6431 boolean nohallu) /* suppress hallucination (for death reasons) */
6432{
6433 static char fltxt[BUFSZ];
6434
6435 typ = zaptype(typ);
6436 if (Hallucination && !nohallu) {
6437 /* always return "blast of foo" for simplicity;
6438 this could be extended with hallucinatory rays, but probably
6439 not worth it at this time */
6440 Sprintf(fltxt, "blast of %s", rnd_hallublast());
6441 } else {
6442 Strcpy(fltxt, flash_types[typ]);
6443 }
6444 return fltxt;
6445}
6446
6447/*zap.c*/

Callers 4

buzzmuFunction · 0.85
do_improvisationFunction · 0.85
ubreatheuFunction · 0.85
dobuzzFunction · 0.85

Calls 2

zaptypeFunction · 0.85
rnd_hallublastFunction · 0.85

Tested by

no test coverage detected