x020023_g_scriptId=020023

x020023_g_CSParamIdxCurFloor=0
x020023_g_CSParamIdxCurSubStage=1


function x020023_OnCopySceneTick(scene,tickCount)					--副本阶段
							
end

function x020023_OnObjEnter(scene,objId)
--	local value = GetRequestCard(scene, objId)
--	AcceptMission(scene,objId,60000 + value)
end


function x020023_OnObjDie( scene,objId,rolebaseId,killerId )					--战斗（）
	local MonCount = GetHostileMonsterCount(scene)
	if(GetObjType(scene, objId) == 0)  then
		if(IsTeamLeader(scene, objId))  then
			local nUserCount = GetSceneUserCount(scene)
			for i=0,nUserCount-1 do                                                                                        --  帮助奖励（当所有BOSS奖励触发后开始触发）
				local nUserObjId = GetUserObjIdByIdx(scene,i)
				GodWordResults(scene, nUserObjId, false)
			end
			SetCopySceneFail(scene)
		elseif not IsInTeam(scene, objId) then
			local nUserCount = GetSceneUserCount(scene)
			for i=0,nUserCount-1 do                                                                                        --  帮助奖励（当所有BOSS奖励触发后开始触发）
				local nUserObjId = GetUserObjIdByIdx(scene,i)
				GodWordResults(scene, nUserObjId, false)
			end
			SetCopySceneFail(scene)
		end
		SendAllPlayerServerTips(scene, "#{1501}*")
	end
	if(MonCount == 0) then
		local nUserCount = GetSceneUserCount(scene)
		for i=0,nUserCount-1 do                                                                                        --  帮助奖励（当所有BOSS奖励触发后开始触发）
			local nUserObjId = GetUserObjIdByIdx(scene,i)
			GodWordResults(scene, nUserObjId, true)
		end
		SendAllPlayerServerTips(scene, "#{50002}*")
		SetCopySceneSuccess(scene)
	end

end



