summary refs log tree commit diff
path: root/whispers-bugfix/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'whispers-bugfix/hooks')
-rw-r--r--whispers-bugfix/hooks/load.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/whispers-bugfix/hooks/load.lua b/whispers-bugfix/hooks/load.lua
new file mode 100644
index 0000000..55290e7
--- /dev/null
+++ b/whispers-bugfix/hooks/load.lua
@@ -0,0 +1,16 @@
+class:bindHook("ToME:load", function(self, data)
+	local Talents = require 'engine.interface.ActorTalents'
+
+	-- update passives when adept is taken
+	if Talents.talents_def.T_ADEPT then
+		Talents.talents_def.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)