[b18] Equilibrium can be reduced below sustains

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

[b18] Equilibrium can be reduced below sustains

#1 Post 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.
<DarkGod> lets say it's intended

Sirrocco
Sher'Tul
Posts: 1059
Joined: Fri Apr 23, 2010 4:56 am

Re: [b18] Equilibrium can be reduced below sustains

#2 Post by Sirrocco »

I was under the impression that this wasn't a bug. Given the whole equilibrium-causes-spell-failure thing....

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: [b18] Equilibrium can be reduced below sustains

#3 Post 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.
<DarkGod> lets say it's intended

Post Reply