Module:Infobox Monster: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
mNo edit summary
(simplify infobox for passive monsters)
Line 87: Line 87:
}
}
end
end
if infobox:is_param_defined(Infobox.param('immune_to')) > 0 then
if infobox:get_param(Infobox.param('passive'), 0) == 'No' then
if infobox:is_param_defined(Infobox.param('immune_to')) > 0 then
infobox:add_row{
infobox:add_row{
{tag='th', content='Immune to', colspan="7"},
{tag='td', content=Infobox.param('immune_to'), colspan="13"},
{tag='th', content='Immune to', colspan="7"},
{tag='td', content=Infobox.param('immune_to'), colspan="13"},
}
}
end
end
if infobox:is_param_defined(Infobox.param('vulnerable_to')) > 0 then
if infobox:is_param_defined(Infobox.param('vulnerable_to')) > 0 then
infobox:add_row{
infobox:add_row{
{tag='th', content='Vulnerable to', colspan="7"},
{tag='td', content=Infobox.param('vulnerable_to'), colspan="13"},
{tag='th', content='Vulnerable to', colspan="7"},
{tag='td', content=Infobox.param('vulnerable_to'), colspan="13"},
}
}
end
end
end
if infobox:is_param_defined(Infobox.param('variant')) > 0 and infobox:get_param(Infobox.param('variant'), 0) ~= 'N/A' then
if infobox:is_param_defined(Infobox.param('variant')) > 0 and infobox:get_param(Infobox.param('variant'), 0) ~= 'N/A' then
Line 114: Line 116:
{tag='td', content=Infobox.param('knowledge'), colspan="13"},
{tag='td', content=Infobox.param('knowledge'), colspan="13"},
}
}
else
end
infobox:add_row{
infobox:add_row{
{tag='th', content='[[File:Aggressive activity icon.png|3px|link=Aggressive]] [[Aggressive]]', colspan="7"},
{tag='th', content='[[File:Aggressive activity icon.png|3px|link=Aggressive]] [[Aggressive]]', colspan="7"},
{tag='td', content=Infobox.param('aggressive'), colspan="13"},
{tag='td', content=Infobox.param('aggressive'), colspan="13"},
}
}
end
:add_row{
infobox:add_row{
{tag='th', content='Description', colspan="7"},
{tag='td', content=Infobox.param('description'), colspan="13"}
{tag='th', content='Description', colspan="7"},
{tag='td', content=Infobox.param('description'), colspan="13"}
}
}
local bubble_a = infobox:is_param_defined(Infobox.param('profession_bubble_a')) > 0
local bubble_a = infobox:is_param_defined(Infobox.param('profession_bubble_a')) > 0
local bubble_b = infobox:is_param_defined(Infobox.param('profession_bubble_b')) > 0
local bubble_b = infobox:is_param_defined(Infobox.param('profession_bubble_b')) > 0