summary refs log tree commit diff
path: root/rabbit-bugfix/hooks/load.lua
blob: 7ae7c8de7583472aaddeece5798cfce215d99fcb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)