Re: [CODE] [CIRCLE] Regeneration

From: The Arrow (arrow@pileborg.org)
Date: 01/09/02


On Wed, 9 Jan 2002, Morten Bojsen-Hansen wrote:

> I am creating a new type of item apply that adds faster regeneration of
> hits, mana and move.
> However, the char only regenerates every MUD hour now, and I
> want to change it to regenerate more often (like every 2 seconds) but much
> less of course.
>
> To my question:
> Where do I lower the regeneration time?

To answer a completely different question (one that has not been asked):

My mud have a new field in the room file that tells the mud to give
characters standing in thos rooms more hit/move/mana points at certain
times. These times are PULSE_VILENCE, PULSE_MOBILE, and at every tick
(the timing is controled by flags). What I did was to call a special
function from the heartbeat() function (in comm.c), that then handles
these "regeneration" rooms.

To come back to the topic, what I would do in this case, is to call a
function in heartbeat() that goes through the character list every X pulse.
This function then checks if the characters are affected by this spell
(or whatever), and then adds some hit/mana/move points.

Remember: never increase the amount above the characters max!
(use GET_HIT(ch) = MIN(GET_MAX_HIT(ch), GET_HIT(ch) + amount)).

/ Joachim
=======================================================================
The Arrow                                   http://pileborg.org/~arrow/
Joachim Pileborg                        Arrow @ ptmud.pileborg.org 1111
=======================================================================
"Everyone wants to go to heaven, but no one wants to die" - Two Witches

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT