Re: [Sorta-long]HELP Advance command

From: Brian (borlick@mines.edu)
Date: 10/27/02


Kevin Dethlefs wrote:
>
> class.c up at http://www.spunge.org/~demortes/class.c

Checking class.c, it appears your problem is that you haven't fully
defined your tables.  In level_exp(), all of your values only go up to
LVL_IMMORT (101).  All levels past that (102-110) have no experience
listed for them.  As such, it falls through to the default statement at
the bottom:

  log("SYSERR: XP tables not set up correctly in class.c!");
  return 123456;

If you check your syslog, you'll probably see a bunch of those SYSERRs.
The result is that this statement in do_advance() [which you posted in
an earlier message]:

  gain_exp_regardless(victim, level_exp(GET_CLASS(victim), newlevel) -
GET_EXP(victim));

gets translated to:

  gain_exp_regardless(victim, 123456 - GET_EXP(victim));

And since a level 101 has an experience >> 123456, he winds up gaining
negative experience and dropping to level 32, as you stated.

And, if that is still the most up to date advance command, any attempts
to advance above level 101 will result in a demotion/promotion to
somewhere in the mortal realm, depending on the level of the character
who's being worked upon.

Your first step should be to add additional case statements for each
class so that levels 102-110 work.  While you're at it, you might check
your saving throw tables -- those are also "broken" because they only go
through level 40.

Overall, the easiest solution is to generate the experience, saving
throw, and thac0 information using a formula rather than using hundreds
of repetitive return lines.

-Brian

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT