Module:Creature Mutation Query: Difference between revisions

scope fix
m (whoops forgot to remove test text)
(scope fix)
Line 5: Line 5:


function p.main()  
function p.main()  
local mutation = ""
local mutation = "Teleportation"
local ego = 16 --[default, is 0 modifier]
local ego = 9 --[default, is 0 modifier]
local level = 1
local level = 1
local isDefect = false
local isDefect = false
Line 29: Line 29:
}
}
local cost, type = tonumber(util_cargo.queryAndCast(query)[1]["Cost"]), util_cargo.queryAndCast(query)[1]["Type"]
local cost, type = tonumber(util_cargo.queryAndCast(query)[1]["Cost"]), util_cargo.queryAndCast(query)[1]["Type"]
    local isDefect = false
    local isMental = false
     if type ~= nil then
     if type ~= nil then
       local isDefect = string.match(type,"defect") ~= nil
       isDefect = string.match(type,"defect") ~= nil
       local isMental = string.match(type,"Mental") ~= nil
       isMental = string.match(type,"Mental") ~= nil
     end
     end
     local modifier = math.floor((ego-16)/2)
     local modifier = math.floor((ego-16)/2)