[CF-Devel] PROPOSAL: Luck

David Hurst dnh at hawthorn.csse.monash.edu.au
Sun Sep 16 06:23:56 CDT 2001


On Sun, Sep 16, 2001 at 12:06:31AM -0700, Tim Rightnour wrote:
>
     
      So.. being a worshipper of Lythander, I was curious as to what exactly luck was
     
     >
     
      buying me, and quite horrified to find that it provided me nothing.
     
     >
     
     
     >
     
      Luck is an intangible benefit.  You can't simply say that "a luck of +1 means
     
     >
     
      you hit for 1 extra HP of damage"  because what that essentially translates
     
     >
     
      into is either luck == armour, or luck == damage.
     
     
Indeed

>
     
      Instead, luck needs to affect all aspects of play.  When I make a saving roll,
     
     >
     
      luck should play a role in it.  When I have a random effect on a spell, it
     
     >
     
      should move it towards the good end of the spectrum.  It should occasionally
     
     >
     
      assist me in recharging wands, or when praying.
     
     
As my understanding goes, this is what alot of the team have tried to do. For example I know that luck plays a part in the calculations for the chance to get hit, well it used to until PM took it out because of a silly bug (increasing luck INCREASED your chance to get hit =). It also helps with the chance of succeeding in alchemy.

>
     
      To make an change this extensive, would be hours of work (adding luck to every
     
     >
     
      calculation in the server).  Instead, I propose modifying the way random die
     
     >
     
      rolls are made.  Currently CF uses RANDOM()%foo to generate a random number. 
     
     >
     
      This could be replaced by a generator function, like random_roll(min, max, op); 
     
     
Indeed possibly the reason it has never been done, no one has the time =(.

>
     
      Wherein, the luck would be taken into account.
     
     >
     
     
     >
     
      Not all uses of RANDOM should be changed, some of them are internal
     
     >
     
      functionality, and should not be modified by luck.  The initial code could go
     
     >
     
      in, and functions could be evaluated on a per-function basis for modification.
     
     
This sounds like alot of tedious work, OTOH it is a great idea.

>
     
      Now for what the code would actually do:
     
     >
     
     
     >
     
      We have a baseline for luck of 20.  When I make a random roll, of say
     
     >
     
      1-10, the following would occur:
     
     >
     
     
     >
     
      1) The players luck is compared to a random roll of 1-20.  A luck of 2 would
     
     >
     
      mean I have a 2/20 chance of having a luck effect.  Player luck would max out
     
     >
     
      at 10 in this function.
     
     >
     
     
     >
     
      2) If the player wins the luck roll, the roll of 1-10 is modified by +1 (and
     
     >
     
      only +1, never more) to 2-10.  This shifts the average slightly upwards for the
     
     >
     
      player.
     
     >
     
     
     >
     
      3) Bad luck would work the opposite.. where the roll would be 0-10, and then be
     
     >
     
      modified back to the minimum (it's a 1-10 roll, so it must return at least 1)
     
     >
     
     
     >
     
      Why I chose this scheme:
     
     >
     
     
     >
     
      In this way, a player with a luck of two, is literally twice as lucky as a
     
     >
     
      player with a luck of 1. He gets slightly better rolls 1/10th of the time.
     
     >
     
     
     >
     
      The luck never becomes overbearing.  A luck of 10 doesn't translate into me
     
     >
     
      hitting 50% of the time, at best, things just get slightly better for the
     
     >
     
      player, more luck means they are slightly better more often.
     
     >
     
     
     >
     
      On smaller die rolls (like 1-4) the effect is more tangible, whereas more
     
     >
     
      common rolls such as combat, the effect is diminished more.  This means luck
     
     >
     
      could translate into a tangible benefit for recharging wands, without
     
     >
     
      unbalancing the whole combat system, or chance to learn a spell.
     
     >
     
     
     >
     
      I don't want to see luck become a +N to all stats.
     
     
Sounds like a great idea, perhaps Mark could answer the specifics abit better.

>
     
     
     >
     
      It might be necc. to add an additional argument to the function, that being if
     
     >
     
      a high roll or a low roll is preferred.  That way things where you want low
     
     >
     
      rolls you aren't penalized by luck.
     
     >
     
     
     >
     
      If this is a generally acceptable idea, I can post a patch where I implement
     
     >
     
      the function, and change a few benign instances of RANDOM to use it.  Over
     
     >
     
      time, more things can be modified to use this.
     
     
As far as I can see, this sounds like an excellent idea, and I know I would love to see someone implement it.

dnh (Darth_bob)

ps. Drop in on #crossfire on openprojects in IRC and have a chat =)

>
     
      Thoughts?  flames?  Violent rage?  :)  (boy this new guy sure is annoying)
     
     >
     
     
     >
     
      ---
     
     >
     
      Tim Rightnour <
      
      root at garbled.net
      
      >
     
     >
     
      NetBSD: Free multi-architecture OS 
      
      http://www.netbsd.org/
      
      
     >
     
      NetBSD supported hardware database: 
      
      http://mail-index.netbsd.org/cgi-bin/hw.cgi
      
      
     >
     
      _______________________________________________
     
     >
     
      crossfire-devel mailing list
     
     >
     
     
      crossfire-devel at lists.real-time.com
      
      
     >
     
     
      https://mailman.real-time.com/mailman/listinfo/crossfire-devel
      
      
     
    


More information about the crossfire mailing list