temple sounds (trunk only)
The user (<email deleted>) who recently suggested a
dump command for containers also wanted atmospheric sounds on levels which
have altars. Right now we'd have to find unattended altars the hard way
(by scanning the entire level) but we could add a counter (or set of
counters, one per alignment) like for fountains and sinks if we really
wanted to do that. [Now that I think about it, the #overview patch may
have already done something of the sort.] But what noises would an altar
be expected to produce? This only adds sounds for temples, where the
attending priest can be the source of the noise.
I'm not real thrilled with the initial set of sounds, particularly
the hallucinating one, but the implementation works. The "carcass" one is
a little clumsy; it's intended to add a hint for new players who haven't
figured out what the #offer command does.
This commit is contained in:
14
src/priest.c
14
src/priest.c
@@ -148,6 +148,18 @@ register xchar x, y;
|
||||
on_level(&(EPRI(priest)->shrlevel), &u.uz)));
|
||||
}
|
||||
|
||||
boolean
|
||||
inhistemple(priest)
|
||||
struct monst *priest;
|
||||
{
|
||||
/* make sure we have a priest */
|
||||
if (!priest || !priest->ispriest) return FALSE;
|
||||
/* priest must be on right level and in right room */
|
||||
if (!histemple_at(priest, priest->mx, priest->my)) return FALSE;
|
||||
/* temple room must still contain properly aligned altar */
|
||||
return has_shrine(priest);
|
||||
}
|
||||
|
||||
/*
|
||||
* pri_move: return 1: moved 0: didn't -1: let m_move do it -2: died
|
||||
*/
|
||||
@@ -322,7 +334,7 @@ struct monst *pri;
|
||||
struct rm *lev;
|
||||
struct epri *epri_p;
|
||||
|
||||
if (!pri) return FALSE;
|
||||
if (!pri || !pri->ispriest) return FALSE;
|
||||
epri_p = EPRI(pri);
|
||||
lev = &levl[epri_p->shrpos.x][epri_p->shrpos.y];
|
||||
if (!IS_ALTAR(lev->typ) || !(lev->altarmask & AM_SHRINE)) return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user