Unify guards yelling
This commit is contained in:
@@ -1373,6 +1373,7 @@ E void FDECL(mon_regen, (struct monst *,BOOLEAN_P));
|
||||
E int FDECL(dochugw, (struct monst *));
|
||||
E boolean FDECL(onscary, (int,int,struct monst *));
|
||||
E void FDECL(monflee, (struct monst *, int, BOOLEAN_P, BOOLEAN_P));
|
||||
E void FDECL(mon_yells, (struct monst *, const char *));
|
||||
E int FDECL(dochug, (struct monst *));
|
||||
E int FDECL(m_move, (struct monst *,int));
|
||||
E void FDECL(dissolve_bars, (int,int));
|
||||
|
||||
14
src/dokick.c
14
src/dokick.c
@@ -1201,11 +1201,7 @@ dumb:
|
||||
if (is_watch(mtmp->data) &&
|
||||
couldsee(mtmp->mx, mtmp->my) &&
|
||||
mtmp->mpeaceful) {
|
||||
if (canspotmon(mtmp))
|
||||
pline("%s yells:", Amonnam(mtmp));
|
||||
else
|
||||
You_hear("someone yell:");
|
||||
verbalize("Halt, thief! You're under arrest!");
|
||||
mon_yells(mtmp, "Halt, thief! You're under arrest!");
|
||||
(void) angry_guards(FALSE);
|
||||
break;
|
||||
}
|
||||
@@ -1219,15 +1215,11 @@ dumb:
|
||||
if (DEADMONSTER(mtmp)) continue;
|
||||
if (is_watch(mtmp->data) &&
|
||||
mtmp->mpeaceful && couldsee(mtmp->mx, mtmp->my)) {
|
||||
if (canspotmon(mtmp))
|
||||
pline("%s yells:", Amonnam(mtmp));
|
||||
else
|
||||
You_hear("someone yell:");
|
||||
if(levl[x][y].looted & D_WARNED) {
|
||||
verbalize("Halt, vandal! You're under arrest!");
|
||||
mon_yells(mtmp, "Halt, vandal! You're under arrest!");
|
||||
(void) angry_guards(FALSE);
|
||||
} else {
|
||||
verbalize("Hey, stop damaging that door!");
|
||||
mon_yells(mtmp, "Hey, stop damaging that door!");
|
||||
levl[x][y].looted |= D_WARNED;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -50,6 +50,18 @@ boolean for_unlocking; /* true => credit card ok, false => not ok */
|
||||
return m_carrying(mon, SKELETON_KEY) || m_carrying(mon, LOCK_PICK);
|
||||
}
|
||||
|
||||
void
|
||||
mon_yells(mon, shout)
|
||||
struct monst *mon;
|
||||
const char *shout;
|
||||
{
|
||||
if (canspotmon(mon))
|
||||
pline("%s yells:", Amonnam(mon));
|
||||
else
|
||||
You_hear("someone yell:");
|
||||
verbalize(shout);
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
watch_on_duty(mtmp)
|
||||
register struct monst *mtmp;
|
||||
@@ -63,13 +75,11 @@ register struct monst *mtmp;
|
||||
(levl[x][y].doormask & D_LOCKED)) {
|
||||
|
||||
if(couldsee(mtmp->mx, mtmp->my)) {
|
||||
|
||||
pline("%s yells:", Amonnam(mtmp));
|
||||
if(levl[x][y].looted & D_WARNED) {
|
||||
verbalize("Halt, thief! You're under arrest!");
|
||||
mon_yells(mtmp, "Halt, thief! You're under arrest!");
|
||||
(void) angry_guards(!!Deaf);
|
||||
} else {
|
||||
verbalize("Hey, stop picking that lock!");
|
||||
mon_yells(mtmp, "Hey, stop picking that lock!");
|
||||
levl[x][y].looted |= D_WARNED;
|
||||
}
|
||||
stop_occupation();
|
||||
|
||||
Reference in New Issue
Block a user