weight of gold

I had wizweight On when testing glob changes and noticed
|Slasher drops a gold piece (0 aum).

Coins are supposed to weigh 1/100 of a unit, and the calculation
rounds rather than simply truncates any fraction, but that still
yielded 0 for quantities of 1..49.  Force any non-zero stack of
gold to weigh at least 1 unit.

Also, add a check for attempting to weigh a quantity 0 or less
(of anything, not only for gold) just in case.
This commit is contained in:
PatR
2021-11-07 13:27:44 -08:00
parent e8acc185ad
commit 90aded3648
2 changed files with 9 additions and 1 deletions
+1
View File
@@ -678,6 +678,7 @@ prevent normal monster activity from picking up the mines' luckstone or the
Sokoban amulet/bag before hero has done so; relying on scare monster
and/or engraved Elbereth wasn't sufficient to guard the Sokoban prize
proceed a little further into dochat() if hero is deaf
stacks of 1 to 49 gold pieces weighed 0
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository