Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old May 3, 2016, 22:07   #1
bertoid
Rookie
 
Join Date: Sep 2015
Posts: 20
bertoid is on a distinguished road
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.)
bertoid is offline   Reply With Quote
Old May 3, 2016, 22:47   #2
Chud
Swordsman
 
Join Date: Jun 2010
Posts: 300
Chud is on a distinguished road
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.
Chud is offline   Reply With Quote
Old May 3, 2016, 23:06   #3
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 56
Posts: 9,236
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by bertoid View Post
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.
Nick is offline   Reply With Quote
Old May 3, 2016, 23:48   #4
bertoid
Rookie
 
Join Date: Sep 2015
Posts: 20
bertoid is on a distinguished road
Oh yeah, I forgot about that pesky /15.

Makes it slightly more probable... no less annoying, though.
bertoid is offline   Reply With Quote
Old May 4, 2016, 02:53   #5
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
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.
Derakon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recharging fph Vanilla 16 October 11, 2015 22:33
Spells vs. Scrolls of Recharging Tregonsee Vanilla 1 April 14, 2011 04:08
The RNG Giveth, the RNG Taketh Away tprice AAR 2 February 21, 2011 15:15
Recharging Magnate Vanilla 74 October 27, 2010 23:31
RNG giveth and RNG taketh away Jungle_Boy AAR 0 June 14, 2010 18:59


All times are GMT +1. The time now is 09:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.