replace some weight-related magic numbers

adds a header file include/nhconst.h  (I'm open to a better name)
This commit is contained in:
nhmall
2025-03-19 13:29:58 -04:00
parent 00a5d811ee
commit a943c4c10b
19 changed files with 118 additions and 86 deletions

View File

@@ -1439,10 +1439,10 @@ hit_bars(
if (your_fault && (otmp->otyp == WAR_HAMMER
|| otmp->otyp == HEAVY_IRON_BALL)) {
/* iron ball isn't a weapon or wep-tool so doesn't use obj->spe;
weight is normally 480 but can be increased by increments
of 160 (scrolls of punishment read while already punished) */
weight is normally 48000 but can be increased by increments
of 16000 (scrolls of punishment read while already punished) */
int spe = ((otmp->otyp == HEAVY_IRON_BALL) /* 3+ for iron ball */
? ((int) otmp->owt / IRON_BALL_W_INCR)
? ((int) otmp->owt / WT_IRON_BALL_INCR)
: otmp->spe);
/* chance: used in saving throw for the bars; more likely to
break those when 'chance' is _lower_; acurrstr(): 3..25 */