[dismiss]
The wiki is currently a work in progress. If you'd like to help out, please check the Community Portal and our getting started guide. Also, check out our sister project on poewiki.net.
Module:Passive skill
You might want to create a documentation page for this module.
Editors can experiment in this module's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this module.
Editors can experiment in this module's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this module.
--
-- Module for bestiary templates
--
local m_util = require('Module:Util')
local getArgs = require('Module:Arguments').getArgs
local p = {}
-- ----------------------------------------------------------------------------
-- Strings
-- ----------------------------------------------------------------------------
local i18n = {
}
-- ----------------------------------------------------------------------------
-- Helper functions and globals
-- ----------------------------------------------------------------------------
-- ----------------------------------------------------------------------------
-- Cargo
-- ----------------------------------------------------------------------------
local tables = {}
tables.passive_skills = {
table = 'passive_skills',
fields = {
id = {
field = 'id',
type = 'String',
},
int_id = {
field = 'int_id',
type = 'Integer',
},
name = {
field = 'name',
type = 'String',
},
flavour_text = {
field = 'flavour_text',
type = 'Text',
},
reminder_text = {
field = 'id',
type = 'Text',
},
buff_id = {
field = 'id',
type = 'String',
},
-- TODO: Other buff stuff
skill_points = {
field = 'skill_points',
type = 'Integer',
},
icon = {
field = 'icon',
type = 'Page',
},
ascendancy_class = {
field = 'ascendancy_class',
type = 'String',
},
is_keystone = {
field = 'is_keystone',
type = 'Boolean',
},
is_notable = {
field = 'is_notable',
type = 'Boolean',
},
is_multiple_choice_option = {
field = 'is_multiple_choice_option',
type = 'Boolean',
},
is_multiple_choice = {
field = 'is_multiple_choice',
type = 'Boolean',
},
is_icon_only = {
field = 'is_icon_only',
type = 'Boolean',
},
is_jewel_socket = {
field = 'is_jewel_socket',
type = 'Boolean',
},
is_ascendancy_starting_node = {
field = 'is_ascendancy_starting_node',
type = 'Boolean',
},
-- from the graph file:
connections = {
field = 'connections',
type = 'List (,) of String',
},
}
}
tables.passive_skill_stats = {
table = 'passive_skill_stats',
fields = {
id = {
field = 'id',
type = 'String',
},
value = {
field = 'value',
type = 'Integer',
},
}
}
-- ----------------------------------------------------------------------------
-- Page functions
-- ----------------------------------------------------------------------------
local p = {}
p.table_passive_skills = m_util.cargo.declare_factory{data=tables.passive_skills}
p.table_passive_skill_stats = m_util.cargo.declare_factory{data=tables.passive_skill_stats}
function p.passive_skill(frame)
-- Get args
tpl_args = getArgs(frame, {
parentFirst = true
})
frame = m_util.misc.get_frame(frame)
-- parse stats
m_util.args.stats(tpl_args, {})
for _, stat in ipairs(tpl_args.stats) do
stat._table = tables.passive_skill_stats.table
m_util.cargo.store(stat)
end
return
end
-- ----------------------------------------------------------------------------
-- End
-- ----------------------------------------------------------------------------
return p