Differences From
Artifact [58885d2bb0]:
- File
gems.lua
— part of check-in
[147592b8e9]
at
2020-10-26 03:58:08
on branch trunk
— add over-time spellcasting abstraction to enable metamagic and in particular disjunction, add more animations and sound effects, add excavation spell, possibly some others, forget when the last commit was, edit a bunch of magitech to make it subject to the disjunction mechanism (throw up a disjunction aura and waltz right through those force fields bby, wheee), also illumination spells, tweak runeforge and rune frequence to better the balance and also limit player frustration, move some math functions into their own library category, various tweaks and bugfixes, probably other shit i don't remember
(user:
lexi,
size: 9009)
[annotate]
[blame]
[check-ins using]
65 65 -- implement this logic themselves (for instance to check a range)
66 66 if (probe.disjunction and not sp.ignore_disjunction) then return nil end
67 67
68 68 local ctx = {
69 69 caster = user;
70 70 target = target;
71 71 stats = stats;
72 - amulet = stack;
72 + wield = stack;
73 + amulet = stack:get_definition()._sorcery.amulet;
73 74 meta = stack:get_meta(); -- avoid spell boilerplate
74 75 color = sorcery.lib.color(sp.tone);
75 76 today = minetest.get_day_count();
76 77 probe = probe;
77 78 heading = {
78 79 pos = user:get_pos();
79 80 yaw = user:get_look_dir();
................................................................................
81 82 angle = user:get_look_horizontal();
82 83 eyeheight = user:get_properties().eye_height;
83 84 };
84 85
85 86 sound = "xdecor_enchanting"; --FIXME make own sounds
86 87 sparkle = true;
87 88 }
88 - print('casting')
89 89 local res = sp.cast(ctx)
90 90
91 91 if res == nil or res == true then
92 92 minetest.sound_play(ctx.sound, {
93 93 pos = user:get_pos();
94 94 gain = 1;
95 95 })
................................................................................
99 99 end
100 100 if res == nil then
101 101 if not minetest.check_player_privs(user, 'sorcery:infinirune') then
102 102 sorcery.amulet.setrune(stack)
103 103 end
104 104 end
105 105
106 - return ctx.amulet
106 + return ctx.wield
107 107 end;
108 108 minetest.register_craftitem(amuletname, {
109 109 description = sorcery.lib.str.capitalize(name) .. ' amulet';
110 110 inventory_image = img_sparkle:blit(img_stone):render();
111 111 wield_scale = { x = 0.6, y = 0.6, z = 0.6 };
112 112 groups = { sorcery_amulet = 1 };
113 113 on_use = useamulet;