Macro for picking random entry from array

This commit is contained in:
Pasi Kallinen
2023-12-05 10:06:27 +02:00
parent b98a70e3ec
commit 5dc94f3d83
24 changed files with 45 additions and 42 deletions

View File

@@ -1505,7 +1505,7 @@ artifact_hit(
return TRUE;
}
*dmgptr = 2 * mdef->mhp + FATAL_DAMAGE_MODIFIER;
pline(behead_msg[rn2(SIZE(behead_msg))], wepdesc,
pline(ROLL_FROM(behead_msg), wepdesc,
mon_nam(mdef));
if (Hallucination && !flags.female)
pline("Good job Henry, but that wasn't Anne.");
@@ -1525,7 +1525,7 @@ artifact_hit(
return TRUE;
}
*dmgptr = 2 * (Upolyd ? u.mh : u.uhp) + FATAL_DAMAGE_MODIFIER;
pline(behead_msg[rn2(SIZE(behead_msg))], wepdesc, "you");
pline(ROLL_FROM(behead_msg), wepdesc, "you");
otmp->dknown = TRUE;
/* Should amulets fall off? */
return TRUE;