boulder pickup: contradictory message sequence
Poly'd into a giant with a full inventory that already contains at least one boulder, moving onto a boulder (that can't be pushed due to a wall or other obstacle) yielded 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. You see here a boulder. The second and third statements contradict each other. Make the code that dishes out the second message smarter. If autopickup is set for it and you will pick up the boulder: However, you easily pick it up. If autopickup is not set for it but would have worked if it was: However, you could easily pick it up. If your inventory is full and you have a boulder (or are in Sokoban) However, you easily push it aside. That last one is instead of "however, you can squeeze yourself into a small opening" that you'd get if not a giant and not carrying much.
This commit is contained in:
26
src/hack.c
26
src/hack.c
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
|
||||
@@ -315,14 +315,30 @@ moverock()
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user