View Single Post
  #15  
Old 10-30-2012, 05:49 PM
Bhruic Bhruic is offline
Approved Member
 
Join Date: Oct 2012
Posts: 233
Default

Seems to be working for me now. Should have been math.max, not math.min

Code:
for i = 1, acnt do
    local spell_name = tab_spells[i].s
    if Attack.act_is_spell(0, spell_name) then
      tab_spells[i].prob = 0
    else
      tab_spells[i].prob = math.max(0, math.ceil(tab_spells[i].prob))
    end
end
Reply With Quote