replace x >= LOW_PM with ismnum(x) shorthand macro

This commit is contained in:
nhmall
2024-01-11 14:01:10 -05:00
parent 58031920dc
commit 25a8c258e6
31 changed files with 119 additions and 107 deletions
+2 -2
View File
@@ -283,7 +283,7 @@ bhitm(struct monst *mtmp, struct obj *otmp)
/* if shapechange failed because there aren't
enough eligible candidates (most likely for
vampshifter), try reverting to original form */
|| (mtmp->cham >= LOW_PM
|| (ismnum(mtmp->cham)
&& newcham(mtmp, &mons[mtmp->cham],
ncflags) != 0)) {
if (give_msg && (canspotmon(mtmp)
@@ -5719,7 +5719,7 @@ destroy_item(int osym, int dmgtyp)
|| objects[obj->otyp].oc_oprop == FLYING))
/* destroyed wands and potions of polymorph don't trigger
polymorph so don't need to be deferred */
|| (obj->otyp == POT_WATER && u.ulycn >= LOW_PM
|| (obj->otyp == POT_WATER && ismnum(u.ulycn)
&& (Upolyd ? obj->blessed : obj->cursed)))) {
deferrals[deferral_indx++] = obj->o_id;
continue;