Page 1 of 1

[b18] Equilibrium can be reduced below sustains

Posted: Sun Jan 02, 2011 5:25 pm
by yufra
I think the most obvious solution to this problem is to overwrite the Actor:incEquilibrium function with this (untested) code:

Code: Select all

-- Overwrite equilibrium to properly treat sustains
function _M:incEquilibrium(v)
	-- Only need to check sustain when decreasing equilibrium
	if v < 0 then
		local total_sustain = 0
		for tid, act in pairs(self.sustain_talents) do
			local t = self:getTalentFromId(tid)
			if t.sustain_equilibrium then
				total_sustain = total_sustain + t.sustain_equilibrium
			end
		end
		v = math.max(v, total_sustain - self:getEquilibrium())
	end
	engine.interface.ActorResource.incEquilibrium(self, v)
end
Then the Meditation talent can lose all the talent deactivation/reactivation stuff.

Re: [b18] Equilibrium can be reduced below sustains

Posted: Mon Jan 03, 2011 10:13 pm
by Sirrocco
I was under the impression that this wasn't a bug. Given the whole equilibrium-causes-spell-failure thing....

Re: [b18] Equilibrium can be reduced below sustains

Posted: Tue Jan 04, 2011 2:12 am
by yufra
It is definitely a bug, but there are some (possibly undocumented) features that alleviate the fail chance. If your willpower is greater than your equilibrium you never fail, otherwise your willpower does get subtracted from your equilibrium before the chance is calculated.