function battle_sai045(npcID)  --雪莲童

    n=flag.GetBattleValue(12010)
    m=battle.GetSelfHP(2)
	
	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

	l=flag.GetValue(12515)
	q=flag.GetBattleValue(12000)
	if l==1 then
		if battle.CheckPlayerStat(battle.GetPlacePlayerID(4),0)==1 or battle.CheckPlayerStat(battle.GetPlacePlayerID(5),0)==1 or battle.CheckPlayerStat(battle.GetPlacePlayerID(6),0)==1 or battle.CheckPlayerStat(battle.GetPlacePlayerID(7),0)==1 then
			a=battle.GetRndNumber(1,10)
			if a>=1 and a<=5 then
				flag.SetBattleValue(12000,1)
				battle.MagicToPlayer(0,1099,4)
				battle.ActionTwice()
				return
			end	
		end
	end
	
	
	if m>=30 then

		if n~=4 then
			a=battle.GetRndNumber(1,10)
			if a>=1 and a<=6 then
				n=n+1
				flag.SetBattleValue(12010,n)
				id = battle.GetRndPlayer()
				battle.AtkToPlayer(id,1)     --普通攻击
			elseif a>=6 and a<=10 then
				id = battle.GetRndPlayer()
				if battle.CheckPlayerStat(id,6)==0 then
					battle.MagicToPlayer(id,1009,1)   --单体法术
					flag.SetBattleValue(12010,0)
				
				else
					battle.AtkToPlayer(id,1)     --普通攻击
					n=n+1
					flag.SetBattleValue(12010,n)
				end
			end
		else
			id = battle.GetRndPlayer()
			if battle.CheckPlayerStat(id,6)==0 then
				battle.MagicToPlayer(id,1009,1)
			else
				battle.AtkToPlayer(id,1)     --普通攻击
			end
			flag.SetBattleValue(12010,0)
		end

	else
		players = {}               --用以储存场上玩家没有被异变的
		i=1
		for p=0,9,1 do
			pid=2^p
			if player.IsPlayerInBattle(pid)==1 and battle.CheckPlayerStat(pid,6)==0 and player.GetHP(pid,0)~=0 and battle.CheckPlayerStat(pid,28)==0 then
				players[i]=pid
				i=i+1
			end
		end
		j=#players
		if j>1 then
			o = battle.GetRndNumber(1,j)
			id = players[o]
			battle.MagicToPlayer(id,1009,1)   --单体法术
		elseif j==1 then
			id = players[1]
			battle.MagicToPlayer(id,1009,1)   --单体法术	  
		else
			id = battle.GetRndPlayer()
			battle.AtkToPlayer(id,1)     --普通攻击
		end
	end
end