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:
+1
-1
@@ -92,7 +92,7 @@ extern boolean artifact_hit(struct monst *, struct monst *, struct obj *,
|
|||||||
int *, int);
|
int *, int);
|
||||||
extern int doinvoke(void);
|
extern int doinvoke(void);
|
||||||
extern boolean finesse_ahriman(struct obj *);
|
extern boolean finesse_ahriman(struct obj *);
|
||||||
extern void arti_speak(struct obj *);
|
extern int arti_speak(struct obj *);
|
||||||
extern boolean artifact_light(struct obj *);
|
extern boolean artifact_light(struct obj *);
|
||||||
extern long spec_m2(struct obj *);
|
extern long spec_m2(struct obj *);
|
||||||
extern boolean artifact_has_invprop(struct obj *, uchar);
|
extern boolean artifact_has_invprop(struct obj *, uchar);
|
||||||
|
|||||||
+3
-2
@@ -4181,8 +4181,9 @@ doapply(void)
|
|||||||
pline("Sorry, I don't know how to use that.");
|
pline("Sorry, I don't know how to use that.");
|
||||||
return ECMD_FAIL;
|
return ECMD_FAIL;
|
||||||
}
|
}
|
||||||
if ((res & ECMD_TIME) && obj && obj->oartifact)
|
if (obj && obj->oartifact) {
|
||||||
arti_speak(obj);
|
res |= arti_speak(obj); /* sets ECMD_TIME bit if artifact speaks */
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -1986,16 +1986,16 @@ artifact_light(struct obj *obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* KMH -- Talking artifacts are finally implemented */
|
/* KMH -- Talking artifacts are finally implemented */
|
||||||
void
|
int
|
||||||
arti_speak(struct obj *obj)
|
arti_speak(struct obj *obj)
|
||||||
{
|
{
|
||||||
register const struct artifact *oart = get_artifact(obj);
|
const struct artifact *oart = get_artifact(obj);
|
||||||
const char *line;
|
const char *line;
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
|
|
||||||
/* Is this a speaking artifact? */
|
/* Is this a speaking artifact? */
|
||||||
if (!oart || !(oart->spfx & SPFX_SPEAK))
|
if (!oart || !(oart->spfx & SPFX_SPEAK))
|
||||||
return;
|
return ECMD_OK; /* nothing happened */
|
||||||
|
|
||||||
line = getrumor(bcsign(obj), buf, TRUE);
|
line = getrumor(bcsign(obj), buf, TRUE);
|
||||||
if (!*line)
|
if (!*line)
|
||||||
@@ -2003,7 +2003,7 @@ arti_speak(struct obj *obj)
|
|||||||
pline("%s:", Tobjnam(obj, "whisper"));
|
pline("%s:", Tobjnam(obj, "whisper"));
|
||||||
SetVoice((struct monst *) 0, 0, 80, voice_talking_artifact);
|
SetVoice((struct monst *) 0, 0, 80, voice_talking_artifact);
|
||||||
verbalize1(line);
|
verbalize1(line);
|
||||||
return;
|
return ECMD_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
|
|||||||
+3
-1
@@ -230,7 +230,9 @@ ready_weapon(struct obj *wep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* KMH -- Talking artifacts are finally implemented */
|
/* 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) {
|
if (artifact_light(wep) && !wep->lamplit) {
|
||||||
begin_burn(wep, FALSE);
|
begin_burn(wep, FALSE);
|
||||||
|
|||||||
Reference in New Issue
Block a user