throw-and-return for aklys
The comment I added to data.base--to explain that despite what the short description says, an aklys wouldn't return to sender after being thrown--was bugging me, so I've made aklyses behave like Mjollnir. If thrown when wielded as primary weapon, it will usually return and usually be re-wielded. I also added a new message when either thrown Mjollnir or thrown aklys is expected to return and fails to do so. Most of the diff to dothrow.c is a change in indentation level. The amount of code needed was quite small. Autopickup for thrown Mjollnir which had failed to return was putting it into the quiver slot if that was empty. Note quite an outright bug, but it started wielded and can't be thrown if quivered, so exclude it from the stuff that will auto-fill the quiver slot when added to invent (post-3.6.0 issue).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 invent.c $NHDT-Date: 1518053384 2018/02/08 01:29:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.224 $ */
|
||||
/* NetHack 3.6 invent.c $NHDT-Date: 1519672703 2018/02/26 19:18:23 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.225 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -598,6 +598,11 @@ struct obj *obj;
|
||||
|
||||
/* fill empty quiver if obj was thrown */
|
||||
if (flags.pickup_thrown && !uquiver && obj_was_thrown
|
||||
/* if Mjollnir is thrown and fails to return, we want to
|
||||
auto-pick it when we move to its spot, but not into quiver;
|
||||
aklyses behave like Mjollnir when thrown while wielded, but
|
||||
we lack sufficient information here make them exceptions */
|
||||
&& obj->oartifact != ART_MJOLLNIR
|
||||
&& (throwing_weapon(obj) || is_ammo(obj)))
|
||||
setuqwep(obj);
|
||||
added:
|
||||
|
||||
Reference in New Issue
Block a user