function  battle_bai005(npcID)--神农
	
		
	n=flag.GetBattleValue(16001)
	m=flag.GetBattleValue(16002)
	l=flag.GetBattleValue(16007)
	f1=flag.GetBattleValue(16011)
	n=n+1
	--flag.SetBattleValue(16009,npcID)
	if l~=0 then
		flag.SetBattleValue(16007,0)
		--[[if l==1 then
			battle.ChangeNpc(6009,6010) 
		elseif l==2 then
			battle.ChangeNpc(6009,6011)
		end]]
		if l==3 then
		    if battle.CheckNpcStat(npcID,734)==1 then
			dead=1
			else
			dead=0
			end
			battle.MagicToPlayer(0,337,1)
		else
			if battle.CheckNpcStat(npcID,734)==1 then
			dead=1
			else
			dead=0
			end
			battle.MagicToPlayer(0,259,1)
		end
	else
		--都被打爆
		if battle.CheckNpcPlace(3)==1 and battle.CheckNpcPlace(2)==1 then
			--召唤被打爆的台子
			--battle.BeginSummon()
			flag.SetBattleValue(19020,1)  --称号旗标
			battle.AddNpc(6000,3)
			battle.AddNpc(6013,2)
			if battle.CheckNpcStat(npcID,734)==1 then
			dead=1
			else
			dead=0
			end
			battle.MagicToPlayer(0,259,1)
		--向左转
		elseif battle.CheckNpcPlace(3)==1 and battle.CheckNpcPlace(2)==0 then
			flag.SetBattleValue(19020,1)  --称号旗标
			camera.Save()
			--camera.ChangeCameraStatic(2392,258,5691,2393,240,5593)
			camera.Shake(5.4,10)
			npc.SetAnimSpeed(npcID,20)
			
			npc.SetAnim(npcID,17,1) 
			--battle.MagicToPlayer(0,259,1)
			--[[播放向左转动画
			]]
			--换脸
			
			
			--召唤被打爆的台子
			--battle.BeginSummon()
			battle.AddNpc(6012,3)
			id2=battle.GetPlaceNpcID(2)
			battle.ChangeNpcByID(id2,6000)
			flag.SetBattleValue(16002,1)
			flag.SetBattleValue(16007,1)
			--battle.ActionTwice()
			--恢复
			battle.ChangeNpc(6009,6010,89998)

			battle.MakeNpcQueueFront(89998)
			
		--向右转
		elseif battle.CheckNpcPlace(2)==1 and battle.CheckNpcPlace(3)==0 then
			flag.SetBattleValue(19020,1)  --称号旗标
			camera.Save()
			--camera.ChangeCameraStatic(2392,258,5691,2393,240,5593)
			camera.Shake(5.4,10)
			npc.SetAnimSpeed(npcID,20)
			
			npc.SetAnim(npcID,18,1) 
			--battle.MagicToPlayer(0,259,1)
			--[[播放向右转动画
			]]		
			--换脸
			
			
			--召唤被打爆的台子
			--battle.BeginSummon()
			battle.AddNpc(6012,2)
			id3=battle.GetPlaceNpcID(3)
			battle.ChangeNpcByID(id3,6013)		
			flag.SetBattleValue(16002,1)
			--恢复
			flag.SetBattleValue(16007,2)
			battle.ChangeNpc(6009,6011,89999) 
			battle.MakeNpcQueueFront(89999)
		--随机旋转
		elseif n%4==0 then
			flag.SetBattleValue(16002,1)
			flag.SetBattleValue(16001,n)
			--camera.ChangeCameraStatic(2392,258,5691,2393,240,5593)
			if battle.GetRndNumber(1,2)==1 then
				npc.SetAnimSpeed(npcID,20)
				npc.SetAnim(npcID,17,1) 
				--[[播放旋转+左转动画
				]]
				--换脸
				id2=battle.GetPlaceNpcID(2)
				battle.ChangeNpcByID(id2,6000)
				id3=battle.GetPlaceNpcID(3)
				battle.ChangeNpcByID(id3,6012)	
				flag.SetBattleValue(16007,3)
				battle.ChangeNpc(6009,6010,89998)
				battle.MakeNpcQueueFront(89998)
			else
				npc.SetAnimSpeed(npcID,20)
				npc.SetAnim(npcID,18,1) 
				--[[播放旋转+右转动画
				]]
				--换脸
				id2=battle.GetPlaceNpcID(2)
				battle.ChangeNpcByID(id2,6012)
				id3=battle.GetPlaceNpcID(3)
				battle.ChangeNpcByID(id3,6013)		
				flag.SetBattleValue(16007,3)
				battle.ChangeNpc(6009,6011,89999) 
				battle.MakeNpcQueueFront(89999)
			end
			flag.SetBattleValue(16002,1)
		--普通攻击
		elseif m==1 then
			flag.SetBattleValue(16001,n)
			flag.SetBattleValue(16002,2)
			battle.MagicToPlayer(0,253,1)
			local sg=flag.GetBattleValue(16222)	--语言提示打法
			global.WaitForBattleSEEnd(4643)
			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	
				elseif zid==64 then
					uid=630
				elseif zid==128 then
					uid=153		
				end
				
				ui.Dialog(86959,uid,0,0,zid,0)--按照一定规律旋转三皇像，会对我们有利，否则会陷入被动……
			end
		else
			if f1>=1 then
				debuff=f1+51
				if debuff>=58 then
					flag.SetBattleValue(19018,1)
					debuff=58
				end			
				player.RemoveStat(1,0,debuff-1)
				player.AddStat(1,0,100,debuff,10000)
				flag.SetBattleValue(16011,f1+1)
			end
			flag.SetBattleValue(16001,n)
			if battle.CheckNpcPlace(4)==1 and battle.CheckNpcPlace(7)==1 then
				battle.MagicToNpc(npcID,256,1)
			else
				if battle.CheckNpcStat(npcID,734)==1 then
			    dead=1
			    else
			    dead=0
			    end
				battle.MagicToPlayer(0,329,1)
			end
		end
	end
end