FANDOM


local p = {}
 
function p.main(frame)
    local effects = frame.args['effects']
    return p.render(frame, effects)
end
 
function p.render(frame, effects)
    local memorias = {}
    for descriptive_effect in (effects .. "&"):gmatch("%s*(.-)&%s*") do
        effect = (descriptive_effect.. "("):match("(.-)%(.*")  -- Remove target and duration
        if effect:find("%[") then
            effect = effect:match("(.-)%s*%[.-]")
        end
        formated_effect = "Chance to " .. effect .. " on Attack" .. " to"
        effect = (formated_effect):match(".*Chance to (.-)%s- on Attack.*to.*")  --Include connects to unique targets, all on edges, and chance skills
        table.insert(memorias, effect .. "¬" .. descriptive_effect)           
    end
 
    table.sort(memorias)
    output = memorias[1]
    for id= 2, #memorias do
        output = output .. ";" .. memorias[id]
    end
 
    return output
end
 
return p
Community content is available under CC-BY-SA unless otherwise noted.