From b1f8c3d5c19e535901523fc86a1b2fb381b87c3f Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 1 Apr 2022 10:53:19 -0700 Subject: [PATCH] wishing for flint Allow wishes for quantity up to 20 to be granted when asking for flint. Like rocks, flints are mainly useful as sling ammo. Also, remove the hardcoded assumption that globs weigh 20 when wish handling computes glob weight based on user-specified count and/or relative size. --- src/objnam.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/objnam.c b/src/objnam.c index 88411bde4..2938ca516 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -4586,7 +4586,8 @@ readobjnam(char *bp, struct obj *no_wish) 2: medium (6..15) => use weight for 6, yielding 120; 3: large (16..25) => 320; 4: very large (26+) => 520 */ if (d.gsize > 1) - d.otmp->owt += (unsigned) (100 + (d.gsize - 2) * 200); + d.otmp->owt += ((unsigned) (5 + (d.gsize - 2) * 10) + * d.otmp->owt); /* 20 + {5|15|25} times 20 */ if (d.cnt > 1) { if ((d.cnt > 6 - d.gsize) && !wizard) d.cnt = rn1(5, 2); /* 2..6 */ @@ -4603,8 +4604,8 @@ readobjnam(char *bp, struct obj *no_wish) || d.cnt < rnd(6) || (d.cnt <= 7 && Is_candle(d.otmp)) || (d.cnt <= 20 - && (d.typ == ROCK || is_missile(d.otmp) - /* WEAPON_CLASS test is to exclude gems */ + && (d.typ == ROCK || d.typ == FLINT || is_missile(d.otmp) + /* WEAPON_CLASS test excludes gems, gray stones */ || (d.oclass == WEAPON_CLASS && is_ammo(d.otmp)))))) d.otmp->quan = (long) d.cnt; }