Recharging vs RNG

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bertoid
    Rookie
    • Sep 2015
    • 20

    Recharging vs RNG

    This one's a bit odd to me: my friend is a lvl 50 Priest with 0% fail on casting Recharging. I had three staves of the Magi in my possession, all down to zero charges thanks to a greater balrog (don't RIP). So naturally, I decided it was a good idea to recharge them in the middle of a fight.

    Code:
    You fight off a sense of dread.
    The recharge backfires!
    There is a bright flash of light.
    You have 2 Maple Staves of the Magi (0 charges) (s).
    Draugluin, Sire of All Werewolves pushes past the Great Wyrm of Balance.
    The recharge backfires!
    There is a bright flash of light.
    You have a Maple Staff of the Magi (0 charges) (s).
    The recharge backfires!
    There is a bright flash of light.
    You have no more Maple Staves of the Magi (0 charges) (s).
    Draugluin, Sire of All Werewolves pushes past the Great Wyrm of Balance.
    You feel your head clear.
    You have 38 Puce Potions of Restore Mana (k).
    How does that work? The code says that failure should be 1 time in [Spell_strength + 100 - item_level - 10 * charge_per_item]/15. That works out (if I understand the spell strength to be character level + 20, item level is 70, and zero charges) to 1 time in 100! And it happened three times in a row! I'd say the RNG is a bit skewed...

    Ah well, at least this run has also been bountiful with the restore mana potions.

    (For what it's worth, this is v4.0.5.)
  • Chud
    Swordsman
    • Jun 2010
    • 309

    #2
    Out of curiosity --- I haven't tried to go through the code to find out --- how frequently does the RNG get called in the course of running the game?

    I agree that a 1 in 100 chance hitting 3 times in a row is pretty unlikely... say, one in a million, even... but if the RNG is getting called all the time and might be invoked many many millions of times in the course of the game then it's not quite so far out there.

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9647

      #3
      Originally posted by bertoid
      The code says that failure should be 1 time in [Spell_strength + 100 - item_level - 10 * charge_per_item]/15. That works out (if I understand the spell strength to be character level + 20, item level is 70, and zero charges) to 1 time in 100!
      I make that one in (70 + 100 - 70 - 0)/15, so about 1 in 7.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • bertoid
        Rookie
        • Sep 2015
        • 20

        #4
        Oh yeah, I forgot about that pesky /15.

        Makes it slightly more probable... no less annoying, though.

        Comment

        • Derakon
          Prophet
          • Dec 2009
          • 9022

          #5
          Note that the listed failure rate on the spell when browsing/casting is merely the likelihood that you'll be charged SP (and time) for casting the spell with absolutely no other effect. You're successfully casting recharging...and then failing to properly recharge the item.

          Comment

          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎