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

View File

@@ -1840,7 +1840,7 @@ weight(struct obj *obj)
struct obj *contents;
int cwt;
if (obj->otyp == STATUE && obj->corpsenm >= LOW_PM) {
if (obj->otyp == STATUE && ismnum(obj->corpsenm)) {
int msize = (int) mons[obj->corpsenm].msize, /* 0..7 */
minwt = (msize + msize + 1) * 100;
@@ -1882,7 +1882,7 @@ weight(struct obj *obj)
return wt + cwt;
}
if (obj->otyp == CORPSE && obj->corpsenm >= LOW_PM) {
if (obj->otyp == CORPSE && ismnum(obj->corpsenm)) {
long long_wt = obj->quan * (long) mons[obj->corpsenm].cwt;
wt = (long_wt > LARGEST_INT) ? LARGEST_INT : (int) long_wt;