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

Function fill_pit

src/trap.c:4009–4020  ·  view source on GitHub ↗

a boulder fills a pit or a hole at x,y */

Source from the content-addressed store, hash-verified

4007
4008/* a boulder fills a pit or a hole at x,y */
4009void
4010fill_pit(coordxy x, coordxy y)
4011{
4012 struct obj *otmp;
4013 struct trap *t;
4014
4015 if ((t = t_at(x, y)) != 0 && (is_pit(t->ttyp) || is_hole(t->ttyp))
4016 && (otmp = sobj_at(BOULDER, x, y)) != 0) {
4017 obj_extract_self(otmp);
4018 (void) flooreffects(otmp, x, y, "settle");
4019 }
4020}
4021
4022/* stop levitating */
4023int

Callers 15

teledsFunction · 0.85
drop_ballFunction · 0.85
goto_levelFunction · 0.85
revive_corpseFunction · 0.85
moverock_coreFunction · 0.85
mon_leaving_levelFunction · 0.85
trapeffect_landmineFunction · 0.85
blow_up_landmineFunction · 0.85
mintrapFunction · 0.85
float_upFunction · 0.85
climb_pitFunction · 0.85
help_monster_outFunction · 0.85

Calls 4

t_atFunction · 0.85
sobj_atFunction · 0.85
obj_extract_selfFunction · 0.85
flooreffectsFunction · 0.85

Tested by

no test coverage detected