Re: Aging

From: John Evans (evansj@HI-LINE.NET)
Date: 08/28/97


On Thu, 28 Aug 1997, Sammy wrote:

> On Wed, 27 Aug 1997, John Evans wrote:
>
> > I'm working on a command that will give the player some temorary benefits
> > (to-hit, to-dam, haste, etc..) but it will age them 5 years.
>
> There's already an APPLY_AGE that can be used as object and spell affects.
> All you need to do is add an affect to the player as if it were a spell
> (don't know the details on that).

There is that! My grep for 'age' didn't find that because I didn't do
'-i' (case insensitive). That's pointed to exactly what I needed. :)

>
> > I found the following in structs.h:
> > struct char_player_data {
> > /* SNIP */
> >    struct time_data time;  /* PC's AGE in days                 */
> > /* SNIP */
> > }
>
> The comment is misleading.  It's a structure, not a time variable.
> It's also not days, but seconds.  The real PC age in *mud years* is
> ch->player.time.birth.

If I would have read the code, and not the comment, then I would have
noticed that, and probably would have saved a couple handfuls of hair.

> So the best way to add a temporary age change would be to use a spell-like
> affect, or you can change it directly with:
>
> ch->player.time.birth += 5 * SECS_PER_MUD_YEAR;

Thanks! That did the trick perfectly.... Now to figure out how to make
characters suffer 'real death' (ie.: Dead and deleted with no corpse)
when they die of old age.

Oh... And before anyone hops on my case for being evil and cruel and unjust:
There are ways to reduce one's age.
There will be warning signs of getting old.
        - Messages about arthritis, wrinkles, gray hair, etc.
        - Reduction in Move, Con, Str.
        - Boost in Int, and Wis.

Thanks for the help Sammy! :)

John Evans
mailto: evansj@hi-line.net    http://www.hi-line.net/~evansj

I don't suffer from Insanity!  I enjoy every minute of it!


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST