sorcery  Diff

Differences From Artifact [daf126a7a3]:

To Artifact [12b64fac56]:

  • File portal.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: 14548) [annotate] [blame] [check-ins using]

   274    274   		local dev = portal_composition(pos)
   275    275   		if not dev then return false end
   276    276   		local dsp = portal_disposition(dev)
   277    277   		local crc = portal_circuit(pos)
   278    278   		local cap = sorcery.ley.netcaps(pos,delta)
   279    279   		local tune = sorcery.attunement.verify(pos)
   280    280   		local partner -- raw position of partner node, if any
          281  +		local probe = sorcery.spell.probe(pos)
   281    282   		if tune and tune.partner then
   282    283   			minetest.load_area(tune.partner)
   283    284   			-- we are attuned to a partner, but is it in the circuit?
   284    285   			for _,v in pairs(crc) do
   285    286   				if vector.equals(v.pos,tune.partner) then
   286    287   					partner = tune.partner
   287    288   					break
................................................................................
   291    292   
   292    293   		if cap.self.minpower ~= cap.self.powerdraw then return true end
   293    294   
   294    295   		-- clean out user table
   295    296   		for name,user in pairs(portal_context.users) do
   296    297   			if user and vector.equals(user.portal, pos) then
   297    298   				local found = false
   298         -				for _,u in pairs(dsp.users) do
   299         -					if u.object:get_player_name() == name then
   300         -						found = true
          299  +				if not probe.disjunction then
          300  +					for _,u in pairs(dsp.users) do
          301  +						if u.object:get_player_name() == name then
          302  +							found = true
          303  +						end
   301    304   					end
   302    305   				end
   303    306   				if not found then
   304    307   					if user.sound then minetest.sound_fade(user.sound,1,0) end
   305    308   					portal_context.users[name] = nil
   306    309   				end
   307    310   			end
   308    311   		end
          312  +		if probe.disjunction then return true end
   309    313   
   310    314   		-- one user per pad only!
   311    315   		for _,n in pairs(dev.nodes) do
   312    316   			for _,u in pairs(dsp.users) do
   313    317   				if u.slot == n then
   314    318   					local pname = u.object:get_player_name()
   315    319   					if not portal_context.users[pname] then