sorcery  Check-in [967d5006f5]

Overview
Comment:continue work on runes, comment out test code in vfx.lua
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 967d5006f5925a1543e3114d867bb2bbd32a8f11629636eff5b48c9871f9dd76
User & Date: lexi on 2021-10-16 23:51:50
Other Links: manifest | tags
Context
2021-10-17
03:27
fix amulets again check-in: 1d0bffea07 user: lexi tags: trunk
2021-10-16
23:51
continue work on runes, comment out test code in vfx.lua check-in: 967d5006f5 user: lexi tags: trunk
2021-08-01
13:42
remove debug statements >_< check-in: de7d27795b user: lexi tags: trunk
Changes

Modified data/runes.lua from [00d856eebe] to [655b36ebed].

   126    126   return {
   127    127   	translocate = {
   128    128   		name = 'Translocate';
   129    129   		tone = {0,235,233};
   130    130   		minpower = 2;
   131    131   		rarity = 8;
   132    132   		amulets = {
          133  +			luxite = {
          134  +				name = 'Banishment Aura';
          135  +				desc = 'Surround yourself with an aura that will banish those who get too close to you to the last place they slept';
          136  +			};
   133    137   			amethyst = {
   134    138   				name = 'Joining';
   135    139   				desc = 'Give this amulet to another and with a snap of their fingers they can arrive safely at your side from anywhere in the world — though returning whence they came may be a more difficult matter';
   136    140   				apply = function(ctx)
   137    141   					local maker = ctx.user:get_player_name()
   138    142   					ctx.meta:set_string('rune_join_target',maker)
   139    143   				end;
................................................................................
   168    172   					};
   169    173   					gold = {
   170    174   						name = 'Exchange';
   171    175   						desc = 'Give this amulet to another and they will be able to trade places with you no matter where in the world each of you might be.'; 
   172    176   					};
   173    177   					cobalt = {
   174    178   						name = 'Sending';
   175         -						desc = 'Give this amulet to another and by wielding this amulet against another they will be able to transport them instantly to your side';
          179  +						desc = 'Give this amulet to another and by wielding this amulet against another they will be able to transport their target instantly to your side';
   176    180   					};
   177    181   					iridium = {
   178    182   						name = 'Arrival';
   179    183   						desc = "Give this amulet to another and they will be able to arrive at your side in a flash from anywhere in the world, carrying others with them in the spell's grip";
   180    184   					};
   181    185   				};
   182    186   			};

Modified vfx.lua from [936cc31413] to [dc765bd287].

   198    198   		};
   199    199   	}
   200    200   end
   201    201   
   202    202   sorcery.vfx.enchantment_sparkle = function(tgt,color)
   203    203   	local minvel, maxvel
   204    204   	if minetest.get_node(vector.add(tgt.under,{y=1,z=0,x=0})).name == 'air' then
   205         -		minvel = {x=0,z=0,y= 0.3}  maxvel = {x=0,z=0,y= 1.5};
          205  +		minvel = vector.new(-0.3,0.3,-0.3)  maxvel = vector.new(0.6,1.5,0.6);
   206    206   	else
   207    207   		local dir = vector.subtract(tgt.above,tgt.under)
   208    208   		minvel = vector.multiply(dir, 0.3)
   209    209   		maxvel = vector.multiply(dir, 1.2)
   210    210   	end
          211  +	print(minetest.get_player_by_name('singleplayer'))
   211    212   	return minetest.add_particlespawner {
   212         -		amount = 50;
   213         -		time = 0.5;
          213  +		amount = 450;--50;
          214  +		time = 2;--0.5;
          215  +		-- old syntax
   214    216   		minpos = vector.subtract(tgt.under, 0.5);
   215    217   		maxpos = vector.add(tgt.under, 0.5);
   216    218   		minvel = minvel, maxvel = maxvel;
   217    219   		minexptime = 1, maxexptime = 2;
   218    220   		minsize = 0.5, maxsize = 2;
   219    221   		texture = L.image('sorcery_spark.png'):multiply(color):render();
   220         -		animation = {
   221         -			type = 'vertical_frames';
   222         -			aspect_w = 16, aspect_h = 16;
   223         -			length = 2;
   224         -		};
   225         -		glow = 14;
          222  +
          223  +		--new syntax
          224  +		-- can't use this shit until it gets merged :(
          225  +	-- 		pos = {
          226  +	-- 			min = vector.subtract(tgt.under, 0.5);
          227  +	-- 			max = vector.add(tgt.under, 0.5);
          228  +	-- 		};
          229  +-- 		pos = {
          230  +-- 			min = vector.subtract(tgt.under, 0.8);
          231  +-- 			max = vector.add     (tgt.under, 0.8);
          232  +-- 		};
          233  +-- 		vel_tween = {
          234  +-- 			{min = minvel, max = maxvel};
          235  +-- 			{min = minvel * 3, max = maxvel * 3};
          236  +-- 		};
          237  +-- 		acc = {
          238  +-- 			min = vector.new(0,-2,0);
          239  +-- 			max = vector.new(0,-5,0);
          240  +-- 		};
          241  +-- 		bounce = { min = 0.3, max = 2 };
          242  +-- 		exptime = { min = 0.5, max = 10 };
          243  +-- 		size = { min = 0.5, max = 1 };
          244  +-- 		collisiondetection = true;
          245  +--
          246  +-- 		texpool = {
          247  +-- 			{
          248  +-- 				img = L.image('sorcery_spark.png'):multiply(color):render();
          249  +-- -- 				img = 'sorcery_inferno_crystal.png';
          250  +-- 				alpha_tween = { 0.8, 1; style = 'pulse', reps = 4};
          251  +-- -- 	        scale = {x=4,y=0.5};
          252  +-- 				scale_tween = { {x=2,y=3}; {x=0,y=0}; style = 'pulse', reps = 6 };
          253  +-- 			};
          254  +-- 	-- 			{
          255  +-- 	-- 				img = L.image('sorcery_divine_radiance_1.png'):multiply(L.color(255,0,0)):render();
          256  +-- 	-- 				fade = 'pulse';
          257  +-- 	-- 				fade_reps = 3;
          258  +-- 	-- 			};
          259  +-- 		};
          260  +-- 		radius = {
          261  +-- 			min = vector.new(0,0,0);
          262  +-- 			max = 0;
          263  +-- 		};
          264  +		-- animation = {
          265  +		-- 	type = 'vertical_frames';
          266  +		-- 	aspect_w = 16, aspect_h = 16;
          267  +		-- 	length = -1;
          268  +		-- };
          269  +		-- glow = 14;
   226    270   	}
   227    271   end
   228    272   
   229    273   sorcery.vfx.bloodburst = function(pos,size)
   230    274   	for i=0, size or 48 do
   231    275   		minetest.add_particle{
   232    276   			texture = 'sorcery_blood_' .. math.random(5) .. '.png',
................................................................................
   270    314   		local ppos = vector.add(po,tpos)
   271    315   		local dir = vector.direction(ppos,scenter)
   272    316   		local vel = math.random() * 0.8 + 0.4
   273    317   		local col if type(color) == 'function'
   274    318   			then col = color(i, {high = high, far = far, dir = dir, vel = vel, pos = po})
   275    319   			else col = color
   276    320   		end
   277         -		local et = math.floor((far/vel)*10)*.1
          321  +		local et = math.floor((far/vel)*10)*.1 -- avoid freeze
   278    322   		minetest.add_particle {
   279    323   			pos = ppos;
   280    324   			velocity = vector.multiply(dir,vel);
   281    325   			expirationtime = 0.4;
   282    326   			size = math.random()*2.4 + 0.6;
   283    327   			texture = L.image('sorcery_sputter.png'):glow(col):render();
   284    328   			glow = 14;