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

Function disarm_shooting_trap

src/trap.c:5663–5673  ·  view source on GitHub ↗

removes traps that shoot arrows, darts, etc. */

Source from the content-addressed store, hash-verified

5661
5662/* removes traps that shoot arrows, darts, etc. */
5663staticfn int
5664disarm_shooting_trap(struct trap *ttmp, int otyp)
5665{
5666 int fails = try_disarm(ttmp, FALSE);
5667
5668 if (fails < 2)
5669 return fails;
5670 You("disarm %s trap.", the_your[ttmp->madeby_u]);
5671 cnv_trap_obj(otyp, 50 - rnl(50), ttmp, FALSE);
5672 return 1;
5673}
5674
5675/* trying to #untrap a monster from a pit; is the weight too heavy? */
5676staticfn int

Callers 1

untrapFunction · 0.85

Calls 4

try_disarmFunction · 0.85
YouFunction · 0.85
cnv_trap_objFunction · 0.85
rnlFunction · 0.85

Tested by

no test coverage detected