View Single Post
  #13  
Old 10-30-2012, 05:16 PM
Puce Moose Puce Moose is offline
Approved Member
 
Join Date: Feb 2010
Posts: 45
Default

Rudi:

I tried that, but it made the game crashed (probably something I messed up while editing), so I tried something else that I think would accomplish the same thing:

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 = math.min(0, math.ceil(tab_spells[i].prob))
else
tab_spells[i].prob = math.min(0, math.ceil(tab_spells[i].prob))
end
end

Unfortunately, it still selected the first spell in the list (bless in my case, since I shuffled bless on top of the spell group).

I found an enemy group with two stacks of witch hunters, which should make for some good testing.

Interestingly, when I changed that section to this:

acnt = table.getn(tab_spells)
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 = math.min(2, math.ceil(tab_spells[i].prob))
else
tab_spells[i].prob = math.min(2, math.ceil(tab_spells[i].prob))
end
end

The enemy witch hunters still always cast bless, but my witch hunter stack always casts Hell/Fire Breath (the sixth spell in the list).
Reply With Quote