Re: [NEWBIE] Regen Rooms

From: Rasdan (thomajam@ucs.orst.edu)
Date: 02/22/97


On Sat, 22 Feb 1997, Shapeshifter wrote:
>         Right now we are using the Oasis building program and I was
> trying to figure out what some of the room flags are. Things like the
> one that is [ HRSCH ] or the [ * ] room flags. I was thinking if these
> did not do anything special there might be a way to set it so that rooms
> marked with the [ * ] flag regenerated players at a higher/faster rate.
> 
>         I was thinking 3 times as much per tick. If anyone has any ideas
> about this please let me know. Thank you for your time and patience in
> reading this.
> 
All I did was make three new flags, ROOM_HP_REGEN, ROOM_MANA_REGEN, 
ROOM_MV_REGEN in structs.h so that builders could set different rooms to 
do different things, not just regen the player each time.

Then in limits.c, in main_gain, hit_gain, move_gain, add the following:
In hit_gain:

  if (ROOM_FLAGGED(ch->in_room, ROOM_HP_REGEN))
    if (IS_WARRIOR(ch) || IS_THIEF(ch))
	gain <<= 2;	/* twice as fast */
    else
	gain *= 1.5;

in mana_gain:
  if (ROOM_FLAGGED(ch->in_room, ROOM_MANA_REGEN))
    if (IS_CLERIC(ch) || IS_MAGIC_USER(ch))
	gain <<=2;
    else
	gain *= 1;	/* may not be needed, but place filler */

in move_gain:
  if (ROOM_FLAGGED(ch->in_room, ROOM_MV_REGEN))
	gain <<=2;


That should cover it just fine.

As you can see, in regen rooms, warriors and thieves regen quicker hp 
than do clerics and mages. The opposite is true in mana regen rooms.
All classes regen mv at an equal rate.

I hope this helps.

Later,

Rasdan

         =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
	                   James C. Thomas Jr.
         thomajam@ucs.orst.edu            rasdan@necromium.com 

		If ya want to build, or code, check out:

		      finality.mudservices.com 5555
		   =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



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