Macro for picking random entry from array
This commit is contained in:
@@ -406,7 +406,7 @@ growl(register struct monst* mtmp)
|
||||
|
||||
/* presumably nearness and soundok checks have already been made */
|
||||
if (Hallucination)
|
||||
growl_verb = h_sounds[rn2(SIZE(h_sounds))];
|
||||
growl_verb = ROLL_FROM(h_sounds);
|
||||
else
|
||||
growl_verb = growl_sound(mtmp);
|
||||
if (growl_verb) {
|
||||
@@ -432,7 +432,7 @@ yelp(register struct monst* mtmp)
|
||||
|
||||
/* presumably nearness and soundok checks have already been made */
|
||||
if (Hallucination)
|
||||
yelp_verb = h_sounds[rn2(SIZE(h_sounds))];
|
||||
yelp_verb = ROLL_FROM(h_sounds);
|
||||
else
|
||||
switch (mtmp->data->msound) {
|
||||
case MS_MEW:
|
||||
@@ -483,7 +483,7 @@ whimper(register struct monst* mtmp)
|
||||
|
||||
/* presumably nearness and soundok checks have already been made */
|
||||
if (Hallucination)
|
||||
whimper_verb = h_sounds[rn2(SIZE(h_sounds))];
|
||||
whimper_verb = ROLL_FROM(h_sounds);
|
||||
else
|
||||
switch (mtmp->data->msound) {
|
||||
case MS_MEW:
|
||||
@@ -602,7 +602,7 @@ maybe_gasp(struct monst* mon)
|
||||
break;
|
||||
}
|
||||
if (dogasp) {
|
||||
return Exclam[rn2(SIZE(Exclam))]; /* [mon->m_id % SIZE(Exclam)]; */
|
||||
return ROLL_FROM(Exclam); /* [mon->m_id % SIZE(Exclam)]; */
|
||||
}
|
||||
return (const char *) 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user