Differences From
Artifact [2bce1083af]:
33 33 return stack
34 34 end;
35 35 };
36 36 drain = {
37 37 groups = {'sword'};
38 38 cost = 4;
39 39 }; -- health vampirism
40 - glitter = { -- created prolonged light on digging
41 - name = 'Glitter';
40 + glimmer = { -- created prolonged light on digging
41 + name = 'Glimmer';
42 42 groups = digtools;
43 43 affinity = 'cognic';
44 44 cost = 1;
45 45 tone = {255,235,195};
46 46 desc = 'Leave a trail of light hanging in the air as you dig';
47 + recipe = {
48 + {lens = 'convex', gem = 'sapphire', dmg = 2};
49 + {lens = 'concave', gem = 'ruby', dmg = 1};
50 + {lens = 'concave', gem = 'sapphire', dmg = 1};
51 + };
52 + on_dig = function(ctx)
53 + local chance = 10 -- make dependent on power somehow?
54 + if math.random(chance) == 1 then
55 + local lightlevel = math.floor(math.min(minetest.LIGHT_MAX,4*ctx.power))
56 + -- spawn a light block
57 + minetest.set_node(ctx.pos, {
58 + name = 'sorcery:air_glimmer_' .. tostring(lightlevel);
59 + })
60 + local lm = minetest.get_meta(ctx.pos)
61 + lm:set_float('duration',45)
62 + lm:set_float('timeleft',45)
63 + lm:set_int('power',lightlevel)
64 + end
65 + end;
47 66 };
48 67 harvest = { -- kills or digging ore replenish durability
49 68 name = 'Harvest';
50 69 cost = 0; -- energy is only depleted when repair takes place
51 70 tone = {255,84,187};
52 71 affinity = 'syncretic';
53 72 groups = {
................................................................................
59 78 {lens = 'concave', gem = 'sapphire', dmg = 1};
60 79 };
61 80 desc = 'some damage is repaired when used to mine ore or kill an attacker';
62 81 on_dig = function(ctx)
63 82 local orepfx = "stone_with_" -- }:<
64 83 -- local oredrop = ' lump'
65 84 local barename = string.sub(ctx.node.name, string.find(ctx.node.name, ':') + 1)
66 - if minetest.get_item_group(ctx.node.name, 'ore') ~= 0 or
67 - string.sub(barename,1,string.len(orepfx)) == orepfx
68 - then
85 + if sorcery.itemclass.get(ctx.node.name,'ore') then
69 86 ctx.tool:add_wear(-(sorcery.enchant.strength(ctx.tool,'harvest') * 2000))
70 87 ctx.cost = 3
71 88 end
72 89 end;
73 90 };
74 91 conserve = { -- use less magical energy
75 92 name = 'Conserve';
................................................................................
125 142 color = sorcery.lib.color(colors[minetest.get_node(n).name]);
126 143 count = 100 * dstfac;
127 144 }
128 145 end
129 146 end
130 147 end;
131 148 };
132 - glitter = { -- increase odds of finding gem
149 + glitter = {
133 150 name = 'Glitter';
134 151 cost = 10;
135 152 tone = {255,50,60};
136 153 desc = 'dramatically improve your chances of finding gems while mining veins';
137 154 groups = {'pick','pickaxe'};
138 155 affinity = 'entropic';
139 156 recipe = {
................................................................................
183 200 desc = 'cleave through sturdy ores and tear mortal flesh with fearsome ease';
184 201 apply = function(stack,power,base)
185 202 local caps = table.copy(stack:get_definition().tool_capabilities)
186 203 for g,v in pairs(caps.groupcaps) do
187 204 local unit = 2
188 205 caps.groupcaps[g].maxlevel = caps[g].maxlevel + math.floor(unit*power)
189 206 end
207 + if caps.damage_groups and caps.damage_groups.fleshy then
208 + caps.damage_groups.fleshy = caps.damage_groups.fleshy + power * 5;
209 + end
190 210 stack:get_meta():set_tool_capabilities(caps)
191 211 return stack
192 212 end;
193 213 };
194 214 -- multiply = {}; -- add a chance of receiving multiple drops of ore/coal
195 215 -- leech = {}; -- draw power from local leylines
216 + -- shadowcloak = {}; -- make player briefly invisible after blows are struck, reappearing only momentarily after each blow
217 + sanctify = {
218 + desc = 'prolong the blessings of the heavens';
219 + groups = {'sorcery_sanctify'};
220 + affinity = 'entropic';
221 + tone = {255,255,255};
222 + cost = 7;
223 + recipe = {
224 + {lens = 'amplifier', gem = 'ruby', dmg = 13};
225 + {lens = 'amplifier', gem = 'ruby', dmg = 15};
226 + {lens = 'amplifier', gem = 'ruby', dmg = 18};
227 + };
228 + };
196 229 }