known) even while being strangled at the time
hero could cast spells while poly'd into a form which can't speak (or grunt,&c)
or while being strangled
+when poly'd into a giant and moving onto a boulder's spot, you could get "you
+ try to move the boulder, but in vain", "however, you can easily pick
+ it up", "you are carrying too much stuff to pick up another boulder"
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
-/* NetHack 3.6 extern.h $NHDT-Date: 1508479720 2017/10/20 06:08:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.618 $ */
+/* NetHack 3.6 extern.h $NHDT-Date: 1508549428 2017/10/21 01:30:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.619 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
E int FDECL(loot_mon, (struct monst *, int *, boolean *));
E int NDECL(dotip);
E boolean FDECL(is_autopickup_exception, (struct obj *, BOOLEAN_P));
+E boolean FDECL(autopick_testobj, (struct obj *, BOOLEAN_P));
/* ### pline.c ### */
-/* NetHack 3.6 hack.c $NHDT-Date: 1496619131 2017/06/04 23:32:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.175 $ */
+/* NetHack 3.6 hack.c $NHDT-Date: 1508549436 2017/10/21 01:30:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.180 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
feel_location(sx, sy);
cannot_push:
if (throws_rocks(youmonst.data)) {
+ boolean
+ canpickup = (!Sokoban
+ /* similar exception as in can_lift():
+ when poly'd into a giant, you can
+ pick up a boulder if you have a free
+ slot or into the overflow ('#') slot
+ unless already carrying at least one */
+ && (inv_cnt(FALSE) < 52 || !carrying(BOULDER))),
+ willpickup = (canpickup && autopick_testobj(otmp, TRUE));
+
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) {
You("aren't skilled enough to %s %s from %s.",
- (flags.pickup && !Sokoban) ? "pick up" : "push aside",
+ willpickup ? "pick up" : "push aside",
the(xname(otmp)), y_monnam(u.usteed));
} else {
- pline("However, you can easily %s.",
- (flags.pickup && !Sokoban) ? "pick it up"
- : "push it aside");
+ /*
+ * willpickup: you easily pick it up
+ * canpickup: you could easily pick it up
+ * otherwise: you easily push it aside
+ */
+ pline("However, you %seasily %s.",
+ (willpickup || !canpickup) ? "" : "could ",
+ (willpickup || canpickup) ? "pick it up"
+ : "push it aside");
sokoban_guilt();
break;
}
-/* NetHack 3.6 pickup.c $NHDT-Date: 1498078877 2017/06/21 21:01:17 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.185 $ */
+/* NetHack 3.6 pickup.c $NHDT-Date: 1508549438 2017/10/21 01:30:38 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.192 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
#if 0 /* not used */
STATIC_DCL boolean FDECL(allow_cat_no_uchain, (struct obj *));
#endif
-STATIC_DCL boolean FDECL(autopick_testobj, (struct obj *, BOOLEAN_P));
STATIC_DCL int FDECL(autopick, (struct obj *, int, menu_item **));
STATIC_DCL int FDECL(count_categories, (struct obj *, int));
STATIC_DCL long FDECL(carry_count, (struct obj *, struct obj *, long,
return FALSE;
}
-STATIC_OVL boolean
+boolean
autopick_testobj(otmp, calc_costly)
struct obj *otmp;
boolean calc_costly;