Make return values use defines
This commit is contained in:
@@ -704,13 +704,13 @@ struct monst *mtmp, *mtarg;
|
||||
mtmp->weapon_check = NEED_RANGED_WEAPON;
|
||||
/* mon_wield_item resets weapon_check as appropriate */
|
||||
if (mon_wield_item(mtmp) != 0)
|
||||
return 0;
|
||||
return MM_MISS;
|
||||
}
|
||||
|
||||
/* Pick a weapon */
|
||||
otmp = select_rwep(mtmp);
|
||||
if (!otmp)
|
||||
return 0;
|
||||
return MM_MISS;
|
||||
ispole = is_pole(otmp);
|
||||
|
||||
x = mtmp->mx;
|
||||
@@ -725,17 +725,17 @@ struct monst *mtmp, *mtarg;
|
||||
if (ammo_and_launcher(otmp, mwep)
|
||||
&& dist2(mtmp->mx, mtmp->my, mtarg->mx, mtarg->my)
|
||||
> PET_MISSILE_RANGE2)
|
||||
return 0; /* Out of range */
|
||||
return MM_MISS; /* Out of range */
|
||||
/* Set target monster */
|
||||
g.mtarget = mtarg;
|
||||
g.marcher = mtmp;
|
||||
monshoot(mtmp, otmp, mwep); /* multishot shooting or throwing */
|
||||
g.marcher = g.mtarget = (struct monst *) 0;
|
||||
nomul(0);
|
||||
return 1;
|
||||
return MM_HIT;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return MM_MISS;
|
||||
}
|
||||
|
||||
/* monster spits substance at monster */
|
||||
@@ -750,7 +750,7 @@ struct attack *mattk;
|
||||
if (!Deaf)
|
||||
pline("A dry rattle comes from %s throat.",
|
||||
s_suffix(mon_nam(mtmp)));
|
||||
return 0;
|
||||
return MM_MISS;
|
||||
}
|
||||
if (m_lined_up(mtarg, mtmp)) {
|
||||
switch (mattk->adtyp) {
|
||||
@@ -784,10 +784,10 @@ struct attack *mattk;
|
||||
dog->hungrytime -= 5;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return MM_HIT;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return MM_MISS;
|
||||
}
|
||||
|
||||
/* monster breathes at monster (ranged) */
|
||||
@@ -807,7 +807,7 @@ struct attack *mattk;
|
||||
else
|
||||
You_hear("a cough.");
|
||||
}
|
||||
return 0;
|
||||
return MM_MISS;
|
||||
}
|
||||
if (!mtmp->mspec_used && rn2(3)) {
|
||||
if ((typ >= AD_MAGM) && (typ <= AD_ACID)) {
|
||||
@@ -836,9 +836,9 @@ struct attack *mattk;
|
||||
}
|
||||
} else impossible("Breath weapon %d used", typ-1);
|
||||
} else
|
||||
return 0;
|
||||
return MM_MISS;
|
||||
}
|
||||
return 1;
|
||||
return MM_HIT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user