Delegate.RegDelBattleOverEvent("NewbieBless_BattleOver");

--սȫ¼
function NewbieBless_BattleOver(_battle)

	for i=0,9 do
		local player = Battle.GetPlayer(_battle,i);
		if(player>-1 and Char.GetData(player,%_ȼ%)<=20 and Char.GetData(player,%_Ѫ%)<Char.GetData(player,%_Ѫ%))then
			Char.SetData(player,%_Ѫ%,Char.GetData(player,%_Ѫ%));
			--Char.SetData(player,%_ħ%,Char.GetData(player,%_ħ%));
			NLG.UpChar(player);
			NLG.SystemMessage(player,"[ʹӻ]"..Char.GetData(player,%_%).."ܵʹף,ֵָȫ.");
		end
		if(player>-1 and Char.GetData(player,%_ս%)==0 and Char.GetData(player,%_þ%)>1 and Battle.GetGainMode(_battle)==%ս_ͨ% and Battle.GetType(_battle)==%ս_ͨ%)then
			local battlePrize = math.random(1,100);
			if(battlePrize >=80 and battlePrize<=82 )then
				--Char.SetData(player,%_þ%,Char.GetData(player,%_þ%)*103/100);
				--NLG.UpChar(player);
				--NLG.SystemMessage(player,"[սӻ]"..Char.GetData(player,%_%).."ܵսף,սֵ3%.");
			elseif(battlePrize >=97 and battlePrize<=99 )then
				--Char.SetData(player,%_þ%,Char.GetData(player,%_þ%)*106/100);
				--NLG.UpChar(player);
				--NLG.SystemMessage(player,"[սӻ]"..Char.GetData(player,%_%).."ܵսף,սֵ6%.");
			elseif(battlePrize >=1 and battlePrize<=2 )then
				local battlePrizeGold = math.random(50,500);
				--Char.AddGold(player,battlePrizeGold);
				--NLG.SystemMessage(player,"[ӻ]"..Char.GetData(player,%_%).."ܵ˲ף,ս"..battlePrizeGold.."Ǯ.");
			elseif(battlePrize >=9 and battlePrize<=12 )then
				--Char.SetData(player,%_þ%,Char.GetData(player,%_þ%)*97/100);
				--NLG.UpChar(player);
				--NLG.SystemMessage(player,"[˥ӻ]"..Char.GetData(player,%_%).."ܵ˥,սþ齵3%.");
			end
		end
	end

	return 1;
end
