discoverying water walking boots
If water walking boots haven't been discovered yet and underwater hero rises to the surface when putting a pair on, discover them. (Sinking while removing such on water already discovers them.)
This commit is contained in:
@@ -959,6 +959,8 @@ a hero on the quest home level who runs or travels past the quest leader and
|
|||||||
gets tossed out of the quest for some reason would keep running on the
|
gets tossed out of the quest for some reason would keep running on the
|
||||||
far side of the quest portal
|
far side of the quest portal
|
||||||
allow rush/run over water if wearing discovered water walking boots
|
allow rush/run over water if wearing discovered water walking boots
|
||||||
|
wearing water walking boots while underwater (maybe via magical breathing)
|
||||||
|
and rising to surface wasn't causing the boots to become discovered
|
||||||
flying pets wouldn't target underwater food but if they happened to fly over
|
flying pets wouldn't target underwater food but if they happened to fly over
|
||||||
such food they could and would eat it
|
such food they could and would eat it
|
||||||
praying on an altar with pet corpse on it can revive the pet
|
praying on an altar with pet corpse on it can revive the pet
|
||||||
|
|||||||
@@ -1044,6 +1044,9 @@ struct instance_globals_w {
|
|||||||
int warn_obj_cnt; /* count of monsters meeting criteria */
|
int warn_obj_cnt; /* count of monsters meeting criteria */
|
||||||
long wailmsg;
|
long wailmsg;
|
||||||
|
|
||||||
|
/* do_wear.c */
|
||||||
|
uint8 wasinwater;
|
||||||
|
|
||||||
/* symbols.c */
|
/* symbols.c */
|
||||||
nhsym warnsyms[WARNCOUNT]; /* the current warning display symbols */
|
nhsym warnsyms[WARNCOUNT]; /* the current warning display symbols */
|
||||||
|
|
||||||
|
|||||||
@@ -851,6 +851,8 @@ static const struct instance_globals_w g_init_w = {
|
|||||||
/* decl.c */
|
/* decl.c */
|
||||||
0, /* warn_obj_cnt */
|
0, /* warn_obj_cnt */
|
||||||
0L, /* wailmsg */
|
0L, /* wailmsg */
|
||||||
|
/* do_wear.c */
|
||||||
|
0U,
|
||||||
/* symbols.c */
|
/* symbols.c */
|
||||||
DUMMY, /* warnsyms */
|
DUMMY, /* warnsyms */
|
||||||
/* files.c */
|
/* files.c */
|
||||||
|
|||||||
@@ -196,8 +196,22 @@ Boots_on(void)
|
|||||||
case KICKING_BOOTS:
|
case KICKING_BOOTS:
|
||||||
break;
|
break;
|
||||||
case WATER_WALKING_BOOTS:
|
case WATER_WALKING_BOOTS:
|
||||||
|
/*
|
||||||
|
* Sequencing issue? If underwater (perhaps via magical breathing),
|
||||||
|
* putting on water walking boots produces "you slowly rise above
|
||||||
|
* the surface" then "you finish your dressing maneuver".
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* spoteffects() doesn't get called here; pooleffects() is called
|
||||||
|
during movement and u.uinwater is already False after setworn() */
|
||||||
if (u.uinwater)
|
if (u.uinwater)
|
||||||
spoteffects(TRUE);
|
spoteffects(TRUE);
|
||||||
|
/* init'd in accessory_or_armor_on() and only used here */
|
||||||
|
if (gw.wasinwater) {
|
||||||
|
if (!u.uinwater)
|
||||||
|
makeknown(WATER_WALKING_BOOTS);
|
||||||
|
gw.wasinwater = 0U;
|
||||||
|
}
|
||||||
/* (we don't need a lava check here since boots can't be
|
/* (we don't need a lava check here since boots can't be
|
||||||
put on while feet are stuck) */
|
put on while feet are stuck) */
|
||||||
break;
|
break;
|
||||||
@@ -2338,6 +2352,7 @@ accessory_or_armor_on(struct obj *obj)
|
|||||||
*
|
*
|
||||||
obj->known = 1;
|
obj->known = 1;
|
||||||
*/
|
*/
|
||||||
|
gw.wasinwater = u.uinwater; /* for WWALKING; Boots_on() is too late */
|
||||||
setworn(obj, mask);
|
setworn(obj, mask);
|
||||||
/* if there's no delay, we'll execute 'afternmv' immediately */
|
/* if there's no delay, we'll execute 'afternmv' immediately */
|
||||||
if (obj == uarm)
|
if (obj == uarm)
|
||||||
@@ -2367,6 +2382,8 @@ accessory_or_armor_on(struct obj *obj)
|
|||||||
on_msg(obj);
|
on_msg(obj);
|
||||||
}
|
}
|
||||||
svc.context.takeoff.mask = svc.context.takeoff.what = 0L;
|
svc.context.takeoff.mask = svc.context.takeoff.what = 0L;
|
||||||
|
/* gw.wasinwater = 0U; // can't clear this yet; Boots_on() needs it
|
||||||
|
* and gets called via afternmv() after this routine has returned */
|
||||||
} else { /* not armor */
|
} else { /* not armor */
|
||||||
if (ring) {
|
if (ring) {
|
||||||
/* Ring_on() expects ring to already be worn as uleft or uright */
|
/* Ring_on() expects ring to already be worn as uleft or uright */
|
||||||
|
|||||||
Reference in New Issue
Block a user