From magical-combat.lua:37
Code: Select all
local spells = {}
local fatigue = (100 + 2 * self:combatFatigue()) / 100
local mana = self:getMana() - 1
if self:knowTalent(self.T_FLAME) and mana > self:getTalentFromId(self.T_FLAME).mana * fatigue then spells[#spells+1] = self.T_FLAME end
if self:knowTalent(self.T_LIGHTNING) and mana > self:getTalentFromId(self.T_LIGHTNING).mana * fatigue then spells[#spells+1] = self.T_LIGHTNING end
if self:knowTalent(self.T_EARTHEN_MISSILES) and mana > self:getTalentFromId(self.T_EARTHEN_MISSILES).mana * fatigue then spells[#spells+1] = self.T_EARTHEN_MISSILES end
Code: Select all
local old_cd = self:isTalentCoolingDown(self:getTalentFromId(tid))
self:forceUseTalent(tid, {ignore_energy=true, force_target={x=target_x, y=target_y, __no_self=true}})
-- Do not setup a cooldown
if not old_cd then
self.talents_cd[tid] = nil
end
self:forceUseTalent can be found in game\engines\te4-0.9.43.teae \engine\interface\ActorTalents.lua:225 and it in turn calls useTalent (line 115) which have the following line.
Code: Select all
if self:isTalentCoolingDown(ab) and not ignore_cd then
game.logPlayer(who, "%s is still on cooldown for %d turns.", ab.name:capitalize(), self.talents_cd[ab.id])
return
end
The solution is to change
Code: Select all
self:forceUseTalent(tid, {ignore_energy=true, force_target={x=target_x, y=target_y, __no_self=true}})
Code: Select all
self:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, force_target={x=target_x, y=target_y, __no_self=true}})
Code: Select all
if self:knowTalent(self.T_FLAME) and mana > self:getTalentFromId(self.T_FLAME).mana * fatigue then spells[#spells+1] = self.T_FLAME end
Code: Select all
if self:knowTalent(self.T_FLAME) and self:isTalentCoolingDown(self.T_FLAME) == false and mana > self:getTalentFromId(self.T_FLAME).mana * fatigue then spells[#spells+1] = self.T_FLAME end