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

Function do_blinding_ray

src/apply.c:60–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 no_elbow_room[] = "don't have enough elbow-room to maneuver.";
59
60void
61do_blinding_ray(struct obj *obj)
62{
63 struct monst *mtmp = bhit(u.dx, u.dy, COLNO, FLASHED_LIGHT,
64 (int (*) (MONST_P, OBJ_P)) 0,
65 (int (*) (OBJ_P, OBJ_P)) 0, &obj);
66
67 obj->ox = u.ux, obj->oy = u.uy; /* flash_hits_mon() wants this */
68 if (mtmp) {
69 (void) flash_hits_mon(mtmp, obj);
70 if (obj->otyp == EXPENSIVE_CAMERA)
71 see_monster_closeup(mtmp, TRUE); /* TRUE for photo */
72 }
73 /* normally bhit() would do this but for FLASHED_LIGHT we want it
74 to be deferred until after flash_hits_mon() */
75 transient_light_cleanup();
76}
77
78staticfn int
79use_camera(struct obj *obj)

Callers 2

invoke_blinding_rayFunction · 0.85
use_cameraFunction · 0.85

Calls 4

bhitFunction · 0.85
flash_hits_monFunction · 0.85
see_monster_closeupFunction · 0.85
transient_light_cleanupFunction · 0.85

Tested by

no test coverage detected