sorcery  Diff

Differences From Artifact [4064266f0d]:

To Artifact [46cef4271e]:

  • File tnodes.lua — part of check-in [147592b8e9] at 2020-10-26 03:58:08 on branch trunk — add over-time spellcasting abstraction to enable metamagic and in particular disjunction, add more animations and sound effects, add excavation spell, possibly some others, forget when the last commit was, edit a bunch of magitech to make it subject to the disjunction mechanism (throw up a disjunction aura and waltz right through those force fields bby, wheee), also illumination spells, tweak runeforge and rune frequence to better the balance and also limit player frustration, move some math functions into their own library category, various tweaks and bugfixes, probably other shit i don't remember (user: lexi, size: 1863) [annotate] [blame] [check-ins using]

18
19
20
21
22
23
24





25
26
27
28
29
30
31
			minetest.get_node_timer(pos):start(1)
		end;
		on_timer = function(pos,dtime)
			local meta = minetest.get_meta(pos)
			local elapsed = dtime + meta:get_float('duration') - meta:get_float('timeleft')
			local level = 1 - (elapsed / meta:get_float('duration'))
			local lum = math.ceil(level*meta:get_int('power'))





			if lum ~= i then
				if lum <= 0 then
					minetest.remove_node(pos)
					return false
				else
					minetest.swap_node(pos,{name='sorcery:air_glimmer_'..tostring(lum)})
				end







>
>
>
>
>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
			minetest.get_node_timer(pos):start(1)
		end;
		on_timer = function(pos,dtime)
			local meta = minetest.get_meta(pos)
			local elapsed = dtime + meta:get_float('duration') - meta:get_float('timeleft')
			local level = 1 - (elapsed / meta:get_float('duration'))
			local lum = math.ceil(level*meta:get_int('power'))
			local probe = sorcery.spell.probe(pos)
			if probe.disjunction then
				minetest.remove_node(pos)
				return false
			end
			if lum ~= i then
				if lum <= 0 then
					minetest.remove_node(pos)
					return false
				else
					minetest.swap_node(pos,{name='sorcery:air_glimmer_'..tostring(lum)})
				end