sorcery  Diff

Differences From Artifact [a858b6f5bf]:

To Artifact [3808158930]:


245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
		s.jobs[#s.jobs+1] = minetest.after(howlong, function()
			-- this is somewhat awkward. since we're using a non-polling approach, we
			-- need to find a way to account for a caster or subject walking into an
			-- existing antimagic field, or someone with an existing antimagic aura
			-- walking into range of the anchor. so every time a spell effect would
			-- take place, we first check to see if it's in range of something nasty
			if not s.disjunction and -- avoid self-disjunction
				(s.caster and sorcery.spell.probe(s.caster:get_pos()).disjunction) or
				(s.anchor and sorcery.spell.probe(s.anchor,s.range).disjunction) then
				sorcery.spell.disjoin{spell=s}
			else
				if not s.disjunction then for _,sub in pairs(s.subjects) do
					local sp = sub.player:get_pos()
					if sorcery.spell.probe(sp).disjunction then
						sorcery.spell.disjoin{pos=sp}
					end







|
|







245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
		s.jobs[#s.jobs+1] = minetest.after(howlong, function()
			-- this is somewhat awkward. since we're using a non-polling approach, we
			-- need to find a way to account for a caster or subject walking into an
			-- existing antimagic field, or someone with an existing antimagic aura
			-- walking into range of the anchor. so every time a spell effect would
			-- take place, we first check to see if it's in range of something nasty
			if not s.disjunction and -- avoid self-disjunction
				((s.caster and sorcery.spell.probe(s.caster:get_pos()).disjunction) or
				 (s.anchor and sorcery.spell.probe(s.anchor,s.range).disjunction)) then
				sorcery.spell.disjoin{spell=s}
			else
				if not s.disjunction then for _,sub in pairs(s.subjects) do
					local sp = sub.player:get_pos()
					if sorcery.spell.probe(sp).disjunction then
						sorcery.spell.disjoin{pos=sp}
					end