diff options
author | Rabbit Whispers <us@starfall.systems> | 2025-06-14 12:58:57 -0500 |
---|---|---|
committer | Rabbit Whispers <us@starfall.systems> | 2025-06-14 13:08:50 -0500 |
commit | 9c55fe0f404f26de278aeed490579b042a441d9b (patch) | |
tree | 37485d3ac8dc2290be1440beb9728438250574b6 /rabbit-bugfix/hooks | |
parent | 7380279bedc3040cc4a923395368a5de8ffa7874 (diff) |
bugfix: patch Adept in hooks rather than overload
Diffstat (limited to 'rabbit-bugfix/hooks')
-rw-r--r-- | rabbit-bugfix/hooks/.keep | 0 | ||||
-rw-r--r-- | rabbit-bugfix/hooks/load.lua | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/rabbit-bugfix/hooks/.keep b/rabbit-bugfix/hooks/.keep deleted file mode 100644 index e69de29..0000000 --- a/rabbit-bugfix/hooks/.keep +++ /dev/null diff --git a/rabbit-bugfix/hooks/load.lua b/rabbit-bugfix/hooks/load.lua new file mode 100644 index 0000000..7ae7c8d --- /dev/null +++ b/rabbit-bugfix/hooks/load.lua @@ -0,0 +1,17 @@ +class:bindHook("ToME:load", function(self, data) + local Talents = require 'engine.interface.ActorTalents' + local TD = Talents.talents_def + + -- update passives when adept is taken + if TD.T_ADEPT then + TD.T_ADEPT.passives = function(self, t, p) + self:talentTemporaryValue(p, "all_talents_bonus_level", 1.5) + + if not self._updating_adept then + self._updating_adept = true + self:updateAllTalentsPassives() + self._updating_adept = nil + end + end + end +end) |