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

@@ -756,7 +756,7 @@ migr_booty_item(int otyp, const char* gang)
Strcpy(ONAME(otmp), gang);
if (objects[otyp].oc_class == FOOD_CLASS) {
if (otyp == SLIME_MOLD)
otmp->spe = fruitadd((char *) orcfruit[rn2(SIZE(orcfruit))],
otmp->spe = fruitadd((char *) ROLL_FROM(orcfruit),
(struct fruit *) 0);
otmp->quan += (long) rn2(3);
otmp->owt = weight(otmp);