Module:Enemies

local p = {}

-- ======================== -- Function outputs the lifebar of an enemey -- -- ME3 enemies lifebar combinations: -- Health --  Health + Barriers --  Health + Shields -- Armor --  Armor + Barriers --  Armor + Shields -- Shields -- Barriers -- ========================

function p.lifebar(param)

local lifebar = mw.text.split(param.args[1], "%s*,%s*") table.sort(lifebar) local game = param.args['game'] local result = ""; for i, name in ipairs(lifebar) do       result = result .. name:sub(1, 1) end return lifebar_list(result.tostring) --local result = " Health: " .. param.args['health'] .. " Barriers: " .. param.args['barriers'] .. " Shields: " .. param.args['shields'] .. " Armor: " .. param.args['armor'] --return "This enemy has : " .. result .. " " end

local function lifebar_list(param) local combos = { h = '', bh = '', hs = '', a = '', ab = '', as = '', s = '', b = '', }   return combos[param] end

return p