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:
@@ -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.
|
* Use udist+1 so steed won't cause divide by zero.
|
||||||
*/
|
*/
|
||||||
if (droppables(mtmp)) {
|
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) {
|
if (rn2(10) < edog->apport) {
|
||||||
relobj(mtmp, (int) mtmp->minvis, TRUE);
|
relobj(mtmp, (int) mtmp->minvis, TRUE);
|
||||||
if (edog->apport > 1)
|
if (edog->apport > 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user