Files
nethack/include
Pasi Kallinen 20f214592a Lua: object timers
Expose object timers to lua scripts. For example:

   local o = obj.new("cockatrice egg");
   o:placeobj(5, 5);
   o:start_timer("hatch-egg", 3);

Available methods are:

- obj.has_timer("rot-corpse")
    returns true if object has attached timer, false otherwise.

- obj.peek_timer("hatch-egg")
    returns an integer value, which is the turn when the timer
    attached to the object would trigger. returns 0 if no such timer.

- obj.stop_timer("shrink-glob")
    stops attached timer, or if no timer type is given, stops all
    timers attached to the object.

- obj.start_timer("zombify-mon", 15)
    starts a timer with a trigger time in that many turns in the future.
    replaces any previous timer of the same type.

Valid timers are "rot-organic", "rot-corpse", "revive-mon",
"zombify-mon", "burn-obj", "hatch-egg", "fig-transform",
and "shrink-glob". Also "melt-ice" is recognized, but does nothing
to objects.
2022-03-13 14:50:07 +02:00
..
2022-02-04 11:01:20 -05:00
2022-02-03 00:27:43 -08:00
2021-02-07 22:25:25 -06:00
2020-10-14 09:25:45 -07:00
2022-01-29 11:13:01 -08:00
2022-03-11 07:33:28 -05:00
2022-03-04 13:07:14 -08:00
2022-03-07 02:06:55 -08:00
2022-02-22 14:41:20 +02:00
2021-01-26 21:06:16 -05:00
2022-03-13 14:50:07 +02:00
2022-03-12 17:25:54 -08:00
2022-03-11 07:33:28 -05:00
2021-01-20 22:18:34 -06:00
2021-12-26 00:16:55 -08:00
2020-12-04 09:30:21 +02:00
2022-02-16 23:04:02 +02:00
2022-02-19 17:31:34 -08:00
2022-02-02 05:26:03 -08:00
2022-01-28 08:30:08 +02:00
2022-03-12 17:25:54 -08:00
2021-12-19 19:31:19 -08:00
2022-02-23 12:53:09 +02:00
2022-03-09 07:06:37 -08:00
2021-09-18 19:51:04 -04:00
2022-03-02 13:09:42 -08:00
2022-02-01 13:03:41 -05:00
2020-08-12 16:15:28 -07:00
2022-03-13 14:50:07 +02:00
2022-02-24 16:24:02 +02:00
2021-10-21 08:48:23 -04:00
2021-12-20 08:16:13 -08:00
2021-09-20 09:32:40 -04:00
2022-01-29 16:28:06 -05:00
2021-01-26 10:27:51 -05:00
2022-02-27 01:55:25 -08:00
2022-01-11 10:25:50 -08:00