Attributes: Difference between revisions

27 bytes added ,  19:29, 25 August 2020
m
use Template:Code Reference
mNo edit summary
m (use Template:Code Reference)
Line 24: Line 24:
An attribute modifier increases or decreases by one for each 2 points that the attribute goes above or below <code>16</code>.
An attribute modifier increases or decreases by one for each 2 points that the attribute goes above or below <code>16</code>.


You can use the following formula for calculating an attribute modifier: <ref><code>XRL.Rules.Stat.GetScoreModifier()</code></ref>
You can use the following formula for calculating an attribute modifier:{{Code Reference | namespace = XRL.Rules | class = Stat | method = GetScoreModifier}}
* Stat values of 16 or higher: <code>(value - 16) &divide; 2</code> rounded down.  
* Stat values of 16 or higher: <code>(value - 16) &divide; 2</code> rounded down.  
* Stat values of 15 or lower: <code>(value - 16) &divide; 2</code> rounded up.
* Stat values of 15 or lower: <code>(value - 16) &divide; 2</code> rounded up.