diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 1ed2b2a6d..cbdf90209 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -16,6 +16,7 @@ include statue contents in end of game inventory disclosure treat handlessness as a major problem when deciding prayer outcome perform artifact touch checks when putting on accessories missing noun in message when horns pierce through your helmet +don't use hcolor() for trapped chest gases when you aren't hallucinating Platform- and/or Interface-Specific Fixes diff --git a/src/do_name.c b/src/do_name.c index 9c6ded0e4..0b276bb87 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1002,6 +1002,15 @@ const char *colorpref; hcolors[rn2(SIZE(hcolors))] : colorpref; } +/* return a random real color unless hallucinating */ +const char * +rndcolor() +{ + int k = rn2(CLR_MAX); + return Hallucination ? hcolor((char *)0) : (k == NO_COLOR) ? + "colorless" : c_obj_colors[k]; +} + /* Aliases for road-runner nemesis */ static const char * const coynames[] = { diff --git a/src/trap.c b/src/trap.c index c9f71b5c3..0f9580143 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3586,7 +3586,7 @@ boolean disarm; case 0: pline("A cloud of %s gas billows from %s.", Blind ? blindgas[rn2(SIZE(blindgas))] : - hcolor((char *)0), the(xname(obj))); + rndcolor(), the(xname(obj))); if(!Stunned) { if (Hallucination) pline("What a groovy feeling!");