function battle_sai029(npcID)       --龙幽

	local n=flag.GetBattleValue(12001)
	
	local x=100+12*n
	
	n=n+1
	flag.SetBattleValue(12001,n)
	
	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 hp=battle.GetSelfHP(2)
	
	if hp>=40 then
		if n<3 then
			local a=battle.GetRndNumber(1,10)
			if a>=1 and a<=3 then
				local id = battle.GetRndPlayer()
				battle.MagicToPlayer(id,1516,1)
			elseif a>=4 and a<=6 then
				local id = battle.GetRndPlayer()
				battle.MagicToPlayer(0,1517,1)
			elseif a>=7 and a<=8 then
				local id = battle.GetRndPlayer()
				battle.MagicToPlayer(id,1518,1)
			else
				battle.MagicToNpc(0,1520,1)
			end
		else
			local s=100-(n-2)*5
			if hp<=s then
				local a=battle.GetRndNumber(1,10)
				if a>=1 and a<=3 then
					local id = battle.GetRndPlayer()
					battle.MagicToPlayer(id,1516,1)
				elseif a>=4 and a<=6 then
					local id = battle.GetRndPlayer()
					battle.MagicToPlayer(0,1517,1)
				elseif a>=7 and a<=8 then
					local id = battle.GetRndPlayer()
					battle.MagicToPlayer(id,1518,1)
				else
					battle.MagicToNpc(0,1520,1)
				end
			else
				local id = battle.GetRndPlayer()
				battle.MagicToPlayer(id,1519,1)
				
			end
		end
	else
		battle.End(5000)
	end
		
end