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

Function dofindgem

src/fountain.c:164–176  ·  view source on GitHub ↗

Find a gem in the sparkling waters. */

Source from the content-addressed store, hash-verified

162
163/* Find a gem in the sparkling waters. */
164staticfn void
165dofindgem(void)
166{
167 if (!Blind)
168 You("spot a gem in the sparkling waters!");
169 else
170 You_feel("a gem here!");
171 (void) mksobj_at(rnd_class(DILITHIUM_CRYSTAL, LUCKSTONE - 1), u.ux, u.uy,
172 FALSE, FALSE);
173 SET_FOUNTAIN_LOOTED(u.ux, u.uy);
174 newsym(u.ux, u.uy);
175 exercise(A_WIS, TRUE); /* a discovery! */
176}
177
178staticfn boolean
179watchman_warn_fountain(struct monst *mtmp)

Callers 2

drinkfountainFunction · 0.85
dipfountainFunction · 0.85

Calls 6

YouFunction · 0.85
You_feelFunction · 0.85
mksobj_atFunction · 0.85
rnd_classFunction · 0.85
newsymFunction · 0.85
exerciseFunction · 0.85

Tested by

no test coverage detected