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