Module:CropCalcs
From IdleOn MMO Wiki
Documentation for this module may be created at Module:CropCalcs/doc
local crops = {}
local function typeindex(croptype)
if croptype == "basic" then
return 0
elseif croptype == "earthy" then
return 1
elseif croptype == "bulbo" then
return 2
elseif croptype == "sushi" then
return 3
elseif croptype == "mushie" then
return 4
elseif croptype == "glassy" then
return 5
end
end
function crops.growtime(frame)
local baseindex = typeindex(frame.args.Type)
end
function crops.evochance(frame)
local baseindex = typeindex(frame.args.Type)
local cropindex = frame.args.CropIndex
local basechance = {0.3, 0.12, 0.04, 0.01, 0.003, 0.0005}
local decay = {0.75, 0.63, 0.3, 0.4, 0.2, 0.05 }
local one = basechance[baseindex]
local two = decay[baseindex]
local three = cropindex
print(one + "\n" + two + "\n" + three)
local four = one * math.pow(two, three)
return four
end
return crops