talking artifact inconsistency
To get the Magic Mirror of Merlin to speak, you could apply it in any direction (or wield it). To get the Master Key of Thievery to speak, you had to apply it toward an adjacent doorway or down while on a container (or wield it). Make the key behave like the mirror.
This commit is contained in:
@@ -4181,8 +4181,9 @@ doapply(void)
|
||||
pline("Sorry, I don't know how to use that.");
|
||||
return ECMD_FAIL;
|
||||
}
|
||||
if ((res & ECMD_TIME) && obj && obj->oartifact)
|
||||
arti_speak(obj);
|
||||
if (obj && obj->oartifact) {
|
||||
res |= arti_speak(obj); /* sets ECMD_TIME bit if artifact speaks */
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -1986,16 +1986,16 @@ artifact_light(struct obj *obj)
|
||||
}
|
||||
|
||||
/* KMH -- Talking artifacts are finally implemented */
|
||||
void
|
||||
int
|
||||
arti_speak(struct obj *obj)
|
||||
{
|
||||
register const struct artifact *oart = get_artifact(obj);
|
||||
const struct artifact *oart = get_artifact(obj);
|
||||
const char *line;
|
||||
char buf[BUFSZ];
|
||||
|
||||
/* Is this a speaking artifact? */
|
||||
if (!oart || !(oart->spfx & SPFX_SPEAK))
|
||||
return;
|
||||
return ECMD_OK; /* nothing happened */
|
||||
|
||||
line = getrumor(bcsign(obj), buf, TRUE);
|
||||
if (!*line)
|
||||
@@ -2003,7 +2003,7 @@ arti_speak(struct obj *obj)
|
||||
pline("%s:", Tobjnam(obj, "whisper"));
|
||||
SetVoice((struct monst *) 0, 0, 80, voice_talking_artifact);
|
||||
verbalize1(line);
|
||||
return;
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
boolean
|
||||
|
||||
@@ -230,7 +230,9 @@ ready_weapon(struct obj *wep)
|
||||
}
|
||||
|
||||
/* KMH -- Talking artifacts are finally implemented */
|
||||
arti_speak(wep);
|
||||
if (wep && wep->oartifact) {
|
||||
res |= arti_speak(wep); /* sets ECMD_TIME bit if artifact speaks */
|
||||
}
|
||||
|
||||
if (artifact_light(wep) && !wep->lamplit) {
|
||||
begin_burn(wep, FALSE);
|
||||
|
||||
Reference in New Issue
Block a user