Module:Creature Mutation Query: Difference between revisions

prevents mutations without pages from breaking the wiki
mNo edit summary
(prevents mutations without pages from breaking the wiki)
Line 24: Line 24:


result= doQuery(mutation)
result= doQuery(mutation)
return format(result["_pageName"], mutation, result["cost"], result["type"], level, ego)
if result ~= nil then
 
  return format(result["_pageName"], mutation, result["cost"], result["type"], level, ego)
else
  return format(mutation, mutation, 0, "", level, ego)
end
end
end


Line 83: Line 86:
    
    
   return formatResult(page, name, formattedLevel, modifier, isMental)
   return formatResult(page, name, formattedLevel, modifier, isMental)
end
function p.test()
a= doQuery("Night Vision")
return format(a["_pageName"], "Night Vision", a["cost"], a["type"], 1, 18)
end
end


return p
return p