Re: Lossing levels when dieing?

From: Elie Rosenblum (fnord@cosanostra.net)
Date: 03/01/02


On Fri, Mar 01, 2002 at 04:42:40PM -0500, Mike Stilson wrote:
> On Fri, Mar 01, 2002 at 12:56:23PM -0600, David Cole wrote:
> >I'm trying to think of a way to make players actually loss EXP and if the
> >loss of EXP excedes a certain amount, say the actual EXP needed to level,
> >then they loss that level. I'm using formulas for all my EXP tables so I
> >can't really call to a case statment or anything, I been wondering how to do
> >this for a few days now, I have a few ideas but nothing solid. I figured I
> >could mail the list and maybe get some pointers or possibly some decent to
> >good ideas, anyone care to comment or lay down some solid ideas or comments?
>
> Somewhere in gain_exp I think it is, if gain<0 just add something to do
> if((get_exp(ch)) < exp_to_level(ch, level-1) * [ here you add something,
> whether it's a % or something from a table or whatever ]) { do
> delevelling code }
>
> so, say.. if((get_exp(ch) < (exp_to_level(ch, get_level(ch)-1) * 0.90))
> would delevel them if they're more than 10% below what they needed to
> gain their current level.

Also remember that you'll need to "unlevel" them in the delevelling
code. What you will need to do is keep a data structure for each
character that stores point gains for each level they gain; when
someone has to go down a level, you have the right data to put them
back where they were.

--
Elie Rosenblum                 That is not dead which can eternal lie,
http://www.cosanostra.net   And with strange aeons even death may die.
Admin / Mercenary / System Programmer             - _The Necronomicon_

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