|
Post by hollywood on Sept 10, 2008 21:35:51 GMT -5
I have a Kensai that had 88 Wisdom and 4 Alignment. I would have expected to get a 20% (17 point) increase in wisdom from putting 1 point into honorable warrior. Instead, I got a 5 point increase. Does the bonus only apply to wisdom from stat points used and not from item bonuses?
My passive.lua is unmodified:
-- Kensai's Honorable Warrior if (p_ptr.abilities[(CLASS_KENSAI * 10) + 3] >= 1) then
if (p_ptr.alignment > 0) then
p_ptr.stat_add[A_WIS+1] = p_ptr.stat_add[A_WIS+1] + ((p_ptr.stat_cur[A_WIS+1] * (p_ptr.alignment * 5) * (p_ptr.abilities[(CLASS_KENSAI * 10) + 3])) / 100)
end end
|
|
|
Post by Gando on Sept 10, 2008 23:16:20 GMT -5
Oddly Ive never used Honorable Warrior so Ive never run into this problem but I think stat_add is without item bonuses.
If your wisdom without items is 25-29 then your bonus would be +5 from honorable warrior with an alignment greater than 0.
ah wait no I see it...the bug is in the formula...using stat_cur instead as the multiplier.
|
|
|
Post by Gando on Sept 10, 2008 23:26:29 GMT -5
p_ptr.stat_add[A_WIS+1] = p_ptr.stat_add[A_WIS+1] + ((p_ptr.stat_add[A_WIS+1] * (p_ptr.alignment * 5) * (p_ptr.abilities[(CLASS_KENSAI * 10) + 3])) / 100)
should yeild the results you seek.
|
|
|
Post by hollywood on Sept 11, 2008 0:13:23 GMT -5
Thanks Gando. I guess item bonuses are not supposed to be boosted. I'll leave the formula as is.
I think if your formula would just scale the already existing bonuses, you would need to replace stat_cur with (stat_cur + stat_add) to scale both.
|
|
|
Post by sekira on Sept 11, 2008 9:21:02 GMT -5
Thanks Gando. I guess item bonuses are not supposed to be boosted. I'll leave the formula as is. I think if your formula would just scale the already existing bonuses, you would need to replace stat_cur with (stat_cur + stat_add) to scale both. Thats correct. This, like almost all other class abilities that boost a stat, increase the stat_add value as a percentage of the stat_cur value. stat_cur is your base stat, affected only by your starting value of 5, and putting stat gain points into the stat. stat_add is the bonuses that are added to your base stat from a variety of sources (racial bonus, class bonus, class ability bonuses, item bonuses), but only the bonuses that are indefinite. The timered bonuses are evaluated in another variable.
|
|