Re: Lossing levels when dieing?

From: Josh Harris (jharris2@ACSU.BUFFALO.EDU)
Date: 04/04/02


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

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