Page 1 of 1

1.0.5 proposal: change to assist multi-resource talents

Posted: Tue Nov 05, 2013 2:57 am
by Doctornull
Right now, a talent which uses an unusual resource, or which uses two resources, does not trigger the appropriate resource bars. This change enables all relevant resource bars for core and addon talents.

In mod/class/Actor.lua, change the function learnPool() to read as follows:

Code: Select all

function _M:learnPool(t)
   local tt = self:getTalentTypeFrom(t.type[1])

   --	if tt.mana_regen and self.mana_regen == 0 then self.mana_regen = 0.5 end

   if t.mana or t.sustain_mana then
      self:checkPool(t.id, self.T_MANA_POOL)
   end
   if t.equilibrium or t.sustain_equilibrium then
      self:checkPool(t.id, self.T_EQUILIBRIUM_POOL)
   end
   if t.stamina or t.sustain_stamina then
      self:checkPool(t.id, self.T_STAMINA_POOL)
   end
   if t.vim or t.sustain_vim then
      self:checkPool(t.id, self.T_VIM_POOL)
   end
   if t.positive or t.sustain_positive then
      self:checkPool(t.id, self.T_POSITIVE_POOL)
   end
   if t.negative or t.sustain_negative then
      self:checkPool(t.id, self.T_NEGATIVE_POOL)
   end
   if t.hate then
      self:checkPool(t.id, self.T_HATE_POOL)
   end
   if t.type[1]:find("^chronomancy/") then
      self:checkPool(t.id, self.T_PARADOX_POOL)
   end
   if t.psi or t.psi_sustain then
      self:checkPool(t.id, self.T_PSI_POOL)
   end
   if t.type[1]:find("^psionic/feedback") or t.type[1]:find("^psionic/discharge") then
      self:checkPool(t.id, self.T_FEEDBACK_POOL)
   end
   -- If we learn an archery talent, also learn to shoot
   if t.type[1]:find("^technique/archery") then
      self:checkPool(t.id, self.T_SHOOT)
      self:checkPool(t.id, self.T_RELOAD)
   end
   -- If we learn an unharmed talent, learn to use it too
   if tt.is_unarmed then
      self:checkPool(t.id, self.T_EMPTY_HAND)
   end

   self:recomputeRegenResources()

   return true
end

Re: 1.0.5 proposal: change to assist multi-resource talents

Posted: Tue Nov 05, 2013 3:58 am
by HousePet
You haven't included the 'does not grant pool' flag.

Re: 1.0.5 proposal: change to assist multi-resource talents

Posted: Tue Nov 05, 2013 5:37 am
by Doctornull
HousePet wrote:You haven't included the 'does not grant pool' flag.
Neither does the function in 1.0.5g.

Go file that as a bug, I guess?

Re: 1.0.5 proposal: change to assist multi-resource talents

Posted: Tue Nov 05, 2013 6:12 am
by HousePet
Paradox doesn't appear to get checked on a cost basis either?

Re: 1.0.5 proposal: change to assist multi-resource talents

Posted: Tue Nov 05, 2013 6:30 am
by Doctornull
HousePet wrote:Paradox doesn't appear to get checked on a cost basis either?
You may want to familiarize yourself with the original code I'm proposing be replaced.

Your observations so far are 100% about things which I haven't changed.

Re: 1.0.5 proposal: change to assist multi-resource talents

Posted: Tue Nov 05, 2013 7:07 am
by HousePet
What, look at beta code?

Ewww :P