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