--サボット関数における待機時間等の決定
--ガード方向の固定ないし無反応の時間を発生させる。

function sabot_delay_control()
	local i = math.random(12150234)
	--print("sabot delay control:",i);
	if i <= 1000 then
		print("sabot delay decision:",1)
		wait(3)
	elseif i <= 187182 then
		print("sabot delay decision:",2)
		wait(5)
	elseif i <= 1651207 then
		print("sabot delay decision:",3)
		wait(17)
	elseif i <= 4802449 then
		print("sabot delay decision:",4)
		wait(11)
	elseif i <= 8137476 then
		print("sabot delay decision:",5)
		wait(13)
	elseif i <= 10390160 then
		print("sabot delay decision:",6)
		wait(17)
	elseif i <= 11506310 then
		print("sabot delay decision:",7)
		wait(19)
	elseif i <= 11947109 then
		print("sabot delay decision:",8)
		wait(23)
	elseif i <= 12093504 then
		print("sabot delay decision:",9)
		wait(29)
	elseif i <= 12135914 then
		print("sabot delay decision:",10)
		wait(31)
	elseif i <= 12146914 then
		print("sabot delay decision:",11)
		wait(37)
	elseif i <= 12149518 then
		print("sabot delay decision:",12)
		wait(41)
	elseif i <= 12150089 then
		print("sabot delay decision:",13)
		wait(43)
	elseif i <= 12150206 then
		print("sabot delay decision:",14)
		wait(47)
	elseif i <= 12150229 then
		print("sabot delay decision:",15)
		wait(53)
	elseif i <= 12150233 then
		print("sabot delay decision:",16)
		wait(59)
	elseif i <= 12150234 then
		print("sabot delay decision:",17)
		wait(61)
	end
end


function react_delay_control()
	local i = math.random(12150234)
	print("reatc delay control:",i);
	if i <= 1000 then
		print("reatc delay decision:",1)
		wait(3)
	elseif i <= 187182 then
		print("reatc delay decision:",2)
		wait(5)
	elseif i <= 1651207 then
		print("reatc delay decision:",3)
		wait(7)
	elseif i <= 4802449 then
		print("reatc delay decision:",4)
		wait(11)
	elseif i <= 8137476 then
		print("reatc delay decision:",5)
		wait(13)
	elseif i <= 10390160 then
		print("reatc delay decision:",6)
		wait(17)
	elseif i <= 11506310 then
		print("reatc delay decision:",7)
		wait(19)
	elseif i <= 11947109 then
		print("reatc delay decision:",8)
		wait(23)
	elseif i <= 12093504 then
		print("reatc delay decision:",9)
		wait(29)
	elseif i <= 12135914 then
		print("reatc delay decision:",10)
		wait(31)
	elseif i <= 12146914 then
		print("reatc delay decision:",11)
		wait(37)
	elseif i <= 12149518 then
		print("reatc delay decision:",12)
		wait(41)
	elseif i <= 12150089 then
		print("reatc delay decision:",13)
		wait(43)
	elseif i <= 12150206 then
		print("reatc delay decision:",14)
		wait(47)
	elseif i <= 12150229 then
		print("reatc delay decision:",15)
		wait(53)
	elseif i <= 12150233 then
		print("reatc delay decision:",16)
		wait(59)
	elseif i <= 12150234 then
		print("reatc delay decision:",17)
		wait(61)
	end
end