Move some hard-coded string arrays into data files.
Random epitaphs, engravings and hallucinatory monsters now live in text data files.
This commit is contained in:
@@ -284,13 +284,14 @@ char *pname; /* caller-supplied output buffer */
|
||||
boolean do_hallu = Hallucination,
|
||||
aligned_priest = mon->data == &mons[PM_ALIGNED_PRIEST],
|
||||
high_priest = mon->data == &mons[PM_HIGH_PRIEST];
|
||||
const char *what = do_hallu ? rndmonnam() : mon->data->mname;
|
||||
char whatcode = '\0';
|
||||
const char *what = do_hallu ? rndmonnam(&whatcode) : mon->data->mname;
|
||||
|
||||
if (!mon->ispriest && !mon->isminion) /* should never happen... */
|
||||
return strcpy(pname, what); /* caller must be confused */
|
||||
|
||||
*pname = '\0';
|
||||
if (!do_hallu || !bogon_is_pname(what)) Strcat(pname, "the ");
|
||||
if (!do_hallu || !bogon_is_pname(whatcode)) Strcat(pname, "the ");
|
||||
if (mon->minvis) Strcat(pname, "invisible ");
|
||||
if (mon->isminion && EMIN(mon)->renegade)
|
||||
Strcat(pname, "renegade ");
|
||||
|
||||
Reference in New Issue
Block a user