Mimic in a health food store could cause a panic
Health food stores use a special "vegetarian class" of items, which mkobj doesn't understand. Just make the mimic use a random item class in that case.
This commit is contained in:
@@ -2216,7 +2216,7 @@ register struct monst *mtmp;
|
|||||||
ap_type = M_AP_OBJECT;
|
ap_type = M_AP_OBJECT;
|
||||||
appear = -s_sym;
|
appear = -s_sym;
|
||||||
} else {
|
} else {
|
||||||
if (s_sym == RANDOM_CLASS)
|
if (s_sym == RANDOM_CLASS || s_sym >= MAXOCLASSES)
|
||||||
s_sym = syms[rn2((int) sizeof(syms) - 2) + 2];
|
s_sym = syms[rn2((int) sizeof(syms) - 2) + 2];
|
||||||
goto assign_sym;
|
goto assign_sym;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -802,7 +802,8 @@ struct obj *obj;
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* positive value: class; negative value: specific object type */
|
/* positive value: class; negative value: specific object type.
|
||||||
|
can also return non-existing object class (eg. VEGETARIAN_CLASS) */
|
||||||
int
|
int
|
||||||
get_shop_item(type)
|
get_shop_item(type)
|
||||||
int type;
|
int type;
|
||||||
|
|||||||
Reference in New Issue
Block a user