模块:制空值计算

来自舰娘百科
跳转至: 导航搜索

此模块的文档可以在模块:制空值计算/doc创建

local p = {}
function p.AirMultiplication(frame)
	if frame.args[1] == 0 or frame.args[1] == "" then
		return ;	
	end
	if frame.args[1] == "?" or frame.args[1] == "?" then
		return "?";	
	end
	if frame.args[2] == "空保" then
    	return math.ceil(frame.args[1] * 3);
    elseif frame.args[2] == "空优" then
    	return math.ceil(frame.args[1] * 1.5);
	elseif frame.args[2] == "空劣" then
    	return math.ceil(frame.args[1] / 3);
    elseif frame.args[2] == "空均" then
    	return math.ceil(frame.args[1] * 2 / 3);
    end
end
return p