sorcery  Diff

Differences From Artifact [92db18c27d]:

To Artifact [b47d0e6fa4]:


   898    898   									if sorcery.lib.node.is_clear(sum) then
   899    899   										vp[#vp+1] = sum
   900    900   									end
   901    901   								end
   902    902   								if #vp > 0 then npos=vp[math.random(#vp)] end
   903    903   							end
   904    904   							if npos then
   905         -								minetest.set_node(npos, minetest.get_node(ctx.target.under))
   906         -								if minetest.registered_nodes[ty].on_construct then
   907         -									minetest.registered_nodes[ty].on_construct(npos)
   908         -								end
          905  +								minetest.place_node(npos, minetest.get_node(ctx.target.under))
          906  +								-- if minetest.registered_nodes[ty].on_construct then
          907  +								-- 	minetest.registered_nodes[ty].on_construct(npos)
          908  +								-- end
   909    909   								minetest.get_meta(npos):from_table(origmeta)
   910    910   								return npos, true
   911    911   							else
   912    912   								local nstack = ItemStack(ty)
   913    913   								nstack:get_meta():from_table(origmeta)
   914    914   								local leftover = ctx.caster:get_inventory():add_item('main',nstack)
   915    915   								if leftover and not leftover.is_empty() then
................................................................................
   988    988   			};
   989    989   		};
   990    990   	};
   991    991   	luminate = {
   992    992   		name = 'Luminate';
   993    993   		tone = {255,194,0};
   994    994   		minpower = 1;
   995         -		rarity = 5;
          995  +		rarity = 8;
   996    996   		amulets = {
   997    997   			luxite = {
   998    998   				name = 'Glow';
   999    999   				desc = 'Swathe yourself in an aura of sparkling radiance, casting light upon all the dark places where you voyage';
  1000   1000   				cast = function(ctx)
  1001   1001   					local fac = (ctx.stats.power * 0.1)
  1002   1002   					local radius = 2 + 5*fac
................................................................................
  1013   1013   								if sorcery.lib.str.beginswith(minetest.get_node(n).name,'sorcery:air_glimmer_') then
  1014   1014   									minetest.remove_node(n)
  1015   1015   								end
  1016   1016   							end
  1017   1017   						end;
  1018   1018   						intervals = {
  1019   1019   							{period = period, after = {whence=0,secs=0.7}, fn = function(c)
  1020         -								print('cycling!')
  1021   1020   								for _,sub in pairs(c.spell.subjects) do
  1022   1021   									local ox, oy, oz = math.random(-radius,radius),
  1023   1022   													   math.random(-radius,radius),
  1024   1023   													   math.random(-radius,radius)
  1025   1024   									local pos = vector.offset(sub.player:get_pos(), ox,oy,oz)
  1026         -									print('pos',minetest.pos_to_string(pos),'player',minetest.pos_to_string(sub.player:get_pos()))
         1025  +									-- print('pos',minetest.pos_to_string(pos),'player',minetest.pos_to_string(sub.player:get_pos()))
  1027   1026   									if sorcery.lib.node.is_air(pos) then
  1028         -										print('is air!')
  1029   1027   										local power = math.random(4,minetest.LIGHT_MAX)
  1030   1028   										minetest.set_node(pos, {
  1031   1029   											name = 'sorcery:air_glimmer_' .. tostring(power);
  1032   1030   										})
  1033   1031   										c.spell.nodes[#c.spell.nodes + 1] = pos
  1034   1032   										local d = glowduration * (0.5 + math.random()*0.5)
  1035   1033   										local m = minetest.get_meta(pos)
  1036   1034   										m:set_float('duration', d)
  1037   1035   										m:set_float('timeleft', d)
  1038   1036   										m:set_int('power', power)
  1039         -									else
  1040         -										print('not air!', dump(minetest.get_node(pos)))
         1037  +									-- else
         1038  +									-- 	print('not air!', dump(minetest.get_node(pos)))
  1041   1039   									end
  1042   1040   								end
  1043   1041   							end};
  1044   1042   						};
  1045   1043   					}
  1046   1044   				end;
  1047   1045   				iridium = {