Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old September 18, 2016, 21:05   #11
old_school
Rookie
 
Join Date: Nov 2010
Posts: 24
old_school is on a distinguished road
Ha!! Last Wed, 09/16/2016 I found 32,767 from a Cave troll drop no less.
I had already moved from south to north of where I'm standing to kill the Cave troll, therefore, the floor behind me, to the south was empty. When the troll died, Adamantite dropped south of me. It would have been nice earlier in the game, but it helped out none the less...
bja
Attached Thumbnails
Click image for larger version

Name:	Angband 32757 AU from Cave troll.jpg
Views:	155
Size:	19.6 KB
ID:	1444  
old_school is offline   Reply With Quote
Old September 19, 2016, 12:31   #12
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,924
PowerWyrm is on a distinguished road
This really sounds like a bug, probably an integer underflow (trying to generate negative gold?)
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old September 20, 2016, 03:00   #13
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,677
Donated: $40
Pete Mack is on a distinguished road
No, it is not a bug. Gold is u16b not s16b. There is a tiny chance of getting a maximum drop
Pete Mack is offline   Reply With Quote
Old October 22, 2016, 22:56   #14
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 56
Posts: 9,351
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
OK, I've decided this is probably not a bug. Calculation is:
Code:
Dungeon level is L
Average drop is A = (18 * L)/10 + 18
Pick a random value V where A - L - 10 <= V <= A + L + 10
Repeat
  1 in a 100 times, if we haven't hit the maximum, multiply by 10
until it fails
If no selling, multiply by the smaller of 5 and L
Reduce to the max if necessary
In the Cave Troll example below, L is 46, so A is 101 (near enough), and we are picking V between 45 and 157. So if it passes the 1 in 100 check twice, it's between 4500 and 15700, and you still get to multiply by 5 for no selling, which puts you over the maximum provided the original value was 70+. It's a 1 in 10000-ish event, but if you play enough you'll see those.

As for seeing exactly 32000 - round numbers are more likely for large values because you're multiplying by 5 and some 10s.
__________________
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 October 22, 2016, 23:11   #15
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
Quote:
Originally Posted by Nick View Post
OK, I've decided this is probably not a bug. Calculation is:
Code:
  1 in a 100 times, if we haven't hit the maximum, multiply by 10
.
Wow, yeah, okay. I thought the supercharge was a mere doubling, but if it's a factor of 10 increase, then hitting the cap becomes an awful lot more common.

What d'you say to making cash drops be unsigned so the cap is higher?
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
Amount of real time to win? BlueFish Vanilla 1 February 2, 2013 21:47
Setting a maximum stack value? fruviad Development 12 September 29, 2011 03:28
Birth amount of gold Thraalbee Vanilla 2 September 23, 2011 22:37
3.3.0 Treasure not displayed Dranken Vanilla 4 August 31, 2011 19:24
Max amount of spells? steeg1234321 Vanilla 11 April 4, 2008 14:28


All times are GMT +1. The time now is 23:30.


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