|| ((ptr)->mlet == S_PUDDING && (ptr) != &mons[PM_BLACK_PUDDING]))
#define befriend_with_obj(ptr, obj) \
- ((obj)->oclass == FOOD_CLASS && is_domestic(ptr) \
+ (((obj)->oclass == FOOD_CLASS && is_domestic(ptr)) \
|| ((obj)->otyp == BANANA && \
((ptr) == &mons[PM_MONKEY] \
|| (ptr) == &mons[PM_APE])))
{
int i, /* loop counter */
tmp, /* amour class difference */
- strike, /* hit this attack */
+ strike = 0, /* hit this attack */
attk, /* attack attempted this time */
struck = 0, /* hit at least once */
res[NATTK]; /* results of all attacks */
register struct monst *mtmp;
{
struct attack *mattk, alt_attk;
- int i, j, tmp, sum[NATTK];
+ int i, j = 0, tmp, sum[NATTK];
struct permonst *mdat = mtmp->data;
boolean ranged = (distu(mtmp->mx, mtmp->my) > 3);
/* Is it near you? Affects your actions */