--普通宝图

--脚本号
x200002_g_scriptId = 200002
--环id
x200002_g_RoundId = 2


--任务权重[概率,任务id(类型)]
x200002_g_MissionWeight={{chanceSum=40,id=10201},{chanceSum=100,id=10203}}


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

--当前环的任务id
function x200002_GetRoundMissionId( scene,selfId )
	-- body

	local missionWeight=x200002_g_MissionWeight;
	local random = math.random(100)
	print(random)
	local  missionId = missionWeight[1].id
	for i=1,#missionWeight do
		if missionWeight[i].chanceSum>=random then
			missionId= missionWeight[i].id
			break
		end	
	end
	print(missionId)
	return missionId 
end


function x200002_MissionRoundNext( scene,selfId,section,roundInSection,roundInCD )
	  AcceptRoundMission(scene,selfId,x200002_g_RoundId)
end



--环奖励 round 本轮的环数 roundInCD 时间段内的环数（本日（周）的完成次数）
function x200002_OnRoundBouns( scene,selfId,section,round,roundInCD)
	-- body
	print("OnRoundBouns",round,roundInCD)
	-- round =round+1
	-- local  level = GetLevel(scene,selfId)	
	
	-- local money = math.ceil(level*2*round*roundInCD)	
	-- local exp = math.ceil(level*2*round*roundInCD)
	
	-- AddMoney(scene,selfId,money)
	-- GainExp(scene,selfId,exp)

end


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