Module:Creature Mutation Query: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
(Created page with "local util_args = require('Module:Args Utility') local util_cargo = require('Module:Cargo Utility') local p = {} function p.main() local mutation = "" local ego = 16 --[default, is 0 modifier] local level = 1 frame=mw.getCurrentFrame() if frame.args ~= nil and frame.args ~= '' then if frame.args[1] ~= nil and frame.args[1] ~= '' then mutation = mw.text.trim(frame:preprocess(frame.args[1])) level = tonumber(mw.text.trim(frame:preprocess(frame.args[2]))) end...")
 
mNo edit summary
Line 35: Line 35:
     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 > 1) then
   elseif (cost > 1) then
     parentheses = '<b><span style="color:#b1c9c3;">&nbsp;(' .. level
     parentheses = '<b><span style="color:#b1c9c3;">&nbsp;(<span style="color:#77bfcf;">' .. level .. '</span>'
     if isMental then
     if isMental then
       local bonus = ""
       local bonus = ""
Line 41: Line 41:
         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 .. ")</span></b>"
     end
     end
  parentheses = parentheses .. bonus .. ")</span></b>"
   end
   end


Navigation menu