Re: stats limit

From: Damian Jurzysta (interact@hem.passagen.se)
Date: 06/21/00



 ('binary' encoding is not supported, stored as-is)
Hello Patrick.

On 21-Jun-00, you wrote:

PD>        Letseee... There's a few reasons this could be happening, i'd look
PD> very carefully at a few different functions; do_start(),
PD> roll_real_abils(), and potentially init_char().

already looked at all that, no errors there. I found the error someplace else
though, and the bug is kinda funny.

if a character rolls an 18 in a stat, and then uses score to see his stats, the stat that previously was 18 turns to 25.

this is what I use to show the stats in do_score():

  sprintf(buf + strlen(buf), "%sDex:%s ",
          CCCYN(ch, C_CMP), CCNRM(ch, C_CMP));
  if (GET_DEX(ch) <= 11)
    strcat(buf, "Awful");
  else if (GET_DEX(ch) <= 12)
    strcat(buf, "Bad");
  else if (GET_DEX(ch) <= 13)
    strcat(buf, "Poor");
  else if (GET_DEX(ch) <= 14)
    strcat(buf, "Average");
  else if (GET_DEX(ch) <= 15)
    strcat(buf, "Fair");
  else if (GET_DEX(ch) <= 16)
    strcat(buf, "Good");
  else if (GET_DEX(ch) <= 17)
    strcat(buf, "Very Good");
  else if ((GET_DEX(ch) = 25))
    strcat(buf, "Godlike!");
  else strcat(buf, "Superb");

dex is only an example, I use this on all stats. I know it isnt very optimised,
but it should work, which it doesnt.

if a character rolls an 18 in (for example) dex, score command doesnt say
"Superb" as it should be, instead it says "Godlike!" and when I stat the
character the dex has suddenly changed to 25. since this doesnt happen if the
stat is 13, 16, 17 or whatever, I figure the error must be somewhere in
comparing xxx = 25. what I dont figure, is what is wrong comparing like this
and how it makes the stat jump up to 25. I have also tried setting the stat to
19, 20, 21 etc and then using score, with the same result; it doesnt say
superb, it says godlike and the stat jumps to 25.


since I am obviously missing something here, what is wrong with comparing the
stat this way and how should I compare if it is 25 without making numbers
between 19-24 jump up?
--
/Damian/


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