...since guards respond to shrill whistles.
Based on a patch by Leon Arnott.
response, to operate on applicable all items, there would still be a
followup menu asking to choose specific items)
eating 1 tin from stack of N (for N >= 2) on shop's floor forced hero to buy 2
+using a cursed whistle in a vault will summon the guard immediately
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
E void FDECL(newegd, (struct monst *));
E void FDECL(free_egd, (struct monst *));
E boolean FDECL(grddead, (struct monst *));
+E void NDECL(vault_summon_gd);
E char FDECL(vault_occupied, (char *));
E void NDECL(invault);
E int FDECL(gd_move, (struct monst *));
/* weight increment of heavy iron ball */
#define IRON_BALL_W_INCR 160
+/* number of turns it takes for vault guard to show up */
+#define VAULT_GUARD_TIME 30
+
/* hunger states - see hu_stat in eat.c */
enum hunger_state_types {
SATIATED = 0,
} else {
You(whistle_str, obj->cursed ? "shrill" : "high");
wake_nearby();
+ if (obj->cursed)
+ vault_summon_gd();
}
}
return (struct monst *) 0;
}
+void
+vault_summon_gd()
+{
+ if (vault_occupied(u.urooms) && !findgd())
+ u.uinvault = (VAULT_GUARD_TIME - 1);
+}
+
char
vault_occupied(array)
char *array;
vaultroom -= ROOMOFFSET;
guard = findgd();
- if (++u.uinvault % 30 == 0 && !guard) { /* if time ok and no guard now. */
+ if (++u.uinvault % VAULT_GUARD_TIME == 0 && !guard) {
+ /* if time ok and no guard now. */
char buf[BUFSZ];
register int x, y, dd, gx, gy;
int lx = 0, ly = 0;