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

@@ -440,7 +440,7 @@ container_impact_dmg(
/* eggs laid by you. penalty is -1 per egg, max 5,
* but it's always exactly 1 that breaks */
if (otmp->otyp == EGG && otmp->spe && otmp->corpsenm >= LOW_PM)
if (otmp->otyp == EGG && otmp->spe && ismnum(otmp->corpsenm))
change_luck(-1);
if (otmp->otyp == EGG) {
Soundeffect(se_egg_cracking, 25);
@@ -1699,7 +1699,7 @@ ship_object(struct obj *otmp, coordxy x, coordxy y, boolean shop_floor_obj)
result = "crash";
} else {
/* penalty for breaking eggs laid by you */
if (otmp->otyp == EGG && otmp->spe && otmp->corpsenm >= LOW_PM)
if (otmp->otyp == EGG && otmp->spe && ismnum(otmp->corpsenm))
change_luck((schar) -min(otmp->quan, 5L));
result = "splat";
}