Re: [NEWBIE] Vamp stuff (was: really long subj.)

From: Chris Jacobson (fear@ATHENET.NET)
Date: 05/06/98


On 5/6/98 3:44 AM, Owen Brodal-Robertson (firemage@ZIP.COM.AU) stated:

>case CLASS_WARRIOR:
>    if (level != 0)
>      if (level != 1)
>        if (level != 2)
>          return curr_exp * (level/100) + 1;
>        else
>          return 2000;
>      else
>        return 1;
>   else
>    return 0;
>break;


cleaner:

case CLASS_WARRIOR:
     switch (level) {
          case 0:   return 0;
          case 1:   return 1;
          case 2:   return 2000;
          default:  return curr_exp * (level/100) + 1;
     }
     break;

>now it compiles, but I have this REALLY bad feeling that I've gone and
>done something really dumb...

Can't tell ya for sure, I dont use an exp system

>What I want, is to make it so that every level's exp is determined as a
>percentage of the previous level (i.e. level 20 would require 120% of the
>exp level 19 required. I hope that makes sense).

You'll have to come up with a mathematical equation here.  Into
trigonometry and logarythms?  :-)

- Chris Jacobson


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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