Go Back   Angband Forums > Angband > Vanilla

Thread Tools Display Modes
Old June 30, 2022, 13:22   #11
Join Date: Aug 2019
Posts: 329
backwardsEric is on a distinguished road
Originally Posted by PowerWyrm View Post
In my variant which is based off V, when I put a debug breakpoint on object_value_real() for the One Ring, I get 400100000 from a base power of 20000. If like OP said the V power for the One Ring is 1400000, there will be an overflow in object_value_real() since you get value = a * power * power + b * power with a = 1 and b = 5 and power = 1400000 -> value = 1 960 007 000 000, which turns into 1 501 913 024 after fitting into an int32.

So the bug in indeed in object_power().
In 4.2.4, the object power for the plain gold ring is 41010 so the expression object_value_real() doesn't overflow. In any case, it should be modified to saturate at the maximum to protect against wraparound in case some other change inflates the values from object_power().
backwardsEric is offline   Reply With Quote
Old July 2, 2022, 16:40   #12
Join Date: Oct 2016
Location: London-ish
Age: 50
Posts: 2,086
Sky is on a distinguished road
keep in mind, i'm just reading the power value from the artifact spoiler file. I dont actually know if that is correct.
"i can take this dracolich"
Sky is offline   Reply With Quote

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
Is it wrong ... Moving Pictures Vanilla 8 April 12, 2018 04:30
What am I doing wrong? Moving Pictures Vanilla 83 April 8, 2018 14:41
Ring of Damage vs Stat gain ring icefyre Vanilla 6 May 31, 2017 06:06
Ring of Slaying vs. Ring of Damage Ingwe Ingweron Vanilla 27 October 13, 2013 17:23
Ring of Frost [12] or Ring of Strength +4 davidonabus Vanilla 3 October 10, 2010 08:55

All times are GMT +1. The time now is 00:36.

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