1.0.5 proposal: change to assist multi-resource talents

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

1.0.5 proposal: change to assist multi-resource talents

#1 Post 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
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

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

#2 Post by HousePet »

You haven't included the 'does not grant pool' flag.
My feedback meter decays into coding. Give me feedback and I make mods.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

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

#3 Post 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?
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

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

#4 Post by HousePet »

Paradox doesn't appear to get checked on a cost basis either?
My feedback meter decays into coding. Give me feedback and I make mods.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

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

#5 Post 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.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

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

#6 Post by HousePet »

What, look at beta code?

Ewww :P
My feedback meter decays into coding. Give me feedback and I make mods.

Post Reply