Re: [30bpl17]quit problem and stats on immortals

From: Juliano Ravasi Ferraz (jferraz@linkway.com.br)
Date: 06/30/00


> 2. When immortals with 25 in all stats wear eq or cast a spell on
> themselves the stats go down to 18 except charisma it stayes at 25,
> anyone able to help me fix this ? also since the circle30bpl17 allows
> people to roll a stat up to 25 and it saves, i wonder why if i set
> someones stat to 25, it saves as 18 ?

On handler.c, affect_total():

--<snip>--
    for (af = ch->affected; af; af = af->next)
      affect_modify(ch, af->location, af->modifier, af->bitvector,
TRUE);

    /* Make certain values are between 0..25, not < 0 and not > 25! */

-   i = (IS_NPC(ch) ? 25 : 18);
+   i = (IS_NPC(ch) || (GET_LEVEL(ch) >= LVL_GRGOD) ? 25 : 18);

+   GET_CHA(ch) = MAX(0, MIN(GET_CHA(ch), i));
    GET_DEX(ch) = MAX(0, MIN(GET_DEX(ch), i));
    GET_INT(ch) = MAX(0, MIN(GET_INT(ch), i));
    GET_WIS(ch) = MAX(0, MIN(GET_WIS(ch), i));
    GET_CON(ch) = MAX(0, MIN(GET_CON(ch), i));
    GET_STR(ch) = MAX(0, GET_STR(ch));

    if (IS_NPC(ch)) {
      GET_STR(ch) = MIN(GET_STR(ch), i);
--<snip>--

Maybe welcome a patch on the original CircleMUD distribution.

--
----=[ Juliano Ravasi Ferraz ]=----=[ jferraz@linkway.com.br ]=----
     Rayon Eletrônica e Informática Ltda. - Linkway Descalvado

I have a 33.6Kbps modem and 1.5bps fingers


     +------------------------------------------------------------+
     | 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