function battle_sai005a(npcID)
	n=flag.GetBattleValue(15111)
    b=battle.GetSelfHP(2)        --血量百分比
    x2=battle.GetSelfHP(1)       --血量数值
    
    flag.SetBattleValue(2,x2)
	flag.SetBattleValue(4,0)     --龟壳形态计数重置
	
    t=flag.GetBattleValue(1)     --回合计数
	t=t+1
	flag.SetBattleValue(1,t)
	
	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
	

if flag.GetBattleValue(1)>=5 and b<=60 then
 	 flag.SetBattleValue(1,0)           --回合数置零
	 npc.SetAnim(npcID,219) 
	 npc.AddAnimChain(npcID,219,2)
     battle.MagicToNpc(npcID,1434,1) 
     global.WaitForBattleSEEnd(1876)
     battle.ChangeNpc(10105,10130)
--     npc.SetHP(npcID,x2) 

	 return
end

if n~=5 then
   a=battle.GetRndNumber(1,10)
	if a>=1 and a<=5 then
	  n=n+1
	  flag.SetBattleValue(15111,n)
	  id = battle.GetRndPlayer() 
	  battle.MagicToPlayer(id,1427,1)          --单体法术1--岩落 
	elseif a>=6 and a<=8 then
	  id = battle.GetRndPlayer() 
	  battle.MagicToPlayer(id,1430,3)          --单体法术2--晶突 
	  flag.SetBattleValue(15111,0)
	elseif a>=9 and a<=10 then
      battle.MagicToPlayer(0,1428,2)           --全体法术--玄龟移山 
	  flag.SetBattleValue(15111,0)
	end
  
else
   c=battle.GetRndNumber(1,2)
    if c==1 then
	id = battle.GetRndPlayer()
	battle.MagicToPlayer(id,1430,3)
	flag.SetBattleValue(15111,0)
	else
    battle.MagicToPlayer(0,1428,2)
	flag.SetBattleValue(15111,0)
    end
end

end
