#dipping from steed
Fix the reported bug of an unskilled rider who is unable to pick items off the floor while mounted still being able to dip into water. There might be other actions which need similar checking; this one only handles the dip into pool/moat case.
This commit is contained in:
@@ -1369,8 +1369,7 @@ int x, y;
|
||||
if (!can_reach_floor()) {
|
||||
#ifdef STEED
|
||||
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
|
||||
You("aren't skilled enough to reach from %s.",
|
||||
mon_nam(u.usteed));
|
||||
rider_cant_reach(); /* not skilled enough to reach */
|
||||
else
|
||||
#endif
|
||||
You("cannot reach the %s.", surface(x, y));
|
||||
|
||||
11
src/potion.c
11
src/potion.c
@@ -593,7 +593,7 @@ peffects(otmp)
|
||||
if (Free_action)
|
||||
You("stiffen momentarily.");
|
||||
else {
|
||||
if (Levitation||Is_airlevel(&u.uz)||Is_waterlevel(&u.uz))
|
||||
if (Levitation || Is_airlevel(&u.uz)||Is_waterlevel(&u.uz))
|
||||
You("are motionlessly suspended.");
|
||||
#ifdef STEED
|
||||
else if (u.usteed)
|
||||
@@ -1546,9 +1546,14 @@ dodip()
|
||||
tmp = (here == POOL) ? "pool" : "moat";
|
||||
Sprintf(qbuf, "Dip it into the %s?", tmp);
|
||||
if (yn(qbuf) == 'y') {
|
||||
if (Levitation)
|
||||
if (Levitation) {
|
||||
floating_above(tmp);
|
||||
else {
|
||||
#ifdef STEED
|
||||
} else if (u.usteed && !is_swimmer(u.usteed->data) &&
|
||||
P_SKILL(P_RIDING) < P_BASIC) {
|
||||
rider_cant_reach(); /* not skilled enough to reach */
|
||||
#endif
|
||||
} else {
|
||||
(void) get_wet(obj);
|
||||
if (obj->otyp == POT_ACID) useup(obj);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)steed.c 3.4 2002/09/08 */
|
||||
/* SCCS Id: @(#)steed.c 3.4 2002/10/10 */
|
||||
/* Copyright (c) Kevin Hugo, 1998-1999. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -14,6 +14,13 @@ static NEARDATA const char steeds[] = {
|
||||
|
||||
STATIC_DCL boolean FDECL(landing_spot, (coord *, int));
|
||||
|
||||
/* caller has decided that hero can't reach something while mounted */
|
||||
void
|
||||
rider_cant_reach()
|
||||
{
|
||||
You("aren't skilled enough to reach from %s.", y_monnam());
|
||||
}
|
||||
|
||||
/*** Putting the saddle on ***/
|
||||
|
||||
/* Can this monster wear a saddle? */
|
||||
|
||||
Reference in New Issue
Block a user