All pastes #515794 Raw Edit

Unnamed

public text v1 · immutable
#515794 ·published 2007-05-28 11:09 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