What I've attempted so far is changing the combat.lua bit that covers the ability from its default to this, which I have no clue if is even remotely appropriate for lua coding:
Code: Select all
function _M:combatAttack(weapon, ammo)
local stats
if self:attr("use_psi_combat") and ((self:getCun(100, true)) > (self:getDex(100, true))) then stats = (self:getCun(100, true) - 10) * (0.6 + self:callTalent(self.T_RESONANT_FOCUS, "bonus")/100)
elseif weapon and weapon.wil_attack and ((self:getWil(100, true)) > (self:getStr(100, true))) then stats = self:getWil(100, true) - 10
else stats = self:getDex(100, true) - 10
end
local d = self:combatAttackBase(weapon, ammo) + stats
if self:attr("dazed") then d = d / 2 end
if self:attr("scoured") then d = d / 1.2 end
return self:rescaleCombatStats(d)
end
function _M:combatAttackRanged(weapon, ammo)
local stats
if self:attr("use_psi_combat") and ((self:getCun(100, true)) > (self:getDex(100, true))) then stats = (self:getCun(100, true) - 10) * (0.6 + self:callTalent(self.T_RESONANT_FOCUS, "bonus")/100)
elseif weapon and weapon.wil_attack ((self:getWil(100, true)) > (self:getStr(100, true))) then stats = self:getWil(100, true) - 10
else stats = self:getDex(100, true) - 10
end
local d = self:combatAttackBase(weapon, ammo) + stats + (self.combat_atk_ranged or 0)
if self:attr("dazed") then d = d / 2 end
if self:attr("scoured") then d = d / 1.2 end
return self:rescaleCombatStats(d)
end
It also doesn't work. Even made sure it wasn't just a display thing; damage definitely dropped appropriately with BtF up. So... would anyone happen to able to point out whatever it is I'm blatantly doing wrong? Help would be appreciated, heh, 'cause I'm pretty terrible at this stuff.
*Ideally, it'd be will/cun for the psi-wield weapon regardless, and better of for the main/off hand, but... my competence when it comes to coding begins classification with the in- prefix and gets worse from there. Baby steps.
E: Wait, wait, no, it breaks something. Ranged attacks spit out a lua error with that mess. Whoops. At least I can stop being faintly surprised at how little it screwed things up, now.