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

Function t_missile

src/trap.c:1017–1027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1015
1016/* make a single arrow/dart/rock for a trap to shoot or drop */
1017staticfn struct obj *
1018t_missile(int otyp, struct trap *trap)
1019{
1020 struct obj *otmp = mksobj(otyp, TRUE, FALSE);
1021
1022 otmp->quan = 1L;
1023 otmp->owt = weight(otmp);
1024 otmp->opoisoned = 0;
1025 otmp->ox = trap->tx, otmp->oy = trap->ty;
1026 return otmp;
1027}
1028
1029void
1030set_utrap(unsigned int tim, unsigned int typ)

Callers 3

trapeffect_arrow_trapFunction · 0.85
trapeffect_dart_trapFunction · 0.85
trapeffect_rocktrapFunction · 0.85

Calls 2

mksobjFunction · 0.85
weightFunction · 0.85

Tested by

no test coverage detected