Fixing a buglist bug. Also changing an unrelated buglist item a bit (it was

mine to begin with, I thought I had a way to fix it but it turns out I didn't,
so I was researching it again).

Checked into CVS.
This commit is contained in:
arromdee
2002-01-13 20:37:18 +00:00
parent f19a999b9c
commit b09c3e2e69
5 changed files with 33 additions and 17 deletions

View File

@@ -1332,6 +1332,15 @@ void arti_speak(obj)
return;
}
boolean
artifact_has_invprop(otmp, inv_prop)
struct obj *otmp;
uchar inv_prop;
{
const struct artifact *arti = get_artifact(otmp);
return((boolean)(arti && (arti->inv_prop == inv_prop)));
}
#endif /* OVLB */

View File

@@ -711,8 +711,21 @@ dodown()
if (Levitation) {
if ((HLevitation & I_SPECIAL) || (ELevitation & W_ARTI)) {
/* end controlled levitation */
if (float_down(I_SPECIAL|TIMEOUT, W_ARTI))
return (1); /* came down, so moved */
if (ELevitation & W_ARTI) {
struct obj *obj;
for(obj = invent; obj; obj = obj->nobj) {
if (obj->oartifact &&
artifact_has_invprop(obj,LEVITATION)) {
if (obj->age < monstermoves)
obj->age = monstermoves + rnz(100);
else
obj->age += rnz(100);
}
}
}
if (float_down(I_SPECIAL|TIMEOUT, W_ARTI))
return (1); /* came down, so moved */
}
floating_above(stairs_down ? "stairs" : ladder_down ?
"ladder" : surface(u.ux, u.uy));