rndcolor()

> "A cloud of sangria gas billows from the chest.
> You stagger and your vision blurs."
> When I see the gas billowing from the chest, I'm not yet
> hallucinating. Shouldn't the gas have a normal colour, then?
> Only after my vision blurs should the gas assume a fake colour, I
> think.
>
This commit is contained in:
nethack.allison
2003-03-12 18:26:17 +00:00
parent b27d66c723
commit e2d9e01e84
3 changed files with 11 additions and 1 deletions

View File

@@ -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[] = {