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

Function attach_fig_transform_timeout

src/timeout.c:1203–1218  ·  view source on GitHub ↗

Attach a fig_transform timeout to the given figurine. */

Source from the content-addressed store, hash-verified

1201
1202/* Attach a fig_transform timeout to the given figurine. */
1203void
1204attach_fig_transform_timeout(struct obj *figurine)
1205{
1206 int i;
1207
1208 /* stop previous timer, if any */
1209 (void) stop_timer(FIG_TRANSFORM, obj_to_any(figurine));
1210
1211 /*
1212 * Decide when to transform the figurine.
1213 */
1214 i = rnd(9000) + 200;
1215 /* figurine will transform */
1216 (void) start_timer((long) i, TIMER_OBJECT, FIG_TRANSFORM,
1217 obj_to_any(figurine));
1218}
1219
1220/* give a fumble message */
1221staticfn void

Callers 3

carry_obj_effectsFunction · 0.85
set_corpsenmFunction · 0.85
curseFunction · 0.85

Calls 4

stop_timerFunction · 0.85
obj_to_anyFunction · 0.85
rndFunction · 0.85
start_timerFunction · 0.85

Tested by

no test coverage detected