All pastes #515796 Raw Edit

Someone

public text v1 · immutable
#515796 ·published 2007-05-28 11:10 UTC
rendered paste body
function brm_Arcubus_AI_DamageInflict(LuaAI,unit,amount_damage)
	local data = LuaAI:Data()
	local HP = LuaAI:GetCreature():GetHealth();
	local MaxHP = LuaAI:GetCreature():GetMaxHealth();
	
	if (data["Attack"] == false) then
		if (100 / MaxHP * HP < 55) then
			-- Attack
			-- Rain of Fire
			local num3 = rand_range(0,100)
			if (num3 > 50) then spellid = 38584
			elseif (num3 < 50) then spellid = 39376
			end
		    data["Attack"] = true;
			LuaAI:DoCast(LuaAI:GetCreature(),spellid)
			LuaAI:SetData(data)
			return;
		end