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

Function use_whistle

src/apply.c:475–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473 alt_whistle_str[] = "produce a %s, sharp vibration.";
474
475staticfn void
476use_whistle(struct obj *obj)
477{
478 if (!can_blow(&gy.youmonst)) {
479 You("are incapable of using the whistle.");
480 } else if (Underwater) {
481 You("blow bubbles through %s.", yname(obj));
482 } else {
483 if (Deaf)
484 You_feel("rushing air tickle your %s.", body_part(NOSE));
485 else
486 You(whistle_str, obj->cursed ? "shrill" : "high");
487 Soundeffect(se_shrill_whistle, 50);
488 wake_nearby(TRUE);
489 if (obj->cursed)
490 vault_summon_gd();
491 }
492}
493
494staticfn void
495use_magic_whistle(struct obj *obj)

Callers 1

doapplyFunction · 0.85

Calls 7

can_blowFunction · 0.85
YouFunction · 0.85
ynameFunction · 0.85
You_feelFunction · 0.85
body_partFunction · 0.85
wake_nearbyFunction · 0.85
vault_summon_gdFunction · 0.85

Tested by

no test coverage detected