sorcery  Diff

Differences From Artifact [f5bc90eb64]:

To Artifact [d9755d7797]:


61
62
63
64
65
66
67
68
69
70
71
72











73
74
75
76
77
78
79
			if not sp or not sp.cast then return nil end
			local stats = sorcery.amulet.stats(stack)

			local ctx = {
				caster = user;
				target = target;
				stats = stats;
				sound = "xdecor_enchanting"; --FIXME make own sounds
				sparkle = true;
				amulet = stack;
				meta = stack:get_meta(); -- avoid spell boilerplate
				color = sorcery.lib.color(sp.tone);











			}
			print('casting')
			local res = sp.cast(ctx)

			if res == nil or res == true then
				minetest.sound_play(ctx.sound, { 
					pos = user:get_pos();







<
<



>
>
>
>
>
>
>
>
>
>
>







61
62
63
64
65
66
67


68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
			if not sp or not sp.cast then return nil end
			local stats = sorcery.amulet.stats(stack)

			local ctx = {
				caster = user;
				target = target;
				stats = stats;


				amulet = stack;
				meta = stack:get_meta(); -- avoid spell boilerplate
				color = sorcery.lib.color(sp.tone);
				today = minetest.get_day_count();
				heading = {
					pos   = user:get_pos();
					yaw   = user:get_look_dir();
					pitch = user:get_look_vertical();
					angle = user:get_look_horizontal();
					eyeheight = user:get_properties().eye_height;
				};

				sound = "xdecor_enchanting"; --FIXME make own sounds
				sparkle = true;
			}
			print('casting')
			local res = sp.cast(ctx)

			if res == nil or res == true then
				minetest.sound_play(ctx.sound, { 
					pos = user:get_pos();