function  battle_bai028(npcID)--毒影

	local sg=flag.GetBattleValue(16222)	--语言提示打法
	local m=flag.GetBattleValue(16001)
	m=m+1
	local hp=battle.GetSelfHP(2)
	if hp>50 then
		flag.SetBattleValue(16001,m)
		if (m+3)%5==0 then
			if battle.CheckNpcPlace(4)==1 or battle.CheckNpcPlace(5)==1 or battle.CheckNpcPlace(6)==1 or battle.CheckNpcPlace(7)==1 then
				battle.BeginSummon()
				if battle.CheckNpcPlace(4)==1 then
					battle.AddNpc(6035,4)
					flag.SetBattleValue(16002,0)
				end
				if battle.CheckNpcPlace(5)==1 then
					battle.AddNpc(6036,5)
					flag.SetBattleValue(16003,0)
				end
				if battle.CheckNpcPlace(6)==1 then
					battle.AddNpc(6037,6)
					flag.SetBattleValue(16004,0)
				end
				if battle.CheckNpcPlace(7)==1 then
					battle.AddNpc(6038,7)
					flag.SetBattleValue(16005,0)
				end
				global.Wait(2)
				if sg==0 then   --战斗对话提示
					flag.SetBattleValue(16222,1)
					local zid=battle.GetRndPlayer()
					if zid==1 then
						uid=522
					elseif zid==2 then
						uid=183
					elseif zid==8 then
						uid=166	
					end
					
					ui.Dialog(87008,uid,0,0,zid,0)--这些蜘蛛非同寻常，我们最好尽快除掉它们……
				end
				battle.Skip()
			else
				battle.MagicToPlayer(0,279,1)
			end
		else
			a=battle.GetRndNumber(1,10)
			if a>=1 and a<=3 then
				battle.MagicToPlayer(0,279,1)
			elseif a>=4 and a<=8 then
			    id = battle.GetRndPlayer()
				if battle.CheckPlayerStat(id,1)==0 then 
				    id = battle.GetRndPlayer()
					if battle.CheckPlayerStat(id,1)==0 then 
				        id = battle.GetRndPlayer()
						if battle.CheckPlayerStat(id,1)==0 then 
							battle.MagicToPlayer(0,280,1)
						else
						    ui.Popo_Auto(170753,1,npcID,1.5,0)
						    battle.MagicToPlayer(id,3062,1)
						end						
					else
					    ui.Popo_Auto(170753,1,npcID,1.5,0)
					    battle.MagicToPlayer(id,3062,1)
					end					
				else
				    ui.Popo_Auto(170753,1,npcID,1.5,0)
				    battle.MagicToPlayer(id,3062,1)
				end
				
			else
				battle.MagicToPlayer(0,281,1)
			end
		end
	else
		
		if battle.CheckNpcPlace(2)==1 or battle.CheckNpcPlace(3)==1 then
			flag.SetBattleValue(16001,m)
		end
		if m%3==0 and (battle.CheckNpcPlace(2)==1 or battle.CheckNpcPlace(3)==1) then
			if battle.CheckNpcPlace(4)==1 or battle.CheckNpcPlace(5)==1 or battle.CheckNpcPlace(6)==1 or battle.CheckNpcPlace(7)==1 then
				battle.BeginSummon()
				if battle.CheckNpcPlace(2)==1 then
					battle.AddNpc(6039,2)
				else
					battle.AddNpc(6039,3)
				end
				global.Wait(2)
				battle.Skip()
			else
				battle.MagicToPlayer(0,281,1)
			end
		else
			
			if battle.CheckNpcPlace(2)==0 then
				id1=battle.GetPlaceNpcID(2)
				hp1=npc.GetHP(id1,1)
				id2=npcID
				if hp1<30 then
					flag.SetBattleValue(19013,1)
					battle.MagicToNpc(id1,283,1)
					return
				end
			end
			if battle.CheckNpcPlace(3)==0 then
				id1=battle.GetPlaceNpcID(3)
				hp1=npc.GetHP(id1,1)
				id2=npcID
				if hp1<30 then
					flag.SetBattleValue(19013,1)
					battle.MagicToNpc(id1,283,1)
					return
				end
			end


				a=battle.GetRndNumber(1,10)
				if a>=1 and a<=3 then
					if battle.CheckNpcStat(npcID,11)==0 then
						battle.MagicToNpc(0,282,1)
						if battle.CheckNpcPlace(2)==0 then
							npc.CreateSE(battle.GetPlaceNpcID(2),4800)
						end
						if battle.CheckNpcPlace(3)==0 then
							npc.CreateSE(battle.GetPlaceNpcID(3),4800)
						end
					else
						id = battle.GetRndPlayer()
				        if battle.CheckPlayerStat(id,1)==0 then 
				        id = battle.GetRndPlayer()
					    if battle.CheckPlayerStat(id,1)==0 then 
				        id = battle.GetRndPlayer()
						if battle.CheckPlayerStat(id,1)==0 then 
							battle.MagicToPlayer(0,280,1)
						else
						    ui.Popo_Auto(170753,1,npcID,1.5,0)
						    battle.MagicToPlayer(id,3062,1)
						end						
					    else
					    ui.Popo_Auto(170753,1,npcID,1.5,0)
					    battle.MagicToPlayer(id,3062,1)
					    end					
				        else
				        ui.Popo_Auto(170753,1,npcID,1.5,0)
				        battle.MagicToPlayer(id,3062,1)
				        end
					end
				elseif a==4 then
					battle.MagicToPlayer(0,279,1)
				elseif a>=5 and a<=8 then
			    id = battle.GetRndPlayer()
				if battle.CheckPlayerStat(id,1)==0 then 
				    id = battle.GetRndPlayer()
					if battle.CheckPlayerStat(id,1)==0 then 
				        id = battle.GetRndPlayer()
						if battle.CheckPlayerStat(id,1)==0 then 
							battle.MagicToPlayer(0,280,1)
						else
						    ui.Popo_Auto(170753,1,npcID,1.5,0)
						    battle.MagicToPlayer(id,3062,1)
						end						
					else
					    ui.Popo_Auto(170753,1,npcID,1.5,0)
					    battle.MagicToPlayer(id,3062,1)
					end					
				else
				    ui.Popo_Auto(170753,1,npcID,1.5,0)
				    battle.MagicToPlayer(id,3062,1)
				end
				else
					battle.MagicToPlayer(0,281,1)
				end

		end
	end
end