[CF-Devel] Stat-wrapping bug get killed enough and your stats go to 30!

Mark Wedel mwedel at scruz.net
Thu Nov 9 01:29:41 CST 2000


Peter Mardahl wrote:
>
     
     
     >
     
      I've a report that depletion on death code can
     
     >
     
      wrap your stats all the way from 18, to 1, to -126, to 127.
     
     >
     
     
     >
     
      Build a perfect char, just kill him a LOT.
     
     >
     
     
     >
     
      We really ought to fix this....
     
     
 I've fixed the bug, but not extensively tested this - I didn't really feel like
spending the time to kill a character several hundred times.  I did still
confirm that it does deplete the stat when you die, so worst case is it still
doesn't preven the wrap.

 However, the patch is fairly trivial - basically, don't allow depletion in
kill_player to deplete a stat beyond -50.

 Note that this bug only happens if you are playing with depletion on death and
not balanced stat loss.  IT appears that the balanced stat loss already takes
into account how depleted a stat is, so you never get into that problem (I could
be wrong - very high level players could perhaps have highly negative
depletions, but since your losing lots of exp to do that, I really don't know if
its worth it.  And I think the stat loss ratio is still high enough that even
high level characters could not wrap it.

 Anyways, from the CHANGES file (this change is in cvs):
server/player.c:  removed unused tmp2 variable from move_player_attack.
modify depletion in kill_player so the maximum depletion for a stat is -50. 
This
should preven stat wrapping from -126 to 127.  MSW 2000-11-08

    
    


More information about the crossfire mailing list