Re: str,dex, etc values

From: Sammy (samedi@clark.net)
Date: 12/31/95


On Sun, 31 Dec 1995 BryanRoach@aol.com wrote:

> Quick question:
> 
> I've implemented races in my mud, and have which race you pich affect your
> str, dex, int, etc. 
> 
> Is there a problem with any of the stats being more than 18? I already
> changed the added strength to be generated if str => 18. Is there anything
> else that has some hard coded limit based on a stat maxing out at 18?  I have
> not investigated the fighting routines yet, so I'm not that familiar with the
> mechanics. 

In file handler.c, routine affect_total(), there's a line like this:

  i = (IS_NPC(ch) ? 25 : 18);

This line will override any race or eq bonuses that make a stat more than 
18.  You can fix this several ways.  The easiest is to increase the max 
(change the 18 to a higher number), though that will allow all players to 
get over 18 with eq bonuses.  If you don't want that, you can instead 
change the lines after the above line to look something like this:

Old line:
  GET_DEX(ch) = MAX(0, MIN(GET_DEX(ch), i));
New line:
  GET_DEX(ch) = MAX(0, MIN(GET_DEX(ch), MAX(ch->real_abils.dex, i)));

Then if the player has a natural 19 or higher dex, that will be their dex 
cap.

Sam



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