Module:Test2

From Elwiki

Documentation for this module may be created at Module:Test2/doc

require('Module:CommonFunctions')
local getArgs = require('Module:Arguments').getArgs
local p = {}

function p.main(frame)
    local args = getArgs(frame);
    local headers = {}
    local cells = {}

    function getBuffData()
        local output = {}
        for key, value in pairs(args) do
            if string.starts(key, 'buff') then
                
            end
        end
    end

    local TRAITS = {
        {
            name = 'Light',
            details = {
                mp = 80
            }
        },
        {
            name = 'Critical',
            details = {
                mp = 120
            },
            extra_data = (function()
                if inArrayStarts('def_ignore', args) then
                    return {
                        def_ignore = 150
                    }
                else return nil end
            end)
        },
        {
            name = 'Reversed',
            details = {
                mp = 60,
                cd = 150
            }
        },
        {
            name = 'Heavy',
            details = {
                cd = 120
            }
        },
        {
            name = 'Haste',
            details = {
                cd = 80
            }
        },
        {
            name = 'Regenerating (1)',
            details = {
                mp = 50
            },
            extra_data = {
                chance = 50
            }
        },
        {
            name = 'Regenerating (2)',
            details = {
                cd = 50
            },
            extra_data = {
                chance = 50
            }
        },
        {
            name = 'Killing Blow (1)',
            details = {
                
            }
        }
    }

    return inspect_dump(frame, headers)
end

return p