function battle_sai020(npcID)       --湮世穹兵

	local n=flag.GetBattleValue(12001)
	
	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
	
	if n%5==1 or n%5==3 or n%5==4 then
		if n>10 and flag.GetBattleValue(12002)==0 then
			flag.SetBattleValue(12002,1)
			battle.MagicToPlayer(0,1489,2)
		else
			local a=battle.GetRndNumber(1,10)
			if a>=1 and a<=3 then
				id=battle.GetRndPlayer()
				battle.MagicToPlayer(id,1486,1)
			elseif a>=4 and a<=6 then
				battle.MagicToPlayer(0,1487,1)
			elseif a>=7 and a<=8 then
				battle.MagicToPlayer(0,1488,1)
			else
				flag.SetBattleValue(12002,1)
				battle.MagicToPlayer(0,1489,2)
			end
		end
	elseif n%5==2 then
		local a=battle.GetRndNumber(1,2)
		if a==1 then
			battle.ActionTwice()
		end
		battle.MagicToNpc(npcID,1490,2)
		
	else
		local a=battle.GetRndNumber(1,2)
		if a==1 then
			battle.ActionTwice()
		end
		battle.MagicToNpc(npcID,1491,2)
		
	end


end