function battle_sai028a()       --一贫

	local n=flag.GetBattleValue(12002)
	local m=flag.GetBattleValue(12003)
	
	if player.GetHP(16,0)>0 then
		if npc.GetHP(90000,0)>10500 then
		 if flag.GetBattleValue(52222)==1 then--P2P4一贫行动的情况
		 if flag.GetBattleValue(12001)==3 then
			player.ChangeHP(1,1,0,battle.GetRndNumber(3,4),1)
		 else
			player.ChangeHP(1,1,0,battle.GetRndNumber(2,3),1)
		 end
			player.ChangeDP(1,0,-10)
		 elseif flag.GetBattleValue(52222)==2 then--P3刚触发的情况
			npc.ChangeHP(0,1,0,1)
		 elseif flag.GetBattleValue(52222)==3 then--P3的情况
			player.ChangeHP(1,1,0,1,1)
			player.ChangeDP(1,0,1)
			npc.ChangeHP(0,1,0,battle.GetRndNumber(1,5))
		 elseif flag.GetBattleValue(52222)==0 then--P2P4自己可以行动的情况
	        if flag.GetBattleValue(52224)==3 then bfb=-1 else bfb=-2 end--0.2秒时掉1%
			player.ChangeHP(1,1,0,bfb,1)
			player.ChangeDP(1,0,-10)
			npc.ChangeHP(0,1,0,-60)
		 elseif flag.GetBattleValue(52222)==10 then--双方都不变
			player.ChangeDP(1,0,-10)
		 end
		 
		if flag.GetBattleValue(52224)==1 then jzt=0.4
		elseif flag.GetBattleValue(52224)==2 then jzt=0.3
		elseif flag.GetBattleValue(52224)==3 then jzt=0.2
		else
		jzt=0.5
		end
		    
			
			if n==4 and m==1 then              --剑阵缩减
				flag.SetBattleValue(12002,3)
				npc.SetVisible(80000,0)
				npc.SetVisible(80004,0)
				global.AddTimer(jzt,21900)
			elseif n==3 and m==1 then
				flag.SetBattleValue(12002,2)
				npc.SetVisible(79999,0)
				npc.SetVisible(80003,0)
				global.AddTimer(jzt,21900)
			elseif n==2 and m==1 then
				npc.RemoveStat(90000,44)
				flag.SetBattleValue(12002,1)
				npc.SetVisible(79998,0)
				npc.SetVisible(80002,0)
				global.AddTimer(jzt,21900)
			elseif n==1 and m==1 then
				flag.SetBattleValue(12003,2)   --剑阵改为增长
				npc.SetVisible(79997,0)
				npc.SetVisible(80001,0)
				global.AddTimer(jzt,21900)
			elseif n==1 and m==2 then
				flag.SetBattleValue(12002,2)
				npc.SetVisible(79997,1)
				npc.SetVisible(80001,1)
				global.AddTimer(jzt,21900)
			elseif n==2 and m==2 then
				flag.SetBattleValue(12002,3)
				npc.SetVisible(79998,1)
				npc.SetVisible(80002,1)
				global.AddTimer(jzt,21900)
			elseif n==3 and m==2 then
				npc.AddStat(0,90000,100,44,1000)
				flag.SetBattleValue(12002,4)
				npc.SetVisible(79999,1)
				npc.SetVisible(80003,1)
				global.AddTimer(jzt,21900)
			elseif n==4 and m==2 then
				flag.SetBattleValue(12003,1)   --剑阵改为缩减
				npc.SetVisible(80000,1)
				npc.SetVisible(80004,1)
				global.AddTimer(jzt,21900)
			end
			--player.ChangeDP(1,0,-10) 
		else
			flag.SetBattleValue(52225,1)--标记已经胜利
			if flag.GetBattleValue(12004)==0 then
				flag.SetBattleValue(12004,1)
				global.AddTimer(0.5,21900)
			else
				for i=79997,80004,1 do
					npc.SetVisible(i,0)--移除剑阵
				end
				player.StopSE(16)
				npc.RemoveStat(90000,44)--移除反震
				player.RemoveStat(1,0,725)  --移除罡
				player.ChangeHP(1,1,0,50,1)
				--npc.ChangeDef(90000,9999)
				npc.HurtBy(90000,1)--攻击无效
			    global.EnableSkipDialog(0)
			    ui.Dialog_t(170821,110,0,0,16,0,1.5)--破阵！
			    global.EnableSkipDialog(1)
				wt(0.5)
				battle.End(50000)
				--global.AddTimer(2,35512)--一贫战胜利循环脚本
			end
		end
	else

		battle.Loose()
		player.StopSE(16)
	end
end