scope Thunder initializer init
	import Units
	import Statistics
	import RegisterPlayerUnitEvent

	constant string FX     = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
	constant string HIT_FX = "Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl"

	constant integer THUNDER_ID = 'A00O'

	function act takes nothing returns nothing
		unit tU

		if GetSpellAbilityId() == THUNDER_ID then
			tU = GetTriggerUnit()

			Units.thunderClock.saveInt(tU.getHandleId(), Statistics.secondsElapsed)
		end
	end

	function init takes nothing returns nothing
		registerPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, function act)
	end
endscope
