function battle_bai041(npcID)  --炎帝侍

	local wqx=flag.GetBattleValue(33037)--文星反转回合数
	if wqx>0 then
	flag.SetBattleValue(33037,wqx-1)
	if wqx-1==3 then
	flag.SetBattleValue(33038,2)--标记下一回合说话
	end
	    if wqx==3 and flag.GetBattleValue(33038)==2 then
		flag.SetBattleValue(33038,1)--屏蔽说话，标记觉醒阶段
		
		npc.ChangeDef(90000,-1200)
		npc.ChangeMagicDef(90000,0,-110)
		npc.ChangeMagicDef(90000,1,-110)
		npc.ChangeMagicDef(90000,2,-110)
		npc.ChangeMagicDef(90000,3,-110)
		npc.ChangeMagicDef(90000,4,-110)
		npc.ChangeMagicDef(90000,5,-110)
		npc.ChangeMagicDef(90000,7,-110)
		
		global.EnableSkipDialog(0)
        ui.Dialog_t(87016,529,1,0,1,0,6.5)--混蛋！把瑕还给我！瑕——
		--wt(3)
		global.EnableSkipDialog(1)
		ui.Message(170710)--夏侯瑾轩恨意觉醒
		--wt(2)
        end
		if wqx==1 and flag.GetBattleValue(33038)==1 then
		flag.SetBattleValue(33038,0)--结束
		
		npc.ChangeDef(90000,1200)
		npc.ChangeMagicDef(90000,0,110)
		npc.ChangeMagicDef(90000,1,110)
		npc.ChangeMagicDef(90000,2,110)
		npc.ChangeMagicDef(90000,3,110)
		npc.ChangeMagicDef(90000,4,110)
		npc.ChangeMagicDef(90000,5,110)
		npc.ChangeMagicDef(90000,7,110)
		
		global.EnableSkipDialog(0)
        ui.Dialog_t(170721,516,1,0,1,0,2.5)--从来尽是愁，千古空留恨……
		--wt(4)
		global.EnableSkipDialog(1)
		
		end
	end
	global.Print(wqx)

    local mn=flag.GetBattleValue(12061)
	local m=flag.GetBattleValue(12834)

 

		if mn~=3 then
			a=battle.GetRndNumber(1,10)
			if a>=1 and a<=6 and flag.GetBattleValue(33037)==0 then
				id = battle.GetRndPlayer()
				battle.AtkToPlayer(id,1)     --普通攻击   
				mn=mn+1
				flag.SetBattleValue(12061,mn)  
			--elseif a>=7 and a<=10 then
			else
				id = battle.GetRndPlayer()
				local wqx=flag.GetBattleValue(33037)--文星反转回合数
	            if wqx>3 then
	            battle.SetSkillScale(-100)
	            elseif wqx>0 and wqx<=3 then
	            battle.SetSkillScale(150)
	            end
				battle.MagicToPlayer(id,1082,1)      --单体法术 
				flag.SetBattleValue(12061,0)
			end
		else
			id = battle.GetRndPlayer()
			local wqx=flag.GetBattleValue(33037)--文星反转回合数
	        if wqx>3 then
	        battle.SetSkillScale(-100)
	        elseif wqx>0 and wqx<=3 then
	        battle.SetSkillScale(150)
	        end
			battle.MagicToPlayer(id,1082,1)      --单体法术 
			flag.SetBattleValue(12061,0)

		end

end