]> granicus.if.org Git - nethack/commitdiff
add pickup_thrown option (trunk only)
authornethack.rankin <nethack.rankin>
Sat, 13 May 2006 04:56:16 +0000 (04:56 +0000)
committernethack.rankin <nethack.rankin>
Sat, 13 May 2006 04:56:16 +0000 (04:56 +0000)
     This patch by <email deleted> was released
when 3.4.1 was current and has been incorporated into slash'em.  It is
extremely useful while using ranged weapons.  When both autopickup and
pickup_thrown are enabled, walking across previously thrown objects will
pick them up even if they don't match the current pickup_types list.
(Autopickup exceptions weren't around when the patch was first developed
and while those can be used for this purpose if you're willing to name
every object prior to throwing it, pickup_thrown is much more convenient.
Especially when you run out of weapons and resort to throwing pick-axes,
unicorn horns, and spare suits of banded mail at that floating eye who
rudely refuses to die.)  If you drop a previously thrown object (after
getting it back into your inventory again, of course), its was_thrown bit
will be clear and subsequent walking over it behaves in the regular
autopickup manner.  There's no special stacking handling; if a thrown
object lands on a compatable object and they stack, the combined stack is
subject to pickup_thrown handling.

     The original patch updated makedefs to add an entry for pickup_thrown
patch to the options list displayed by #version; I've left that out.  It
also cleared the was_thrown bit in the pickup code, resulting in being
sticky for boomerangs and Mjollnir (where throwing, catching, and then
dropping those would result in behaving as if they had most recently been
thrown rather than dropped).  I've moved that to the add-to-inventory code
instead to fix this.  The original patch also put the pickup_thrown bit
into iflags instead of flags in order to avoid invalidating save files;
I've moved it to flags where it belongs and added a patchlevel.h update.
I've also reworded the Guidebook entries slightly.  [The original patch
can be obtained from <Someone>'s "NetHack Patch Database" at
http://bilious.homelinux.org/ under the "browse" heading.  I didn't hang
on the exact URL; sorry.]

     I think objects stolen from the hero should have their was_thrown bit
set (or else add a new was_stolen bit, which seems like overkill) so that
recovering stolen objects will become simpler after the thief has been
tracked down and dealt with, but I haven't done that here.

include/patchlevel.h

index e21e615836088c2b056f176e16d067b530b97773..92fc31d2a40050457f2d312197082f1405edd45e 100644 (file)
@@ -13,7 +13,7 @@
  * Incrementing EDITLEVEL can be used to force invalidation of old bones
  * and save files.
  */
-#define EDITLEVEL      30
+#define EDITLEVEL      31
 
 #define COPYRIGHT_BANNER_A \
 "NetHack, Copyright 1985-2006"