--捉鬼环

--脚本号
x200001_g_scriptId = 200001
--环id
x200001_g_RoundId = 1
--任务Id
x200001_g_MissionId = 20001
--接环最小等级
x200001_g_MinLevel = 25
x200001_g_AdapteLevel = 5

x200001_MissionBoundExpDouble = {7776, 9216, 10656, 12096, 13536, 14976, 16416, 17856, 19296, 20736, 22176, 23616, 25056, 26496, 27936, 29376}
x200001_MissionBoundExpNormal = {3888, 4608, 5328, 6048, 6768, 7488, 8208, 8928, 9648, 10368, 11088, 11808, 12528, 13248, 13968, 14688}
x200001_MissionBoundBindMoneyDouble = {300, 360, 420, 480, 540, 600, 660, 720, 780, 840, 900, 960, 1020, 1080, 1140, 1200}
x200001_MissionBoundBindMoneyNormal = {150, 180, 210, 240, 270, 300, 330, 360, 390, 420, 450, 480, 510, 540, 570, 600}
x200001_MissionBoundDropBox = {80007, 80007, 80007, 80007, 80007, 80007, 80007, 80007, 80007, 80007, 80007, 80007, 80007, 80007, 80007, 80007}


--是否可以接环，通用逻辑已判断
function x200001_CheckRoundAccept( scene,selfId )
	-- body
	return true
end

--当前环的任务id
function x200001_GetRoundMissionId( scene,selfId )
	-- body
	return x200001_g_MissionId 
end

--一环结束的逻辑 调用AcceptRoundMission
function x200001_OnNextRoundAccept( scene,selfId )
	-- body
	if IsTeamLeader(scene, selfId) then
		AcceptRoundMission(scene,selfId,x200001_g_RoundId)
	end
end

--一轮结束的逻辑
function x200001_OnNextSectionAccept( scene,selfId )
	-- body
	print("section finish")
	if IsTeamLeader(scene, selfId) then 
		ShowAcceptNextRoundUI(scene, selfId)
	end
end

function x200001_MissionRoundNext( scene,selfId,section,roundInSection,roundInCD )
	print("round in section",roundInSection==0)
	print(section)
	if roundInSection==0 then
		x200001_OnNextSectionAccept(scene,selfId)
	else
		x200001_OnNextRoundAccept(scene,selfId)
	end
end


--环奖励
function x200001_OnRoundBouns( scene,selfId,section,round,roundInCD )
	-- body
	print("OnRoundBouns")
	print(scene, selfId, x200001_g_MissionId, x200001_g_RoundId)

	local posIndex = math.floor(math.max(0, GetTeamMissionRoundLevel(scene, selfId) - x200001_g_MinLevel) / x200001_g_AdapteLevel) + 1
	GetTeamRoundMissionBones(scene, selfId, x200001_g_MissionId, x200001_g_RoundId, x200001_MissionBoundExpDouble[posIndex], x200001_MissionBoundExpNormal[posIndex], x200001_MissionBoundBindMoneyDouble[posIndex], x200001_MissionBoundBindMoneyNormal[posIndex], x200001_MissionBoundDropBox[posIndex])
end

--轮数做完了
function x200001_OnRoundFinish( scene,selfId )
	-- body
print("OnRound finish")
end