function  battle_bai015(npcID)--螃蟹

	
	if battle.CheckPlayerStat(16,725)==1 then
	    for se=1,7,1 do
        if battle.CheckNpcPlace(se)==0 then
	    local tid=battle.GetPlaceNpcID(se)
		    if npc.GetHP(tid,1)>2 then
			   npc.CreateSE(tid,3844)--剑斩的特效
			   global.PlaySound(531,200)--音效插入
			   npc.ChangeHP(1,0,tid,-2)
			end
	    end
		end	
	wt(1.5)
	end
	
	local sg=flag.GetBattleValue(16222)	--语言提示打法
	
	m=flag.GetBattleValue(16001)  --螯足存在控制旗标
	p=flag.GetBattleValue(16002)  --回合记录旗标
	flag.SetBattleValue(16002,p+1)
	a=battle.CheckNpcPlace(4)
	b=battle.CheckNpcPlace(2)
	c=battle.CheckNpcPlace(3)
	d=battle.CheckNpcPlace(7)
	
	
	if p==2 then
		local zid=battle.GetRndPlayer()
		if zid==1 then
			uid=522
		elseif zid==2 then
			uid=183
		elseif zid==8 then
			uid=166	
		elseif zid==16 then
			uid=110
		end
		
		ui.Dialog(86993,uid,0,0,zid,0)--它壳很坚硬，又有两只大螯足挡在前面，我们很难伤害到它的本体，试着先打它的几只足……
	end
	
	if b==1 and c==1 and m==0 then   --两个大螯足打掉之后防御降低。
		npc.ChangeDef(npcID,-2000)
		npc.ChangeMagicDef(npcID,7,-70)
		flag.SetBattleValue(16001,1)
	end	
	local id1,id2,id3,id4
	if a==0 then
		id1=battle.GetPlaceNpcID(4)
	end
	if b==0 then
		id2=battle.GetPlaceNpcID(2)
	end	
	if c==0 then
		id3=battle.GetPlaceNpcID(3)
	end	
	if d==0 then
		id4=battle.GetPlaceNpcID(7)
	end
	
	if p%6==0 and (a==1 or d==1) then
		battle.BeginSummon()
		if a==1 then
			battle.AddNpc(6022,4)
		end
		if d==1 then
			battle.AddNpc(6025,7)
		end
		global.Wait(2)
		battle.Skip() 
	elseif a==1 and b==1 and c==1 and d==1 then
		x=battle.GetRndNumber(1,10)
		if x>=1 and x<=6 then
			battle.MagicToPlayer(0,235,1)
		elseif x>=7 and x<=10 then
			id=battle.GetRndPlayer()
			battle.MagicToPlayer(id,251,1)
		end
	else
		x=battle.GetRndNumber(1,100)
		if x>=1 and x<=25 and (a==0 or b==0 or c==0 or d==0) then
			local r=battle.GetRndNumber(1,4)
			if r==1 and a==0 then
				npc.SetAnim(90000,105)                   --足光
				if a==0 then
					global.CreateCameraSE(id1,4727)
				end
				if b==0 then
					npc.SetAnim(id2,5)
				end	
				if c==0 then
					npc.SetAnim(id3,5)
				end	
				if d==0 then
					npc.SetAnim(id4,5)
				end
			elseif r==2 and b==0 then
				npc.SetAnim(90000,106)                   --足光
				if a==0 then
					npc.SetAnim(id1,6)
				end
				if b==0 then
					global.CreateCameraSE(id2,4733)
				end	
				if c==0 then
					npc.SetAnim(id3,6)
				end	
				if d==0 then
					npc.SetAnim(id4,6)
				end			
			elseif r==3 and c==0 then
				npc.SetAnim(90000,107)                   --足光
				if a==0 then
					npc.SetAnim(id1,7)
				end
				if b==0 then
					npc.SetAnim(id2,7)
				end	
				if c==0 then
					global.CreateCameraSE(id3,4735)
				end	
				if d==0 then
					npc.SetAnim(id4,7)
				end			
			elseif r==4 and d==0 then
				npc.SetAnim(90000,108)                   --足光
				if a==0 then
					npc.SetAnim(id1,8)
				end
				if b==0 then
					npc.SetAnim(id2,8)
				end	
				if c==0 then
					npc.SetAnim(id3,8)
				end	
				if d==0 then
					global.CreateCameraSE(id4,4737)
				end	
			else
				if a==0 then
					npc.SetAnim(90000,105)                   --足光
					if a==0 then
						global.CreateCameraSE(id1,4727)
					end
					if b==0 then
						npc.SetAnim(id2,5)
					end	
					if c==0 then
						npc.SetAnim(id3,5)
					end	
					if d==0 then
						npc.SetAnim(id4,5)
					end
				elseif b==0 then
					npc.SetAnim(90000,106)                   --足光
					if a==0 then
						npc.SetAnim(id1,6)
					end
					if b==0 then
						global.CreateCameraSE(id2,4733)
					end	
					if c==0 then
						npc.SetAnim(id3,6)
					end	
					if d==0 then
						npc.SetAnim(id4,6)
					end
				elseif c==0 then
					npc.SetAnim(90000,107)                   --足光
					if a==0 then
						npc.SetAnim(id1,7)
					end
					if b==0 then
						npc.SetAnim(id2,7)
					end	
					if c==0 then
						global.CreateCameraSE(id3,4735)
					end	
					if d==0 then
						npc.SetAnim(id4,7)
					end	
				elseif d==0 then
					npc.SetAnim(90000,108)                   --足光
					if a==0 then
						npc.SetAnim(id1,8)
					end
					if b==0 then
						npc.SetAnim(id2,8)
					end	
					if c==0 then
						npc.SetAnim(id3,8)
					end	
					if d==0 then
						global.CreateCameraSE(id4,4737)
					end	
				end
			end
		elseif x>=26 and x<=50 then
			if a==0 then
				npc.SetAnim(id1,15)
			end
			if b==0 then
				npc.SetAnim(id2,15)
			end	
			if c==0 then
				npc.SetAnim(id3,15)
			end	
			if d==0 then
				npc.SetAnim(id4,15)
			end
			battle.MagicToPlayer(0,235,1)                    --水激
		elseif x>=51 and x<=70 then                          --螯闪
			if a==0 and b==0 and c==0 and d==0 then
				battle.MagicToPlayer(0,236,1)
			elseif a==0 and b==0 and c==0 and d==1 then
				battle.MagicToPlayer(0,237,1)
			elseif a==0 and b==0 and c==1 and d==0 then
				battle.MagicToPlayer(0,238,1)
			elseif a==0 and b==1 and c==0 and d==0 then
				battle.MagicToPlayer(0,239,1)
			elseif a==1 and b==0 and c==0 and d==0 then
				battle.MagicToPlayer(0,240,1)
			elseif a==0 and b==0 and c==1 and d==1 then
				battle.MagicToPlayer(0,241,1)
			elseif a==0 and b==1 and c==0 and d==1 then
				battle.MagicToPlayer(0,242,1)
			elseif a==0 and b==1 and c==1 and d==0 then
				battle.MagicToPlayer(0,243,1)
			elseif a==1 and b==0 and c==0 and d==1 then
				battle.MagicToPlayer(0,244,1)
			elseif a==1 and b==0 and c==1 and d==0 then
				battle.MagicToPlayer(0,245,1)
			elseif a==1 and b==1 and c==0 and d==0 then
				battle.MagicToPlayer(0,246,1)
			elseif a==0 and b==1 and c==1 and d==1 then
				id=battle.GetRndPlayer()
				if a==0 then
					npc.SetAnim(id1,310)
				end
				if b==0 then
					npc.SetAnim(id2,310)
				end	
				if c==0 then
					npc.SetAnim(id3,310)
				end	
				if d==0 then
					npc.SetAnim(id4,310)
				end
				battle.MagicToPlayer(id,251,1)       --沙波
			elseif a==1 and b==0 and c==1 and d==1 then
				id=battle.GetRndPlayer()
				if a==0 then
					npc.SetAnim(id1,310)
				end
				if b==0 then
					npc.SetAnim(id2,310)
				end	
				if c==0 then
					npc.SetAnim(id3,310)
				end	
				if d==0 then
					npc.SetAnim(id4,310)
				end
				battle.MagicToPlayer(id,251,1)       --沙波
			elseif a==1 and b==1 and c==0 and d==1 then
				id=battle.GetRndPlayer()
				if a==0 then
					npc.SetAnim(id1,310)
				end
				if b==0 then
					npc.SetAnim(id2,310)
				end	
				if c==0 then
					npc.SetAnim(id3,310)
				end	
				if d==0 then
					npc.SetAnim(id4,310)
				end
				battle.MagicToPlayer(id,251,1)       --沙波
			elseif a==1 and b==1 and c==1 and d==0 then
				id=battle.GetRndPlayer()
				if a==0 then
					npc.SetAnim(id1,310)
				end
				if b==0 then
					npc.SetAnim(id2,310)
				end	
				if c==0 then
					npc.SetAnim(id3,310)
				end	
				if d==0 then
					npc.SetAnim(id4,310)
				end
				battle.MagicToPlayer(id,251,1)       --沙波
			end
		elseif x>=71 and x<=90 then
			id=battle.GetRndPlayer()
			if a==0 then
				npc.SetAnim(id1,310)
			end
			if b==0 then
				npc.SetAnim(id2,310)
			end	
			if c==0 then
				npc.SetAnim(id3,310)
			end	
			if d==0 then
				npc.SetAnim(id4,310)
			end
			battle.MagicToPlayer(id,251,1)       --沙波
	
		else
			if a==0 then
				npc.SetAnim(id1,320)
			end
			if b==0 then
				npc.SetAnim(id2,320)
			end	
			if c==0 then
				npc.SetAnim(id3,320)
			end	
			if d==0 then
				npc.SetAnim(id4,320)
			end
			battle.MagicToPlayer(0,252,1)        --潮海
		end
	end
end