Re: Lossing levels when dieing?

From: John Madrell (john.madrell@ntlworld.com)
Date: 04/04/02


> -----Original Message-----
> From: Circle Discussion List [mailto:CIRCLE@post.queensu.ca]On Behalf Of
> Josh Harris
> Sent: 04 April 2002 17:11
> To: CIRCLE@post.queensu.ca
> Subject: Re: [CIRCLE] Lossing levels when dieing?
>
>
> In fight.c you can add a statement in do_die . . or add another
> function to
> check experience everytime you die. . either way . ..
>
> GET_EXP(ch)=GET_EXP(ch)*0.95;    //causes player to lose 5% of
>                                  //experience
> if(GET_EXP(ch)<level_exp(GET_CLASS(ch), GET_LEVEL(ch)-1)) {
>   GET_LEVEL(ch)=GET_LEVEL(ch)-1;    //causes them to lose 1 level
> }
>
>
> Hope that helps. . .
>
> --Josh--
>

Each time they lose a level, then regain a level they will get practices,
hits, mana and moves again.

eg.
        1. Joe creates a char gets it to level 2 (gaining some hp some mana some
mv some practices)
      2. Then Joe gets the char killed several times to lose a level.
      3. Joe regains level 2 (gaining more hp more mana more mv more
practices)
      4. goto step 2 and repeat how much you want.

        After mass deaths and level gains Joe has a level 2 character with stats
to rival a Immortal!
        (this is an extreme example but can you see what I mean)

So unless this is what you want you need to make sure they haven't already
been the level they are
gaining.

So (mailer code!) as an additoin to your code :)

structs.h

change one of the spares in player_special_data_saved to

        int levels_gained;

in utils.h add somewhere

#define GET_GAINED_LEVELS(ch)   CHECK_PLAYER_SPECIAL((ch),
((ch)->player_specials->saved.levels_gained))


in class.c in advance_level near the beginning of the function


  /* check to see if they have already been this level */
  if (GET_LEVEL(ch)<=GET_GAINED_LEVELS(ch)){
    /* they have well return out so they dont gain hp mp mv pracs :) */
    return;
  }else{
    /* we let them gain so we need to update gained levels :) */
    GET_GAINED_LEVELS(ch)=GET_LEVEL(ch);
  }

you will need to set GET_GAINED_LEVELS to 0 on creation of a new character
also possible problems with do_advance if you demote a character

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