sorcery  Diff

Differences From Artifact [423ee7c3cf]:

To Artifact [d0158e43bb]:


    10     10   		and function(x) return vector.add(pos,x) end
    11     11   		or  function(x) return x end
    12     12   	local height = caster:get_properties().eye_height
    13     13   	minetest.add_particlespawner {
    14     14   		amount = 70 * strength;
    15     15   		time = duration or 1.5;
    16     16   		attached = caster;
    17         -		texture = sorcery.lib.image('sorcery_spark.png'):multiply(color):render();
           17  +		-- texture = sorcery.lib.image('sorcery_spark.png'):multiply(color):render();
           18  +		texture = sorcery.vfx.glowspark(color):render();
    18     19   		minpos = ofs({ x =  0.0, z =  0.6, y =  height*0.7});
    19     20   		maxpos = ofs({ x =  0.4, z =  0.2, y =  height*1.1});
    20     21   		minvel = { x = -0.5, z = -0.5, y = -0.5};
    21     22   		maxvel = { x =  0.5, z =  0.5, y =  0.5};
    22     23   		minacc = { x =  0.0, z =  0.0, y =  0.5};
    23     24   		maxacc = { x =  0.0, z =  0.0, y =  0.5};
    24     25   		minsize = 0.4, maxsize = 0.8;
................................................................................
    63     64   end
    64     65   
    65     66   sorcery.vfx.enchantment_sparkle = function(tgt,color)
    66     67   	local minvel, maxvel
    67     68   	if minetest.get_node(vector.add(tgt.under,{y=1,z=0,x=0})).name == 'air' then
    68     69   		minvel = {x=0,z=0,y= 0.3}  maxvel = {x=0,z=0,y= 1.5};
    69     70   	else
    70         -		local dir = vector.subtract(tgt.under,tgt.above)
           71  +		local dir = vector.subtract(tgt.above,tgt.under)
    71     72   		minvel = vector.multiply(dir, 0.3)
    72     73   		maxvel = vector.multiply(dir, 1.2)
    73     74   	end
    74     75   	return minetest.add_particlespawner {
    75     76   		amount = 50;
    76     77   		time = 0.5;
    77     78   		minpos = vector.subtract(tgt.under, 0.5);