function battle_jai002(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
	
	m=flag.GetBattleValue(12951)
		
	hp=npc.GetHP(npcID,1)
	h0p=npc.GetHP(npcID,0)
	lasthp=flag.GetBattleValue(12955)
	lasth0p=flag.GetBattleValue(12954)
	flag.SetBattleValue(12955,hp)
	flag.SetBattleValue(12954,h0p)
	
	flag.SetBattleValue(12952,0)
	flag.SetBattleValue(12953,0)
    
	i=0
	for p=0,9,1 do
		pid=2^p
		if player.IsPlayerInBattle(pid)==1 and player.GetHP(pid,1)<100 then
			i=i+1
		end
	end
	
	
	if i==0 and m==0 and battle.GetRndNumber(1,10)<=4 then
		
		battle.MagicToPlayer(0,1204,1)   --全体法术

	else
	
	    if m==0 then
		    a = battle.GetRndNumber(1,10)
		    if a>=1 and a<=6 then
		        id = battle.GetRndPlayer()
		        battle.MagicToPlayer(id,1205,1)--穿刺
		        m=m+1
		        flag.SetBattleValue(12951,m)
		    else
		        battle.MagicToPlayer(0,1204,1)   --全体法术
		    end
		
		elseif m==1 then
		ui.Popo_Auto(170764,1,npcID,2,0)
		if (hp<50 and shs~=2) or (hp<50 and battle.GetRndNumber(1,10)<=5) then flag.SetBattleValue(12953,1) end
		battle.MagicToPlayer(0,3063,1)--昏睡
		
		elseif m==2 then
		    if hp==lasthp then
			    wt(1)
			    ui.Popo_Auto(170761,1,npcID,2,0)
			    npc.ChangeHP(1,1,0,10)
			    flag.SetBattleValue(12952,1)
		        battle.MagicToPlayer(0,1204,1)   --全体法术
				m=0
				flag.SetBattleValue(12951,m)
			elseif lasth0p-h0p>=20000 then
			    wt(1)
			    ui.Popo_Auto(170762,1,npcID,2,0)
			    npc.AddStat(0,npcID,9000,3,3)
			    a = battle.GetRndNumber(1,10)
				if a>=1 and a<=4 then
				    id = battle.GetRndPlayer()
				    if battle.CheckPlayerStat(id,83)==1 then atkscale=5 else atkscale=1 end
				    if battle.CheckNpcStat(npcID,3)==1 then atkscale=atkscale*0.3 end
				    --备选脱力3
				    battle.SetDamageScale(atkscale)
				    battle.AtkToPlayer(id,1)     --普通攻击
		        else
				    battle.MagicToPlayer(0,1204,1)   --全体法术
				end
				m=0
				flag.SetBattleValue(12951,m)
			else
			    wt(1)
			    ui.Popo_Auto(170763,1,npcID,2,0)
				npc.ChangeHP(1,1,0,5)
			    id = battle.GetRndPlayer()
		        battle.MagicToPlayer(id,1205,1)--穿刺
		        m=1
		        flag.SetBattleValue(12951,m)
			end
		elseif m==4 then
		    PP1=0
            PP2=0
            PP3=0
            PP4=0
		    for pis=1,9,1 do
            if battle.CheckPlayerPlace(pis)==1 then --判断有人 
	            pisd=battle.GetPlacePlayerID(pis) --位置人id
	            if PP1==0 then
	            PP1=player.GetHP(pisd,0)
				player.ChangeHP(0,0,pisd,HH1-PP1)
	            elseif PP2==0 then
	            PP2=player.GetHP(pisd,0)
				player.ChangeHP(0,0,pisd,HH2-PP2)
	            elseif PP3==0 then
	            PP3=player.GetHP(pisd,0)
				player.ChangeHP(0,0,pisd,HH3-PP3)
	            elseif PP4==0 then
	            PP4=player.GetHP(pisd,0)
				player.ChangeHP(0,0,pisd,HH4-PP4)
	            end
           end
           end
		    if hp==lasthp and HH1==PP1 and HH2==PP2 and HH3==PP3 and HH4==PP4 then
			    ui.Popo_Auto(170765,1,npcID,2,0)--这都被你看穿了
				id = battle.GetRndPlayer()
				if battle.CheckPlayerStat(id,83)==1 then atkscale=5 else atkscale=1 end
				if battle.CheckNpcStat(npcID,3)==1 then atkscale=atkscale*0.3 end
				--备选脱力3
				battle.SetDamageScale(atkscale)
				battle.AtkToPlayer(id,1)     --普通攻击
				m=0
		        flag.SetBattleValue(12951,m)
			else
			    wt(1)
			    ui.Popo_Auto(170767,1,npcID,2,0)--哈哈，你中计了。梦中之事，皆是虚幻。
			    npc.ChangeHP(0,0,npcID,lasth0p-h0p)
				wt(2)
				ui.Popo_Auto(170768,1,npcID,2,0)--接受惩罚吧。
				id = battle.GetRndPlayer()
		        battle.MagicToPlayer(id,1205,1)--穿刺
		        m=0
		        flag.SetBattleValue(12951,m)
			end
		end
		
    end
end