if (likes_gems(mtmp->data) && otmp->oclass == GEM_CLASS
&& objects[otmp->otyp].oc_material != MINERAL && pctload < 85)
return TRUE;
- if (likes_objs(mtmp->data) && index(practical, otmp->oclass)
+ if (likes_objs(mtmp->data) && strchr(practical, otmp->oclass)
&& pctload < 75)
return TRUE;
- if (likes_magic(mtmp->data) && index(magical, otmp->oclass)
+ if (likes_magic(mtmp->data) && strchr(magical, otmp->oclass)
&& pctload < 85)
return TRUE;
if (throws_rocks(mtmp->data) && otmp->otyp == BOULDER