throw-and-return vs !fixinv

Implement the request that a wielded+thrown aklys be given the same
inventory letter when it returns and is caught and rewielded, even for
the !fixinv setting where inventory letters don't stick.  Works for
Valkyrie-thrown Mjollnir and returning (ie, didn't hit) boomerangs as
well as for aklys.

I'm not sure how useful this really is, because on the rare occasions
that it either doesn't return or fails to be caught, it won't be given
the same letter when subsequently picked up.  So the player who relies
on it will still be vulnerable to using the wrong letter next time a
throw is attempted.  But at least picking it up explicitly displays
the new inventory letter, unlike catching it upon return.
This commit is contained in:
PatR
2020-03-01 06:46:37 -08:00
parent 297863d4bc
commit 99035e72ee
5 changed files with 60 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 polyself.c $NHDT-Date: 1581886864 2020/02/16 21:01:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.150 $ */
/* NetHack 3.6 polyself.c $NHDT-Date: 1583073991 2020/03/01 14:46:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.152 $ */
/* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
@@ -1203,7 +1203,7 @@ dospit()
break;
}
otmp->spe = 1; /* to indicate it's yours */
throwit(otmp, 0L, FALSE);
throwit(otmp, 0L, FALSE, (struct obj *) 0);
}
return 1;
}