MCPcopy Index your code
hub / github.com/NetHack/NetHack / gd_letknow

Function gd_letknow

src/vault.c:868–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866}
867
868staticfn void
869gd_letknow(struct monst *grd)
870{
871 if (!cansee(grd->mx, grd->my) || !mon_visible(grd))
872 You_hear("%s.",
873 m_carrying(grd, TIN_WHISTLE)
874 ? "the shrill sound of a guard's whistle"
875 : "angry shouting");
876 else
877 You(um_dist(grd->mx, grd->my, 2)
878 ? "see %s approaching."
879 : "are confronted by %s.",
880 /* "an angry guard" */
881 x_monnam(grd, ARTICLE_A, "angry", 0, FALSE));
882}
883
884/*
885 * return 1: guard moved, 0: guard didn't, -1: let m_move do it, -2: died

Callers 1

gd_moveFunction · 0.85

Calls 5

mon_visibleFunction · 0.85
You_hearFunction · 0.85
m_carryingFunction · 0.85
YouFunction · 0.85
um_distFunction · 0.85

Tested by

no test coverage detected