Module:Sandbox/LVL: Difference between revisionsGive feedback
No edit summary |
No edit summary |
||
| Line 493: | Line 493: | ||
) | ) | ||
-- | -- At the point where you build data_attrs for DPS/SustainedDPS cells | ||
local hit_once = "false" | |||
if (attr_key == 'DPS' or attr_key == 'SustainedDPS') and hero_data.Weapon and hero_data.Weapon.HitOnceAcrossAllBullets then | |||
hit_once = "true" | |||
end | |||
local data_attrs = string.format( | local data_attrs = string.format( | ||
'data-stat-name="%s" data-base="%s" data-spirit-scale="%s" data-level-scale="%s" data-innate-spirit-scale="%s" data-sort-value="%s"', | 'data-stat-name="%s" data-base="%s" data-spirit-scale="%s" data-level-scale="%s" data-innate-spirit-scale="%s" data-sort-value="%s" data-hit-once="%s"', | ||
attr_key, | attr_key, | ||
tostring(type(base_value) == "number" and util_module.round_to_sig_fig(base_value, 3) or base_value), | tostring(type(base_value) == "number" and util_module.round_to_sig_fig(base_value, 3) or base_value), | ||
tonumber(spirit_scale) or 0, | tonumber(spirit_scale) or 0, | ||
(attr_key == "TechPower") and "0" or (tonumber(level_scale) or 0), | (attr_key == "TechPower") and "0" or (tonumber(level_scale) or 0), | ||
innate_spirit_scale or 0, | innate_spirit_scale or 0, | ||
stat_value | stat_value, | ||
hit_once | |||
) | ) | ||