Warning: You are not logged in. Once you make an edit, a temporary account will be created for you.
Learn more.
Log in or
create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision |
Your text |
| Line 110: |
Line 110: |
| end | | end |
| return out | | return out |
| end
| |
|
| |
| -- Formats a 0–1 multiplier as a percentage: 0.2 → "20%", 0.125 → "12.5%".
| |
| -- %.10g absorbs floating-point noise from the ×100.
| |
| local function format_percent(v)
| |
| return string.format("%.10g", v * 100) .. "%"
| |
| end | | end |
|
| |
|
| Line 593: |
Line 587: |
| if #segments == 0 then return {} end | | if #segments == 0 then return {} end |
| return { ["Debuff Resist"] = table.concat(segments, " → ") } | | return { ["Debuff Resist"] = table.concat(segments, " → ") } |
| end
| |
|
| |
| -- Renders how much of an ability's damage applies to objectives (Guardians,
| |
| -- Walkers, Patron, Mid-Boss). BossDamageScale is a 0–1 multiplier shown as a
| |
| -- percentage: 0.2 → "20%". The field never appears in upgrade tiers, so only
| |
| -- the base value is read; sub-ability records are checked as a fallback when
| |
| -- the main record lacks it.
| |
| function p.RenderBossDamageScale(ability)
| |
| local v = unwrap_value(ability["BossDamageScale"])
| |
| if (v == nil or v == 0) and type(ability["_subabilities"]) == "table" then
| |
| for _, sub in ipairs(ability["_subabilities"]) do
| |
| local sv = unwrap_value(sub["BossDamageScale"])
| |
| if sv and sv ~= 0 then v = sv; break end
| |
| end
| |
| end
| |
| if v == nil or v == 0 then return {} end
| |
| return { ["Damage to Objectives"] = format_percent(v) }
| |
| end | | end |
|
| |
|
| return p | | return p |