Breathing

From: Dave Ely (banzai5150@home.com)
Date: 02/13/00


Hello, I have played a MUD where you basically breathed.  If you moved too fast you ran out of breath.  I'm trying to Imp that and getting stuck.  Here's what I have already.

Theory of how it should work, I think.  Basically every char will have a value for breath at 100, every second or so, it will add a # to breath if it's less than 100.  When a move is performed, it will subtract a # from breath.  so.. following this logic of lack of.  I move, I lose 5 from breath, pulse, I get 5 back, my breath is 100.  I move move move move move, I lose 25 from breath, pulse, I get 5 back, my breath is 80.

If anyone can Help I'd apprecitate it.  Also, I want to add in a Stamina Attribute that will affect breath, but need help with putting in new attributes so their in all the proper places.


(the followingn should just keep adding 5 to breath every second, and I have it added to prompt to show, but I cant get past login name, never asks for pword)

in act.movement.c

void perform_breath(void)
{
  struct char_data *ch;

  for (ch = character_list; ch; ch->next)
    GET_BREATH(ch) += 5;

}

in comm.c
if (!(pulse % PULSE_BREATH))
  perform_breath();

in structs.h
#define PULSE_BREATH    (1 RL_SEC)

(in player section)
int breath;

utils.h
#define GET_BREATH(ch)  ((ch)->breath)

----------------------------------
Download ICQ at http://www.icq.com


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT