sorcery  Check-in [4b5ada2414]

Overview
Comment:updates
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 4b5ada2414bc770bbad7a7d222c45572b8eff739e026ce1b1bb3f24338057030
User & Date: lexi on 2022-03-18 01:50:41
Other Links: manifest | tags
Context
2022-03-18
01:50
updates Leaf check-in: 4b5ada2414 user: lexi tags: trunk
2021-10-27
18:11
fix group matching check-in: 9599e69051 user: lexi tags: trunk
Changes

Modified data/resonance.lua from [c464435f82] to [a891ed08b5].

1
2
3
4
5
6
7
8
-- resonance is a mechanic whereby give which 'resonate' can be
-- transformed into each other by use of the divide/meld wands

local function
undersign(signs) return function(ctx)
	local stars = sorcery.calendar.stars(ctx.today);
	for _,s in pairs(signs) do
		if stars.sign.id == s then return true end
|







1
2
3
4
5
6
7
8
-- resonance is a mechanic whereby items which 'resonate' can be
-- transformed into each other by use of the divide/meld wands

local function
undersign(signs) return function(ctx)
	local stars = sorcery.calendar.stars(ctx.today);
	for _,s in pairs(signs) do
		if stars.sign.id == s then return true end

Modified data/runes.lua from [655b36ebed] to [269be1ec2d].

1
2
3
4
5
6


7
8
9
10
11
12
13
...
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
....
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
-- a rune is an abstract object created by a runeforge, which can be
-- applied to an amulet in order to imbue that amulet with unique
-- and fearsome powers. the specific spell depends on the stone the
-- rune is applied to, and not all runes can necessarily be applied
-- to all stones.



local L = sorcery.lib
local sparkle_region = function(s)
	s.spell.visual_subjects {
		amount = s.amt, time = s.time, -- attached = s;
		minpos = s.minpos;
		maxpos = s.maxpos;
		minvel = { x = -0.4, y = -0.2, z = -0.4 };
................................................................................
									wreck[#wreck+1] = pos
								end
							end
							sorcery.spell.cast {
								name = 'sorcery:spellshatter';
								caster = ctx.caster;
								anchor = epicenter;
								--disjunction = true;
								--range = radius;
								duration = 10;
								timeline = {
									[0] = function(s)
										s.visual_caster {
											texture = tex;
											amount = 100, time = 0.2;
											minpos = { x = -0.1, y = -0.5, z = -0.1 };
................................................................................
					sorcery.vfx.bloodburst(vector.add(tgt:get_pos(),{x=0,y=tgth/2,z=0}),20)
					minetest.sound_play('sorcery_bloody_burst', { pos = pos, gain = 1.5 })
					tgt:set_hp(0)
				end;
				frame = {
					iridium = {
						name = 'Massacre';
						desc = "Unleash the dark and wicked force that lurks within this fell amulet to instantaneously slay all those who surround you, friend and foe alike";
					};
				};
			};
		};
	};
	excavate = {
		name = 'Excavate';






>
>







 







|
|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
....
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
-- a rune is an abstract object created by a runeforge, which can be
-- applied to an amulet in order to imbue that amulet with unique
-- and fearsome powers. the specific spell depends on the stone the
-- rune is applied to, and not all runes can necessarily be applied
-- to all stones.

-- TODO add blood ritual that adds an extra "charge" to an amulet

local L = sorcery.lib
local sparkle_region = function(s)
	s.spell.visual_subjects {
		amount = s.amt, time = s.time, -- attached = s;
		minpos = s.minpos;
		maxpos = s.maxpos;
		minvel = { x = -0.4, y = -0.2, z = -0.4 };
................................................................................
									wreck[#wreck+1] = pos
								end
							end
							sorcery.spell.cast {
								name = 'sorcery:spellshatter';
								caster = ctx.caster;
								anchor = epicenter;
								disjunction = true;
								range = radius;
								duration = 10;
								timeline = {
									[0] = function(s)
										s.visual_caster {
											texture = tex;
											amount = 100, time = 0.2;
											minpos = { x = -0.1, y = -0.5, z = -0.1 };
................................................................................
					sorcery.vfx.bloodburst(vector.add(tgt:get_pos(),{x=0,y=tgth/2,z=0}),20)
					minetest.sound_play('sorcery_bloody_burst', { pos = pos, gain = 1.5 })
					tgt:set_hp(0)
				end;
				frame = {
					iridium = {
						name = 'Massacre';
						desc = "Unleash the dark and wicked force that lurks within this fell amulet to instantaneously slay all those who surround you friend and foe alike";
					};
				};
			};
		};
	};
	excavate = {
		name = 'Excavate';

Modified recipes.lua from [4091d897f1] to [4c15c3b3eb].

795
796
797
798
799
800
801



802
803
804
805
806
807
808
		minetest.register_craft {
			output = dye .. ' 4';
			recipe = {
				{'',    pd[2],                     ''};
				{pd[1],'basic_materials:paraffin', pd[3]};
				{'',   'bucket:bucket_water',      ''};
			};



		}
	end
end

local potion_auto_recipe = function(id, substance, tools, container)
	local recipe = tools
	local replace = {}







>
>
>







795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
		minetest.register_craft {
			output = dye .. ' 4';
			recipe = {
				{'',    pd[2],                     ''};
				{pd[1],'basic_materials:paraffin', pd[3]};
				{'',   'bucket:bucket_water',      ''};
			};
			replacements = {
				{'bucket:bucket_water', 'bucket:bucket_empty'};
			};
		}
	end
end

local potion_auto_recipe = function(id, substance, tools, container)
	local recipe = tools
	local replace = {}

Modified spell.lua from [a858b6f5bf] to [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

Modified vfx.lua from [dc765bd287] to [ee7b81ab5a].

206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
	else
		local dir = vector.subtract(tgt.above,tgt.under)
		minvel = vector.multiply(dir, 0.3)
		maxvel = vector.multiply(dir, 1.2)
	end
	print(minetest.get_player_by_name('singleplayer'))
	return minetest.add_particlespawner {
		amount = 450;--50;
		time = 2;--0.5;
		-- old syntax
		minpos = vector.subtract(tgt.under, 0.5);
		maxpos = vector.add(tgt.under, 0.5);
		minvel = minvel, maxvel = maxvel;
		minexptime = 1, maxexptime = 2;
		minsize = 0.5, maxsize = 2;
		texture = L.image('sorcery_spark.png'):multiply(color):render();

		--new syntax
		-- can't use this shit until it gets merged :(
	-- 		pos = {
	-- 			min = vector.subtract(tgt.under, 0.5);
	-- 			max = vector.add(tgt.under, 0.5);
	-- 		};
-- 		pos = {
-- 			min = vector.subtract(tgt.under, 0.8);
-- 			max = vector.add     (tgt.under, 0.8);
-- 		};
-- 		vel_tween = {
-- 			{min = minvel, max = maxvel};
-- 			{min = minvel * 3, max = maxvel * 3};
-- 		};
-- 		acc = {
-- 			min = vector.new(0,-2,0);
-- 			max = vector.new(0,-5,0);
-- 		};
-- 		bounce = { min = 0.3, max = 2 };
-- 		exptime = { min = 0.5, max = 10 };
-- 		size = { min = 0.5, max = 1 };
-- 		collisiondetection = true;
--
-- 		texpool = {
-- 			{
-- 				img = L.image('sorcery_spark.png'):multiply(color):render();
-- -- 				img = 'sorcery_inferno_crystal.png';
-- 				alpha_tween = { 0.8, 1; style = 'pulse', reps = 4};
-- -- 	        scale = {x=4,y=0.5};
-- 				scale_tween = { {x=2,y=3}; {x=0,y=0}; style = 'pulse', reps = 6 };
-- 			};
-- 	-- 			{
-- 	-- 				img = L.image('sorcery_divine_radiance_1.png'):multiply(L.color(255,0,0)):render();
-- 	-- 				fade = 'pulse';
-- 	-- 				fade_reps = 3;
-- 	-- 			};
-- 		};
-- 		radius = {
-- 			min = vector.new(0,0,0);
-- 			max = 0;
-- 		};
		-- animation = {
		-- 	type = 'vertical_frames';
		-- 	aspect_w = 16, aspect_h = 16;
		-- 	length = -1;
		-- };
		-- glow = 14;
	}
end

sorcery.vfx.bloodburst = function(pos,size)
	for i=0, size or 48 do
		minetest.add_particle{
			texture = 'sorcery_blood_' .. math.random(5) .. '.png',







|
|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
|







206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221










































222
223
224
225
226
227
228
229
230
231
232
233
234
	else
		local dir = vector.subtract(tgt.above,tgt.under)
		minvel = vector.multiply(dir, 0.3)
		maxvel = vector.multiply(dir, 1.2)
	end
	print(minetest.get_player_by_name('singleplayer'))
	return minetest.add_particlespawner {
		amount = 50;
		time = 0.5;
		-- old syntax
		minpos = vector.subtract(tgt.under, 0.5);
		maxpos = vector.add(tgt.under, 0.5);
		minvel = minvel, maxvel = maxvel;
		minexptime = 1, maxexptime = 2;
		minsize = 0.5, maxsize = 2;
		texture = L.image('sorcery_spark.png'):multiply(color):render();










































		animation = {
			type = 'vertical_frames';
			aspect_w = 16, aspect_h = 16;
			length = 2.1;
		};
		glow = 14;
	}
end

sorcery.vfx.bloodburst = function(pos,size)
	for i=0, size or 48 do
		minetest.add_particle{
			texture = 'sorcery_blood_' .. math.random(5) .. '.png',