function battle_sai003(npcID)--冰鳞
n=flag.GetBattleValue(15150)  

	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

hp=battle.GetSelfHP(2)


	

 if hp>30 then
	
      
   if n~=3 then
   
      a=battle.GetRndNumber(1,10)
      if a>=1 and a<=3 then
         
         id = battle.GetRndPlayer()
		 if battle.CheckPlayerStat(id,0)==1 then
			battle.SetDamageScale(3)
		 end
	     battle.AtkToPlayer(id,1)     --普通攻击 
	     n=n+1
	     flag.SetBattleValue(15150,n)
	  elseif a>=4 and a<=6 then
	     
	     id = battle.GetRndPlayer()
         battle.MagicToPlayer(id,1422,1)       --单体法术
		 n=n+1
	     flag.SetBattleValue(15150,n)
	  elseif a>=7 and a<=8 then
		 battle.MagicToPlayer(0,1424,2)      
	  else
	     
	     battle.MagicToPlayer(0,1423,2)       --全体法术
	     flag.SetBattleValue(15150,0)
	  end
   else
      global.Print(5)
      battle.MagicToPlayer(0,1423,2)       --全体法术
	  flag.SetBattleValue(15150,0)	  
   end

 else     --更换模型 

	if flag.GetBattleValue(14001)==0 then
		
		npc.CreateSE(npcID,1817)
		npc.SetAnim(npcID,220)
		npc.AddAnimChain(npcID,220,2)
		global.Wait(2.8)
		--吼
		global.PlaySound(1425,100)
		global.WaitForNpcAnim(npcID,220)
		flag.SetBattleValue(14001,1) --对话控制
		battle.MagicToPlayer(0,1423,2)       --全体法术
	else
		a=battle.GetRndNumber(1,10)
		if a>=1 and a<=3 then
			
			id = battle.GetRndPlayer()
			if battle.CheckPlayerStat(id,0)==1 then
				battle.SetDamageScale(3)
			end
			battle.AtkToPlayer(id,1)     --普通攻击 
			n=n+1
			flag.SetBattleValue(15150,n)
		elseif a>=4 and a<=6 then
			
			id = battle.GetRndPlayer()
			battle.MagicToPlayer(id,1422,1)       --单体法术
			n=n+1
			flag.SetBattleValue(15150,n)
		elseif a>=7 and a<=8 then
			battle.MagicToPlayer(0,1424,2)      
		else
			
			battle.MagicToPlayer(0,1423,2)       --全体法术
			flag.SetBattleValue(15150,0)
		end
	end

end

end 