View Single Post
  #3  
Old 10-30-2012, 04:21 PM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

Quote:
Originally Posted by Puce Moose View Post
Regarding the witch hunter's issue:

I tried editing the file and replacing the prob = 0 with prob = 5. That made no difference in game. I then tried moving the {s = "bless", prob = 0}, line above the {s = "dragon_slayer", prob = 0}, line.

After making that change, now my witch hunters always cast bless. It looks like the buff as it currently stands always casts the first buff in the list.
So we could at least pick the spell we want, but it would be more fun if the random function worked. All those zeroes seems to indicate something is messed up. Did you see farther down where it says:

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

local spell = random_choice(tab_spells)
if spell.s == "dragon_slayer" then
spell_dragon_slayer_attack(2, dmgts, 0)
elseif spell.s == "dark_knight" then
spell_dark_knight_attack(2, dmgts, 0)
elseif spell.s == "light_knight" then
spell_light_knight_attack(2, dmgts, 0)
elseif spell.s == "divine_armor" then
spell_divine_armor_attack(2, dmgts, 0)
elseif spell.s == "fire_breath" then
spell_fire_breath_attack(2, dmgts, 0)
elseif spell.s == "haste" then
spell_haste_attack(2, dmgts, 0)
elseif spell.s == "stone_skin" then
spell_stone_skin_attack(2, dmgts, 0)
elseif spell.s == "bless" then
spell_bless_attack(2, dmgts, 0)
end

==========

Maybe the key is in there?
Reply With Quote