Module:Creature Mutation Query: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 5: Line 5:


function p.main()  
function p.main()  
local mutation = ""
local mutation = "Poison Gas Generation"
local ego = 16  --[default, is 0 modifier]
local ego = 16  --[default, is 0 modifier]
local level = 1
local level = 1
Line 38: Line 38:
   if isDefect then
   if isDefect then
     parentheses ='<b><span style="color:#b1c9c3;">&nbsp;(</span><span style="color:#a64a2e;">D</span><span style="color:#b1c9c3;">)</b>'
     parentheses ='<b><span style="color:#b1c9c3;">&nbsp;(</span><span style="color:#a64a2e;">D</span><span style="color:#b1c9c3;">)</b>'
   elseif (cost ~= nil) or (cost > 1) then
   elseif (cost == nil or cost > 1) then
    parentheses = '<b><span style="color:#b1c9c3;">&nbsp;(<span style="color:#77bfcf;">' .. level .. '</span>'
      parentheses = '<b><span style="color:#b1c9c3;">&nbsp;(<span style="color:#77bfcf;">' .. level .. '</span>'
    if isMental then
      if isMental then
      local bonus = ""
        local bonus = ""
      if modifier > 0 then
        if modifier > 0 then
         bonus = "<span style = \"color:#00c420\">+" .. tostring(modifier) .. '</span>'
         bonus = "<span style = \"color:#00c420\">+" .. tostring(modifier) .. '</span>'
      elseif modifier < 0 then
        elseif modifier < 0 then
        bonus = "<span style = \"color:#d74200\">" .. tostring(modifier) .. '</span>'
          bonus = "<span style = \"color:#d74200\">" .. tostring(modifier) .. '</span>'
      end
        end
      parentheses = parentheses .. bonus
        parentheses = parentheses .. bonus
     
     end
     end
   parentheses = parentheses .. ")</span></b>"
   parentheses = parentheses .. ")</span></b>"