Three related bug fixed, two reported in U409.
+ If you zapped a wand of cold downward while hiding underwater, the uundetected
flag was not reset (but the monster case was code correctly), resulting in
an impossible error on the next attack
+ If you finished eating something you were hiding under and were attacked,
another impossible would occur
+ While checking the eating gold case, I noticed that several cases would lose
gold on the floor if the attempt to eat it failed
The first case is fixed by resetting the flag just like the monster case.
The other cases are fixed by adding code to useupf to deal with this.
eatspecial and floorfood were modified to allow useupf to be called, and
fix the 3rd bug in the process.
clean up inconsistency between various places quaff is documented
is_damageable was using is_rottable incorrectly
charge for use of an unpaid tinning kit
+avoid impossible when water freezes while hero is hiding under water
+avoid impossible after eating the object the hero is hiding under
+failed attempt to eat floor gold while polymorphed would lose the gold
Platform- and/or Interface-Specific Fixes
#ifdef GOLDOBJ
if (carried(otmp))
useupall(otmp);
- else
+#else
+ if (otmp->where == OBJ_FREE)
+ dealloc_obj(otmp);
#endif
- dealloc_obj(otmp);
+ else
+ useupf(otmp, otmp->quan);
return;
}
if (otmp->oclass == POTION_CLASS) {
Sprintf(qbuf, "There are %ld gold pieces here; eat them?",
gold->quan);
if ((c = yn_function(qbuf, ynqchars, 'n')) == 'y') {
- obj_extract_self(gold);
return gold;
} else if (c == 'q') {
return (struct obj *)0;
long numused;
{
register struct obj *otmp;
+ boolean at_u = (obj->ox == u.ux && obj->oy == u.uy);
/* burn_floor_paper() keeps an object pointer that it tries to
* useupf() multiple times, so obj must survive if plural */
else (void)stolen_value(otmp, otmp->ox, otmp->oy, FALSE, FALSE);
}
delobj(otmp);
+ if (at_u && u.uundetected && hides_under(youmonst.data))
+ u.uundetected = OBJ_AT(u.ux, u.uy);
}
#endif /* OVLB */
if (u.uinwater) { /* not just `if (Underwater)' */
/* leave the no longer existent water */
u.uinwater = 0;
+ u.uundetected = 0;
docrt();
vision_full_recalc = 1;
} else if (u.utrap && u.utraptype == TT_LAVA) {