Module:Test2: Difference between revisions
From Elwiki
(Bot: Automated import of articles *** existing text overwritten ***) |
(Bot: Automated import of articles *** existing text overwritten ***) |
||
(58 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
local p = {} | local p = {} | ||
function p.main(frame) | function p.main(frame) | ||
local args = getArgs(frame); | local args = getArgs(frame); | ||
local | local headers = {} | ||
local cells = {} | |||
function getBuffData() | |||
local output = {} | |||
for key, value in pairs(args) do | |||
if string.starts(key, 'buff') then | |||
end | |||
for | |||
end | end | ||
end | end | ||
local | 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 | end | ||
return p | return p |
Latest revision as of 10:36, 7 May 2023
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