--晚宴一阶段环

--脚本号
x200014_g_scriptId = 200014

--环ID
x200014_g_RoundConfigId = 14

--任务ID(策划配置)
x200014_g_MissionId = 60550

--是否可以接环，通用逻辑已判断
function x200014_CheckRoundAccept(scene,selfId)

	return true
end

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

	local missionId = x200014_g_MissionId
	print(missionId)
	
	return missionId 
end


function x200014_MissionRoundNext(scene,selfId,section,roundInSection,roundInCD)

	AcceptRoundMission(scene,selfId,x200014_g_RoundConfigId)
end

--环奖励 round 本轮的环数 roundInCD 时间段内的环数（本日（周）的完成次数）
function x200014_OnRoundBouns(scene,selfId,section,round,roundInCD)

	print("x200014_OnRoundBouns",round,roundInCD)
	
	round = round+1
	
	local level = GetLevel(scene,selfId)
	local moneyRatio = GetGuildDinnerMissionMoneyRatio(scene,selfId)
	local expRatio = GetGuildDinnerMissionExpRatio(scene,selfId)
	
	local money = math.ceil(level*2*round*roundInCD*moneyRatio)	
	local exp = math.ceil(level*2*round*roundInCD*expRatio)

	money = math.ceil(money/10000)
	exp = math.ceil(exp/10000)
		
	AddMoney(scene,selfId,money)
	GainExp(scene,selfId,exp)
end

--轮数做完了
function x200014_OnRoundFinish(scene,selfId)

	print("x200014_OnRoundFinish")
end