avoid "Something's in the way" message with unidentified wand of locking
better handling for Fort Ludios and endgame in wizard mode's `^V ?' menu
no free lunch for gelatinous cubes eating scrolls of mail
+eating gold in front of the vault guard will make the guard angry
Platform- and/or Interface-Specific Fixes
E void NDECL(paygd);
E long NDECL(hidden_gold);
E boolean NDECL(gd_sound);
+E void FDECL(vault_gd_watching, (unsigned int));
/* ### version.c ### */
** formerly vault.h -- vault guard extension
*/
#define FCSIZ (ROWNO+COLNO)
+#define GD_EATGOLD 0x01
+#define GD_DESTROYGOLD 0x02
struct fakecorridor {
xchar fx, fy, ftyp;
d_level gdlevel; /* level (& dungeon) guard was created in */
xchar warncnt; /* number of warnings to follow */
Bitfield(gddone,1); /* true iff guard has released player */
- Bitfield(unused,7);
+ Bitfield(witness,2); /* the guard saw you do something */
+ Bitfield(unused,5);
struct fakecorridor fakecorr[FCSIZ];
};
#endif
else
useupf(otmp, otmp->quan);
+ vault_gd_watching(GD_EATGOLD);
return;
}
#ifdef MAIL
if(abs(egrd->ogx - grd->mx) > 1 ||
abs(egrd->ogy - grd->my) > 1)
return(-1); /* teleported guard - treat as monster */
+
+ if(egrd->witness) {
+ verbalize("How dare you %s that gold, scoundrel!",
+ (egrd->witness & GD_EATGOLD) ? "consume" : "destroy");
+ egrd->witness = 0;
+ grd->mpeaceful = 0;
+ return(-1);
+ }
if(egrd->fcend == 1) {
if(u_in_vault &&
(u_carry_gold || um_dist(grd->mx, grd->my, 1))) {
else return((boolean)(grd == (struct monst *)0));
}
+void
+vault_gd_watching(activity)
+unsigned int activity;
+{
+ struct monst *guard = findgd();
+ if (guard && guard->mcansee && m_canseeu(guard)) {
+ if (activity == GD_EATGOLD ||
+ activity == GD_DESTROYGOLD)
+ EGD(guard)->witness = activity;
+ }
+}
/*vault.c*/