MCPcopy Create free account
hub / github.com/NetHack/NetHack / gulp_blnd_check

Function gulp_blnd_check

src/mhitu.c:1272–1285  ·  view source on GitHub ↗

An interface for use when taking a blindfold off, for example, * to see if an engulfing attack should immediately take affect, like * a passive attack. TRUE if engulfing blindness occurred */

Source from the content-addressed store, hash-verified

1270 * to see if an engulfing attack should immediately take affect, like
1271 * a passive attack. TRUE if engulfing blindness occurred */
1272boolean
1273gulp_blnd_check(void)
1274{
1275 struct attack *mattk;
1276
1277 if (!Blinded && u.uswallow
1278 && (mattk = attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND))
1279 && can_blnd(u.ustuck, &gy.youmonst, mattk->aatyp, (struct obj *) 0)) {
1280 ++u.uswldtim; /* compensate for gulpmu change */
1281 (void) gulpmu(u.ustuck, mattk);
1282 return TRUE;
1283 }
1284 return FALSE;
1285}
1286
1287/* monster swallows you, or damage if already swallowed (u.uswallow != 0) */
1288staticfn int

Callers 3

Blindf_offFunction · 0.85
wipeoffFunction · 0.85
use_towelFunction · 0.85

Calls 3

attacktype_fordmgFunction · 0.85
can_blndFunction · 0.85
gulpmuFunction · 0.85

Tested by

no test coverage detected