don't hide the zero value of apport

It was pointed out that it might not be a good idea to hide the illegal value of apport.
This commit is contained in:
nhmall
2025-01-24 18:24:26 -05:00
parent 3c824cd866
commit dc938b7acf

View File

@@ -406,7 +406,8 @@ dog_invent(struct monst *mtmp, struct edog *edog, int udist)
* Use udist+1 so steed won't cause divide by zero.
*/
if (droppables(mtmp)) {
if (!rn2(udist + 1) || (edog->apport && !rn2(edog->apport)))
assert(edog->apport > 0);
if (!rn2(udist + 1) || !rn2(edog->apport))
if (rn2(10) < edog->apport) {
relobj(mtmp, (int) mtmp->minvis, TRUE);
if (edog->apport > 1)